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

दस्तावेज़

इतिहास और कार्यप्रवाह

प्रोजेक्ट गिट-संगत कमिट, शाखाएं, पुनर्स्थापना, समीक्षा, गिटहब मिररिंग और वर्कफ़्लो प्रेषण।

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

प्लेग्राउंड

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

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

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

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

संचालन

22 एंडपॉइंट vcs समूह, साइडकार के स्वयं से उत्पन्न ओपनएपीआई दस्तावेज़. संरक्षित संचालन लेते हैं Authorization: Bearer $CADCAMFUN_TOKEN; देखना प्रमाणीकरण. व्यवहार और मर्यादा में हैं सबसिस्टम गाइड.

पाना /api/projects/{id}/vcs/status vcs.status
पाना /api/projects/{id}/vcs/log vcs.log
डाक /api/projects/{id}/vcs/commit vcs.commit
पाना /api/projects/{id}/vcs/branches vcs.branches
डाक /api/projects/{id}/vcs/branches vcs.createBranch
डाक /api/projects/{id}/vcs/checkout vcs.checkout
डाक /api/projects/{id}/vcs/restore vcs.restore
पाना /api/projects/{id}/vcs/diff vcs.diff
पाना /api/projects/{id}/pulls vcs.listPullRequests
डाक /api/projects/{id}/pulls vcs.openPullRequest
पाना /api/projects/{id}/pulls/{number} vcs.pullRequest
डाक /api/projects/{id}/pulls/{number}/reviews vcs.review
डाक /api/projects/{id}/pulls/{number}/merge vcs.mergePullRequest
डाक /api/projects/{id}/pulls/{number}/close vcs.closePullRequest
पाना /api/projects/{id}/vcs/remote vcs.remote
रखना /api/projects/{id}/vcs/remote vcs.setRemote
डाक /api/projects/{id}/vcs/push vcs.push
डाक /api/projects/{id}/vcs/pull vcs.pull
पाना /api/projects/{id}/actions/runs vcs.runs
डाक /api/projects/{id}/actions/dispatch vcs.dispatch
पाना /api/projects/{id}/actions/workflows vcs.listWorkflows
पाना /api/projects/{id}/actions/workflows/{name} vcs.workflow
3डी में इतिहास और कार्यप्रवाह संचालन कक्षा में खींचें · ज़ूम करने के लिए स्क्रॉल करें · पैन करने के लिए दाईं ओर खींचें
प्रति ऑपरेशन एक ब्लॉक (22), इस पृष्ठ के प्रति संसाधन अनुभाग को स्टैक्ड किया गया है और विधि के अनुसार रंगा गया है: हरा GET, नारंगी POST, नीला PUT, बैंगनी PATCH, लाल DELETE। निर्माण के समय OpenAPI दस्तावेज़ से उत्पन्न।

/api/projects

