@chrt-inc/typescript-sdk 1.302.0 → 1.304.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -583
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +25 -20
- package/dist/cjs/api/resources/connections/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/connections/client/Client.js +3 -3
- package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.js +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToForwarder/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToForwarder/client/Client.js +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToShipper/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToShipper/client/Client.js +1 -1
- package/dist/cjs/api/resources/dev/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/dev/client/Client.js +9 -9
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +2 -2
- package/dist/cjs/api/resources/orderDrafts/client/Client.d.ts +127 -0
- package/dist/cjs/api/resources/orderDrafts/client/Client.js +457 -0
- package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/cargo/client/Client.d.ts +99 -0
- package/dist/cjs/api/resources/orderDrafts/resources/cargo/client/Client.js +326 -0
- package/dist/cjs/api/resources/{orders/resources/draft/client/requests/OrderDraftCreateCargoReq.d.ts → orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.ts} +1 -1
- package/dist/cjs/api/resources/orderDrafts/resources/cargo/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/orderDrafts/resources/index.d.ts +8 -0
- package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/resources/index.js +9 -3
- package/dist/cjs/api/resources/orderDrafts/resources/task/client/Client.d.ts +81 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/client/Client.js +259 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/client/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/task/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/client/Client.d.ts +63 -0
- package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/taskArtifact}/client/Client.js +32 -33
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/client/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskArtifact/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +63 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.js +192 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/index.js +17 -0
- package/dist/cjs/api/resources/orders/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/orders/client/Client.js +0 -5
- package/dist/cjs/api/resources/orders/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/orders/resources/index.js +1 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/Client.js +3 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/Client.js +3 -3
- package/dist/cjs/api/resources/orgProfiles/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/orgProfiles/client/Client.js +7 -7
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/orgs/client/Client.js +7 -7
- package/dist/cjs/api/resources/payments/client/Client.d.ts +20 -20
- package/dist/cjs/api/resources/payments/client/Client.js +83 -83
- package/dist/cjs/api/resources/root/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/root/client/Client.js +5 -5
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +2 -2
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +7 -7
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +14 -14
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +14 -14
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.js +1 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +1 -1
- package/dist/cjs/api/resources/utils/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/utils/client/Client.js +1 -1
- package/dist/cjs/api/types/Cargo1.d.ts +1 -1
- package/dist/cjs/api/types/CargoClientCreate1.d.ts +1 -1
- package/dist/cjs/api/types/CargoClientUpdate1.d.ts +1 -1
- package/dist/cjs/api/types/{DriverUpdateResp.d.ts → DriverUpdateRes.d.ts} +1 -1
- package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +1 -1
- package/dist/cjs/api/types/index.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/connections/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/connections/client/Client.mjs +3 -3
- package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.mjs +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToForwarder/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToForwarder/client/Client.mjs +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToShipper/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToShipper/client/Client.mjs +1 -1
- package/dist/esm/api/resources/dev/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/dev/client/Client.mjs +9 -9
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +2 -2
- package/dist/esm/api/resources/orderDrafts/client/Client.d.mts +127 -0
- package/dist/esm/api/resources/orderDrafts/client/Client.mjs +420 -0
- package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/cargo/client/Client.d.mts +99 -0
- package/dist/esm/api/resources/orderDrafts/resources/cargo/client/Client.mjs +289 -0
- package/dist/esm/api/resources/{orders/resources/draft/client/requests/OrderDraftCreateCargoReq.d.mts → orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.mts} +1 -1
- package/dist/esm/api/resources/orderDrafts/resources/cargo/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/orderDrafts/resources/index.d.mts +8 -0
- package/dist/esm/api/resources/orderDrafts/resources/index.mjs +8 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/client/Client.d.mts +81 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/client/Client.mjs +222 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/client/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/task/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/client/Client.d.mts +63 -0
- package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/taskArtifact}/client/Client.mjs +30 -31
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/client/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskArtifact/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +63 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.mjs +155 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/index.mjs +1 -0
- package/dist/esm/api/resources/orders/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/orders/client/Client.mjs +0 -5
- package/dist/esm/api/resources/orders/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/orders/resources/index.mjs +0 -2
- package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/Client.mjs +3 -3
- package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/Client.mjs +3 -3
- package/dist/esm/api/resources/orgProfiles/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/orgProfiles/client/Client.mjs +7 -7
- package/dist/esm/api/resources/orgs/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/orgs/client/Client.mjs +7 -7
- package/dist/esm/api/resources/payments/client/Client.d.mts +20 -20
- package/dist/esm/api/resources/payments/client/Client.mjs +83 -83
- package/dist/esm/api/resources/root/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/root/client/Client.mjs +5 -5
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +2 -2
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +7 -7
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +14 -14
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +14 -14
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +1 -1
- package/dist/esm/api/resources/utils/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/utils/client/Client.mjs +1 -1
- package/dist/esm/api/types/Cargo1.d.mts +1 -1
- package/dist/esm/api/types/CargoClientCreate1.d.mts +1 -1
- package/dist/esm/api/types/CargoClientUpdate1.d.mts +1 -1
- package/dist/esm/api/types/{DriverUpdateResp.d.mts → DriverUpdateRes.d.mts} +1 -1
- package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +1 -1
- package/dist/esm/api/types/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +569 -563
- package/dist/cjs/api/resources/orders/resources/draft/client/Client.d.ts +0 -261
- package/dist/cjs/api/resources/orders/resources/draft/client/Client.js +0 -1014
- package/dist/cjs/api/resources/orders/resources/draft/client/requests/index.d.ts +0 -9
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/Client.d.ts +0 -61
- package/dist/cjs/api/resources/orders/resources/draft/resources/index.d.ts +0 -2
- package/dist/esm/api/resources/orders/resources/draft/client/Client.d.mts +0 -261
- package/dist/esm/api/resources/orders/resources/draft/client/Client.mjs +0 -977
- package/dist/esm/api/resources/orders/resources/draft/client/requests/index.d.mts +0 -9
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/Client.d.mts +0 -61
- package/dist/esm/api/resources/orders/resources/draft/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/orders/resources/draft/resources/index.mjs +0 -2
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersDraftUpdateReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersDraftUpdateReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersNewDraftReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersNewDraftReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts}/index.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/client/requests/OrderDraftAddTaskArtifactReq.js → orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.js} +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftAssociateCargoWithTaskReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftAssociateCargoWithTaskReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftUpdateCargoReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftUpdateCargoReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/index.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftAddTaskReqV1.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftAddTaskReqV1.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftUpdateTaskReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftUpdateTaskReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/taskArtifact}/client/requests/OrderDraftAddTaskArtifactReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/client/requests/OrderDraftAddTaskGroupReq.js → orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.js} +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft → orderDrafts/resources/taskGroup}/client/requests/OrderDraftAddTaskGroupReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/client/requests/OrderDraftCreateCargoReq.js → orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.js} +0 -0
- /package/dist/cjs/api/types/{DriverUpdateResp.js → DriverUpdateRes.js} +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersDraftUpdateReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersDraftUpdateReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersNewDraftReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/requests/OrdersNewDraftReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts}/index.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/client/requests/OrderDraftAddTaskArtifactReq.mjs → orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.mjs} +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftAssociateCargoWithTaskReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftAssociateCargoWithTaskReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftUpdateCargoReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/cargo}/client/requests/OrderDraftUpdateCargoReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts/resources/cargo}/index.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftAddTaskReqV1.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftAddTaskReqV1.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftUpdateTaskReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/task}/client/requests/OrderDraftUpdateTaskReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/taskArtifact}/client/requests/OrderDraftAddTaskArtifactReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/client/requests/OrderDraftAddTaskGroupReq.mjs → orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.mjs} +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft → orderDrafts/resources/taskGroup}/client/requests/OrderDraftAddTaskGroupReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/client/requests/OrderDraftCreateCargoReq.mjs → orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.mjs} +0 -0
- /package/dist/esm/api/types/{DriverUpdateResp.mjs → DriverUpdateRes.mjs} +0 -0
package/README.md
CHANGED
|
@@ -1,583 +0,0 @@
|
|
|
1
|
-
# Chrt TypeScript Library
|
|
2
|
-
|
|
3
|
-
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fchrt-inc%2Ftypescript-sdk)
|
|
4
|
-
[](https://www.npmjs.com/package/@chrt-inc/typescript-sdk)
|
|
5
|
-
|
|
6
|
-
The Chrt TypeScript library provides convenient access to the Chrt APIs from TypeScript.
|
|
7
|
-
|
|
8
|
-
## Table of Contents
|
|
9
|
-
|
|
10
|
-
- [Installation](#installation)
|
|
11
|
-
- [Reference](#reference)
|
|
12
|
-
- [Usage](#usage)
|
|
13
|
-
- [Request and Response Types](#request-and-response-types)
|
|
14
|
-
- [Exception Handling](#exception-handling)
|
|
15
|
-
- [Advanced](#advanced)
|
|
16
|
-
- [Additional Headers](#additional-headers)
|
|
17
|
-
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
18
|
-
- [Retries](#retries)
|
|
19
|
-
- [Timeouts](#timeouts)
|
|
20
|
-
- [Aborting Requests](#aborting-requests)
|
|
21
|
-
- [Access Raw Response Data](#access-raw-response-data)
|
|
22
|
-
- [Runtime Compatibility](#runtime-compatibility)
|
|
23
|
-
- [Contributing](#contributing)
|
|
24
|
-
- [Binary Response](#binary-response)
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
npm i -s @chrt-inc/typescript-sdk
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Reference
|
|
33
|
-
|
|
34
|
-
A full reference for this library is available [here](https://github.com/chrt-inc/typescript-sdk/blob/HEAD/./reference.md).
|
|
35
|
-
|
|
36
|
-
## Usage
|
|
37
|
-
|
|
38
|
-
Instantiate and use the client with the following:
|
|
39
|
-
|
|
40
|
-
```typescript
|
|
41
|
-
import { ChrtClient } from "@chrt-inc/typescript-sdk";
|
|
42
|
-
|
|
43
|
-
const client = new ChrtClient({ token: "YOUR_TOKEN" });
|
|
44
|
-
await client.payments.createConnectAccountV1();
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Request and Response Types
|
|
48
|
-
|
|
49
|
-
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
50
|
-
following namespace:
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
import { Chrt } from "@chrt-inc/typescript-sdk";
|
|
54
|
-
|
|
55
|
-
const request: Chrt.GenerateInvoiceReq = {
|
|
56
|
-
...
|
|
57
|
-
};
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Exception Handling
|
|
61
|
-
|
|
62
|
-
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
63
|
-
will be thrown.
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
import { ChrtError } from "@chrt-inc/typescript-sdk";
|
|
67
|
-
|
|
68
|
-
try {
|
|
69
|
-
await client.payments.createConnectAccountV1(...);
|
|
70
|
-
} catch (err) {
|
|
71
|
-
if (err instanceof ChrtError) {
|
|
72
|
-
console.log(err.statusCode);
|
|
73
|
-
console.log(err.message);
|
|
74
|
-
console.log(err.body);
|
|
75
|
-
console.log(err.rawResponse);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Advanced
|
|
81
|
-
|
|
82
|
-
### Additional Headers
|
|
83
|
-
|
|
84
|
-
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
const response = await client.payments.createConnectAccountV1(..., {
|
|
88
|
-
headers: {
|
|
89
|
-
'X-Custom-Header': 'custom value'
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Additional Query String Parameters
|
|
95
|
-
|
|
96
|
-
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
const response = await client.payments.createConnectAccountV1(..., {
|
|
100
|
-
queryParams: {
|
|
101
|
-
'customQueryParamKey': 'custom query param value'
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Retries
|
|
107
|
-
|
|
108
|
-
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
109
|
-
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
|
|
110
|
-
retry limit (default: 2).
|
|
111
|
-
|
|
112
|
-
A request is deemed retryable when any of the following HTTP status codes is returned:
|
|
113
|
-
|
|
114
|
-
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
115
|
-
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
116
|
-
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
117
|
-
|
|
118
|
-
Use the `maxRetries` request option to configure this behavior.
|
|
119
|
-
|
|
120
|
-
```typescript
|
|
121
|
-
const response = await client.payments.createConnectAccountV1(..., {
|
|
122
|
-
maxRetries: 0 // override maxRetries at the request level
|
|
123
|
-
});
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Timeouts
|
|
127
|
-
|
|
128
|
-
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
129
|
-
|
|
130
|
-
```typescript
|
|
131
|
-
const response = await client.payments.createConnectAccountV1(..., {
|
|
132
|
-
timeoutInSeconds: 30 // override timeout to 30s
|
|
133
|
-
});
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Aborting Requests
|
|
137
|
-
|
|
138
|
-
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
const controller = new AbortController();
|
|
142
|
-
const response = await client.payments.createConnectAccountV1(..., {
|
|
143
|
-
abortSignal: controller.signal
|
|
144
|
-
});
|
|
145
|
-
controller.abort(); // aborts the request
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Access Raw Response Data
|
|
149
|
-
|
|
150
|
-
The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
|
|
151
|
-
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
152
|
-
|
|
153
|
-
```typescript
|
|
154
|
-
const { data, rawResponse } = await client.payments.createConnectAccountV1(...).withRawResponse();
|
|
155
|
-
|
|
156
|
-
console.log(data);
|
|
157
|
-
console.log(rawResponse.headers['X-My-Header']);
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Runtime Compatibility
|
|
161
|
-
|
|
162
|
-
The SDK works in the following runtimes:
|
|
163
|
-
|
|
164
|
-
- Node.js 18+
|
|
165
|
-
- Vercel
|
|
166
|
-
- Cloudflare Workers
|
|
167
|
-
- Deno v1.25+
|
|
168
|
-
- Bun 1.0+
|
|
169
|
-
- React Native
|
|
170
|
-
|
|
171
|
-
### Customizing Fetch Client
|
|
172
|
-
|
|
173
|
-
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
|
|
174
|
-
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
175
|
-
|
|
176
|
-
```typescript
|
|
177
|
-
import { ChrtClient } from "@chrt-inc/typescript-sdk";
|
|
178
|
-
|
|
179
|
-
const client = new ChrtClient({
|
|
180
|
-
...
|
|
181
|
-
fetcher: // provide your implementation here
|
|
182
|
-
});
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## Contributing
|
|
186
|
-
|
|
187
|
-
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
188
|
-
Additions made directly to this library would have to be moved over to our generation code,
|
|
189
|
-
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
190
|
-
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
191
|
-
an issue first to discuss with us!
|
|
192
|
-
|
|
193
|
-
On the other hand, contributions to the README are always very welcome!
|
|
194
|
-
|
|
195
|
-
## Binary Response
|
|
196
|
-
|
|
197
|
-
You can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:
|
|
198
|
-
|
|
199
|
-
```typescript
|
|
200
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
201
|
-
const stream: ReadableStream<Uint8Array> = response.stream();
|
|
202
|
-
// const arrayBuffer: ArrayBuffer = await response.arrayBuffer();
|
|
203
|
-
// const blob: Blob = response.blob();
|
|
204
|
-
// const bytes: Uint8Array = response.bytes();
|
|
205
|
-
// You can only use the response body once, so you must choose one of the above methods.
|
|
206
|
-
// If you want to check if the response body has been used, you can use the following property.
|
|
207
|
-
const bodyUsed = response.bodyUsed;
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
<details>
|
|
211
|
-
<summary>Save binary response to a file</summary>
|
|
212
|
-
|
|
213
|
-
<blockquote>
|
|
214
|
-
<details>
|
|
215
|
-
<summary>Node.js</summary>
|
|
216
|
-
|
|
217
|
-
<blockquote>
|
|
218
|
-
<details>
|
|
219
|
-
<summary>ReadableStream (most-efficient)</summary>
|
|
220
|
-
|
|
221
|
-
```ts
|
|
222
|
-
import { createWriteStream } from 'fs';
|
|
223
|
-
import { Readable } from 'stream';
|
|
224
|
-
import { pipeline } from 'stream/promises';
|
|
225
|
-
|
|
226
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
227
|
-
|
|
228
|
-
const stream = response.stream();
|
|
229
|
-
const nodeStream = Readable.fromWeb(stream);
|
|
230
|
-
const writeStream = createWriteStream('path/to/file');
|
|
231
|
-
|
|
232
|
-
await pipeline(nodeStream, writeStream);
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
</details>
|
|
236
|
-
</blockquote>
|
|
237
|
-
|
|
238
|
-
<blockquote>
|
|
239
|
-
<details>
|
|
240
|
-
<summary>ArrayBuffer</summary>
|
|
241
|
-
|
|
242
|
-
```ts
|
|
243
|
-
import { writeFile } from 'fs/promises';
|
|
244
|
-
|
|
245
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
246
|
-
|
|
247
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
248
|
-
await writeFile('path/to/file', Buffer.from(arrayBuffer));
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
</details>
|
|
252
|
-
</blockquote>
|
|
253
|
-
|
|
254
|
-
<blockquote>
|
|
255
|
-
<details>
|
|
256
|
-
<summary>Blob</summary>
|
|
257
|
-
|
|
258
|
-
```ts
|
|
259
|
-
import { writeFile } from 'fs/promises';
|
|
260
|
-
|
|
261
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
262
|
-
|
|
263
|
-
const blob = await response.blob();
|
|
264
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
265
|
-
await writeFile('output.bin', Buffer.from(arrayBuffer));
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
</details>
|
|
269
|
-
</blockquote>
|
|
270
|
-
|
|
271
|
-
<blockquote>
|
|
272
|
-
<details>
|
|
273
|
-
<summary>Bytes (UIntArray8)</summary>
|
|
274
|
-
|
|
275
|
-
```ts
|
|
276
|
-
import { writeFile } from 'fs/promises';
|
|
277
|
-
|
|
278
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
279
|
-
|
|
280
|
-
const bytes = await response.bytes();
|
|
281
|
-
await writeFile('path/to/file', bytes);
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
</details>
|
|
285
|
-
</blockquote>
|
|
286
|
-
|
|
287
|
-
</details>
|
|
288
|
-
</blockquote>
|
|
289
|
-
|
|
290
|
-
<blockquote>
|
|
291
|
-
<details>
|
|
292
|
-
<summary>Bun</summary>
|
|
293
|
-
|
|
294
|
-
<blockquote>
|
|
295
|
-
<details>
|
|
296
|
-
<summary>ReadableStream (most-efficient)</summary>
|
|
297
|
-
|
|
298
|
-
```ts
|
|
299
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
300
|
-
|
|
301
|
-
const stream = response.stream();
|
|
302
|
-
await Bun.write('path/to/file', stream);
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
</details>
|
|
306
|
-
</blockquote>
|
|
307
|
-
|
|
308
|
-
<blockquote>
|
|
309
|
-
<details>
|
|
310
|
-
<summary>ArrayBuffer</summary>
|
|
311
|
-
|
|
312
|
-
```ts
|
|
313
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
314
|
-
|
|
315
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
316
|
-
await Bun.write('path/to/file', arrayBuffer);
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
</details>
|
|
320
|
-
</blockquote>
|
|
321
|
-
|
|
322
|
-
<blockquote>
|
|
323
|
-
<details>
|
|
324
|
-
<summary>Blob</summary>
|
|
325
|
-
|
|
326
|
-
```ts
|
|
327
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
328
|
-
|
|
329
|
-
const blob = await response.blob();
|
|
330
|
-
await Bun.write('path/to/file', blob);
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
</details>
|
|
334
|
-
</blockquote>
|
|
335
|
-
|
|
336
|
-
<blockquote>
|
|
337
|
-
<details>
|
|
338
|
-
<summary>Bytes (UIntArray8)</summary>
|
|
339
|
-
|
|
340
|
-
```ts
|
|
341
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
342
|
-
|
|
343
|
-
const bytes = await response.bytes();
|
|
344
|
-
await Bun.write('path/to/file', bytes);
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
</details>
|
|
348
|
-
</blockquote>
|
|
349
|
-
|
|
350
|
-
</details>
|
|
351
|
-
</blockquote>
|
|
352
|
-
|
|
353
|
-
<blockquote>
|
|
354
|
-
<details>
|
|
355
|
-
<summary>Deno</summary>
|
|
356
|
-
|
|
357
|
-
<blockquote>
|
|
358
|
-
<details>
|
|
359
|
-
<summary>ReadableStream (most-efficient)</summary>
|
|
360
|
-
|
|
361
|
-
```ts
|
|
362
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
363
|
-
|
|
364
|
-
const stream = response.stream();
|
|
365
|
-
const file = await Deno.open('path/to/file', { write: true, create: true });
|
|
366
|
-
await stream.pipeTo(file.writable);
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
</details>
|
|
370
|
-
</blockquote>
|
|
371
|
-
|
|
372
|
-
<blockquote>
|
|
373
|
-
<details>
|
|
374
|
-
<summary>ArrayBuffer</summary>
|
|
375
|
-
|
|
376
|
-
```ts
|
|
377
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
378
|
-
|
|
379
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
380
|
-
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
</details>
|
|
384
|
-
</blockquote>
|
|
385
|
-
|
|
386
|
-
<blockquote>
|
|
387
|
-
<details>
|
|
388
|
-
<summary>Blob</summary>
|
|
389
|
-
|
|
390
|
-
```ts
|
|
391
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
392
|
-
|
|
393
|
-
const blob = await response.blob();
|
|
394
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
395
|
-
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
</details>
|
|
399
|
-
</blockquote>
|
|
400
|
-
|
|
401
|
-
<blockquote>
|
|
402
|
-
<details>
|
|
403
|
-
<summary>Bytes (UIntArray8)</summary>
|
|
404
|
-
|
|
405
|
-
```ts
|
|
406
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
407
|
-
|
|
408
|
-
const bytes = await response.bytes();
|
|
409
|
-
await Deno.writeFile('path/to/file', bytes);
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
</details>
|
|
413
|
-
</blockquote>
|
|
414
|
-
|
|
415
|
-
</details>
|
|
416
|
-
</blockquote>
|
|
417
|
-
|
|
418
|
-
<blockquote>
|
|
419
|
-
<details>
|
|
420
|
-
<summary>Browser</summary>
|
|
421
|
-
|
|
422
|
-
<blockquote>
|
|
423
|
-
<details>
|
|
424
|
-
<summary>Blob (most-efficient)</summary>
|
|
425
|
-
|
|
426
|
-
```ts
|
|
427
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
428
|
-
|
|
429
|
-
const blob = await response.blob();
|
|
430
|
-
const url = URL.createObjectURL(blob);
|
|
431
|
-
|
|
432
|
-
// trigger download
|
|
433
|
-
const a = document.createElement('a');
|
|
434
|
-
a.href = url;
|
|
435
|
-
a.download = 'filename';
|
|
436
|
-
a.click();
|
|
437
|
-
URL.revokeObjectURL(url);
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
</details>
|
|
441
|
-
</blockquote>
|
|
442
|
-
|
|
443
|
-
<blockquote>
|
|
444
|
-
<details>
|
|
445
|
-
<summary>ReadableStream</summary>
|
|
446
|
-
|
|
447
|
-
```ts
|
|
448
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
449
|
-
|
|
450
|
-
const stream = response.stream();
|
|
451
|
-
const reader = stream.getReader();
|
|
452
|
-
const chunks = [];
|
|
453
|
-
|
|
454
|
-
while (true) {
|
|
455
|
-
const { done, value } = await reader.read();
|
|
456
|
-
if (done) break;
|
|
457
|
-
chunks.push(value);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
const blob = new Blob(chunks);
|
|
461
|
-
const url = URL.createObjectURL(blob);
|
|
462
|
-
|
|
463
|
-
// trigger download
|
|
464
|
-
const a = document.createElement('a');
|
|
465
|
-
a.href = url;
|
|
466
|
-
a.download = 'filename';
|
|
467
|
-
a.click();
|
|
468
|
-
URL.revokeObjectURL(url);
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
</details>
|
|
472
|
-
</blockquote>
|
|
473
|
-
|
|
474
|
-
<blockquote>
|
|
475
|
-
<details>
|
|
476
|
-
<summary>ArrayBuffer</summary>
|
|
477
|
-
|
|
478
|
-
```ts
|
|
479
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
480
|
-
|
|
481
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
482
|
-
const blob = new Blob([arrayBuffer]);
|
|
483
|
-
const url = URL.createObjectURL(blob);
|
|
484
|
-
|
|
485
|
-
// trigger download
|
|
486
|
-
const a = document.createElement('a');
|
|
487
|
-
a.href = url;
|
|
488
|
-
a.download = 'filename';
|
|
489
|
-
a.click();
|
|
490
|
-
URL.revokeObjectURL(url);
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
</details>
|
|
494
|
-
</blockquote>
|
|
495
|
-
|
|
496
|
-
<blockquote>
|
|
497
|
-
<details>
|
|
498
|
-
<summary>Bytes (UIntArray8)</summary>
|
|
499
|
-
|
|
500
|
-
```ts
|
|
501
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
502
|
-
|
|
503
|
-
const bytes = await response.bytes();
|
|
504
|
-
const blob = new Blob([bytes]);
|
|
505
|
-
const url = URL.createObjectURL(blob);
|
|
506
|
-
|
|
507
|
-
// trigger download
|
|
508
|
-
const a = document.createElement('a');
|
|
509
|
-
a.href = url;
|
|
510
|
-
a.download = 'filename';
|
|
511
|
-
a.click();
|
|
512
|
-
URL.revokeObjectURL(url);
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
</details>
|
|
516
|
-
</blockquote>
|
|
517
|
-
|
|
518
|
-
</details>
|
|
519
|
-
</blockquote>
|
|
520
|
-
|
|
521
|
-
</details>
|
|
522
|
-
</blockquote>
|
|
523
|
-
|
|
524
|
-
<details>
|
|
525
|
-
<summary>Convert binary response to text</summary>
|
|
526
|
-
|
|
527
|
-
<blockquote>
|
|
528
|
-
<details>
|
|
529
|
-
<summary>ReadableStream</summary>
|
|
530
|
-
|
|
531
|
-
```ts
|
|
532
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
533
|
-
|
|
534
|
-
const stream = response.stream();
|
|
535
|
-
const text = await new Response(stream).text();
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
</details>
|
|
539
|
-
</blockquote>
|
|
540
|
-
|
|
541
|
-
<blockquote>
|
|
542
|
-
<details>
|
|
543
|
-
<summary>ArrayBuffer</summary>
|
|
544
|
-
|
|
545
|
-
```ts
|
|
546
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
547
|
-
|
|
548
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
549
|
-
const text = new TextDecoder().decode(arrayBuffer);
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
</details>
|
|
553
|
-
</blockquote>
|
|
554
|
-
|
|
555
|
-
<blockquote>
|
|
556
|
-
<details>
|
|
557
|
-
<summary>Blob</summary>
|
|
558
|
-
|
|
559
|
-
```ts
|
|
560
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
561
|
-
|
|
562
|
-
const blob = await response.blob();
|
|
563
|
-
const text = await blob.text();
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
</details>
|
|
567
|
-
</blockquote>
|
|
568
|
-
|
|
569
|
-
<blockquote>
|
|
570
|
-
<details>
|
|
571
|
-
<summary>Bytes (UIntArray8)</summary>
|
|
572
|
-
|
|
573
|
-
```ts
|
|
574
|
-
const response = await client.taskArtifacts.images.getByMetadataIdV1(...);
|
|
575
|
-
|
|
576
|
-
const bytes = await response.bytes();
|
|
577
|
-
const text = new TextDecoder().decode(bytes);
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
</details>
|
|
581
|
-
</blockquote>
|
|
582
|
-
|
|
583
|
-
</details>
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { Drivers } from "./api/resources/drivers/client/Client.js";
|
|
|
20
20
|
import { TaskArtifacts } from "./api/resources/taskArtifacts/client/Client.js";
|
|
21
21
|
import { OffChrtShipperOrg } from "./api/resources/offChrtShipperOrg/client/Client.js";
|
|
22
22
|
import { Orders } from "./api/resources/orders/client/Client.js";
|
|
23
|
+
import { OrderDrafts } from "./api/resources/orderDrafts/client/Client.js";
|
|
23
24
|
import { TaskGroups } from "./api/resources/taskGroups/client/Client.js";
|
|
24
25
|
import { ShipperContactInfo } from "./api/resources/shipperContactInfo/client/Client.js";
|
|
25
26
|
import { Orgs } from "./api/resources/orgs/client/Client.js";
|
|
@@ -71,6 +72,7 @@ export declare class ChrtClient {
|
|
|
71
72
|
protected _taskArtifacts: TaskArtifacts | undefined;
|
|
72
73
|
protected _offChrtShipperOrg: OffChrtShipperOrg | undefined;
|
|
73
74
|
protected _orders: Orders | undefined;
|
|
75
|
+
protected _orderDrafts: OrderDrafts | undefined;
|
|
74
76
|
protected _taskGroups: TaskGroups | undefined;
|
|
75
77
|
protected _shipperContactInfo: ShipperContactInfo | undefined;
|
|
76
78
|
protected _orgs: Orgs | undefined;
|
|
@@ -98,6 +100,7 @@ export declare class ChrtClient {
|
|
|
98
100
|
get taskArtifacts(): TaskArtifacts;
|
|
99
101
|
get offChrtShipperOrg(): OffChrtShipperOrg;
|
|
100
102
|
get orders(): Orders;
|
|
103
|
+
get orderDrafts(): OrderDrafts;
|
|
101
104
|
get taskGroups(): TaskGroups;
|
|
102
105
|
get shipperContactInfo(): ShipperContactInfo;
|
|
103
106
|
get orgs(): Orgs;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -56,22 +56,23 @@ const Client_js_14 = require("./api/resources/drivers/client/Client.js");
|
|
|
56
56
|
const Client_js_15 = require("./api/resources/taskArtifacts/client/Client.js");
|
|
57
57
|
const Client_js_16 = require("./api/resources/offChrtShipperOrg/client/Client.js");
|
|
58
58
|
const Client_js_17 = require("./api/resources/orders/client/Client.js");
|
|
59
|
-
const Client_js_18 = require("./api/resources/
|
|
60
|
-
const Client_js_19 = require("./api/resources/
|
|
61
|
-
const Client_js_20 = require("./api/resources/
|
|
62
|
-
const Client_js_21 = require("./api/resources/
|
|
63
|
-
const Client_js_22 = require("./api/resources/
|
|
64
|
-
const Client_js_23 = require("./api/resources/
|
|
65
|
-
const Client_js_24 = require("./api/resources/
|
|
66
|
-
const Client_js_25 = require("./api/resources/
|
|
67
|
-
const Client_js_26 = require("./api/resources/
|
|
59
|
+
const Client_js_18 = require("./api/resources/orderDrafts/client/Client.js");
|
|
60
|
+
const Client_js_19 = require("./api/resources/taskGroups/client/Client.js");
|
|
61
|
+
const Client_js_20 = require("./api/resources/shipperContactInfo/client/Client.js");
|
|
62
|
+
const Client_js_21 = require("./api/resources/orgs/client/Client.js");
|
|
63
|
+
const Client_js_22 = require("./api/resources/root/client/Client.js");
|
|
64
|
+
const Client_js_23 = require("./api/resources/users/client/Client.js");
|
|
65
|
+
const Client_js_24 = require("./api/resources/utils/client/Client.js");
|
|
66
|
+
const Client_js_25 = require("./api/resources/notifications/client/Client.js");
|
|
67
|
+
const Client_js_26 = require("./api/resources/orgConnectionInfos/client/Client.js");
|
|
68
|
+
const Client_js_27 = require("./api/resources/tracking/client/Client.js");
|
|
68
69
|
class ChrtClient {
|
|
69
70
|
constructor(_options = {}) {
|
|
70
71
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
71
72
|
"X-Fern-Language": "JavaScript",
|
|
72
73
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
73
|
-
"X-Fern-SDK-Version": "1.
|
|
74
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
74
|
+
"X-Fern-SDK-Version": "1.304.0",
|
|
75
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.304.0",
|
|
75
76
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
76
77
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
77
78
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -144,41 +145,45 @@ class ChrtClient {
|
|
|
144
145
|
var _a;
|
|
145
146
|
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_17.Orders(this._options)));
|
|
146
147
|
}
|
|
148
|
+
get orderDrafts() {
|
|
149
|
+
var _a;
|
|
150
|
+
return ((_a = this._orderDrafts) !== null && _a !== void 0 ? _a : (this._orderDrafts = new Client_js_18.OrderDrafts(this._options)));
|
|
151
|
+
}
|
|
147
152
|
get taskGroups() {
|
|
148
153
|
var _a;
|
|
149
|
-
return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new
|
|
154
|
+
return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new Client_js_19.TaskGroups(this._options)));
|
|
150
155
|
}
|
|
151
156
|
get shipperContactInfo() {
|
|
152
157
|
var _a;
|
|
153
|
-
return ((_a = this._shipperContactInfo) !== null && _a !== void 0 ? _a : (this._shipperContactInfo = new
|
|
158
|
+
return ((_a = this._shipperContactInfo) !== null && _a !== void 0 ? _a : (this._shipperContactInfo = new Client_js_20.ShipperContactInfo(this._options)));
|
|
154
159
|
}
|
|
155
160
|
get orgs() {
|
|
156
161
|
var _a;
|
|
157
|
-
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new
|
|
162
|
+
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_21.Orgs(this._options)));
|
|
158
163
|
}
|
|
159
164
|
get root() {
|
|
160
165
|
var _a;
|
|
161
|
-
return ((_a = this._root) !== null && _a !== void 0 ? _a : (this._root = new
|
|
166
|
+
return ((_a = this._root) !== null && _a !== void 0 ? _a : (this._root = new Client_js_22.Root(this._options)));
|
|
162
167
|
}
|
|
163
168
|
get users() {
|
|
164
169
|
var _a;
|
|
165
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
170
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_23.Users(this._options)));
|
|
166
171
|
}
|
|
167
172
|
get utils() {
|
|
168
173
|
var _a;
|
|
169
|
-
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new
|
|
174
|
+
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_24.Utils(this._options)));
|
|
170
175
|
}
|
|
171
176
|
get notifications() {
|
|
172
177
|
var _a;
|
|
173
|
-
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new
|
|
178
|
+
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_25.Notifications(this._options)));
|
|
174
179
|
}
|
|
175
180
|
get orgConnectionInfos() {
|
|
176
181
|
var _a;
|
|
177
|
-
return ((_a = this._orgConnectionInfos) !== null && _a !== void 0 ? _a : (this._orgConnectionInfos = new
|
|
182
|
+
return ((_a = this._orgConnectionInfos) !== null && _a !== void 0 ? _a : (this._orgConnectionInfos = new Client_js_26.OrgConnectionInfos(this._options)));
|
|
178
183
|
}
|
|
179
184
|
get tracking() {
|
|
180
185
|
var _a;
|
|
181
|
-
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new
|
|
186
|
+
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_27.Tracking(this._options)));
|
|
182
187
|
}
|
|
183
188
|
}
|
|
184
189
|
exports.ChrtClient = ChrtClient;
|