सामग्री पर जाएँ
CADCAMFUN
दस्तावेज़

दस्तावेज़

उत्पादन लागत

अनुमान, गणना अनुरोध, सामग्री लागत, संचालन लागत और उपकरण-पहनने के रिकॉर्ड।

स्वचालित अनुवाद अभी उपलब्ध नहीं है; पाठ अंग्रेज़ी में है और इंटरफ़ेस आपकी भाषा में है। अंग्रेज़ी मूल देखें

प्लेग्राउंड

इन अनुरोधों को अपने स्वयं के चल रहे साइडकार को भेजें। मान इस ब्राउज़र में रहते हैं.

जुड़े नहीं हैं
यह कैसे काम करता है

साइडकार स्टार्टअप पर चुने गए लूपबैक पोर्ट पर सुनता है और इसे प्रिंट करता है ready रेखा; उस यूआरएल का उपयोग करें और CADCAMFUN_TOKEN इसकी शुरुआत की गई थी. अनुरोध सीधे इस पृष्ठ से उस पते पर जाते हैं।

साइडकार CORS हेडर को केवल टौरी मूल और तक भेजता है http://localhost या http://127.0.0.1 किसी भी बंदरगाह पर. होस्ट किए गए दस्तावेज़ों से ब्राउज़र प्रतिक्रिया को अवरुद्ध कर देता है, इसलिए दस्तावेज़ों को स्थानीय रूप से चलाएँ (bun run dev में packages/web) खेल के मैदान का उपयोग करने के लिए, या अनुरोध को कर्ल के रूप में कॉपी करें। वास्तविक डेटा को छुए बिना प्रयोग करने के लिए, साइडकार से शुरुआत करें CADCAMFUN_DATA_DIR एक बेकार निर्देशिका की ओर इशारा किया - देखें एपीआई वॉकथ्रू.

संचालन

21 एंडपॉइंट production-costs समूह, साइडकार के स्वयं से उत्पन्न ओपनएपीआई दस्तावेज़. संरक्षित संचालन लेते हैं 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 में कक्षा में खींचें · ज़ूम करने के लिए स्क्रॉल करें · पैन करने के लिए दाईं ओर खींचें
प्रति ऑपरेशन एक ब्लॉक (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
/एपीआई/उत्पादन-लागत/अनुमान प्राप्त करें
[]
एसडीके उदाहरण
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
/एपीआई/उत्पादन-लागत/अनुमान प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/production-costs/estimates" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/production-costs/estimates # production-costs.createEstimate

आवश्यक है Authorization: Bearer <token>.

अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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
पोस्ट/एपीआई/उत्पादन-लागत/अनुमान
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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
प्राप्त करें /एपीआई/उत्पादन-लागत/अनुमान/{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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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
/एपीआई/उत्पादन-लागत/अनुमान/{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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
हटाएं /एपीआई/उत्पादन-लागत/अनुमान/{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>.

अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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
पोस्ट/एपीआई/उत्पादन-लागत/अनुमान/गणना करें
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
/एपीआई/उत्पादन-लागत/सामग्री-लागत प्राप्त करें
[]
एसडीके उदाहरण
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
/एपीआई/उत्पादन-लागत/सामग्री-लागत प्राप्त करें
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>.

अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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
पोस्ट/एपीआई/उत्पादन-लागत/सामग्री-लागत
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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
प्राप्त करें /एपीआई/उत्पादन-लागत/सामग्री-लागत/{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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
हटाएँ /एपीआई/उत्पादन-लागत/सामग्री-लागत/{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
/एपीआई/उत्पादन-लागत/संचालन-लागत प्राप्त करें
[]
एसडीके उदाहरण
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
/एपीआई/उत्पादन-लागत/संचालन-लागत प्राप्त करें
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>.

अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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
पोस्ट/एपीआई/उत्पादन-लागत/संचालन-लागत
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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
प्राप्त करें /एपीआई/उत्पादन-लागत/संचालन-लागत/{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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
हटाएँ /एपीआई/उत्पादन-लागत/संचालन-लागत/{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
/एपीआई/उत्पादन-लागत/उपकरण-पहनावा प्राप्त करें
[]
एसडीके उदाहरण
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
/एपीआई/उत्पादन-लागत/उपकरण-पहनावा प्राप्त करें
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>.

अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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
पोस्ट/एपीआई/उत्पादन-लागत/उपकरण-पहनना
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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
प्राप्त करें /एपीआई/उत्पादन-लागत/उपकरण-पहनना/{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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  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
एसडीके उदाहरण
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/उत्पादन-लागत/उपकरण-पहनना/{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>.

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
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
एसडीके उदाहरण
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
हटाएं /एपीआई/उत्पादन-लागत/उपकरण-पहनना/{id}
curl --request DELETE "${CADCAMFUN_URL}/api/production-costs/tool-wear/<id>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं

स्कीमा

नामित स्कीमा इस समूह के मापदंडों, निकायों और प्रतिक्रियाओं से पहुंच योग्य हैं। ए ? एक वैकल्पिक फ़ील्ड चिह्नित करता है; | 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
}

इस समूह को कॉल किया जा रहा है

ऑपरेशन आईडी का फॉर्म है production-costs.<name>. जनरेट किया गया प्रॉमिस SDK (@cadcamfun/api/sdk) उनमें से अधिकांश को इस रूप में उजागर करता है client.<namespace>.<method>(input), कहाँ input पथ पैरामीटर और बॉडी फ़ील्ड की एक सपाट वस्तु है; प्रत्येक कार्ड का एसडीके उदाहरण सटीक एक्सेसर और इनपुट प्रकार दिखाता है। मल्टीपार्ट अपलोड, बाइनरी या जावास्क्रिप्ट प्रतिक्रियाएँ और कच्चे वेबहुक उत्पन्न नहीं होते हैं; वे कार्ड दिखाते हैं fetch इसके बजाय.

प्रॉमिस एसडीके से त्रुटियाँ
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विरोधाभासी स्थिति, जैसे डुप्लिकेट नाम या पुराना शाखा प्रमुखसंसाधन को दोबारा पढ़ें और वर्तमान डेटा के साथ पुनः प्रयास करें।
कोशिश करें यह कहता है "सीओआरएस द्वारा अवरुद्ध"दस्तावेज़ गैर-लूपबैक मूल से परोसे जाते हैंदस्तावेज़ों को स्थानीय रूप से चलाएँ या अनुरोध को कर्ल के रूप में कॉपी करें।
कनेक्शन नहीं हो सकासाइडकार एक नए बंदरगाह पर फिर से शुरू हुईनए से पोर्ट पढ़ें ready पंक्ति.