पाना /api/projects/{id}/vcs/status # vcs.status

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
200 वस्तु application/json
{
  branch: string
  head: string | null
  dirty: string[]
}
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
एसडीके उदाहरण
vcs.status
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsStatusInput
const result = await client.vcs.status({
  id: "<id>"
})
curl
/api/projects/{id}/vcs/status प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/status" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
पाना /api/projects/{id}/vcs/log # vcs.log

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
फिरना सवाल डोरी | null वैकल्पिक
आप LIMIT सवाल डोरी | null वैकल्पिक
पथ सवाल डोरी | null वैकल्पिक
जवाब
200 सारणी<ऑब्जेक्ट> application/json
Array<{
  oid: string
  parents: string[]
  message: string
  author: {
    name: string
    email: string
    time: number | "Infinity" | "-Infinity" | "NaN"
  }
}>
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
एसडीके उदाहरण
vcs.log
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsLogInput
const result = await client.vcs.log({
  id: "<id>"
})
curl
/api/projects/{id}/vcs/log प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/log" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/projects/{id}/vcs/commit # vcs.commit

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  message: string
  authorKind?: "user" | "ai" | null
  files?: {
    [key: string]: string
  } | null
}
जवाब
201 वस्तु application/json
{
  oid: string
  parents: string[]
  message: string
  author: {
    name: string
    email: string
    time: number | "Infinity" | "-Infinity" | "NaN"
  }
}
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
एसडीके उदाहरण
vcs.commit
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsCommitInput
const result = await client.vcs.commit({
  id: "<id>",
  message: "",
  authorKind: "user",
  files: {}
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/vcs/commit
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/commit" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
पाना /api/projects/{id}/vcs/branches # vcs.branches

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
200 वस्तु application/json
{
  current: string
  branches: {
    [key: string]: string
  }
}
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
एसडीके उदाहरण
vcs.branches
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsBranchesInput
const result = await client.vcs.branches({
  id: "<id>"
})
curl
/api/projects/{id}/vcs/शाखाएँ प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/branches" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/projects/{id}/vcs/branches # vcs.createBranch

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  name: string
  from?: string | null
}
जवाब
201 वस्तु application/json
{
  current: string
  branches: {
    [key: string]: string
  }
}
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
एसडीके उदाहरण
vcs.createBranch
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsCreateBranchInput
const result = await client.vcs.createBranch({
  id: "<id>",
  name: "",
  from: ""
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/वीसीएस/शाखाएं
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/branches" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
डाक /api/projects/{id}/vcs/checkout # vcs.checkout

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  branch: string
}
जवाब
200 वस्तु application/json
{
  branch: string
  head: string | null
  dirty: string[]
}
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
एसडीके उदाहरण
vcs.checkout
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsCheckoutInput
const result = await client.vcs.checkout({
  id: "<id>",
  branch: ""
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/वीसीएस/चेकआउट
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/checkout" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
डाक /api/projects/{id}/vcs/restore # vcs.restore

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  rev: string
  paths?: string[] | null
}
जवाब
200 वस्तु application/json
{
  oid: string
  parents: string[]
  message: string
  author: {
    name: string
    email: string
    time: number | "Infinity" | "-Infinity" | "NaN"
  }
}
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
एसडीके उदाहरण
vcs.restore
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsRestoreInput
const result = await client.vcs.restore({
  id: "<id>",
  rev: "",
  paths: [
    ""
  ]
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/वीसीएस/रिस्टोर
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/restore" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
पाना /api/projects/{id}/vcs/diff # vcs.diff

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
से सवाल डोरी | null वैकल्पिक
तक सवाल डोरी आवश्यक
जवाब
200 सारणी<ऑब्जेक्ट> application/json
Array<{
  path: string
  kind: "drawings" | "components" | "toolpaths" | "materials" | "tools" | "machine-configs" | "costs" | "project" | "other"
  id?: string | null
  name?: string | null
  status: "added" | "modified" | "deleted"
  changes: Array<{
    pointer: string
    before?: unknown | null
    after?: unknown | 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
एसडीके उदाहरण
vcs.diff
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsDiffInput
const result = await client.vcs.diff({
  id: "<id>"
})
curl
/api/projects/{id}/vcs/diff प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/diff?to=<to>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
पाना /api/projects/{id}/pulls # vcs.listPullRequests

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
राज्य सवाल "खुला" | "विलय होना" | "बंद किया हुआ" | null वैकल्पिक
जवाब
200 सारणी<ऑब्जेक्ट> application/json
Array<{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}>
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
एसडीके उदाहरण
vcs.listPullRequests
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsListPullRequestsInput
const result = await client.vcs.listPullRequests({
  id: "<id>"
})
curl
प्राप्त करें /api/projects/{id}/खींचें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/pulls" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/projects/{id}/pulls # vcs.openPullRequest

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  title: string
  body?: string | null
  head: string
  base?: string | null
  authorKind?: "user" | "ai" | null
}
जवाब
201 वस्तु application/json
{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}
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
एसडीके उदाहरण
vcs.openPullRequest
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsOpenPullRequestInput
const result = await client.vcs.openPullRequest({
  id: "<id>",
  title: "",
  body: "",
  head: "",
  base: "",
  authorKind: "user"
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/खींचता है
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
पाना /api/projects/{id}/pulls/{number} # vcs.pullRequest

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
संख्या पथ डोरी आवश्यक
जवाब
200 वस्तु application/json
{
  pullRequest: {
    id: string
    projectId: string
    number: number | "Infinity" | "-Infinity" | "NaN"
    title: string
    body: string
    head: string
    base: string
    state: "open" | "merged" | "closed"
    authorId: string
    authorKind: "user" | "ai"
    mergeCommit: string | null
    remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
    createdAt: string
    updatedAt: string
  }
  reviews: Array<{
    id: string
    pullRequestId: string
    reviewerId: string
    verdict: "comment" | "approve" | "request-changes"
    body: string
    path: string | null
    pointer: string | null
    createdAt: string
  }>
  changes: Array<{
    path: string
    kind: "drawings" | "components" | "toolpaths" | "materials" | "tools" | "machine-configs" | "costs" | "project" | "other"
    id?: string | null
    name?: string | null
    status: "added" | "modified" | "deleted"
    changes: Array<{
      pointer: string
      before?: unknown | null
      after?: unknown | 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
एसडीके उदाहरण
vcs.pullRequest
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsPullRequestInput
const result = await client.vcs.pullRequest({
  id: "<id>",
  number: "<number>"
})
curl
GET /api/projects/{id}/pulls/{number}
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/projects/{id}/pulls/{number}/reviews # vcs.review

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
संख्या पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  verdict: "comment" | "approve" | "request-changes"
  body?: string | null
  path?: string | null
  pointer?: string | null
}
जवाब
201 वस्तु application/json
{
  id: string
  pullRequestId: string
  reviewerId: string
  verdict: "comment" | "approve" | "request-changes"
  body: string
  path: string | null
  pointer: string | null
  createdAt: string
}
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
एसडीके उदाहरण
vcs.review
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsReviewInput
const result = await client.vcs.review({
  id: "<id>",
  number: "<number>",
  verdict: "comment",
  body: "",
  path: "",
  pointer: ""
})
curl
POST /api/projects/{id}/pulls/{number}/reviews
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/reviews" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
डाक /api/projects/{id}/pulls/{number}/merge # vcs.mergePullRequest

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
संख्या पथ डोरी आवश्यक
जवाब
200 वस्तु application/json
{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}
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
एसडीके उदाहरण
vcs.mergePullRequest
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsMergePullRequestInput
const result = await client.vcs.mergePullRequest({
  id: "<id>",
  number: "<number>"
})
curl
POST /api/projects/{id}/pulls/{number}/merge
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/merge" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/projects/{id}/pulls/{number}/close # vcs.closePullRequest

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
संख्या पथ डोरी आवश्यक
जवाब
200 वस्तु application/json
{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}
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
एसडीके उदाहरण
vcs.closePullRequest
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsClosePullRequestInput
const result = await client.vcs.closePullRequest({
  id: "<id>",
  number: "<number>"
})
curl
POST /api/projects/{id}/pulls/{number}/close
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/close" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
पाना /api/projects/{id}/vcs/remote # vcs.remote

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
200 वस्तु application/json
{
  remote: 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
एसडीके उदाहरण
vcs.remote
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsRemoteInput
const result = await client.vcs.remote({
  id: "<id>"
})
curl
/api/projects/{id}/vcs/remote प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/remote" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
रखना /api/projects/{id}/vcs/remote # vcs.setRemote

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  remote: string | null
}
जवाब
200 वस्तु application/json
{
  remote: 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
एसडीके उदाहरण
vcs.setRemote
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsSetRemoteInput
const result = await client.vcs.setRemote({
  id: "<id>",
  remote: ""
})
curl
/api/projects/{id}/vcs/remote डालें
curl --request PUT "${CADCAMFUN_URL}/api/projects/<id>/vcs/remote" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
डाक /api/projects/{id}/vcs/push # vcs.push

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
x-github-टोकन हैडर डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  branch?: string | null
}
जवाब
200 वस्तु application/json
{
  oid: string
  objects: number | "Infinity" | "-Infinity" | "NaN"
}
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
एसडीके उदाहरण
vcs.push
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsPushInput
const result = await client.vcs.push({
  id: "<id>",
  branch: ""
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/वीसीएस/पुश
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/push" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
डाक /api/projects/{id}/vcs/pull # vcs.pull

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
x-github-टोकन हैडर डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  branch?: string | null
}
जवाब
200 वस्तु application/json
{
  kind: string
  oid: string
}
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
एसडीके उदाहरण
vcs.pull
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsPullInput
const result = await client.vcs.pull({
  id: "<id>",
  branch: ""
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/वीसीएस/पुल
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/pull" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
पाना /api/projects/{id}/actions/runs # vcs.runs

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
जवाब
200 सारणी<ऑब्जेक्ट> application/json
Array<{
  id: string
  projectId: string
  workflow: string
  event: "push" | "pull-request" | "manual"
  ref: string
  sha: string
  status: "queued" | "running" | "success" | "failure"
  events: unknown[]
  startedAt: string
  finishedAt: 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
एसडीके उदाहरण
vcs.runs
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsRunsInput
const result = await client.vcs.runs({
  id: "<id>"
})
curl
/api/projects/{id}/actions/runs प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/runs" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
डाक /api/projects/{id}/actions/dispatch # vcs.dispatch

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
अनुरोध का मुख्य भाग · आवश्यक · एप्लिकेशन/जेसन
{
  ref?: string | null
}
जवाब
200 सारणी<ऑब्जेक्ट> application/json
Array<{
  id: string
  projectId: string
  workflow: string
  event: "push" | "pull-request" | "manual"
  ref: string
  sha: string
  status: "queued" | "running" | "success" | "failure"
  events: unknown[]
  startedAt: string
  finishedAt: 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
एसडीके उदाहरण
vcs.dispatch
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsDispatchInput
const result = await client.vcs.dispatch({
  id: "<id>",
  ref: ""
})
curl
पोस्ट /एपीआई/प्रोजेक्ट्स/{id}/कार्रवाई/प्रेषण
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/actions/dispatch" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
इसे अजमाएं
पाना /api/projects/{id}/actions/workflows # vcs.listWorkflows

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
रेफरी सवाल डोरी | null वैकल्पिक
जवाब
200 सारणी<ऑब्जेक्ट> application/json
Array<{
  name: string
  path: string
  content: string
  problem?: 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
एसडीके उदाहरण
vcs.listWorkflows
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsListWorkflowsInput
const result = await client.vcs.listWorkflows({
  id: "<id>"
})
curl
/api/projects/{id}/actions/workflows प्राप्त करें
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/workflows" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
इसे अजमाएं
पाना /api/projects/{id}/actions/workflows/{name} # vcs.workflow

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

पैरामीटर
नाममेंप्रकारआवश्यक
पहचान पथ डोरी आवश्यक
नाम पथ डोरी आवश्यक
रेफरी सवाल डोरी | null वैकल्पिक
जवाब
200 वस्तु application/json
{
  name: string
  path: string
  content: string
  problem?: 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
एसडीके उदाहरण
vcs.workflow
import { CadCam } from "@cadcamfun/api/sdk"

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

// VcsWorkflowInput
const result = await client.vcs.workflow({
  id: "<id>",
  name: "<name>"
})
curl
GET /api/projects/{id}/actions/workflows/{name}
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/workflows/<name>" \
  --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
}

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

ऑपरेशन आईडी का फॉर्म है vcs.<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 पंक्ति.