@chrt-inc/typescript-sdk 0.0.184 → 0.0.185
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 +390 -0
- package/dist/cjs/Client.d.ts +9 -0
- package/dist/cjs/Client.js +41 -26
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.d.ts +6 -5
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.js +20 -47
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateReq.d.ts +24 -0
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewReq.d.ts +27 -0
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.js +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.d.ts → CourierPayDriverLineItemGroupAddLineItemsReq.d.ts} +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.js +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.d.ts → CourierPayDriverLineItemGroupRemoveLineItemsReq.d.ts} +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.js +61 -0
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/requests/CourierPayDriverPayoutClientUpdate1.d.ts +14 -0
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +5 -0
- package/dist/cjs/api/resources/index.js +6 -1
- package/dist/cjs/api/resources/milestones/resources/images/client/Client.d.ts +1 -8
- package/dist/cjs/api/resources/milestones/resources/images/client/Client.js +1 -7
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/notifications/client/Client.js +3 -3
- package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.js +13 -13
- package/dist/cjs/api/resources/notifications/resources/index.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/index.js +3 -3
- package/dist/cjs/api/resources/offChrtShipperOrgConnectionInfo/client/requests/OffChrtShipperOrgConnectionInfoClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/payments/client/Client.d.ts +19 -25
- package/dist/cjs/api/resources/payments/client/Client.js +58 -72
- package/dist/cjs/api/resources/payments/client/requests/GenerateInvoiceReq.d.ts +14 -0
- package/dist/cjs/api/resources/payments/client/requests/index.d.ts +1 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/Client.d.ts +96 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/Client.js +321 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupCreateReq.d.ts +28 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupPreviewReq.d.ts +28 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupPreviewReq.js +5 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/index.js +18 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/Client.js +136 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/ShipperPayCourierLineItemGroupAddLineItemsReq.d.ts +19 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/ShipperPayCourierLineItemGroupAddLineItemsReq.js +5 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/index.js +43 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/Client.js +136 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/ShipperPayCourierLineItemGroupRemoveLineItemsReq.d.ts +19 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/ShipperPayCourierLineItemGroupRemoveLineItemsReq.js +5 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/Client.d.ts +62 -0
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/Client.js +192 -0
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/index.js +2 -0
- package/dist/cjs/api/resources/shipperPayCourierPayments/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipperPayCourierPayments/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/Client.d.ts +110 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/Client.js +367 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/index.js +17 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.d.ts +49 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.js +5 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientUpdate1.d.ts +31 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/index.js +17 -0
- package/dist/cjs/api/types/ConnectionEvent.d.ts +12 -0
- package/dist/cjs/api/types/ConnectionEvent.js +5 -0
- package/dist/cjs/api/types/ConnectionEventEnum.d.ts +11 -0
- package/dist/cjs/api/types/ConnectionEventEnum.js +13 -0
- package/dist/cjs/api/types/ConnectionState.d.ts +10 -0
- package/dist/cjs/api/types/ConnectionState.js +12 -0
- package/dist/cjs/api/types/CourierPayDriverPayout1.d.ts +20 -0
- package/dist/cjs/api/types/CourierPayDriverPayout1.js +5 -0
- package/dist/cjs/api/types/CreateShipperPayCourierPaymentReq.d.ts +9 -0
- package/dist/cjs/api/types/CreateShipperPayCourierPaymentReq.js +5 -0
- package/dist/cjs/api/types/GenerateInvoiceRes.d.ts +9 -0
- package/dist/cjs/api/types/GenerateInvoiceRes.js +5 -0
- package/dist/cjs/api/types/OffChrtShipperOrgConnectionInfo1.d.ts +1 -0
- package/dist/cjs/api/types/OrgPublicData2.d.ts +5 -1
- package/dist/cjs/api/types/PaymentPreviewResponse.d.ts +13 -0
- package/dist/cjs/api/types/PaymentPreviewResponse.js +5 -0
- package/dist/cjs/api/types/PayoutStatusEnum.d.ts +10 -0
- package/dist/cjs/api/types/PayoutStatusEnum.js +12 -0
- package/dist/cjs/api/types/ShipperCourierConnection1.d.ts +5 -2
- package/dist/cjs/api/types/ShipperPayCourierLineItemGroup1.d.ts +16 -0
- package/dist/cjs/api/types/ShipperPayCourierLineItemGroup1.js +5 -0
- package/dist/cjs/api/types/ShipperPayCourierLineItemGroupClientCreate1.d.ts +8 -0
- package/dist/cjs/api/types/ShipperPayCourierLineItemGroupClientCreate1.js +5 -0
- package/dist/cjs/api/types/ShipperPayCourierRateSheet1.d.ts +33 -0
- package/dist/cjs/api/types/ShipperPayCourierRateSheet1.js +5 -0
- package/dist/cjs/api/types/StripeConnectAccountEvent.d.ts +11 -0
- package/dist/cjs/api/types/StripeConnectAccountEvent.js +5 -0
- package/dist/cjs/api/types/StripeConnectAccountEventEnum.d.ts +8 -0
- package/dist/cjs/api/types/StripeConnectAccountEventEnum.js +10 -0
- package/dist/cjs/api/types/UserPublicData6.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +13 -1
- package/dist/cjs/api/types/index.js +13 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +9 -0
- package/dist/esm/Client.mjs +17 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.d.mts +6 -5
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.mjs +20 -47
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateReq.d.mts +24 -0
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewReq.d.mts +27 -0
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.mjs +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.d.mts → CourierPayDriverLineItemGroupAddLineItemsReq.d.mts} +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.mjs +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.d.mts → CourierPayDriverLineItemGroupRemoveLineItemsReq.d.mts} +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.mjs +61 -0
- package/dist/esm/api/resources/courierPayDriverPayouts/client/requests/CourierPayDriverPayoutClientUpdate1.d.mts +14 -0
- package/dist/esm/api/resources/courierPayDriverPayouts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/index.d.mts +5 -0
- package/dist/esm/api/resources/index.mjs +5 -0
- package/dist/esm/api/resources/milestones/resources/images/client/Client.d.mts +1 -8
- package/dist/esm/api/resources/milestones/resources/images/client/Client.mjs +1 -7
- package/dist/esm/api/resources/notifications/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/notifications/client/Client.mjs +3 -3
- package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.mjs +11 -11
- package/dist/esm/api/resources/notifications/resources/courier/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/notifications/resources/index.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/index.mjs +2 -2
- package/dist/esm/api/resources/offChrtShipperOrgConnectionInfo/client/requests/OffChrtShipperOrgConnectionInfoClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/payments/client/Client.d.mts +19 -25
- package/dist/esm/api/resources/payments/client/Client.mjs +58 -72
- package/dist/esm/api/resources/payments/client/requests/GenerateInvoiceReq.d.mts +14 -0
- package/dist/esm/api/resources/payments/client/requests/index.d.mts +1 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/Client.d.mts +96 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/Client.mjs +284 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupCreateReq.d.mts +28 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupPreviewReq.d.mts +28 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupPreviewReq.mjs +4 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/index.mjs +2 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/Client.mjs +99 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/ShipperPayCourierLineItemGroupAddLineItemsReq.d.mts +19 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/ShipperPayCourierLineItemGroupAddLineItemsReq.mjs +4 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/addLineItems/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/index.mjs +4 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/Client.mjs +99 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/ShipperPayCourierLineItemGroupRemoveLineItemsReq.d.mts +19 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/ShipperPayCourierLineItemGroupRemoveLineItemsReq.mjs +4 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierLineItemGroup/resources/removeLineItems/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierPayments/client/Client.d.mts +62 -0
- package/dist/esm/api/resources/shipperPayCourierPayments/client/Client.mjs +155 -0
- package/dist/esm/api/resources/shipperPayCourierPayments/client/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierPayments/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierPayments/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierPayments/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/Client.d.mts +110 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/Client.mjs +330 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.d.mts +49 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientUpdate1.d.mts +31 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/index.d.mts +1 -0
- package/dist/esm/api/resources/shipperPayCourierRateSheets/index.mjs +1 -0
- package/dist/esm/api/types/ConnectionEvent.d.mts +12 -0
- package/dist/esm/api/types/ConnectionEvent.mjs +4 -0
- package/dist/esm/api/types/ConnectionEventEnum.d.mts +11 -0
- package/dist/esm/api/types/ConnectionEventEnum.mjs +10 -0
- package/dist/esm/api/types/ConnectionState.d.mts +10 -0
- package/dist/esm/api/types/ConnectionState.mjs +9 -0
- package/dist/esm/api/types/CourierPayDriverPayout1.d.mts +20 -0
- package/dist/esm/api/types/CourierPayDriverPayout1.mjs +4 -0
- package/dist/esm/api/types/CreateShipperPayCourierPaymentReq.d.mts +9 -0
- package/dist/esm/api/types/CreateShipperPayCourierPaymentReq.mjs +4 -0
- package/dist/esm/api/types/GenerateInvoiceRes.d.mts +9 -0
- package/dist/esm/api/types/GenerateInvoiceRes.mjs +4 -0
- package/dist/esm/api/types/OffChrtShipperOrgConnectionInfo1.d.mts +1 -0
- package/dist/esm/api/types/OrgPublicData2.d.mts +5 -1
- package/dist/esm/api/types/PaymentPreviewResponse.d.mts +13 -0
- package/dist/esm/api/types/PaymentPreviewResponse.mjs +4 -0
- package/dist/esm/api/types/PayoutStatusEnum.d.mts +10 -0
- package/dist/esm/api/types/PayoutStatusEnum.mjs +9 -0
- package/dist/esm/api/types/ShipperCourierConnection1.d.mts +5 -2
- package/dist/esm/api/types/ShipperPayCourierLineItemGroup1.d.mts +16 -0
- package/dist/esm/api/types/ShipperPayCourierLineItemGroup1.mjs +4 -0
- package/dist/esm/api/types/ShipperPayCourierLineItemGroupClientCreate1.d.mts +8 -0
- package/dist/esm/api/types/ShipperPayCourierLineItemGroupClientCreate1.mjs +4 -0
- package/dist/esm/api/types/ShipperPayCourierRateSheet1.d.mts +33 -0
- package/dist/esm/api/types/ShipperPayCourierRateSheet1.mjs +4 -0
- package/dist/esm/api/types/StripeConnectAccountEvent.d.mts +11 -0
- package/dist/esm/api/types/StripeConnectAccountEvent.mjs +4 -0
- package/dist/esm/api/types/StripeConnectAccountEventEnum.d.mts +8 -0
- package/dist/esm/api/types/StripeConnectAccountEventEnum.mjs +7 -0
- package/dist/esm/api/types/UserPublicData6.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +13 -1
- package/dist/esm/api/types/index.mjs +13 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1012 -126
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.ts +0 -18
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts +0 -18
- package/dist/cjs/api/resources/payments/client/requests/CreateConnectAccountLinkReq.d.ts +0 -12
- package/dist/cjs/api/resources/payments/client/requests/CreateDirectChargeReq.d.ts +0 -17
- package/dist/cjs/api/types/CreateDirectChargeRes.d.ts +0 -8
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts +0 -18
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.mts +0 -18
- package/dist/esm/api/resources/payments/client/requests/CreateConnectAccountLinkReq.d.mts +0 -12
- package/dist/esm/api/resources/payments/client/requests/CreateDirectChargeReq.d.mts +0 -17
- package/dist/esm/api/types/CreateDirectChargeRes.d.mts +0 -8
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.js → CourierPayDriverLineItemGroupCreateReq.js} +0 -0
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.js → CourierPayDriverLineItemGroupPreviewReq.js} +0 -0
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.js → CourierPayDriverLineItemGroupAddLineItemsReq.js} +0 -0
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.js → CourierPayDriverLineItemGroupRemoveLineItemsReq.js} +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/courierPreferences/client/requests/CourierNotificationPreferencesClientCreate1.js → courierPayDriverPayouts/client/requests/CourierPayDriverPayoutClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -0
- /package/dist/cjs/api/resources/{payments/client/requests/CreateConnectAccountLinkReq.js → notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.js +0 -0
- /package/dist/cjs/api/resources/payments/client/requests/{CreateDirectChargeReq.js → GenerateInvoiceReq.js} +0 -0
- /package/dist/cjs/api/{types/CreateDirectChargeRes.js → resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupCreateReq.js} +0 -0
- /package/dist/{esm/api/resources/notifications/resources/courierPreferences/client/requests/index.mjs → cjs/api/resources/shipperPayCourierPayments/client/index.d.ts} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.mjs → CourierPayDriverLineItemGroupCreateReq.mjs} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.mjs → CourierPayDriverLineItemGroupPreviewReq.mjs} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.mjs → CourierPayDriverLineItemGroupAddLineItemsReq.mjs} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.mjs → CourierPayDriverLineItemGroupRemoveLineItemsReq.mjs} +0 -0
- /package/dist/esm/api/resources/{notifications/resources/courierPreferences/client/requests/CourierNotificationPreferencesClientCreate1.mjs → courierPayDriverPayouts/client/requests/CourierPayDriverPayoutClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -0
- /package/dist/esm/api/resources/{payments/client/requests/CreateConnectAccountLinkReq.mjs → notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.mjs +0 -0
- /package/dist/esm/api/resources/payments/client/requests/{CreateDirectChargeReq.mjs → GenerateInvoiceReq.mjs} +0 -0
- /package/dist/esm/api/{types/CreateDirectChargeRes.mjs → resources/shipperPayCourierLineItemGroup/client/requests/ShipperPayCourierLineItemGroupCreateReq.mjs} +0 -0
package/README.md
CHANGED
|
@@ -166,3 +166,393 @@ a proof of concept, but know that we will not be able to merge it as-is. We sugg
|
|
|
166
166
|
an issue first to discuss with us!
|
|
167
167
|
|
|
168
168
|
On the other hand, contributions to the README are always very welcome!
|
|
169
|
+
|
|
170
|
+
## Binary Response
|
|
171
|
+
|
|
172
|
+
You can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
176
|
+
const stream: ReadableStream<Uint8Array> = response.stream();
|
|
177
|
+
// const arrayBuffer: ArrayBuffer = await response.arrayBuffer();
|
|
178
|
+
// const blob: Blob = response.blob();
|
|
179
|
+
// const bytes: Uint8Array = response.bytes();
|
|
180
|
+
// You can only use the response body once, so you must choose one of the above methods.
|
|
181
|
+
// If you want to check if the response body has been used, you can use the following property.
|
|
182
|
+
const bodyUsed = response.bodyUsed;
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
<details>
|
|
186
|
+
<summary>Save binary response to a file</summary>
|
|
187
|
+
|
|
188
|
+
<blockquote>
|
|
189
|
+
<details>
|
|
190
|
+
<summary>Node.js</summary>
|
|
191
|
+
|
|
192
|
+
<blockquote>
|
|
193
|
+
<details>
|
|
194
|
+
<summary>ReadableStream (most-efficient)</summary>
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
import { createWriteStream } from 'fs';
|
|
198
|
+
import { Readable } from 'stream';
|
|
199
|
+
import { pipeline } from 'stream/promises';
|
|
200
|
+
|
|
201
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
202
|
+
|
|
203
|
+
const stream = response.stream();
|
|
204
|
+
const nodeStream = Readable.fromWeb(stream);
|
|
205
|
+
const writeStream = createWriteStream('path/to/file');
|
|
206
|
+
|
|
207
|
+
await pipeline(nodeStream, writeStream);
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
</details>
|
|
211
|
+
</blockquote>
|
|
212
|
+
|
|
213
|
+
<blockquote>
|
|
214
|
+
<details>
|
|
215
|
+
<summary>ArrayBuffer</summary>
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
import { writeFile } from 'fs/promises';
|
|
219
|
+
|
|
220
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
221
|
+
|
|
222
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
223
|
+
await writeFile('path/to/file', Buffer.from(arrayBuffer));
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
</details>
|
|
227
|
+
</blockquote>
|
|
228
|
+
|
|
229
|
+
<blockquote>
|
|
230
|
+
<details>
|
|
231
|
+
<summary>Blob</summary>
|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
import { writeFile } from 'fs/promises';
|
|
235
|
+
|
|
236
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
237
|
+
|
|
238
|
+
const blob = await response.blob();
|
|
239
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
240
|
+
await writeFile('output.bin', Buffer.from(arrayBuffer));
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
</details>
|
|
244
|
+
</blockquote>
|
|
245
|
+
|
|
246
|
+
<blockquote>
|
|
247
|
+
<details>
|
|
248
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
import { writeFile } from 'fs/promises';
|
|
252
|
+
|
|
253
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
254
|
+
|
|
255
|
+
const bytes = await response.bytes();
|
|
256
|
+
await writeFile('path/to/file', bytes);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
</details>
|
|
260
|
+
</blockquote>
|
|
261
|
+
|
|
262
|
+
</details>
|
|
263
|
+
</blockquote>
|
|
264
|
+
|
|
265
|
+
<blockquote>
|
|
266
|
+
<details>
|
|
267
|
+
<summary>Bun</summary>
|
|
268
|
+
|
|
269
|
+
<blockquote>
|
|
270
|
+
<details>
|
|
271
|
+
<summary>ReadableStream (most-efficient)</summary>
|
|
272
|
+
|
|
273
|
+
```ts
|
|
274
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
275
|
+
|
|
276
|
+
const stream = response.stream();
|
|
277
|
+
await Bun.write('path/to/file', stream);
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
</details>
|
|
281
|
+
</blockquote>
|
|
282
|
+
|
|
283
|
+
<blockquote>
|
|
284
|
+
<details>
|
|
285
|
+
<summary>ArrayBuffer</summary>
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
289
|
+
|
|
290
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
291
|
+
await Bun.write('path/to/file', arrayBuffer);
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
</details>
|
|
295
|
+
</blockquote>
|
|
296
|
+
|
|
297
|
+
<blockquote>
|
|
298
|
+
<details>
|
|
299
|
+
<summary>Blob</summary>
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
303
|
+
|
|
304
|
+
const blob = await response.blob();
|
|
305
|
+
await Bun.write('path/to/file', blob);
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
</details>
|
|
309
|
+
</blockquote>
|
|
310
|
+
|
|
311
|
+
<blockquote>
|
|
312
|
+
<details>
|
|
313
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
314
|
+
|
|
315
|
+
```ts
|
|
316
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
317
|
+
|
|
318
|
+
const bytes = await response.bytes();
|
|
319
|
+
await Bun.write('path/to/file', bytes);
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
</details>
|
|
323
|
+
</blockquote>
|
|
324
|
+
|
|
325
|
+
</details>
|
|
326
|
+
</blockquote>
|
|
327
|
+
|
|
328
|
+
<blockquote>
|
|
329
|
+
<details>
|
|
330
|
+
<summary>Deno</summary>
|
|
331
|
+
|
|
332
|
+
<blockquote>
|
|
333
|
+
<details>
|
|
334
|
+
<summary>ReadableStream (most-efficient)</summary>
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
338
|
+
|
|
339
|
+
const stream = response.stream();
|
|
340
|
+
const file = await Deno.open('path/to/file', { write: true, create: true });
|
|
341
|
+
await stream.pipeTo(file.writable);
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
</details>
|
|
345
|
+
</blockquote>
|
|
346
|
+
|
|
347
|
+
<blockquote>
|
|
348
|
+
<details>
|
|
349
|
+
<summary>ArrayBuffer</summary>
|
|
350
|
+
|
|
351
|
+
```ts
|
|
352
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
353
|
+
|
|
354
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
355
|
+
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
</details>
|
|
359
|
+
</blockquote>
|
|
360
|
+
|
|
361
|
+
<blockquote>
|
|
362
|
+
<details>
|
|
363
|
+
<summary>Blob</summary>
|
|
364
|
+
|
|
365
|
+
```ts
|
|
366
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
367
|
+
|
|
368
|
+
const blob = await response.blob();
|
|
369
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
370
|
+
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
</details>
|
|
374
|
+
</blockquote>
|
|
375
|
+
|
|
376
|
+
<blockquote>
|
|
377
|
+
<details>
|
|
378
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
379
|
+
|
|
380
|
+
```ts
|
|
381
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
382
|
+
|
|
383
|
+
const bytes = await response.bytes();
|
|
384
|
+
await Deno.writeFile('path/to/file', bytes);
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
</details>
|
|
388
|
+
</blockquote>
|
|
389
|
+
|
|
390
|
+
</details>
|
|
391
|
+
</blockquote>
|
|
392
|
+
|
|
393
|
+
<blockquote>
|
|
394
|
+
<details>
|
|
395
|
+
<summary>Browser</summary>
|
|
396
|
+
|
|
397
|
+
<blockquote>
|
|
398
|
+
<details>
|
|
399
|
+
<summary>Blob (most-efficient)</summary>
|
|
400
|
+
|
|
401
|
+
```ts
|
|
402
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
403
|
+
|
|
404
|
+
const blob = await response.blob();
|
|
405
|
+
const url = URL.createObjectURL(blob);
|
|
406
|
+
|
|
407
|
+
// trigger download
|
|
408
|
+
const a = document.createElement('a');
|
|
409
|
+
a.href = url;
|
|
410
|
+
a.download = 'filename';
|
|
411
|
+
a.click();
|
|
412
|
+
URL.revokeObjectURL(url);
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
</details>
|
|
416
|
+
</blockquote>
|
|
417
|
+
|
|
418
|
+
<blockquote>
|
|
419
|
+
<details>
|
|
420
|
+
<summary>ReadableStream</summary>
|
|
421
|
+
|
|
422
|
+
```ts
|
|
423
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
424
|
+
|
|
425
|
+
const stream = response.stream();
|
|
426
|
+
const reader = stream.getReader();
|
|
427
|
+
const chunks = [];
|
|
428
|
+
|
|
429
|
+
while (true) {
|
|
430
|
+
const { done, value } = await reader.read();
|
|
431
|
+
if (done) break;
|
|
432
|
+
chunks.push(value);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const blob = new Blob(chunks);
|
|
436
|
+
const url = URL.createObjectURL(blob);
|
|
437
|
+
|
|
438
|
+
// trigger download
|
|
439
|
+
const a = document.createElement('a');
|
|
440
|
+
a.href = url;
|
|
441
|
+
a.download = 'filename';
|
|
442
|
+
a.click();
|
|
443
|
+
URL.revokeObjectURL(url);
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
</details>
|
|
447
|
+
</blockquote>
|
|
448
|
+
|
|
449
|
+
<blockquote>
|
|
450
|
+
<details>
|
|
451
|
+
<summary>ArrayBuffer</summary>
|
|
452
|
+
|
|
453
|
+
```ts
|
|
454
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
455
|
+
|
|
456
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
457
|
+
const blob = new Blob([arrayBuffer]);
|
|
458
|
+
const url = URL.createObjectURL(blob);
|
|
459
|
+
|
|
460
|
+
// trigger download
|
|
461
|
+
const a = document.createElement('a');
|
|
462
|
+
a.href = url;
|
|
463
|
+
a.download = 'filename';
|
|
464
|
+
a.click();
|
|
465
|
+
URL.revokeObjectURL(url);
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
</details>
|
|
469
|
+
</blockquote>
|
|
470
|
+
|
|
471
|
+
<blockquote>
|
|
472
|
+
<details>
|
|
473
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
477
|
+
|
|
478
|
+
const bytes = await response.bytes();
|
|
479
|
+
const blob = new Blob([bytes]);
|
|
480
|
+
const url = URL.createObjectURL(blob);
|
|
481
|
+
|
|
482
|
+
// trigger download
|
|
483
|
+
const a = document.createElement('a');
|
|
484
|
+
a.href = url;
|
|
485
|
+
a.download = 'filename';
|
|
486
|
+
a.click();
|
|
487
|
+
URL.revokeObjectURL(url);
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
</details>
|
|
491
|
+
</blockquote>
|
|
492
|
+
|
|
493
|
+
</details>
|
|
494
|
+
</blockquote>
|
|
495
|
+
|
|
496
|
+
</details>
|
|
497
|
+
</blockquote>
|
|
498
|
+
|
|
499
|
+
<details>
|
|
500
|
+
<summary>Convert binary response to text</summary>
|
|
501
|
+
|
|
502
|
+
<blockquote>
|
|
503
|
+
<details>
|
|
504
|
+
<summary>ReadableStream</summary>
|
|
505
|
+
|
|
506
|
+
```ts
|
|
507
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
508
|
+
|
|
509
|
+
const stream = response.stream();
|
|
510
|
+
const text = await new Response(stream).text();
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
</details>
|
|
514
|
+
</blockquote>
|
|
515
|
+
|
|
516
|
+
<blockquote>
|
|
517
|
+
<details>
|
|
518
|
+
<summary>ArrayBuffer</summary>
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
522
|
+
|
|
523
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
524
|
+
const text = new TextDecoder().decode(arrayBuffer);
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
</details>
|
|
528
|
+
</blockquote>
|
|
529
|
+
|
|
530
|
+
<blockquote>
|
|
531
|
+
<details>
|
|
532
|
+
<summary>Blob</summary>
|
|
533
|
+
|
|
534
|
+
```ts
|
|
535
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
536
|
+
|
|
537
|
+
const blob = await response.blob();
|
|
538
|
+
const text = await blob.text();
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
</details>
|
|
542
|
+
</blockquote>
|
|
543
|
+
|
|
544
|
+
<blockquote>
|
|
545
|
+
<details>
|
|
546
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
547
|
+
|
|
548
|
+
```ts
|
|
549
|
+
const response = await client.milestones.images.getByMetadataId(...);
|
|
550
|
+
|
|
551
|
+
const bytes = await response.bytes();
|
|
552
|
+
const text = new TextDecoder().decode(bytes);
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
</details>
|
|
556
|
+
</blockquote>
|
|
557
|
+
|
|
558
|
+
</details>
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ import { OffChrtShipperOrgConnectionInfo } from "./api/resources/offChrtShipperO
|
|
|
10
10
|
import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.js";
|
|
11
11
|
import { Orders } from "./api/resources/orders/client/Client.js";
|
|
12
12
|
import { CourierPayDriverRateSheets } from "./api/resources/courierPayDriverRateSheets/client/Client.js";
|
|
13
|
+
import { ShipperPayCourierRateSheets } from "./api/resources/shipperPayCourierRateSheets/client/Client.js";
|
|
13
14
|
import { CourierPayDriverLineItemGroup } from "./api/resources/courierPayDriverLineItemGroup/client/Client.js";
|
|
15
|
+
import { ShipperPayCourierLineItemGroup } from "./api/resources/shipperPayCourierLineItemGroup/client/Client.js";
|
|
16
|
+
import { ShipperPayCourierPayments } from "./api/resources/shipperPayCourierPayments/client/Client.js";
|
|
14
17
|
import { CourierPayDriverPayouts } from "./api/resources/courierPayDriverPayouts/client/Client.js";
|
|
15
18
|
import { Connections } from "./api/resources/connections/client/Client.js";
|
|
16
19
|
import { TaskGroups } from "./api/resources/taskGroups/client/Client.js";
|
|
@@ -52,7 +55,10 @@ export declare class ChrtClient {
|
|
|
52
55
|
protected _orgProfiles: OrgProfiles | undefined;
|
|
53
56
|
protected _orders: Orders | undefined;
|
|
54
57
|
protected _courierPayDriverRateSheets: CourierPayDriverRateSheets | undefined;
|
|
58
|
+
protected _shipperPayCourierRateSheets: ShipperPayCourierRateSheets | undefined;
|
|
55
59
|
protected _courierPayDriverLineItemGroup: CourierPayDriverLineItemGroup | undefined;
|
|
60
|
+
protected _shipperPayCourierLineItemGroup: ShipperPayCourierLineItemGroup | undefined;
|
|
61
|
+
protected _shipperPayCourierPayments: ShipperPayCourierPayments | undefined;
|
|
56
62
|
protected _courierPayDriverPayouts: CourierPayDriverPayouts | undefined;
|
|
57
63
|
protected _connections: Connections | undefined;
|
|
58
64
|
protected _taskGroups: TaskGroups | undefined;
|
|
@@ -72,7 +78,10 @@ export declare class ChrtClient {
|
|
|
72
78
|
get orgProfiles(): OrgProfiles;
|
|
73
79
|
get orders(): Orders;
|
|
74
80
|
get courierPayDriverRateSheets(): CourierPayDriverRateSheets;
|
|
81
|
+
get shipperPayCourierRateSheets(): ShipperPayCourierRateSheets;
|
|
75
82
|
get courierPayDriverLineItemGroup(): CourierPayDriverLineItemGroup;
|
|
83
|
+
get shipperPayCourierLineItemGroup(): ShipperPayCourierLineItemGroup;
|
|
84
|
+
get shipperPayCourierPayments(): ShipperPayCourierPayments;
|
|
76
85
|
get courierPayDriverPayouts(): CourierPayDriverPayouts;
|
|
77
86
|
get connections(): Connections;
|
|
78
87
|
get taskGroups(): TaskGroups;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -46,25 +46,28 @@ const Client_js_4 = require("./api/resources/offChrtShipperOrgConnectionInfo/cli
|
|
|
46
46
|
const Client_js_5 = require("./api/resources/orgProfiles/client/Client.js");
|
|
47
47
|
const Client_js_6 = require("./api/resources/orders/client/Client.js");
|
|
48
48
|
const Client_js_7 = require("./api/resources/courierPayDriverRateSheets/client/Client.js");
|
|
49
|
-
const Client_js_8 = require("./api/resources/
|
|
50
|
-
const Client_js_9 = require("./api/resources/
|
|
51
|
-
const Client_js_10 = require("./api/resources/
|
|
52
|
-
const Client_js_11 = require("./api/resources/
|
|
53
|
-
const Client_js_12 = require("./api/resources/
|
|
54
|
-
const Client_js_13 = require("./api/resources/
|
|
55
|
-
const Client_js_14 = require("./api/resources/
|
|
56
|
-
const Client_js_15 = require("./api/resources/
|
|
57
|
-
const Client_js_16 = require("./api/resources/
|
|
58
|
-
const Client_js_17 = require("./api/resources/
|
|
59
|
-
const Client_js_18 = require("./api/resources/
|
|
60
|
-
const Client_js_19 = require("./api/resources/
|
|
49
|
+
const Client_js_8 = require("./api/resources/shipperPayCourierRateSheets/client/Client.js");
|
|
50
|
+
const Client_js_9 = require("./api/resources/courierPayDriverLineItemGroup/client/Client.js");
|
|
51
|
+
const Client_js_10 = require("./api/resources/shipperPayCourierLineItemGroup/client/Client.js");
|
|
52
|
+
const Client_js_11 = require("./api/resources/shipperPayCourierPayments/client/Client.js");
|
|
53
|
+
const Client_js_12 = require("./api/resources/courierPayDriverPayouts/client/Client.js");
|
|
54
|
+
const Client_js_13 = require("./api/resources/connections/client/Client.js");
|
|
55
|
+
const Client_js_14 = require("./api/resources/taskGroups/client/Client.js");
|
|
56
|
+
const Client_js_15 = require("./api/resources/shipperContactInfo/client/Client.js");
|
|
57
|
+
const Client_js_16 = require("./api/resources/milestoneNotifications/client/Client.js");
|
|
58
|
+
const Client_js_17 = require("./api/resources/orgs/client/Client.js");
|
|
59
|
+
const Client_js_18 = require("./api/resources/payments/client/Client.js");
|
|
60
|
+
const Client_js_19 = require("./api/resources/root/client/Client.js");
|
|
61
|
+
const Client_js_20 = require("./api/resources/users/client/Client.js");
|
|
62
|
+
const Client_js_21 = require("./api/resources/notifications/client/Client.js");
|
|
63
|
+
const Client_js_22 = require("./api/resources/orgConnectionInfos/client/Client.js");
|
|
61
64
|
class ChrtClient {
|
|
62
65
|
constructor(_options = {}) {
|
|
63
66
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
64
67
|
"X-Fern-Language": "JavaScript",
|
|
65
68
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
66
|
-
"X-Fern-SDK-Version": "0.0.
|
|
67
|
-
"User-Agent": "@chrt-inc/typescript-sdk/0.0.
|
|
69
|
+
"X-Fern-SDK-Version": "0.0.185",
|
|
70
|
+
"User-Agent": "@chrt-inc/typescript-sdk/0.0.185",
|
|
68
71
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
69
72
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
70
73
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -97,53 +100,65 @@ class ChrtClient {
|
|
|
97
100
|
var _a;
|
|
98
101
|
return ((_a = this._courierPayDriverRateSheets) !== null && _a !== void 0 ? _a : (this._courierPayDriverRateSheets = new Client_js_7.CourierPayDriverRateSheets(this._options)));
|
|
99
102
|
}
|
|
103
|
+
get shipperPayCourierRateSheets() {
|
|
104
|
+
var _a;
|
|
105
|
+
return ((_a = this._shipperPayCourierRateSheets) !== null && _a !== void 0 ? _a : (this._shipperPayCourierRateSheets = new Client_js_8.ShipperPayCourierRateSheets(this._options)));
|
|
106
|
+
}
|
|
100
107
|
get courierPayDriverLineItemGroup() {
|
|
101
108
|
var _a;
|
|
102
|
-
return ((_a = this._courierPayDriverLineItemGroup) !== null && _a !== void 0 ? _a : (this._courierPayDriverLineItemGroup = new
|
|
109
|
+
return ((_a = this._courierPayDriverLineItemGroup) !== null && _a !== void 0 ? _a : (this._courierPayDriverLineItemGroup = new Client_js_9.CourierPayDriverLineItemGroup(this._options)));
|
|
110
|
+
}
|
|
111
|
+
get shipperPayCourierLineItemGroup() {
|
|
112
|
+
var _a;
|
|
113
|
+
return ((_a = this._shipperPayCourierLineItemGroup) !== null && _a !== void 0 ? _a : (this._shipperPayCourierLineItemGroup = new Client_js_10.ShipperPayCourierLineItemGroup(this._options)));
|
|
114
|
+
}
|
|
115
|
+
get shipperPayCourierPayments() {
|
|
116
|
+
var _a;
|
|
117
|
+
return ((_a = this._shipperPayCourierPayments) !== null && _a !== void 0 ? _a : (this._shipperPayCourierPayments = new Client_js_11.ShipperPayCourierPayments(this._options)));
|
|
103
118
|
}
|
|
104
119
|
get courierPayDriverPayouts() {
|
|
105
120
|
var _a;
|
|
106
|
-
return ((_a = this._courierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._courierPayDriverPayouts = new
|
|
121
|
+
return ((_a = this._courierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._courierPayDriverPayouts = new Client_js_12.CourierPayDriverPayouts(this._options)));
|
|
107
122
|
}
|
|
108
123
|
get connections() {
|
|
109
124
|
var _a;
|
|
110
|
-
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new
|
|
125
|
+
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_js_13.Connections(this._options)));
|
|
111
126
|
}
|
|
112
127
|
get taskGroups() {
|
|
113
128
|
var _a;
|
|
114
|
-
return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new
|
|
129
|
+
return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new Client_js_14.TaskGroups(this._options)));
|
|
115
130
|
}
|
|
116
131
|
get shipperContactInfo() {
|
|
117
132
|
var _a;
|
|
118
|
-
return ((_a = this._shipperContactInfo) !== null && _a !== void 0 ? _a : (this._shipperContactInfo = new
|
|
133
|
+
return ((_a = this._shipperContactInfo) !== null && _a !== void 0 ? _a : (this._shipperContactInfo = new Client_js_15.ShipperContactInfo(this._options)));
|
|
119
134
|
}
|
|
120
135
|
get milestoneNotifications() {
|
|
121
136
|
var _a;
|
|
122
|
-
return ((_a = this._milestoneNotifications) !== null && _a !== void 0 ? _a : (this._milestoneNotifications = new
|
|
137
|
+
return ((_a = this._milestoneNotifications) !== null && _a !== void 0 ? _a : (this._milestoneNotifications = new Client_js_16.MilestoneNotifications(this._options)));
|
|
123
138
|
}
|
|
124
139
|
get orgs() {
|
|
125
140
|
var _a;
|
|
126
|
-
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new
|
|
141
|
+
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_17.Orgs(this._options)));
|
|
127
142
|
}
|
|
128
143
|
get payments() {
|
|
129
144
|
var _a;
|
|
130
|
-
return ((_a = this._payments) !== null && _a !== void 0 ? _a : (this._payments = new
|
|
145
|
+
return ((_a = this._payments) !== null && _a !== void 0 ? _a : (this._payments = new Client_js_18.Payments(this._options)));
|
|
131
146
|
}
|
|
132
147
|
get root() {
|
|
133
148
|
var _a;
|
|
134
|
-
return ((_a = this._root) !== null && _a !== void 0 ? _a : (this._root = new
|
|
149
|
+
return ((_a = this._root) !== null && _a !== void 0 ? _a : (this._root = new Client_js_19.Root(this._options)));
|
|
135
150
|
}
|
|
136
151
|
get users() {
|
|
137
152
|
var _a;
|
|
138
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
153
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_20.Users(this._options)));
|
|
139
154
|
}
|
|
140
155
|
get notifications() {
|
|
141
156
|
var _a;
|
|
142
|
-
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new
|
|
157
|
+
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_21.Notifications(this._options)));
|
|
143
158
|
}
|
|
144
159
|
get orgConnectionInfos() {
|
|
145
160
|
var _a;
|
|
146
|
-
return ((_a = this._orgConnectionInfos) !== null && _a !== void 0 ? _a : (this._orgConnectionInfos = new
|
|
161
|
+
return ((_a = this._orgConnectionInfos) !== null && _a !== void 0 ? _a : (this._orgConnectionInfos = new Client_js_22.OrgConnectionInfos(this._options)));
|
|
147
162
|
}
|
|
148
163
|
}
|
|
149
164
|
exports.ChrtClient = ChrtClient;
|
|
@@ -37,7 +37,7 @@ export declare class CourierPayDriverLineItemGroup {
|
|
|
37
37
|
/**
|
|
38
38
|
* Previews calculated line items for a driver based on rate sheet and task group without creating the group.
|
|
39
39
|
*
|
|
40
|
-
* @param {Chrt.
|
|
40
|
+
* @param {Chrt.CourierPayDriverLineItemGroupPreviewReq} request
|
|
41
41
|
* @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
42
|
*
|
|
43
43
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -45,10 +45,11 @@ export declare class CourierPayDriverLineItemGroup {
|
|
|
45
45
|
* @example
|
|
46
46
|
* await client.courierPayDriverLineItemGroup.preview({
|
|
47
47
|
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
48
|
-
* task_group_id: "task_group_id"
|
|
48
|
+
* task_group_id: "task_group_id",
|
|
49
|
+
* driver_id: "driver_id"
|
|
49
50
|
* })
|
|
50
51
|
*/
|
|
51
|
-
preview(request: Chrt.
|
|
52
|
+
preview(request: Chrt.CourierPayDriverLineItemGroupPreviewReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
|
|
52
53
|
private __preview;
|
|
53
54
|
/**
|
|
54
55
|
* Retrieves a courier driver line item group by its ID.
|
|
@@ -79,7 +80,7 @@ export declare class CourierPayDriverLineItemGroup {
|
|
|
79
80
|
/**
|
|
80
81
|
* Creates a courier driver line item group by calculating items from rate sheet and task group.
|
|
81
82
|
*
|
|
82
|
-
* @param {Chrt.
|
|
83
|
+
* @param {Chrt.CourierPayDriverLineItemGroupCreateReq} request
|
|
83
84
|
* @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
85
|
*
|
|
85
86
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -90,7 +91,7 @@ export declare class CourierPayDriverLineItemGroup {
|
|
|
90
91
|
* task_group_id: "task_group_id"
|
|
91
92
|
* })
|
|
92
93
|
*/
|
|
93
|
-
create(request: Chrt.
|
|
94
|
+
create(request: Chrt.CourierPayDriverLineItemGroupCreateReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
|
|
94
95
|
private __create;
|
|
95
96
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
96
97
|
}
|