@chrt-inc/typescript-sdk 1.530.0 → 1.539.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 +1 -1
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/billing/index.d.ts +1 -1
- package/dist/cjs/api/resources/billing/index.js +1 -1
- package/dist/cjs/api/resources/billing/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/billing/resources/index.js +2 -3
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +5 -1
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListForCourierOrgV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/billing/resources/rateSheets/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/billing/resources/rateSheets/client/Client.js +7 -3
- package/dist/cjs/api/resources/billing/resources/rateSheets/client/requests/RateSheetsListByOrgV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/billing/resources/rateSheets/index.d.ts +0 -1
- package/dist/cjs/api/resources/billing/resources/rateSheets/index.js +0 -1
- package/dist/cjs/api/resources/billing/resources/statements/client/Client.d.ts +8 -2
- package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +28 -4
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.ts +10 -1
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +10 -1
- package/dist/cjs/api/resources/index.d.ts +2 -2
- package/dist/cjs/api/resources/index.js +3 -3
- package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.d.ts +7 -3
- package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.js +23 -11
- package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/AdHocListByOrderIdV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/resources/groups/client/Client.d.ts +18 -6
- package/dist/cjs/api/resources/notifications/resources/groups/client/Client.js +71 -36
- package/dist/cjs/api/resources/notifications/resources/groups/client/requests/GroupsListByOrgV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/notifications/resources/groups/client/requests/GroupsListByUserV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/notifications/resources/groups/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +11 -3
- package/dist/cjs/api/resources/orgs/client/Client.js +51 -16
- package/dist/cjs/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.ts +23 -0
- package/dist/cjs/api/resources/orgs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/Client.d.ts +27 -9
- package/dist/cjs/api/resources/orgs/resources/connections/client/Client.js +105 -48
- package/dist/cjs/api/resources/orgs/resources/connections/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/index.js +15 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListCouriersV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListCouriersV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListForwardersV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListForwardersV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/resources/connections/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orgs/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/index.js +1 -0
- package/dist/cjs/api/resources/orgs/resources/offChrtShipperOrg/client/Client.d.ts +9 -3
- package/dist/cjs/api/resources/orgs/resources/offChrtShipperOrg/client/Client.js +35 -16
- package/dist/cjs/api/resources/orgs/resources/offChrtShipperOrg/client/requests/OffChrtShipperOrgListV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/orgs/resources/offChrtShipperOrg/client/requests/OffChrtShipperOrgListV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/offChrtShipperOrg/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/index.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/index.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +14 -8
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +58 -24
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.ts +11 -4
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.ts +17 -6
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +3 -3
- package/dist/cjs/api/resources/shipping/resources/index.js +4 -4
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftUpdateReq.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/index.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/index.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.ts +3 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/index.js +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/index.js +2 -3
- package/dist/cjs/api/resources/shipping/resources/orders/index.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/index.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +22 -4
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +82 -6
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedTypeaheadV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/index.js +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/index.js +0 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/index.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/index.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.ts +22 -4
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.js +82 -6
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedTypeaheadV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/index.js +0 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/index.js +2 -3
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +5 -20
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +15 -79
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesListV1Request.d.ts +10 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +1 -18
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +5 -77
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.ts +4 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/users/resources/directoryEntries/client/Client.d.ts +12 -3
- package/dist/cjs/api/resources/users/resources/directoryEntries/client/Client.js +47 -16
- package/dist/cjs/api/resources/users/resources/directoryEntries/client/requests/DirectoryEntriesListV1Request.d.ts +24 -0
- package/dist/cjs/api/resources/users/resources/directoryEntries/client/requests/DirectoryEntriesListV1Request.js +5 -0
- package/dist/cjs/api/resources/users/resources/directoryEntries/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/CourierConnectionListRes.d.ts +8 -0
- package/dist/cjs/api/types/CourierConnectionListRes.js +5 -0
- package/dist/cjs/api/types/DeviceLimitedForList1.d.ts +1 -0
- package/dist/cjs/api/types/DeviceListRes.d.ts +1 -1
- package/dist/cjs/api/types/DevicePausedTimeWindow1.d.ts +7 -0
- package/dist/cjs/api/types/DevicePausedTimeWindow1.js +5 -0
- package/dist/cjs/api/types/{DeviceSearchRes.d.ts → DirectoryEntryListRes.d.ts} +2 -2
- package/dist/cjs/api/types/DirectoryEntryListRes.js +5 -0
- package/dist/cjs/api/types/DirectoryEntrySortByEnum.d.ts +9 -0
- package/dist/cjs/api/types/DirectoryEntrySortByEnum.js +11 -0
- package/dist/cjs/api/types/{SessionSearchRes.d.ts → DriverListRes.d.ts} +2 -2
- package/dist/cjs/api/types/DriverListRes.js +5 -0
- package/dist/cjs/api/types/ForwarderConnectionListRes.d.ts +8 -0
- package/dist/cjs/api/types/ForwarderConnectionListRes.js +5 -0
- package/dist/cjs/api/types/LineItemGroupListRes.d.ts +1 -1
- package/dist/cjs/api/types/NotificationAdHocListRes.d.ts +8 -0
- package/dist/cjs/api/types/NotificationAdHocListRes.js +5 -0
- package/dist/cjs/api/types/NotificationGroupListRes.d.ts +8 -0
- package/dist/cjs/api/types/NotificationGroupListRes.js +5 -0
- package/dist/cjs/api/types/NotificationGroupUserListRes.d.ts +8 -0
- package/dist/cjs/api/types/NotificationGroupUserListRes.js +5 -0
- package/dist/cjs/api/types/OffChrtShipperOrgListRes.d.ts +8 -0
- package/dist/cjs/api/types/OffChrtShipperOrgListRes.js +5 -0
- package/dist/cjs/api/types/OrderDraftExpandedListRes.d.ts +1 -1
- package/dist/cjs/api/types/OrdersExpandedListRes.d.ts +1 -1
- package/dist/cjs/api/types/OrgMemberListRes.d.ts +8 -0
- package/dist/cjs/api/types/OrgMemberListRes.js +5 -0
- package/dist/cjs/api/types/OrgMemberSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/OrgMemberSortByEnum.js +10 -0
- package/dist/cjs/api/types/OrgMembersAndDriversListRes.d.ts +8 -0
- package/dist/cjs/api/types/OrgMembersAndDriversListRes.js +5 -0
- package/dist/cjs/api/types/RateSheetListResponse.d.ts +1 -1
- package/dist/cjs/api/types/SessionListRes.d.ts +1 -1
- package/dist/cjs/api/types/ShipperConnectionListRes.d.ts +8 -0
- package/dist/cjs/api/types/ShipperConnectionListRes.js +5 -0
- package/dist/cjs/api/types/StatementsExpandedListRes.d.ts +1 -1
- package/dist/cjs/api/types/StatementsListRes.d.ts +1 -1
- package/dist/cjs/api/types/TaskGroupExpandedListRes.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +14 -2
- package/dist/cjs/api/types/index.js +14 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/billing/index.d.mts +1 -1
- package/dist/esm/api/resources/billing/index.mjs +1 -1
- package/dist/esm/api/resources/billing/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/billing/resources/index.mjs +1 -2
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +5 -1
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListForCourierOrgV1Request.d.mts +3 -0
- package/dist/esm/api/resources/billing/resources/rateSheets/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/billing/resources/rateSheets/client/Client.mjs +7 -3
- package/dist/esm/api/resources/billing/resources/rateSheets/client/requests/RateSheetsListByOrgV1Request.d.mts +6 -2
- package/dist/esm/api/resources/billing/resources/rateSheets/index.d.mts +0 -1
- package/dist/esm/api/resources/billing/resources/rateSheets/index.mjs +0 -1
- package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +8 -2
- package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +28 -4
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.mts +10 -1
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +10 -1
- package/dist/esm/api/resources/index.d.mts +2 -2
- package/dist/esm/api/resources/index.mjs +2 -2
- package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.d.mts +7 -3
- package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.mjs +23 -11
- package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/AdHocListByOrderIdV1Request.d.mts +14 -0
- package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/resources/groups/client/Client.d.mts +18 -6
- package/dist/esm/api/resources/notifications/resources/groups/client/Client.mjs +71 -36
- package/dist/esm/api/resources/notifications/resources/groups/client/requests/GroupsListByOrgV1Request.d.mts +14 -0
- package/dist/esm/api/resources/notifications/resources/groups/client/requests/GroupsListByUserV1Request.d.mts +14 -0
- package/dist/esm/api/resources/notifications/resources/groups/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/client/Client.d.mts +11 -3
- package/dist/esm/api/resources/orgs/client/Client.mjs +51 -16
- package/dist/esm/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.mts +23 -0
- package/dist/esm/api/resources/orgs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/Client.d.mts +27 -9
- package/dist/esm/api/resources/orgs/resources/connections/client/Client.mjs +105 -48
- package/dist/esm/api/resources/orgs/resources/connections/client/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/index.mjs +1 -1
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListCouriersV1Request.d.mts +14 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListCouriersV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListForwardersV1Request.d.mts +14 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListForwardersV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersV1Request.d.mts +14 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/orgs/resources/connections/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/offChrtShipperOrg/client/Client.d.mts +9 -3
- package/dist/esm/api/resources/orgs/resources/offChrtShipperOrg/client/Client.mjs +35 -16
- package/dist/esm/api/resources/orgs/resources/offChrtShipperOrg/client/requests/OffChrtShipperOrgListV1Request.d.mts +14 -0
- package/dist/esm/api/resources/orgs/resources/offChrtShipperOrg/client/requests/OffChrtShipperOrgListV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/offChrtShipperOrg/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/index.d.mts +1 -1
- package/dist/esm/api/resources/shipping/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +14 -8
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +58 -24
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.mts +11 -4
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts +17 -6
- package/dist/esm/api/resources/shipping/resources/index.d.mts +3 -3
- package/dist/esm/api/resources/shipping/resources/index.mjs +3 -3
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftUpdateReq.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/index.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.mts +3 -2
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/index.mjs +1 -2
- package/dist/esm/api/resources/shipping/resources/orders/index.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +22 -4
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +82 -6
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +6 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +6 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedTypeaheadV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/index.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.mts +22 -4
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.mjs +82 -6
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +6 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +6 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedTypeaheadV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/index.mjs +1 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +5 -20
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +15 -79
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesListV1Request.d.mts +10 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +1 -18
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +5 -77
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.mts +4 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/users/resources/directoryEntries/client/Client.d.mts +12 -3
- package/dist/esm/api/resources/users/resources/directoryEntries/client/Client.mjs +47 -16
- package/dist/esm/api/resources/users/resources/directoryEntries/client/requests/DirectoryEntriesListV1Request.d.mts +24 -0
- package/dist/esm/api/resources/users/resources/directoryEntries/client/requests/DirectoryEntriesListV1Request.mjs +4 -0
- package/dist/esm/api/resources/users/resources/directoryEntries/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/CourierConnectionListRes.d.mts +8 -0
- package/dist/esm/api/types/CourierConnectionListRes.mjs +4 -0
- package/dist/esm/api/types/DeviceLimitedForList1.d.mts +1 -0
- package/dist/esm/api/types/DeviceListRes.d.mts +1 -1
- package/dist/esm/api/types/DevicePausedTimeWindow1.d.mts +7 -0
- package/dist/esm/api/types/DevicePausedTimeWindow1.mjs +4 -0
- package/dist/esm/api/types/{DeviceSearchRes.d.mts → DirectoryEntryListRes.d.mts} +2 -2
- package/dist/esm/api/types/DirectoryEntryListRes.mjs +4 -0
- package/dist/esm/api/types/DirectoryEntrySortByEnum.d.mts +9 -0
- package/dist/esm/api/types/DirectoryEntrySortByEnum.mjs +8 -0
- package/dist/esm/api/types/{SessionSearchRes.d.mts → DriverListRes.d.mts} +2 -2
- package/dist/esm/api/types/DriverListRes.mjs +4 -0
- package/dist/esm/api/types/ForwarderConnectionListRes.d.mts +8 -0
- package/dist/esm/api/types/ForwarderConnectionListRes.mjs +4 -0
- package/dist/esm/api/types/LineItemGroupListRes.d.mts +1 -1
- package/dist/esm/api/types/NotificationAdHocListRes.d.mts +8 -0
- package/dist/esm/api/types/NotificationAdHocListRes.mjs +4 -0
- package/dist/esm/api/types/NotificationGroupListRes.d.mts +8 -0
- package/dist/esm/api/types/NotificationGroupListRes.mjs +4 -0
- package/dist/esm/api/types/NotificationGroupUserListRes.d.mts +8 -0
- package/dist/esm/api/types/NotificationGroupUserListRes.mjs +4 -0
- package/dist/esm/api/types/OffChrtShipperOrgListRes.d.mts +8 -0
- package/dist/esm/api/types/OffChrtShipperOrgListRes.mjs +4 -0
- package/dist/esm/api/types/OrderDraftExpandedListRes.d.mts +1 -1
- package/dist/esm/api/types/OrdersExpandedListRes.d.mts +1 -1
- package/dist/esm/api/types/OrgMemberListRes.d.mts +8 -0
- package/dist/esm/api/types/OrgMemberListRes.mjs +4 -0
- package/dist/esm/api/types/OrgMemberSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/OrgMemberSortByEnum.mjs +7 -0
- package/dist/esm/api/types/OrgMembersAndDriversListRes.d.mts +8 -0
- package/dist/esm/api/types/OrgMembersAndDriversListRes.mjs +4 -0
- package/dist/esm/api/types/RateSheetListResponse.d.mts +1 -1
- package/dist/esm/api/types/SessionListRes.d.mts +1 -1
- package/dist/esm/api/types/ShipperConnectionListRes.d.mts +8 -0
- package/dist/esm/api/types/ShipperConnectionListRes.mjs +4 -0
- package/dist/esm/api/types/StatementsExpandedListRes.d.mts +1 -1
- package/dist/esm/api/types/StatementsListRes.d.mts +1 -1
- package/dist/esm/api/types/TaskGroupExpandedListRes.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +14 -2
- package/dist/esm/api/types/index.mjs +14 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +302 -180
- package/dist/cjs/api/resources/billing/resources/rateSheets/types/RateSheetsListByOrgV1RequestSortOrder.d.ts +0 -8
- package/dist/cjs/api/resources/billing/resources/rateSheets/types/RateSheetsListByOrgV1RequestSortOrder.js +0 -10
- package/dist/cjs/api/resources/billing/resources/rateSheets/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/billing/resources/rateSheets/types/index.js +0 -17
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.ts +0 -8
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.js +0 -10
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/types/index.js +0 -17
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.d.ts +0 -8
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.js +0 -10
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.d.ts +0 -8
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.js +0 -10
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/types/index.js +0 -18
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.d.ts +0 -8
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.js +0 -10
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.d.ts +0 -8
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.js +0 -10
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/types/index.js +0 -18
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesSearchV1Request.d.ts +0 -21
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.d.ts +0 -21
- package/dist/esm/api/resources/billing/resources/rateSheets/types/RateSheetsListByOrgV1RequestSortOrder.d.mts +0 -8
- package/dist/esm/api/resources/billing/resources/rateSheets/types/RateSheetsListByOrgV1RequestSortOrder.mjs +0 -7
- package/dist/esm/api/resources/billing/resources/rateSheets/types/index.d.mts +0 -1
- package/dist/esm/api/resources/billing/resources/rateSheets/types/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.mts +0 -8
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.mjs +0 -7
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/types/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/types/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.d.mts +0 -8
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.mjs +0 -7
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.d.mts +0 -8
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.mjs +0 -7
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/types/index.d.mts +0 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/types/index.mjs +0 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.d.mts +0 -8
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.mjs +0 -7
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.d.mts +0 -8
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.mjs +0 -7
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/types/index.d.mts +0 -2
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/types/index.mjs +0 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesSearchV1Request.d.mts +0 -21
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.d.mts +0 -21
- /package/dist/cjs/api/resources/{tracking/resources/devices/client/requests/DevicesSearchV1Request.js → notifications/resources/adHoc/client/requests/AdHocListByOrderIdV1Request.js} +0 -0
- /package/dist/cjs/api/resources/{tracking/resources/sessions/client/requests/SessionsSearchV1Request.js → notifications/resources/groups/client/requests/GroupsListByOrgV1Request.js} +0 -0
- /package/dist/cjs/api/{types/DeviceSearchRes.js → resources/notifications/resources/groups/client/requests/GroupsListByUserV1Request.js} +0 -0
- /package/dist/cjs/api/{types/SessionSearchRes.js → resources/orgs/client/requests/OrgsListMembersV1Request.js} +0 -0
- /package/dist/esm/api/resources/{tracking/resources/devices/client/requests/DevicesSearchV1Request.mjs → notifications/resources/adHoc/client/requests/AdHocListByOrderIdV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/{tracking/resources/sessions/client/requests/SessionsSearchV1Request.mjs → notifications/resources/groups/client/requests/GroupsListByOrgV1Request.mjs} +0 -0
- /package/dist/esm/api/{types/DeviceSearchRes.mjs → resources/notifications/resources/groups/client/requests/GroupsListByUserV1Request.mjs} +0 -0
- /package/dist/esm/api/{types/SessionSearchRes.mjs → resources/orgs/client/requests/OrgsListMembersV1Request.mjs} +0 -0
|
@@ -20,25 +20,39 @@ export class Groups {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Lists all notification groups for the caller's organization. | authz: min_org_role=operator | () -> (
|
|
23
|
+
* Lists all notification groups for the caller's organization. | authz: min_org_role=operator | () -> (NotificationGroupListRes)
|
|
24
24
|
*
|
|
25
|
+
* @param {Chrt.notifications.GroupsListByOrgV1Request} request
|
|
25
26
|
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
27
|
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
27
30
|
* @example
|
|
28
|
-
* await client.notifications.groups.listByOrgV1(
|
|
31
|
+
* await client.notifications.groups.listByOrgV1({
|
|
32
|
+
* page: 1,
|
|
33
|
+
* page_size: 1
|
|
34
|
+
* })
|
|
29
35
|
*/
|
|
30
|
-
listByOrgV1(requestOptions) {
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.__listByOrgV1(requestOptions));
|
|
36
|
+
listByOrgV1(request = {}, requestOptions) {
|
|
37
|
+
return core.HttpResponsePromise.fromPromise(this.__listByOrgV1(request, requestOptions));
|
|
32
38
|
}
|
|
33
|
-
__listByOrgV1(
|
|
34
|
-
return __awaiter(this,
|
|
35
|
-
var _a, _b, _c, _d;
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
+
__listByOrgV1() {
|
|
40
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
41
|
+
var _a, _b, _c, _d, _e, _f;
|
|
42
|
+
const { page, page_size: pageSize } = request;
|
|
43
|
+
const _queryParams = {};
|
|
44
|
+
if (page !== undefined) {
|
|
45
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
46
|
+
}
|
|
47
|
+
if (pageSize !== undefined) {
|
|
48
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
49
|
+
}
|
|
50
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
52
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "notifications/groups/list_by_org/v1"),
|
|
39
53
|
method: "GET",
|
|
40
54
|
headers: _headers,
|
|
41
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
42
56
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
43
57
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
44
58
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -47,11 +61,16 @@ export class Groups {
|
|
|
47
61
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
48
62
|
}
|
|
49
63
|
if (_response.error.reason === "status-code") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
switch (_response.error.statusCode) {
|
|
65
|
+
case 422:
|
|
66
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
67
|
+
default:
|
|
68
|
+
throw new errors.ChrtError({
|
|
69
|
+
statusCode: _response.error.statusCode,
|
|
70
|
+
body: _response.error.body,
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
55
74
|
}
|
|
56
75
|
switch (_response.error.reason) {
|
|
57
76
|
case "non-json":
|
|
@@ -130,41 +149,57 @@ export class Groups {
|
|
|
130
149
|
});
|
|
131
150
|
}
|
|
132
151
|
/**
|
|
133
|
-
* Lists notification groups the caller is a member of. | () -> (
|
|
152
|
+
* Lists notification groups the caller is a member of. | () -> (NotificationGroupUserListRes)
|
|
134
153
|
*
|
|
154
|
+
* @param {Chrt.notifications.GroupsListByUserV1Request} request
|
|
135
155
|
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
156
|
*
|
|
157
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
158
|
+
*
|
|
137
159
|
* @example
|
|
138
|
-
* await client.notifications.groups.listByUserV1(
|
|
160
|
+
* await client.notifications.groups.listByUserV1({
|
|
161
|
+
* page: 1,
|
|
162
|
+
* page_size: 1
|
|
163
|
+
* })
|
|
139
164
|
*/
|
|
140
|
-
listByUserV1(requestOptions) {
|
|
141
|
-
return core.HttpResponsePromise.fromPromise(this.__listByUserV1(requestOptions));
|
|
165
|
+
listByUserV1(request = {}, requestOptions) {
|
|
166
|
+
return core.HttpResponsePromise.fromPromise(this.__listByUserV1(request, requestOptions));
|
|
142
167
|
}
|
|
143
|
-
__listByUserV1(
|
|
144
|
-
return __awaiter(this,
|
|
145
|
-
var _a, _b, _c, _d;
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
|
|
168
|
+
__listByUserV1() {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
170
|
+
var _a, _b, _c, _d, _e, _f;
|
|
171
|
+
const { page, page_size: pageSize } = request;
|
|
172
|
+
const _queryParams = {};
|
|
173
|
+
if (page !== undefined) {
|
|
174
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
175
|
+
}
|
|
176
|
+
if (pageSize !== undefined) {
|
|
177
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
178
|
+
}
|
|
179
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
180
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
181
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "notifications/groups/list_by_user/v1"),
|
|
149
182
|
method: "GET",
|
|
150
183
|
headers: _headers,
|
|
151
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
184
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
152
185
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
153
186
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
154
187
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
155
188
|
});
|
|
156
189
|
if (_response.ok) {
|
|
157
|
-
return {
|
|
158
|
-
data: _response.body,
|
|
159
|
-
rawResponse: _response.rawResponse,
|
|
160
|
-
};
|
|
190
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
161
191
|
}
|
|
162
192
|
if (_response.error.reason === "status-code") {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
193
|
+
switch (_response.error.statusCode) {
|
|
194
|
+
case 422:
|
|
195
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
196
|
+
default:
|
|
197
|
+
throw new errors.ChrtError({
|
|
198
|
+
statusCode: _response.error.statusCode,
|
|
199
|
+
body: _response.error.body,
|
|
200
|
+
rawResponse: _response.rawResponse,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
168
203
|
}
|
|
169
204
|
switch (_response.error.reason) {
|
|
170
205
|
case "non-json":
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
export { type GroupsListByOrgV1Request } from "./GroupsListByOrgV1Request.mjs";
|
|
2
|
+
export { type GroupsListByUserV1Request } from "./GroupsListByUserV1Request.mjs";
|
|
1
3
|
export { type NotificationGroupClientCreate1 } from "./NotificationGroupClientCreate1.mjs";
|
|
2
4
|
export { type GroupsUpdateNameV1Request } from "./GroupsUpdateNameV1Request.mjs";
|
|
@@ -59,14 +59,22 @@ export declare class Orgs {
|
|
|
59
59
|
getInfoV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgInfoResponse>;
|
|
60
60
|
private __getInfoV1;
|
|
61
61
|
/**
|
|
62
|
-
* Lists all members of the caller's organization with their roles and details. | () -> (
|
|
62
|
+
* Lists all members of the caller's organization with their roles and details. | () -> (OrgMemberListRes)
|
|
63
63
|
*
|
|
64
|
+
* @param {Chrt.OrgsListMembersV1Request} request
|
|
64
65
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
66
|
*
|
|
67
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
68
|
+
*
|
|
66
69
|
* @example
|
|
67
|
-
* await client.orgs.listMembersV1(
|
|
70
|
+
* await client.orgs.listMembersV1({
|
|
71
|
+
* sort_by: "first_name",
|
|
72
|
+
* sort_order: "asc",
|
|
73
|
+
* page: 1,
|
|
74
|
+
* page_size: 1
|
|
75
|
+
* })
|
|
68
76
|
*/
|
|
69
|
-
listMembersV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.
|
|
77
|
+
listMembersV1(request?: Chrt.OrgsListMembersV1Request, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberListRes>;
|
|
70
78
|
private __listMembersV1;
|
|
71
79
|
/**
|
|
72
80
|
* Sets the org_type in Clerk's JWT public metadata. Returns True if already set and matching, sets it if not present, or raises exception if conflicting. | (SetOrgTypeReq) -> (bool)
|
|
@@ -101,25 +101,55 @@ export class Orgs {
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
|
-
* Lists all members of the caller's organization with their roles and details. | () -> (
|
|
104
|
+
* Lists all members of the caller's organization with their roles and details. | () -> (OrgMemberListRes)
|
|
105
105
|
*
|
|
106
|
+
* @param {Chrt.OrgsListMembersV1Request} request
|
|
106
107
|
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
108
|
*
|
|
109
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
110
|
+
*
|
|
108
111
|
* @example
|
|
109
|
-
* await client.orgs.listMembersV1(
|
|
112
|
+
* await client.orgs.listMembersV1({
|
|
113
|
+
* sort_by: "first_name",
|
|
114
|
+
* sort_order: "asc",
|
|
115
|
+
* page: 1,
|
|
116
|
+
* page_size: 1
|
|
117
|
+
* })
|
|
110
118
|
*/
|
|
111
|
-
listMembersV1(requestOptions) {
|
|
112
|
-
return core.HttpResponsePromise.fromPromise(this.__listMembersV1(requestOptions));
|
|
119
|
+
listMembersV1(request = {}, requestOptions) {
|
|
120
|
+
return core.HttpResponsePromise.fromPromise(this.__listMembersV1(request, requestOptions));
|
|
113
121
|
}
|
|
114
|
-
__listMembersV1(
|
|
115
|
-
return __awaiter(this,
|
|
116
|
-
var _a, _b, _c, _d;
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
122
|
+
__listMembersV1() {
|
|
123
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
124
|
+
var _a, _b, _c, _d, _e, _f;
|
|
125
|
+
const { filter_role: filterRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize } = request;
|
|
126
|
+
const _queryParams = {};
|
|
127
|
+
if (filterRole !== undefined) {
|
|
128
|
+
if (Array.isArray(filterRole)) {
|
|
129
|
+
_queryParams["filter_role"] = filterRole.map((item) => item);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
_queryParams["filter_role"] = filterRole;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (sortBy !== undefined) {
|
|
136
|
+
_queryParams["sort_by"] = sortBy;
|
|
137
|
+
}
|
|
138
|
+
if (sortOrder !== undefined) {
|
|
139
|
+
_queryParams["sort_order"] = sortOrder;
|
|
140
|
+
}
|
|
141
|
+
if (page !== undefined) {
|
|
142
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
143
|
+
}
|
|
144
|
+
if (pageSize !== undefined) {
|
|
145
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
146
|
+
}
|
|
147
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
148
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
149
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "orgs/members/list/v1"),
|
|
120
150
|
method: "GET",
|
|
121
151
|
headers: _headers,
|
|
122
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
152
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
123
153
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
124
154
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
125
155
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -128,11 +158,16 @@ export class Orgs {
|
|
|
128
158
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
129
159
|
}
|
|
130
160
|
if (_response.error.reason === "status-code") {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
161
|
+
switch (_response.error.statusCode) {
|
|
162
|
+
case 422:
|
|
163
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
164
|
+
default:
|
|
165
|
+
throw new errors.ChrtError({
|
|
166
|
+
statusCode: _response.error.statusCode,
|
|
167
|
+
body: _response.error.body,
|
|
168
|
+
rawResponse: _response.rawResponse,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
136
171
|
}
|
|
137
172
|
switch (_response.error.reason) {
|
|
138
173
|
case "non-json":
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* sort_by: "first_name",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface OrgsListMembersV1Request {
|
|
15
|
+
/** Filter by organization role(s) */
|
|
16
|
+
filter_role?: (Chrt.OrgRoleEnum | null) | (Chrt.OrgRoleEnum | null)[];
|
|
17
|
+
/** Field to sort by */
|
|
18
|
+
sort_by?: Chrt.OrgMemberSortByEnum | null;
|
|
19
|
+
/** Sort order (asc or desc) */
|
|
20
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
21
|
+
page?: number | null;
|
|
22
|
+
page_size?: number | null;
|
|
23
|
+
}
|
|
@@ -31,34 +31,52 @@ export declare class Connections {
|
|
|
31
31
|
protected readonly _options: Connections.Options;
|
|
32
32
|
constructor(_options?: Connections.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Lists shipper organizations based on the caller's organization type. Couriers see connected shippers, forwarders see connected shippers. | () -> (
|
|
34
|
+
* Lists shipper organizations based on the caller's organization type. Couriers see connected shippers, forwarders see connected shippers. | () -> (ShipperConnectionListRes)
|
|
35
35
|
*
|
|
36
|
+
* @param {Chrt.orgs.ConnectionsListShippersV1Request} request
|
|
36
37
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
38
|
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
38
41
|
* @example
|
|
39
|
-
* await client.orgs.connections.listShippersV1(
|
|
42
|
+
* await client.orgs.connections.listShippersV1({
|
|
43
|
+
* page: 1,
|
|
44
|
+
* page_size: 1
|
|
45
|
+
* })
|
|
40
46
|
*/
|
|
41
|
-
listShippersV1(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.
|
|
47
|
+
listShippersV1(request?: Chrt.orgs.ConnectionsListShippersV1Request, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.ShipperConnectionListRes>;
|
|
42
48
|
private __listShippersV1;
|
|
43
49
|
/**
|
|
44
|
-
* Lists courier organizations based on the caller's organization type. Shippers see connected couriers, forwarders see connected couriers. | () -> (
|
|
50
|
+
* Lists courier organizations based on the caller's organization type. Shippers see connected couriers, forwarders see connected couriers. | () -> (CourierConnectionListRes)
|
|
45
51
|
*
|
|
52
|
+
* @param {Chrt.orgs.ConnectionsListCouriersV1Request} request
|
|
46
53
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
54
|
*
|
|
55
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
56
|
+
*
|
|
48
57
|
* @example
|
|
49
|
-
* await client.orgs.connections.listCouriersV1(
|
|
58
|
+
* await client.orgs.connections.listCouriersV1({
|
|
59
|
+
* page: 1,
|
|
60
|
+
* page_size: 1
|
|
61
|
+
* })
|
|
50
62
|
*/
|
|
51
|
-
listCouriersV1(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.
|
|
63
|
+
listCouriersV1(request?: Chrt.orgs.ConnectionsListCouriersV1Request, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.CourierConnectionListRes>;
|
|
52
64
|
private __listCouriersV1;
|
|
53
65
|
/**
|
|
54
|
-
* Lists forwarder organizations based on the caller's organization type. Shippers see connected forwarders, couriers see connected forwarders. | () -> (
|
|
66
|
+
* Lists forwarder organizations based on the caller's organization type. Shippers see connected forwarders, couriers see connected forwarders. | () -> (ForwarderConnectionListRes)
|
|
55
67
|
*
|
|
68
|
+
* @param {Chrt.orgs.ConnectionsListForwardersV1Request} request
|
|
56
69
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
70
|
*
|
|
71
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
72
|
+
*
|
|
58
73
|
* @example
|
|
59
|
-
* await client.orgs.connections.listForwardersV1(
|
|
74
|
+
* await client.orgs.connections.listForwardersV1({
|
|
75
|
+
* page: 1,
|
|
76
|
+
* page_size: 1
|
|
77
|
+
* })
|
|
60
78
|
*/
|
|
61
|
-
listForwardersV1(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.
|
|
79
|
+
listForwardersV1(request?: Chrt.orgs.ConnectionsListForwardersV1Request, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.ForwarderConnectionListRes>;
|
|
62
80
|
private __listForwardersV1;
|
|
63
81
|
/**
|
|
64
82
|
* Gets connection between caller's org and org with specified handle. | () -> (ShipperCourierConnection1 | ShipperForwarderConnection1 | ForwarderCourierConnection1 | None)
|
|
@@ -20,25 +20,39 @@ export class Connections {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Lists shipper organizations based on the caller's organization type. Couriers see connected shippers, forwarders see connected shippers. | () -> (
|
|
23
|
+
* Lists shipper organizations based on the caller's organization type. Couriers see connected shippers, forwarders see connected shippers. | () -> (ShipperConnectionListRes)
|
|
24
24
|
*
|
|
25
|
+
* @param {Chrt.orgs.ConnectionsListShippersV1Request} request
|
|
25
26
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
27
|
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
27
30
|
* @example
|
|
28
|
-
* await client.orgs.connections.listShippersV1(
|
|
31
|
+
* await client.orgs.connections.listShippersV1({
|
|
32
|
+
* page: 1,
|
|
33
|
+
* page_size: 1
|
|
34
|
+
* })
|
|
29
35
|
*/
|
|
30
|
-
listShippersV1(requestOptions) {
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.__listShippersV1(requestOptions));
|
|
36
|
+
listShippersV1(request = {}, requestOptions) {
|
|
37
|
+
return core.HttpResponsePromise.fromPromise(this.__listShippersV1(request, requestOptions));
|
|
32
38
|
}
|
|
33
|
-
__listShippersV1(
|
|
34
|
-
return __awaiter(this,
|
|
35
|
-
var _a, _b, _c, _d;
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
+
__listShippersV1() {
|
|
40
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
41
|
+
var _a, _b, _c, _d, _e, _f;
|
|
42
|
+
const { page, page_size: pageSize } = request;
|
|
43
|
+
const _queryParams = {};
|
|
44
|
+
if (page !== undefined) {
|
|
45
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
46
|
+
}
|
|
47
|
+
if (pageSize !== undefined) {
|
|
48
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
49
|
+
}
|
|
50
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
52
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "orgs/connections/shippers/list/v1"),
|
|
39
53
|
method: "GET",
|
|
40
54
|
headers: _headers,
|
|
41
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
42
56
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
43
57
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
44
58
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -47,11 +61,16 @@ export class Connections {
|
|
|
47
61
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
48
62
|
}
|
|
49
63
|
if (_response.error.reason === "status-code") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
switch (_response.error.statusCode) {
|
|
65
|
+
case 422:
|
|
66
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
67
|
+
default:
|
|
68
|
+
throw new errors.ChrtError({
|
|
69
|
+
statusCode: _response.error.statusCode,
|
|
70
|
+
body: _response.error.body,
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
55
74
|
}
|
|
56
75
|
switch (_response.error.reason) {
|
|
57
76
|
case "non-json":
|
|
@@ -71,25 +90,39 @@ export class Connections {
|
|
|
71
90
|
});
|
|
72
91
|
}
|
|
73
92
|
/**
|
|
74
|
-
* Lists courier organizations based on the caller's organization type. Shippers see connected couriers, forwarders see connected couriers. | () -> (
|
|
93
|
+
* Lists courier organizations based on the caller's organization type. Shippers see connected couriers, forwarders see connected couriers. | () -> (CourierConnectionListRes)
|
|
75
94
|
*
|
|
95
|
+
* @param {Chrt.orgs.ConnectionsListCouriersV1Request} request
|
|
76
96
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
97
|
*
|
|
98
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
99
|
+
*
|
|
78
100
|
* @example
|
|
79
|
-
* await client.orgs.connections.listCouriersV1(
|
|
101
|
+
* await client.orgs.connections.listCouriersV1({
|
|
102
|
+
* page: 1,
|
|
103
|
+
* page_size: 1
|
|
104
|
+
* })
|
|
80
105
|
*/
|
|
81
|
-
listCouriersV1(requestOptions) {
|
|
82
|
-
return core.HttpResponsePromise.fromPromise(this.__listCouriersV1(requestOptions));
|
|
106
|
+
listCouriersV1(request = {}, requestOptions) {
|
|
107
|
+
return core.HttpResponsePromise.fromPromise(this.__listCouriersV1(request, requestOptions));
|
|
83
108
|
}
|
|
84
|
-
__listCouriersV1(
|
|
85
|
-
return __awaiter(this,
|
|
86
|
-
var _a, _b, _c, _d;
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
109
|
+
__listCouriersV1() {
|
|
110
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
111
|
+
var _a, _b, _c, _d, _e, _f;
|
|
112
|
+
const { page, page_size: pageSize } = request;
|
|
113
|
+
const _queryParams = {};
|
|
114
|
+
if (page !== undefined) {
|
|
115
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
116
|
+
}
|
|
117
|
+
if (pageSize !== undefined) {
|
|
118
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
119
|
+
}
|
|
120
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
121
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
122
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "orgs/connections/couriers/list/v1"),
|
|
90
123
|
method: "GET",
|
|
91
124
|
headers: _headers,
|
|
92
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
125
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
93
126
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
127
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
128
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -98,11 +131,16 @@ export class Connections {
|
|
|
98
131
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
132
|
}
|
|
100
133
|
if (_response.error.reason === "status-code") {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
134
|
+
switch (_response.error.statusCode) {
|
|
135
|
+
case 422:
|
|
136
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
137
|
+
default:
|
|
138
|
+
throw new errors.ChrtError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.body,
|
|
141
|
+
rawResponse: _response.rawResponse,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
106
144
|
}
|
|
107
145
|
switch (_response.error.reason) {
|
|
108
146
|
case "non-json":
|
|
@@ -122,25 +160,39 @@ export class Connections {
|
|
|
122
160
|
});
|
|
123
161
|
}
|
|
124
162
|
/**
|
|
125
|
-
* Lists forwarder organizations based on the caller's organization type. Shippers see connected forwarders, couriers see connected forwarders. | () -> (
|
|
163
|
+
* Lists forwarder organizations based on the caller's organization type. Shippers see connected forwarders, couriers see connected forwarders. | () -> (ForwarderConnectionListRes)
|
|
126
164
|
*
|
|
165
|
+
* @param {Chrt.orgs.ConnectionsListForwardersV1Request} request
|
|
127
166
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
167
|
*
|
|
168
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
169
|
+
*
|
|
129
170
|
* @example
|
|
130
|
-
* await client.orgs.connections.listForwardersV1(
|
|
171
|
+
* await client.orgs.connections.listForwardersV1({
|
|
172
|
+
* page: 1,
|
|
173
|
+
* page_size: 1
|
|
174
|
+
* })
|
|
131
175
|
*/
|
|
132
|
-
listForwardersV1(requestOptions) {
|
|
133
|
-
return core.HttpResponsePromise.fromPromise(this.__listForwardersV1(requestOptions));
|
|
176
|
+
listForwardersV1(request = {}, requestOptions) {
|
|
177
|
+
return core.HttpResponsePromise.fromPromise(this.__listForwardersV1(request, requestOptions));
|
|
134
178
|
}
|
|
135
|
-
__listForwardersV1(
|
|
136
|
-
return __awaiter(this,
|
|
137
|
-
var _a, _b, _c, _d;
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
179
|
+
__listForwardersV1() {
|
|
180
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
181
|
+
var _a, _b, _c, _d, _e, _f;
|
|
182
|
+
const { page, page_size: pageSize } = request;
|
|
183
|
+
const _queryParams = {};
|
|
184
|
+
if (page !== undefined) {
|
|
185
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
186
|
+
}
|
|
187
|
+
if (pageSize !== undefined) {
|
|
188
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
189
|
+
}
|
|
190
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
191
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
192
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "orgs/connections/forwarders/list/v1"),
|
|
141
193
|
method: "GET",
|
|
142
194
|
headers: _headers,
|
|
143
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
195
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
144
196
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
145
197
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
146
198
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -149,11 +201,16 @@ export class Connections {
|
|
|
149
201
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
150
202
|
}
|
|
151
203
|
if (_response.error.reason === "status-code") {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
204
|
+
switch (_response.error.statusCode) {
|
|
205
|
+
case 422:
|
|
206
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
207
|
+
default:
|
|
208
|
+
throw new errors.ChrtError({
|
|
209
|
+
statusCode: _response.error.statusCode,
|
|
210
|
+
body: _response.error.body,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
157
214
|
}
|
|
158
215
|
switch (_response.error.reason) {
|
|
159
216
|
case "non-json":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.mjs";
|