コンテンツへスキップ
CADCAMFUN
ドキュメント

ドキュメント

製造コスト

見積り、計算依頼、材料費、作業費、工具の摩耗記録。

英語から自動翻訳されています。 英語の原文を見る

プレイグラウンド

これらのリクエストを独自の実行中のサイドカーに送信します。値はこのブラウザ内に残ります。

接続されていません
仕組み

サイドカーは起動時に選択されたループバック ポートをリッスンし、それをそのポートに出力します。 ready ライン;その URL を使用し、 CADCAMFUN_TOKEN で始まりました。リクエストはこのページからそのアドレスに直接送信されます。

サイドカーは CORS ヘッダーを Tauri オリジンと http://localhost または http://127.0.0.1 どのポートでも。ホストされているドキュメントからはブラウザーが応答をブロックするため、ドキュメントをローカルで実行します (bun run dev で packages/web) プレイグラウンドを使用するか、リクエストをcurlとしてコピーします。実際のデータに触れることなく実験するには、次のようにしてサイドカーを開始します。 CADCAMFUN_DATA_DIR 使い捨てディレクトリを指す - を参照 aPI のチュートリアル.

運営

21 エンドポイント( production-costs サイドカー自体から生成されたグループ OpenAPIドキュメント。保護された操作には時間がかかります Authorization: Bearer $CADCAMFUN_TOKEN;見る 認証。行動と制限は次のとおりです サブシステムガイド.

得る /api/production-costs/estimates production-costs.listEstimates
役職 /api/production-costs/estimates production-costs.createEstimate
得る /api/production-costs/estimates/{id} production-costs.getEstimate
置く /api/production-costs/estimates/{id} production-costs.updateEstimate
消去 /api/production-costs/estimates/{id} production-costs.deleteEstimate
役職 /api/production-costs/estimates/calculate production-costs.calculateEstimate
得る /api/production-costs/material-costs production-costs.listMaterialCosts
役職 /api/production-costs/material-costs production-costs.createMaterialCost
得る /api/production-costs/material-costs/{id} production-costs.getMaterialCost
置く /api/production-costs/material-costs/{id} production-costs.updateMaterialCost
消去 /api/production-costs/material-costs/{id} production-costs.deleteMaterialCost
得る /api/production-costs/operation-costs production-costs.listOperationCosts
役職 /api/production-costs/operation-costs production-costs.createOperationCost
得る /api/production-costs/operation-costs/{id} production-costs.getOperationCost
置く /api/production-costs/operation-costs/{id} production-costs.updateOperationCost
消去 /api/production-costs/operation-costs/{id} production-costs.deleteOperationCost
得る /api/production-costs/tool-wear production-costs.listToolWear
役職 /api/production-costs/tool-wear production-costs.createToolWear
得る /api/production-costs/tool-wear/{id} production-costs.getToolWear
置く /api/production-costs/tool-wear/{id} production-costs.updateToolWear
消去 /api/production-costs/tool-wear/{id} production-costs.deleteToolWear
3D での生産コストのオペレーション ドラッグして周回します · スクロールしてズーム · 右ドラッグしてパンします
オペレーションごとに 1 つのブロック (21)、このページのリソース セクションごとにスタックされ、メソッドごとに色分けされます: 緑色の GET、オレンジ色の POST、青色の PUT、紫色の PATCH、赤色の DELETE。ビルド時に OpenAPI ドキュメントから生成されます。

/api/production-costs/estimates

得る /api/production-costs/estimates # production-costs.listEstimates

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
toolpathId クエリ 弦 | null オプション
projectId クエリ 弦 | null オプション
organizationId クエリ 「ヌル」 | 弦 | null オプション
応答
200 配列<オブジェクト> application/json
Array<{
  id: string
  createdAt: string
  updatedAt: string
  materialCost: number | "Infinity" | "-Infinity" | "NaN"
  toolWearCost: number | "Infinity" | "-Infinity" | "NaN"
  machineTime: number | "Infinity" | "-Infinity" | "NaN"
  machineTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  operatorTime: number | "Infinity" | "-Infinity" | "NaN"
  operatorTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  setupCost: number | "Infinity" | "-Infinity" | "NaN"
  totalCost: number | "Infinity" | "-Infinity" | "NaN"
  currencyCode: string
  ownerId: string | null
  organizationId: string | null
  toolpathId: string
  details: unknown
  operationCostId: string | null
  costSettingsId?: string | null
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
  toolpath: {
    id: string
    name: string
    projectId?: string | null
  }
  operationCost: {
    id: string
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
    currencyCode: string
    name: string
    machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
    operatorHourlyRate: number | "NaN"
    setupTime: number | "NaN"
  } | null
}>
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
応答例 捕獲 · 200
GET /api/production-costs/estimates
[]
SDKの例
production-costs.listEstimates
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsListEstimatesInput
const result = await client["production-costs"].listEstimates({})
curl
GET /api/production-costs/estimates
curl --request GET "${CADCAMFUN_URL}/api/production-costs/estimates" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/production-costs/estimates # production-costs.createEstimate

必要 Authorization: Bearer <token>.

リクエスト本文 · 必須 · application/json
{
  toolpathId: string
  totalCost: number | "Infinity" | "-Infinity" | "NaN"
  materialCost?: number | "Infinity" | "-Infinity" | "NaN" | null
  toolWearCost?: number | "Infinity" | "-Infinity" | "NaN" | null
  machineTime?: number | "Infinity" | "-Infinity" | "NaN" | null
  machineTimeCost?: number | "Infinity" | "-Infinity" | "NaN" | null
  operatorTime?: number | "Infinity" | "-Infinity" | "NaN" | null
  operatorTimeCost?: number | "Infinity" | "-Infinity" | "NaN" | null
  setupCost?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
  details?: unknown | null
  operationCostId?: string | null
  costSettingsId?: string | null
  organizationId?: string | null
}
応答
201 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  materialCost: number | "Infinity" | "-Infinity" | "NaN"
  toolWearCost: number | "Infinity" | "-Infinity" | "NaN"
  machineTime: number | "Infinity" | "-Infinity" | "NaN"
  machineTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  operatorTime: number | "Infinity" | "-Infinity" | "NaN"
  operatorTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  setupCost: number | "Infinity" | "-Infinity" | "NaN"
  totalCost: number | "Infinity" | "-Infinity" | "NaN"
  currencyCode: string
  ownerId: string | null
  organizationId: string | null
  toolpathId: string
  details: unknown
  operationCostId: string | null
  costSettingsId?: string | null
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
  toolpath: {
    id: string
    name: string
    projectId?: string | null
  }
  operationCost: {
    id: string
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
    currencyCode: string
    name: string
    machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
    operatorHourlyRate: number | "NaN"
    setupTime: number | "NaN"
  } | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.createEstimate
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsCreateEstimateInput
const result = await client["production-costs"].createEstimate({
  toolpathId: "",
  totalCost: 0,
  materialCost: 0,
  toolWearCost: 0,
  machineTime: 0,
  machineTimeCost: 0,
  operatorTime: 0,
  operatorTimeCost: 0,
  setupCost: 0,
  currencyCode: "",
  details: null,
  operationCostId: "",
  costSettingsId: "",
  organizationId: ""
})
curl
POST /api/生産コスト/見積もり
curl --request POST "${CADCAMFUN_URL}/api/production-costs/estimates" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
得る /api/production-costs/estimates/{id} # production-costs.getEstimate

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  materialCost: number | "Infinity" | "-Infinity" | "NaN"
  toolWearCost: number | "Infinity" | "-Infinity" | "NaN"
  machineTime: number | "Infinity" | "-Infinity" | "NaN"
  machineTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  operatorTime: number | "Infinity" | "-Infinity" | "NaN"
  operatorTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  setupCost: number | "Infinity" | "-Infinity" | "NaN"
  totalCost: number | "Infinity" | "-Infinity" | "NaN"
  currencyCode: string
  ownerId: string | null
  organizationId: string | null
  toolpathId: string
  details: unknown
  operationCostId: string | null
  costSettingsId?: string | null
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
  toolpath: {
    id: string
    name: string
    projectId?: string | null
  }
  operationCost: {
    id: string
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
    currencyCode: string
    name: string
    machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
    operatorHourlyRate: number | "NaN"
    setupTime: number | "NaN"
  } | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.getEstimate
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsGetEstimateInput
const result = await client["production-costs"].getEstimate({
  id: "<id>"
})
curl
GET /api/production-costs/estimates/{id}
curl --request GET "${CADCAMFUN_URL}/api/production-costs/estimates/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
置く /api/production-costs/estimates/{id} # production-costs.updateEstimate

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  currencyCode?: string | null
  details?: unknown | null
  notes?: string | null
}
応答
200 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  materialCost: number | "Infinity" | "-Infinity" | "NaN"
  toolWearCost: number | "Infinity" | "-Infinity" | "NaN"
  machineTime: number | "Infinity" | "-Infinity" | "NaN"
  machineTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  operatorTime: number | "Infinity" | "-Infinity" | "NaN"
  operatorTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  setupCost: number | "Infinity" | "-Infinity" | "NaN"
  totalCost: number | "Infinity" | "-Infinity" | "NaN"
  currencyCode: string
  ownerId: string | null
  organizationId: string | null
  toolpathId: string
  details: unknown
  operationCostId: string | null
  costSettingsId?: string | null
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
  toolpath: {
    id: string
    name: string
    projectId?: string | null
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.updateEstimate
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsUpdateEstimateInput
const result = await client["production-costs"].updateEstimate({
  id: "<id>",
  currencyCode: "",
  details: null,
  notes: ""
})
curl
PUT /api/production-costs/estimates/{id}
curl --request PUT "${CADCAMFUN_URL}/api/production-costs/estimates/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
消去 /api/production-costs/estimates/{id} # production-costs.deleteEstimate

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 application/json
{
  message: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.deleteEstimate
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsDeleteEstimateInput
const result = await client["production-costs"].deleteEstimate({
  id: "<id>"
})
curl
DELETE /api/production-costs/estimates/{id}
curl --request DELETE "${CADCAMFUN_URL}/api/production-costs/estimates/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/production-costs/estimates/calculate # production-costs.calculateEstimate

必要 Authorization: Bearer <token>.

リクエスト本文 · 必須 · application/json
{
  toolpathId: string
  costSettingsId?: string | null
  organizationId?: string | null
}
応答
200 物体 application/json
{
  materialCost: number | "Infinity" | "-Infinity" | "NaN"
  toolWearCost: number | "Infinity" | "-Infinity" | "NaN"
  machineTime: number | "Infinity" | "-Infinity" | "NaN"
  machineTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  operatorTime: number | "Infinity" | "-Infinity" | "NaN"
  operatorTimeCost: number | "Infinity" | "-Infinity" | "NaN"
  setupCost: number | "Infinity" | "-Infinity" | "NaN"
  totalCost: number | "Infinity" | "-Infinity" | "NaN"
  currencyCode: string
  ownerId: string | null
  organizationId: string | null
  toolpathId: string
  details: {
    sourceSettingsId?: string | null
    inputs: {
      toolpathId: string
      toolId: string | null
      materialId: string | null
    }
    calculatedValues: {
      totalPathLengthMm: number | "Infinity" | "-Infinity" | "NaN"
      materialVolumeM3: number | "Infinity" | "-Infinity" | "NaN"
      feedRateMmMin: number | "Infinity" | "-Infinity" | "NaN"
      machineTimeMinutes: number | "Infinity" | "-Infinity" | "NaN"
      operatorTimeMinutes: number | "Infinity" | "-Infinity" | "NaN"
      totalSetupTimeMinutes: number | "Infinity" | "-Infinity" | "NaN"
    }
    costBreakdown: {
      material: number | "Infinity" | "-Infinity" | "NaN"
      toolWear: number | "Infinity" | "-Infinity" | "NaN"
      machineRun: number | "Infinity" | "-Infinity" | "NaN"
      operator: number | "Infinity" | "-Infinity" | "NaN"
      setup: number | "Infinity" | "-Infinity" | "NaN"
    }
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.calculateEstimate
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsCalculateEstimateInput
const result = await client["production-costs"].calculateEstimate({
  toolpathId: "",
  costSettingsId: "",
  organizationId: ""
})
curl
POST /api/生産コスト/見積もり/計算
curl --request POST "${CADCAMFUN_URL}/api/production-costs/estimates/calculate" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください

/api/production-costs/material-costs

得る /api/production-costs/material-costs # production-costs.listMaterialCosts

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
materialId クエリ 弦 | null オプション
organizationId クエリ 「ヌル」 | 弦 | null オプション
応答
200 配列<オブジェクト> application/json
Array<{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  materialId: string
  costPerUnit: number | "Infinity" | "-Infinity" | "NaN"
  wasteFactor: number | "Infinity" | "-Infinity" | "NaN"
  minimumCharge: number | "Infinity" | "-Infinity" | "NaN"
  material: {
    id: string
    name: string
    description: string | null
    properties: unknown
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
}>
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
応答例 捕獲 · 200
GET /api/製造原価/材料費
[]
SDKの例
production-costs.listMaterialCosts
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsListMaterialCostsInput
const result = await client["production-costs"].listMaterialCosts({})
curl
GET /api/製造原価/材料費
curl --request GET "${CADCAMFUN_URL}/api/production-costs/material-costs" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/production-costs/material-costs # production-costs.createMaterialCost

必要 Authorization: Bearer <token>.

リクエスト本文 · 必須 · application/json
{
  costPerUnit: number | "Infinity" | "-Infinity" | "NaN"
  wasteFactor?: number | "Infinity" | "-Infinity" | "NaN" | null
  minimumCharge?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
  materialId: string
  organizationId?: string | null
}
応答
201 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  materialId: string
  costPerUnit: number | "Infinity" | "-Infinity" | "NaN"
  wasteFactor: number | "Infinity" | "-Infinity" | "NaN"
  minimumCharge: number | "Infinity" | "-Infinity" | "NaN"
  material: {
    id: string
    name: string
    description: string | null
    properties: unknown
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.createMaterialCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsCreateMaterialCostInput
const result = await client["production-costs"].createMaterialCost({
  costPerUnit: 0,
  wasteFactor: 0,
  minimumCharge: 0,
  currencyCode: "",
  materialId: "",
  organizationId: ""
})
curl
POST /api/生産費/材料費
curl --request POST "${CADCAMFUN_URL}/api/production-costs/material-costs" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
得る /api/production-costs/material-costs/{id} # production-costs.getMaterialCost

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 オブジェクト |ヌル application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  materialId: string
  costPerUnit: number | "Infinity" | "-Infinity" | "NaN"
  wasteFactor: number | "NaN"
  minimumCharge: number | "NaN"
  material: {
    id: string
    name: string
    description: string | null
    properties: unknown
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
} | null
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.getMaterialCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsGetMaterialCostInput
const result = await client["production-costs"].getMaterialCost({
  id: "<id>"
})
curl
GET /api/制作費/材料費/{id}
curl --request GET "${CADCAMFUN_URL}/api/production-costs/material-costs/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
置く /api/production-costs/material-costs/{id} # production-costs.updateMaterialCost

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  costPerUnit?: number | "Infinity" | "-Infinity" | "NaN" | null
  wasteFactor?: number | "Infinity" | "-Infinity" | "NaN" | null
  minimumCharge?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
}
応答
200 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  materialId: string
  costPerUnit: number | "Infinity" | "-Infinity" | "NaN"
  wasteFactor: number | "Infinity" | "-Infinity" | "NaN"
  minimumCharge: number | "Infinity" | "-Infinity" | "NaN"
  material: {
    id: string
    name: string
    description: string | null
    properties: unknown
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.updateMaterialCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsUpdateMaterialCostInput
const result = await client["production-costs"].updateMaterialCost({
  id: "<id>",
  costPerUnit: 0,
  wasteFactor: 0,
  minimumCharge: 0,
  currencyCode: ""
})
curl
PUT /api/制作費/材料費/{id}
curl --request PUT "${CADCAMFUN_URL}/api/production-costs/material-costs/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
消去 /api/production-costs/material-costs/{id} # production-costs.deleteMaterialCost

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 application/json
{
  message: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.deleteMaterialCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsDeleteMaterialCostInput
const result = await client["production-costs"].deleteMaterialCost({
  id: "<id>"
})
curl
DELETE /api/生産費/材料費/{id}
curl --request DELETE "${CADCAMFUN_URL}/api/production-costs/material-costs/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください

/api/production-costs/operation-costs

得る /api/production-costs/operation-costs # production-costs.listOperationCosts

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
organizationId クエリ 「ヌル」 | 弦 | null オプション
応答
200 配列<オブジェクト> application/json
Array<{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  name: string
  machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  operatorHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  setupTime: number | "Infinity" | "-Infinity" | "NaN"
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
}>
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
応答例 捕獲 · 200
GET /api/制作コスト/運用コスト
[]
SDKの例
production-costs.listOperationCosts
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsListOperationCostsInput
const result = await client["production-costs"].listOperationCosts({})
curl
GET /api/制作コスト/運用コスト
curl --request GET "${CADCAMFUN_URL}/api/production-costs/operation-costs" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/production-costs/operation-costs # production-costs.createOperationCost

必要 Authorization: Bearer <token>.

リクエスト本文 · 必須 · application/json
{
  name: string
  machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  operatorHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  setupTime?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
  organizationId?: string | null
}
応答
201 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  name: string
  machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  operatorHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  setupTime: number | "Infinity" | "-Infinity" | "NaN"
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.createOperationCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsCreateOperationCostInput
const result = await client["production-costs"].createOperationCost({
  name: "",
  machineHourlyRate: 0,
  operatorHourlyRate: 0,
  setupTime: 0,
  currencyCode: "",
  organizationId: ""
})
curl
POST /api/制作コスト/運用コスト
curl --request POST "${CADCAMFUN_URL}/api/production-costs/operation-costs" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
得る /api/production-costs/operation-costs/{id} # production-costs.getOperationCost

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 オブジェクト |ヌル application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  name: string
  machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  operatorHourlyRate: number | "NaN"
  setupTime: number | "NaN"
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
} | null
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.getOperationCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsGetOperationCostInput
const result = await client["production-costs"].getOperationCost({
  id: "<id>"
})
curl
GET /api/production-costs/operation-costs/{id}
curl --request GET "${CADCAMFUN_URL}/api/production-costs/operation-costs/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
置く /api/production-costs/operation-costs/{id} # production-costs.updateOperationCost

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  name?: string | null
  machineHourlyRate?: number | "Infinity" | "-Infinity" | "NaN" | null
  operatorHourlyRate?: number | "Infinity" | "-Infinity" | "NaN" | null
  setupTime?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
}
応答
200 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  name: string
  machineHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  operatorHourlyRate: number | "Infinity" | "-Infinity" | "NaN"
  setupTime: number | "Infinity" | "-Infinity" | "NaN"
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.updateOperationCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsUpdateOperationCostInput
const result = await client["production-costs"].updateOperationCost({
  id: "<id>",
  name: "",
  machineHourlyRate: 0,
  operatorHourlyRate: 0,
  setupTime: 0,
  currencyCode: ""
})
curl
PUT /api/本番コスト/運用コスト/{id}
curl --request PUT "${CADCAMFUN_URL}/api/production-costs/operation-costs/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
消去 /api/production-costs/operation-costs/{id} # production-costs.deleteOperationCost

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 application/json
{
  message: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.deleteOperationCost
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsDeleteOperationCostInput
const result = await client["production-costs"].deleteOperationCost({
  id: "<id>"
})
curl
DELETE /api/production-costs/operation-costs/{id}
curl --request DELETE "${CADCAMFUN_URL}/api/production-costs/operation-costs/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください

/api/production-costs/tool-wear

得る /api/production-costs/tool-wear # production-costs.listToolWear

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
toolId クエリ 弦 | null オプション
organizationId クエリ 「ヌル」 | 弦 | null オプション
応答
200 配列<オブジェクト> application/json
Array<{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  toolId: string
  wearRatePerMeter: number | "Infinity" | "-Infinity" | "NaN"
  replacementCost: number | "Infinity" | "-Infinity" | "NaN"
  replacementThreshold: number | "Infinity" | "-Infinity" | "NaN"
  tool: {
    id: string
    name: string
    type: string
    diameter: number | "Infinity" | "-Infinity" | "NaN"
    material: string
    numberOfFlutes: number | "Infinity" | "-Infinity" | "NaN" | null
    maxRPM: number | "Infinity" | "-Infinity" | "NaN" | null
    coolantType: string | null
    cuttingLength: number | "Infinity" | "-Infinity" | "NaN" | null
    totalLength: number | "Infinity" | "-Infinity" | "NaN" | null
    shankDiameter: number | "Infinity" | "-Infinity" | "NaN" | null
    cornerRadius?: number | "Infinity" | "-Infinity" | "NaN" | null
    tipAngle?: number | "Infinity" | "-Infinity" | "NaN" | null
    threadPitch?: number | "Infinity" | "-Infinity" | "NaN" | null
    holderDiameter?: number | "Infinity" | "-Infinity" | "NaN" | null
    holderLength?: number | "Infinity" | "-Infinity" | "NaN" | null
    stickout?: number | "Infinity" | "-Infinity" | "NaN" | null
    notes: string | null
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
  } | null
}>
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
応答例 捕獲 · 200
GET /api/production-costs/tool-wear
[]
SDKの例
production-costs.listToolWear
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsListToolWearInput
const result = await client["production-costs"].listToolWear({})
curl
GET /api/production-costs/tool-wear
curl --request GET "${CADCAMFUN_URL}/api/production-costs/tool-wear" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/production-costs/tool-wear # production-costs.createToolWear

必要 Authorization: Bearer <token>.

リクエスト本文 · 必須 · application/json
{
  wearRatePerMeter: number | "Infinity" | "-Infinity" | "NaN"
  replacementCost: number | "Infinity" | "-Infinity" | "NaN"
  replacementThreshold?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
  toolId: string
  organizationId?: string | null
}
応答
201 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  toolId: string
  wearRatePerMeter: number | "Infinity" | "-Infinity" | "NaN"
  replacementCost: number | "Infinity" | "-Infinity" | "NaN"
  replacementThreshold: number | "Infinity" | "-Infinity" | "NaN"
  tool: {
    id: string
    name: string
    type: string
    diameter: number | "Infinity" | "-Infinity" | "NaN"
    material: string
    numberOfFlutes: number | "Infinity" | "-Infinity" | "NaN" | null
    maxRPM: number | "Infinity" | "-Infinity" | "NaN" | null
    coolantType: string | null
    cuttingLength: number | "Infinity" | "-Infinity" | "NaN" | null
    totalLength: number | "Infinity" | "-Infinity" | "NaN" | null
    shankDiameter: number | "Infinity" | "-Infinity" | "NaN" | null
    cornerRadius?: number | "Infinity" | "-Infinity" | "NaN" | null
    tipAngle?: number | "Infinity" | "-Infinity" | "NaN" | null
    threadPitch?: number | "Infinity" | "-Infinity" | "NaN" | null
    holderDiameter?: number | "Infinity" | "-Infinity" | "NaN" | null
    holderLength?: number | "Infinity" | "-Infinity" | "NaN" | null
    stickout?: number | "Infinity" | "-Infinity" | "NaN" | null
    notes: string | null
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.createToolWear
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsCreateToolWearInput
const result = await client["production-costs"].createToolWear({
  wearRatePerMeter: 0,
  replacementCost: 0,
  replacementThreshold: 0,
  currencyCode: "",
  toolId: "",
  organizationId: ""
})
curl
POST /api/生産コスト/ツールウェア
curl --request POST "${CADCAMFUN_URL}/api/production-costs/tool-wear" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
得る /api/production-costs/tool-wear/{id} # production-costs.getToolWear

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 オブジェクト |ヌル application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  toolId: string
  wearRatePerMeter: number | "Infinity" | "-Infinity" | "NaN"
  replacementCost: number | "NaN"
  replacementThreshold: number | "NaN"
  tool: {
    id: string
    name: string
    type: string
    diameter: number | "NaN"
    material: string
    numberOfFlutes: number | "NaN" | null
    maxRPM: number | null
    coolantType: string | null
    cuttingLength: number | null
    totalLength: number | null
    shankDiameter: number | null
    cornerRadius?: number | null
    tipAngle?: number | null
    threadPitch?: number | null
    holderDiameter?: number | null
    holderLength?: number | null
    stickout?: number | null
    notes: string | null
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
  owner: {
    id: string
    name: string | null
    email?: string | null
  } | null
  organization: {
    id: string
    name: string | null
} | null
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.getToolWear
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsGetToolWearInput
const result = await client["production-costs"].getToolWear({
  id: "<id>"
})
curl
GET /api/production-costs/tool-wear/{id}
curl --request GET "${CADCAMFUN_URL}/api/production-costs/tool-wear/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
置く /api/production-costs/tool-wear/{id} # production-costs.updateToolWear

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  wearRatePerMeter?: number | "Infinity" | "-Infinity" | "NaN" | null
  replacementCost?: number | "Infinity" | "-Infinity" | "NaN" | null
  replacementThreshold?: number | "Infinity" | "-Infinity" | "NaN" | null
  currencyCode?: string | null
}
応答
200 物体 application/json
{
  id: string
  createdAt: string
  updatedAt: string
  ownerId: string | null
  organizationId: string | null
  currencyCode: string
  toolId: string
  wearRatePerMeter: number | "Infinity" | "-Infinity" | "NaN"
  replacementCost: number | "Infinity" | "-Infinity" | "NaN"
  replacementThreshold: number | "Infinity" | "-Infinity" | "NaN"
  tool: {
    id: string
    name: string
    type: string
    diameter: number | "Infinity" | "-Infinity" | "NaN"
    material: string
    numberOfFlutes: number | "Infinity" | "-Infinity" | "NaN" | null
    maxRPM: number | "Infinity" | "-Infinity" | "NaN" | null
    coolantType: string | null
    cuttingLength: number | "Infinity" | "-Infinity" | "NaN" | null
    totalLength: number | "Infinity" | "-Infinity" | "NaN" | null
    shankDiameter: number | "Infinity" | "-Infinity" | "NaN" | null
    cornerRadius?: number | "Infinity" | "-Infinity" | "NaN" | null
    tipAngle?: number | "Infinity" | "-Infinity" | "NaN" | null
    threadPitch?: number | "Infinity" | "-Infinity" | "NaN" | null
    holderDiameter?: number | "Infinity" | "-Infinity" | "NaN" | null
    holderLength?: number | "Infinity" | "-Infinity" | "NaN" | null
    stickout?: number | "Infinity" | "-Infinity" | "NaN" | null
    notes: string | null
    isPublic: boolean
    createdAt: string
    updatedAt: string
    ownerId: string | null
    organizationId: string | null
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.updateToolWear
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsUpdateToolWearInput
const result = await client["production-costs"].updateToolWear({
  id: "<id>",
  wearRatePerMeter: 0,
  replacementCost: 0,
  replacementThreshold: 0,
  currencyCode: ""
})
curl
PUT /api/production-costs/tool-wear/{id}
curl --request PUT "${CADCAMFUN_URL}/api/production-costs/tool-wear/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
試してみてください
消去 /api/production-costs/tool-wear/{id} # production-costs.deleteToolWear

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 application/json
{
  message: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDKの例
production-costs.deleteToolWear
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// ProductionCostsDeleteToolWearInput
const result = await client["production-costs"].deleteToolWear({
  id: "<id>"
})
curl
/api/production-costs/tool-wear/{id} を削除します
curl --request DELETE "${CADCAMFUN_URL}/api/production-costs/tool-wear/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください

スキーマ

このグループのパラメータ、本体、および応答から到達可能な名前付きスキーマ。あ ? オプションのフィールドをマークします。 | null null 値が存在する可能性があるフィールドにマークを付けます。

BadRequestEncoded
{
  _tag: "BadRequest"
  message: string
}
ConflictEncoded
{
  _tag: "Conflict"
  message: string
}
ForbiddenEncoded
{
  _tag: "Forbidden"
  message: string
}
InternalErrorEncoded
{
  _tag: "InternalError"
  message: string
}
NotFoundEncoded
{
  _tag: "NotFound"
  message: string
}
UnauthorizedEncoded
{
  _tag: "Unauthorized"
  message: string
}

このグループに電話をかける

オペレーション ID の形式は次のとおりです。 production-costs.<name>。生成された Promise SDK (@cadcamfun/api/sdk) それらのほとんどを次のように公開します client.<namespace>.<method>(input)、 どこ input パスパラメータとボディフィールドの 1 つのフラットオブジェクトです。各カードの SDK の例は、正確なアクセサーと入力タイプを示しています。マルチパート アップロード、バイナリまたは JavaScript 応答、生の Webhook は生成されません。それらのカードが示しているのは fetch 代わりに。

Promise SDK からのエラー
import { CadCam, ClientError } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

try {
  await client.projects.list()
} catch (error) {
  if (error instanceof ClientError) {
    // Transport | UnexpectedStatus | UnsupportedContentType | MalformedResponse | SseEventTooLarge
  } else {
    // a declared error body: switch on error._tag
  }
}

トラブルシューティング

症状考えられる原因修理
呼び出しごとの 401以前の起動からのトークン、または欠落しています Bearer 接頭辞送信 Authorization: Bearer <token> サイドカーが開始されたトークンを使用します。
何も起きる前の 400本体またはパラメータがスキーマと一致しませんペイロードとカード上のリクエスト スキーマを比較します。
別の場所で見えるレコードの 403 または 404代理アカウントは異なります権利を送信します x-session-token、またはレコードを所有するローカル プロファイルを使用します。
409重複した名前や古いブランチヘッドなどの矛盾した状態リソースを再読み込みし、現在のデータで再試行します。
「CORS によってブロックされました」と表示されてみてくださいドキュメントは非ループバックオリジンから提供されますドキュメントをローカルで実行するか、リクエストをcurlとしてコピーします。
接続拒否サイドカーが新しいポートで再起動されました新しいポートからポートを読み取ります ready 行。