@chrt-inc/typescript-sdk 1.359.1 → 1.363.1
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/dist/cjs/Client.d.ts +3 -6
- package/dist/cjs/Client.js +37 -42
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +1 -1
- package/dist/cjs/api/resources/directoryEntries/client/Client.d.ts +99 -0
- package/dist/cjs/api/resources/directoryEntries/client/Client.js +364 -0
- package/dist/cjs/api/{types/ShipperContactClientCreate1.d.ts → resources/directoryEntries/client/requests/DirectoryEntryClientCreate1.d.ts} +11 -7
- package/dist/cjs/api/resources/{shipperContactInfo/client/requests/ShipperContactClientUpdate1.d.ts → directoryEntries/client/requests/DirectoryEntryClientUpdate1.d.ts} +2 -2
- package/dist/cjs/api/resources/directoryEntries/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/index.d.ts +2 -4
- package/dist/cjs/api/resources/index.js +3 -5
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +12 -6
- package/dist/cjs/api/resources/notifications/client/Client.js +16 -6
- package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.d.ts +77 -0
- package/dist/cjs/api/resources/notifications/resources/{courier → adHoc}/client/Client.js +95 -26
- package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/NotificationIntentAdHocClientCreate1.d.ts +18 -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 +209 -0
- package/dist/cjs/api/resources/{shipperContactInfo → notifications/resources/groups}/client/Client.js +305 -118
- package/dist/cjs/api/resources/notifications/resources/groups/client/requests/GroupsUpdateNameV1Request.d.ts +12 -0
- package/dist/cjs/api/resources/notifications/resources/groups/client/requests/NotificationGroupClientCreate1.d.ts +14 -0
- package/dist/cjs/api/resources/notifications/resources/groups/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/notifications/resources/index.d.ts +7 -4
- package/dist/cjs/api/resources/notifications/resources/index.js +8 -5
- package/dist/cjs/api/resources/notifications/resources/userPreferences/client/Client.d.ts +67 -0
- package/dist/cjs/api/resources/notifications/resources/{shipper → userPreferences}/client/Client.js +73 -24
- package/dist/cjs/api/resources/notifications/resources/userPreferences/client/requests/UserNotificationPreferencesUpdateRequest.d.ts +15 -0
- package/dist/cjs/api/resources/notifications/resources/userPreferences/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/resources/webhookSetup/client/Client.d.ts +74 -0
- package/dist/cjs/api/resources/notifications/resources/webhookSetup/client/Client.js +271 -0
- package/dist/cjs/api/resources/notifications/resources/webhookSetup/client/index.js +2 -0
- package/dist/cjs/api/resources/notifications/resources/webhookSetup/index.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/resources/webhookSetup/index.js +17 -0
- package/dist/cjs/api/types/BillingLineItemGroupMessageWebhookPayload.d.ts +13 -0
- package/dist/cjs/api/types/BillingLineItemGroupS3ObjectAddedWebhookPayload.d.ts +13 -0
- package/dist/cjs/api/types/BillingStatementOpenedWebhookPayload.d.ts +11 -0
- package/dist/cjs/api/types/BillingStatementPaidWebhookPayload.d.ts +11 -0
- package/dist/cjs/api/types/{ShipperContact1.d.ts → DirectoryEntry1.d.ts} +4 -6
- package/dist/cjs/api/types/{Driver1.d.ts → Driver1Input.d.ts} +1 -1
- package/dist/cjs/api/types/Driver1Output.d.ts +27 -0
- package/dist/cjs/api/types/NotificationChannelsEnum.d.ts +12 -0
- package/dist/cjs/api/types/{NotificationChannelEnum.js → NotificationChannelsEnum.js} +2 -3
- package/dist/cjs/api/types/NotificationEventsForAdHocEnum.d.ts +14 -0
- package/dist/cjs/api/types/NotificationEventsForAdHocEnum.js +10 -0
- package/dist/cjs/api/types/NotificationEventsForOrgsEnum.d.ts +29 -0
- package/dist/cjs/api/types/NotificationEventsForOrgsEnum.js +26 -0
- package/dist/cjs/api/types/NotificationEventsForUsersEnum.d.ts +20 -0
- package/dist/cjs/api/types/NotificationEventsForUsersEnum.js +15 -0
- package/dist/cjs/api/types/NotificationGroup1.d.ts +18 -0
- package/dist/cjs/api/types/NotificationGroup1.js +5 -0
- package/dist/cjs/api/types/NotificationGroupLimitedForDriver1.d.ts +23 -0
- package/dist/cjs/api/types/NotificationGroupLimitedForDriver1.js +5 -0
- package/dist/cjs/api/types/NotificationIntentAdHoc1.d.ts +18 -0
- package/dist/cjs/api/types/NotificationIntentAdHoc1.js +5 -0
- package/dist/cjs/api/types/NotificationUserPreferences1.d.ts +15 -0
- package/dist/cjs/api/types/NotificationUserPreferences1.js +5 -0
- package/dist/cjs/api/types/OrderAndTaskGroupExpandedReq.d.ts +1 -1
- package/dist/cjs/api/types/OrgMembersAndDrivers.d.ts +1 -1
- package/dist/cjs/api/types/OrgPrivateData1.d.ts +2 -0
- package/dist/cjs/api/types/ShippingOrderCancelledWebhookPayload.d.ts +11 -0
- package/dist/cjs/api/types/ShippingOrderCancelledWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingOrderCompletedWebhookPayload.d.ts +11 -0
- package/dist/cjs/api/types/ShippingOrderCompletedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingOrderStagedWebhookPayload.d.ts +11 -0
- package/dist/cjs/api/types/ShippingOrderStagedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskAddedWebhookPayload.d.ts +15 -0
- package/dist/cjs/api/types/ShippingTaskAddedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskCompletedWebhookPayload.d.ts +15 -0
- package/dist/cjs/api/types/ShippingTaskCompletedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskDeletedWebhookPayload.d.ts +14 -0
- package/dist/cjs/api/types/ShippingTaskDeletedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupCourierOrgAssignedWebhookPayload.d.ts +14 -0
- package/dist/cjs/api/types/ShippingTaskGroupCourierOrgAssignedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupDriverAssignedWebhookPayload.d.ts +15 -0
- package/dist/cjs/api/types/ShippingTaskGroupDriverAssignedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.ts +16 -0
- package/dist/cjs/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupInProgressWebhookPayload.d.ts +13 -0
- package/dist/cjs/api/types/ShippingTaskGroupInProgressWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupMessageWebhookPayload.d.ts +15 -0
- package/dist/cjs/api/types/ShippingTaskGroupMessageWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupS3ObjectAddedWebhookPayload.d.ts +15 -0
- package/dist/cjs/api/types/ShippingTaskGroupS3ObjectAddedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskGroupTasksOrderingUpdatedWebhookPayload.d.ts +14 -0
- package/dist/cjs/api/types/ShippingTaskGroupTasksOrderingUpdatedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ShippingTaskSkippedWebhookPayload.d.ts +15 -0
- package/dist/cjs/api/types/ShippingTaskSkippedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/Statement1.d.ts +1 -1
- package/dist/cjs/api/types/{Task1.d.ts → Task1Input.d.ts} +4 -8
- package/dist/cjs/api/types/Task1Input.js +5 -0
- package/dist/cjs/api/types/Task1Output.d.ts +36 -0
- package/dist/cjs/api/types/Task1Output.js +5 -0
- package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -1
- package/dist/cjs/api/types/TaskClientUpdate1.d.ts +1 -1
- package/dist/cjs/api/types/TaskExpanded.d.ts +2 -2
- package/dist/cjs/api/types/TaskGroupExpanded.d.ts +1 -1
- package/dist/cjs/api/types/UserPublicData1.d.ts +0 -1
- package/dist/cjs/api/types/WebhookAppPortalAccessRes.d.ts +10 -0
- package/dist/cjs/api/types/WebhookAppPortalAccessRes.js +5 -0
- package/dist/cjs/api/types/index.d.ts +32 -10
- package/dist/cjs/api/types/index.js +32 -10
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -6
- package/dist/esm/Client.mjs +5 -10
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +1 -1
- package/dist/esm/api/resources/directoryEntries/client/Client.d.mts +99 -0
- package/dist/esm/api/resources/directoryEntries/client/Client.mjs +327 -0
- package/dist/esm/api/{types/ShipperContactClientCreate1.d.mts → resources/directoryEntries/client/requests/DirectoryEntryClientCreate1.d.mts} +11 -7
- package/dist/esm/api/resources/{shipperContactInfo/client/requests/ShipperContactClientUpdate1.d.mts → directoryEntries/client/requests/DirectoryEntryClientUpdate1.d.mts} +2 -2
- package/dist/esm/api/resources/directoryEntries/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/drivers/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/index.d.mts +2 -4
- package/dist/esm/api/resources/index.mjs +2 -4
- package/dist/esm/api/resources/notifications/client/Client.d.mts +12 -6
- package/dist/esm/api/resources/notifications/client/Client.mjs +16 -6
- package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.d.mts +77 -0
- package/dist/esm/api/resources/notifications/resources/{shipper → adHoc}/client/Client.mjs +93 -24
- package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/NotificationIntentAdHocClientCreate1.d.mts +18 -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 +209 -0
- package/dist/esm/api/resources/{shipperContactInfo → notifications/resources/groups}/client/Client.mjs +303 -116
- package/dist/esm/api/resources/notifications/resources/groups/client/requests/GroupsUpdateNameV1Request.d.mts +12 -0
- package/dist/esm/api/resources/notifications/resources/groups/client/requests/NotificationGroupClientCreate1.d.mts +14 -0
- package/dist/esm/api/resources/notifications/resources/groups/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/notifications/resources/index.d.mts +7 -4
- package/dist/esm/api/resources/notifications/resources/index.mjs +7 -4
- package/dist/esm/api/resources/notifications/resources/userPreferences/client/Client.d.mts +67 -0
- package/dist/esm/api/resources/notifications/resources/{courier → userPreferences}/client/Client.mjs +71 -22
- package/dist/esm/api/resources/notifications/resources/userPreferences/client/requests/UserNotificationPreferencesUpdateRequest.d.mts +15 -0
- package/dist/esm/api/resources/notifications/resources/userPreferences/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/resources/userPreferences/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/notifications/resources/webhookSetup/client/Client.d.mts +74 -0
- package/dist/esm/api/resources/notifications/resources/webhookSetup/client/Client.mjs +234 -0
- package/dist/esm/api/resources/notifications/resources/webhookSetup/client/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/resources/webhookSetup/client/index.mjs +1 -0
- package/dist/esm/api/resources/notifications/resources/webhookSetup/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/resources/webhookSetup/index.mjs +1 -0
- package/dist/esm/api/types/BillingLineItemGroupMessageWebhookPayload.d.mts +13 -0
- package/dist/esm/api/types/BillingLineItemGroupS3ObjectAddedWebhookPayload.d.mts +13 -0
- package/dist/esm/api/types/BillingStatementOpenedWebhookPayload.d.mts +11 -0
- package/dist/esm/api/types/BillingStatementPaidWebhookPayload.d.mts +11 -0
- package/dist/esm/api/types/{ShipperContact1.d.mts → DirectoryEntry1.d.mts} +4 -6
- package/dist/esm/api/types/{Driver1.d.mts → Driver1Input.d.mts} +1 -1
- package/dist/esm/api/types/Driver1Output.d.mts +27 -0
- package/dist/esm/api/types/NotificationChannelsEnum.d.mts +12 -0
- package/dist/esm/api/types/{NotificationChannelEnum.mjs → NotificationChannelsEnum.mjs} +1 -2
- package/dist/esm/api/types/NotificationEventsForAdHocEnum.d.mts +14 -0
- package/dist/esm/api/types/NotificationEventsForAdHocEnum.mjs +7 -0
- package/dist/esm/api/types/NotificationEventsForOrgsEnum.d.mts +29 -0
- package/dist/esm/api/types/NotificationEventsForOrgsEnum.mjs +23 -0
- package/dist/esm/api/types/NotificationEventsForUsersEnum.d.mts +20 -0
- package/dist/esm/api/types/NotificationEventsForUsersEnum.mjs +12 -0
- package/dist/esm/api/types/NotificationGroup1.d.mts +18 -0
- package/dist/esm/api/types/NotificationGroup1.mjs +4 -0
- package/dist/esm/api/types/NotificationGroupLimitedForDriver1.d.mts +23 -0
- package/dist/esm/api/types/NotificationGroupLimitedForDriver1.mjs +4 -0
- package/dist/esm/api/types/NotificationIntentAdHoc1.d.mts +18 -0
- package/dist/esm/api/types/NotificationIntentAdHoc1.mjs +4 -0
- package/dist/esm/api/types/NotificationUserPreferences1.d.mts +15 -0
- package/dist/esm/api/types/NotificationUserPreferences1.mjs +4 -0
- package/dist/esm/api/types/OrderAndTaskGroupExpandedReq.d.mts +1 -1
- package/dist/esm/api/types/OrgMembersAndDrivers.d.mts +1 -1
- package/dist/esm/api/types/OrgPrivateData1.d.mts +2 -0
- package/dist/esm/api/types/ShippingOrderCancelledWebhookPayload.d.mts +11 -0
- package/dist/esm/api/types/ShippingOrderCancelledWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingOrderCompletedWebhookPayload.d.mts +11 -0
- package/dist/esm/api/types/ShippingOrderCompletedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingOrderStagedWebhookPayload.d.mts +11 -0
- package/dist/esm/api/types/ShippingOrderStagedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskAddedWebhookPayload.d.mts +15 -0
- package/dist/esm/api/types/ShippingTaskAddedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskCompletedWebhookPayload.d.mts +15 -0
- package/dist/esm/api/types/ShippingTaskCompletedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskDeletedWebhookPayload.d.mts +14 -0
- package/dist/esm/api/types/ShippingTaskDeletedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupCourierOrgAssignedWebhookPayload.d.mts +14 -0
- package/dist/esm/api/types/ShippingTaskGroupCourierOrgAssignedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupDriverAssignedWebhookPayload.d.mts +15 -0
- package/dist/esm/api/types/ShippingTaskGroupDriverAssignedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.mts +16 -0
- package/dist/esm/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupInProgressWebhookPayload.d.mts +13 -0
- package/dist/esm/api/types/ShippingTaskGroupInProgressWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupMessageWebhookPayload.d.mts +15 -0
- package/dist/esm/api/types/ShippingTaskGroupMessageWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupS3ObjectAddedWebhookPayload.d.mts +15 -0
- package/dist/esm/api/types/ShippingTaskGroupS3ObjectAddedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskGroupTasksOrderingUpdatedWebhookPayload.d.mts +14 -0
- package/dist/esm/api/types/ShippingTaskGroupTasksOrderingUpdatedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ShippingTaskSkippedWebhookPayload.d.mts +15 -0
- package/dist/esm/api/types/ShippingTaskSkippedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/Statement1.d.mts +1 -1
- package/dist/esm/api/types/{Task1.d.mts → Task1Input.d.mts} +4 -8
- package/dist/esm/api/types/Task1Input.mjs +4 -0
- package/dist/esm/api/types/Task1Output.d.mts +36 -0
- package/dist/esm/api/types/Task1Output.mjs +4 -0
- package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -1
- package/dist/esm/api/types/TaskClientUpdate1.d.mts +1 -1
- package/dist/esm/api/types/TaskExpanded.d.mts +2 -2
- package/dist/esm/api/types/TaskGroupExpanded.d.mts +1 -1
- package/dist/esm/api/types/UserPublicData1.d.mts +0 -1
- package/dist/esm/api/types/WebhookAppPortalAccessRes.d.mts +10 -0
- package/dist/esm/api/types/WebhookAppPortalAccessRes.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +32 -10
- package/dist/esm/api/types/index.mjs +32 -10
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1534 -744
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +0 -59
- package/dist/cjs/api/resources/notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/cjs/api/resources/notifications/resources/courier/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +0 -59
- package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.d.ts +0 -163
- package/dist/cjs/api/resources/shipperContactInfo/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +0 -59
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +0 -186
- package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/types/CourierNotificationEventEnum.d.ts +0 -7
- package/dist/cjs/api/types/CourierNotificationPreferences1.d.ts +0 -18
- package/dist/cjs/api/types/NotificationChannelEnum.d.ts +0 -13
- package/dist/cjs/api/types/ShipperNotificationEventEnum.d.ts +0 -7
- package/dist/cjs/api/types/ShipperNotificationPreferences1.d.ts +0 -18
- package/dist/cjs/api/types/TaskArtifactNotificationPreferences1.d.ts +0 -18
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +0 -59
- package/dist/esm/api/resources/notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -18
- package/dist/esm/api/resources/notifications/resources/courier/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +0 -59
- package/dist/esm/api/resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.d.mts +0 -18
- package/dist/esm/api/resources/notifications/resources/shipper/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/shipperContactInfo/client/Client.d.mts +0 -163
- package/dist/esm/api/resources/shipperContactInfo/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +0 -59
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +0 -149
- package/dist/esm/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.d.mts +0 -18
- package/dist/esm/api/resources/taskArtifactNotifications/client/requests/index.d.mts +0 -1
- package/dist/esm/api/types/CourierNotificationEventEnum.d.mts +0 -7
- package/dist/esm/api/types/CourierNotificationPreferences1.d.mts +0 -18
- package/dist/esm/api/types/NotificationChannelEnum.d.mts +0 -13
- package/dist/esm/api/types/ShipperNotificationEventEnum.d.mts +0 -7
- package/dist/esm/api/types/ShipperNotificationPreferences1.d.mts +0 -18
- package/dist/esm/api/types/TaskArtifactNotificationPreferences1.d.mts +0 -18
- /package/dist/cjs/api/resources/{notifications/resources/courier → directoryEntries}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/courier → directoryEntries}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.js → directoryEntries/client/requests/DirectoryEntryClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.js → directoryEntries/client/requests/DirectoryEntryClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/courier → directoryEntries}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/courier → directoryEntries}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{notifications/resources/courier → directoryEntries}/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{shipper → adHoc}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{shipper → adHoc}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{shipperContactInfo/client/requests/ShipperContactClientUpdate1.js → notifications/resources/adHoc/client/requests/NotificationIntentAdHocClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{shipper → adHoc}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{shipper → adHoc}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{shipper → adHoc}/index.js +0 -0
- /package/dist/cjs/api/resources/{shipperContactInfo → notifications/resources/groups}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{shipperContactInfo → notifications/resources/groups}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.js → notifications/resources/groups/client/requests/GroupsUpdateNameV1Request.js} +0 -0
- /package/dist/cjs/api/{types/CourierNotificationEventEnum.js → resources/notifications/resources/groups/client/requests/NotificationGroupClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/{shipperContactInfo → notifications/resources/groups}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{shipperContactInfo → notifications/resources/groups}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{shipperContactInfo → notifications/resources/groups}/index.js +0 -0
- /package/dist/cjs/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/client/index.js +0 -0
- /package/dist/cjs/api/{types/CourierNotificationPreferences1.js → resources/notifications/resources/userPreferences/client/requests/UserNotificationPreferencesUpdateRequest.js} +0 -0
- /package/dist/cjs/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/index.js +0 -0
- /package/dist/{esm/api/resources/notifications/resources/courier/client/requests/index.mjs → cjs/api/resources/notifications/resources/webhookSetup/client/index.d.ts} +0 -0
- /package/dist/cjs/api/types/{Driver1.js → BillingLineItemGroupMessageWebhookPayload.js} +0 -0
- /package/dist/cjs/api/types/{ShipperContact1.js → BillingLineItemGroupS3ObjectAddedWebhookPayload.js} +0 -0
- /package/dist/cjs/api/types/{ShipperContactClientCreate1.js → BillingStatementOpenedWebhookPayload.js} +0 -0
- /package/dist/cjs/api/types/{ShipperNotificationEventEnum.js → BillingStatementPaidWebhookPayload.js} +0 -0
- /package/dist/cjs/api/types/{ShipperNotificationPreferences1.js → DirectoryEntry1.js} +0 -0
- /package/dist/cjs/api/types/{Task1.js → Driver1Input.js} +0 -0
- /package/dist/cjs/api/types/{TaskArtifactNotificationPreferences1.js → Driver1Output.js} +0 -0
- /package/dist/esm/api/resources/{notifications/resources/courier → directoryEntries}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{notifications/resources/courier → directoryEntries}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.mjs → directoryEntries/client/requests/DirectoryEntryClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/{notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.mjs → directoryEntries/client/requests/DirectoryEntryClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/{notifications/resources/shipper → directoryEntries}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{notifications/resources/courier → directoryEntries}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{notifications/resources/courier → directoryEntries}/index.mjs +0 -0
- /package/dist/esm/api/resources/notifications/resources/{shipper → adHoc}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{shipper → adHoc}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{shipperContactInfo/client/requests/ShipperContactClientUpdate1.mjs → notifications/resources/adHoc/client/requests/NotificationIntentAdHocClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/{shipperContactInfo → notifications/resources/adHoc}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/notifications/resources/{shipper → adHoc}/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{shipper → adHoc}/index.mjs +0 -0
- /package/dist/esm/api/resources/{shipperContactInfo → notifications/resources/groups}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{shipperContactInfo → notifications/resources/groups}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.mjs → notifications/resources/groups/client/requests/GroupsUpdateNameV1Request.mjs} +0 -0
- /package/dist/esm/api/{types/CourierNotificationEventEnum.mjs → resources/notifications/resources/groups/client/requests/NotificationGroupClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/{taskArtifactNotifications → notifications/resources/groups}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{shipperContactInfo → notifications/resources/groups}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{shipperContactInfo → notifications/resources/groups}/index.mjs +0 -0
- /package/dist/esm/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/client/index.mjs +0 -0
- /package/dist/esm/api/{types/CourierNotificationPreferences1.mjs → resources/notifications/resources/userPreferences/client/requests/UserNotificationPreferencesUpdateRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{taskArtifactNotifications → notifications/resources/userPreferences}/index.mjs +0 -0
- /package/dist/esm/api/types/{Driver1.mjs → BillingLineItemGroupMessageWebhookPayload.mjs} +0 -0
- /package/dist/esm/api/types/{ShipperContact1.mjs → BillingLineItemGroupS3ObjectAddedWebhookPayload.mjs} +0 -0
- /package/dist/esm/api/types/{ShipperContactClientCreate1.mjs → BillingStatementOpenedWebhookPayload.mjs} +0 -0
- /package/dist/esm/api/types/{ShipperNotificationEventEnum.mjs → BillingStatementPaidWebhookPayload.mjs} +0 -0
- /package/dist/esm/api/types/{ShipperNotificationPreferences1.mjs → DirectoryEntry1.mjs} +0 -0
- /package/dist/esm/api/types/{Task1.mjs → Driver1Input.mjs} +0 -0
- /package/dist/esm/api/types/{TaskArtifactNotificationPreferences1.mjs → Driver1Output.mjs} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* schema_version: 1,
|
|
8
|
+
* group_name: "group_name"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface NotificationGroupClientCreate1 {
|
|
12
|
+
schema_version: number;
|
|
13
|
+
group_name: string;
|
|
14
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
1
|
+
export * as adHoc from "./adHoc/index.mjs";
|
|
2
|
+
export * as groups from "./groups/index.mjs";
|
|
3
|
+
export * as userPreferences from "./userPreferences/index.mjs";
|
|
4
|
+
export * as webhookSetup from "./webhookSetup/index.mjs";
|
|
5
|
+
export * from "./adHoc/client/requests/index.mjs";
|
|
6
|
+
export * from "./groups/client/requests/index.mjs";
|
|
7
|
+
export * from "./userPreferences/client/requests/index.mjs";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
1
|
+
export * as adHoc from "./adHoc/index.mjs";
|
|
2
|
+
export * as groups from "./groups/index.mjs";
|
|
3
|
+
export * as userPreferences from "./userPreferences/index.mjs";
|
|
4
|
+
export * as webhookSetup from "./webhookSetup/index.mjs";
|
|
5
|
+
export * from "./adHoc/client/requests/index.mjs";
|
|
6
|
+
export * from "./groups/client/requests/index.mjs";
|
|
7
|
+
export * from "./userPreferences/client/requests/index.mjs";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
export declare namespace UserPreferences {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class UserPreferences {
|
|
31
|
+
protected readonly _options: UserPreferences.Options;
|
|
32
|
+
constructor(_options?: UserPreferences.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the caller's notification preferences. | () -> (NotificationUserPreferences1)
|
|
35
|
+
*
|
|
36
|
+
* @param {UserPreferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.notifications.userPreferences.getV1()
|
|
40
|
+
*/
|
|
41
|
+
getV1(requestOptions?: UserPreferences.RequestOptions): core.HttpResponsePromise<Chrt.NotificationUserPreferences1>;
|
|
42
|
+
private __getV1;
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new notification preferences record for the caller. Returns existing preferences if already created. | () -> (NotificationUserPreferences1)
|
|
45
|
+
*
|
|
46
|
+
* @param {UserPreferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.notifications.userPreferences.createV1()
|
|
50
|
+
*/
|
|
51
|
+
createV1(requestOptions?: UserPreferences.RequestOptions): core.HttpResponsePromise<Chrt.NotificationUserPreferences1>;
|
|
52
|
+
private __createV1;
|
|
53
|
+
/**
|
|
54
|
+
* Updates notification preferences with explicit events, opt-in, or opt-out operations. | (UserNotificationPreferencesUpdateRequest) -> (NotificationUserPreferences1)
|
|
55
|
+
*
|
|
56
|
+
* @param {Chrt.notifications.UserNotificationPreferencesUpdateRequest} request
|
|
57
|
+
* @param {UserPreferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* await client.notifications.userPreferences.updateV1()
|
|
63
|
+
*/
|
|
64
|
+
updateV1(request?: Chrt.notifications.UserNotificationPreferencesUpdateRequest, requestOptions?: UserPreferences.RequestOptions): core.HttpResponsePromise<Chrt.NotificationUserPreferences1>;
|
|
65
|
+
private __updateV1;
|
|
66
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
67
|
+
}
|
package/dist/esm/api/resources/notifications/resources/{courier → userPreferences}/client/Client.mjs
RENAMED
|
@@ -15,27 +15,27 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
15
15
|
import * as Chrt from "../../../../../index.mjs";
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
-
export class
|
|
18
|
+
export class UserPreferences {
|
|
19
19
|
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Retrieves
|
|
23
|
+
* Retrieves the caller's notification preferences. | () -> (NotificationUserPreferences1)
|
|
24
24
|
*
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {UserPreferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
|
-
* await client.notifications.
|
|
28
|
+
* await client.notifications.userPreferences.getV1()
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
30
|
+
getV1(requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__getV1(requestOptions));
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
__getV1(requestOptions) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
var _a, _b, _c, _d;
|
|
36
36
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
37
37
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
38
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/
|
|
38
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/user_preferences/get/v1"),
|
|
39
39
|
method: "GET",
|
|
40
40
|
headers: _headers,
|
|
41
41
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -61,7 +61,7 @@ export class Courier {
|
|
|
61
61
|
rawResponse: _response.rawResponse,
|
|
62
62
|
});
|
|
63
63
|
case "timeout":
|
|
64
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/
|
|
64
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/user_preferences/get/v1.");
|
|
65
65
|
case "unknown":
|
|
66
66
|
throw new errors.ChrtError({
|
|
67
67
|
message: _response.error.errorMessage,
|
|
@@ -71,29 +71,78 @@ export class Courier {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Creates
|
|
74
|
+
* Creates a new notification preferences record for the caller. Returns existing preferences if already created. | () -> (NotificationUserPreferences1)
|
|
75
75
|
*
|
|
76
|
-
* @param {
|
|
77
|
-
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
-
*
|
|
79
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
76
|
+
* @param {UserPreferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
77
|
*
|
|
81
78
|
* @example
|
|
82
|
-
* await client.notifications.
|
|
83
|
-
* schema_version: 1
|
|
84
|
-
* })
|
|
79
|
+
* await client.notifications.userPreferences.createV1()
|
|
85
80
|
*/
|
|
86
|
-
|
|
87
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
81
|
+
createV1(requestOptions) {
|
|
82
|
+
return core.HttpResponsePromise.fromPromise(this.__createV1(requestOptions));
|
|
88
83
|
}
|
|
89
|
-
|
|
84
|
+
__createV1(requestOptions) {
|
|
90
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
86
|
var _a, _b, _c, _d;
|
|
92
87
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
93
88
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
94
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/
|
|
89
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/user_preferences/create/v1"),
|
|
95
90
|
method: "POST",
|
|
96
91
|
headers: _headers,
|
|
92
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
93
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
throw new errors.ChrtError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
switch (_response.error.reason) {
|
|
108
|
+
case "non-json":
|
|
109
|
+
throw new errors.ChrtError({
|
|
110
|
+
statusCode: _response.error.statusCode,
|
|
111
|
+
body: _response.error.rawBody,
|
|
112
|
+
rawResponse: _response.rawResponse,
|
|
113
|
+
});
|
|
114
|
+
case "timeout":
|
|
115
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/user_preferences/create/v1.");
|
|
116
|
+
case "unknown":
|
|
117
|
+
throw new errors.ChrtError({
|
|
118
|
+
message: _response.error.errorMessage,
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Updates notification preferences with explicit events, opt-in, or opt-out operations. | (UserNotificationPreferencesUpdateRequest) -> (NotificationUserPreferences1)
|
|
126
|
+
*
|
|
127
|
+
* @param {Chrt.notifications.UserNotificationPreferencesUpdateRequest} request
|
|
128
|
+
* @param {UserPreferences.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* await client.notifications.userPreferences.updateV1()
|
|
134
|
+
*/
|
|
135
|
+
updateV1(request = {}, requestOptions) {
|
|
136
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(request, requestOptions));
|
|
137
|
+
}
|
|
138
|
+
__updateV1() {
|
|
139
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
140
|
+
var _a, _b, _c, _d;
|
|
141
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
142
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
143
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/user_preferences/update/v1"),
|
|
144
|
+
method: "PATCH",
|
|
145
|
+
headers: _headers,
|
|
97
146
|
contentType: "application/json",
|
|
98
147
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
99
148
|
requestType: "json",
|
|
@@ -125,7 +174,7 @@ export class Courier {
|
|
|
125
174
|
rawResponse: _response.rawResponse,
|
|
126
175
|
});
|
|
127
176
|
case "timeout":
|
|
128
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
177
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /notifications/user_preferences/update/v1.");
|
|
129
178
|
case "unknown":
|
|
130
179
|
throw new errors.ChrtError({
|
|
131
180
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
*/
|
|
9
|
+
export interface UserNotificationPreferencesUpdateRequest {
|
|
10
|
+
set_events_by_channel?: Record<string, (Chrt.NotificationEventsForUsersEnum[] | null) | undefined> | null;
|
|
11
|
+
add_events_by_channel?: Record<string, (Chrt.NotificationEventsForUsersEnum[] | null) | undefined> | null;
|
|
12
|
+
remove_events_by_channel?: Record<string, (Chrt.NotificationEventsForUsersEnum[] | null) | undefined> | null;
|
|
13
|
+
opt_in_to_all_on_channels?: Chrt.NotificationChannelsEnum[] | null;
|
|
14
|
+
opt_out_of_all_on_channels?: Chrt.NotificationChannelsEnum[] | null;
|
|
15
|
+
}
|
package/dist/esm/api/resources/notifications/resources/userPreferences/client/requests/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type UserNotificationPreferencesUpdateRequest } from "./UserNotificationPreferencesUpdateRequest.mjs";
|
package/dist/esm/api/resources/notifications/resources/userPreferences/client/requests/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
export declare namespace WebhookSetup {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class WebhookSetup {
|
|
31
|
+
protected readonly _options: WebhookSetup.Options;
|
|
32
|
+
constructor(_options?: WebhookSetup.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Creates a Svix consumer application for the organization. Each org needs one app, then endpoints can be added and configured via the app portal. Idempotent - returns True if already created. | authz: min_org_role=administrator | () -> (bool)
|
|
35
|
+
*
|
|
36
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.notifications.webhookSetup.createAppV1()
|
|
40
|
+
*/
|
|
41
|
+
createAppV1(requestOptions?: WebhookSetup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
42
|
+
private __createAppV1;
|
|
43
|
+
/**
|
|
44
|
+
* Returns a 1-day magic link URL to access the Svix App Portal. The link contains a one-time token - request a fresh link for each portal session. Admins/owners get full access, operators get read-only. | authz: min_org_role=operator | () -> (WebhookAppPortalAccessRes)
|
|
45
|
+
*
|
|
46
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.notifications.webhookSetup.appPortalAccessV1()
|
|
50
|
+
*/
|
|
51
|
+
appPortalAccessV1(requestOptions?: WebhookSetup.RequestOptions): core.HttpResponsePromise<Chrt.WebhookAppPortalAccessRes>;
|
|
52
|
+
private __appPortalAccessV1;
|
|
53
|
+
/**
|
|
54
|
+
* Enables webhook notifications for the organization. Idempotent. | authz: min_org_role=administrator | () -> (bool)
|
|
55
|
+
*
|
|
56
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.notifications.webhookSetup.turnOnV1()
|
|
60
|
+
*/
|
|
61
|
+
turnOnV1(requestOptions?: WebhookSetup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
62
|
+
private __turnOnV1;
|
|
63
|
+
/**
|
|
64
|
+
* Disables webhook notifications for the organization. Idempotent. | authz: min_org_role=administrator | () -> (bool)
|
|
65
|
+
*
|
|
66
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.notifications.webhookSetup.turnOffV1()
|
|
70
|
+
*/
|
|
71
|
+
turnOffV1(requestOptions?: WebhookSetup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
72
|
+
private __turnOffV1;
|
|
73
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
15
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
export class WebhookSetup {
|
|
18
|
+
constructor(_options = {}) {
|
|
19
|
+
this._options = _options;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates a Svix consumer application for the organization. Each org needs one app, then endpoints can be added and configured via the app portal. Idempotent - returns True if already created. | authz: min_org_role=administrator | () -> (bool)
|
|
23
|
+
*
|
|
24
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await client.notifications.webhookSetup.createAppV1()
|
|
28
|
+
*/
|
|
29
|
+
createAppV1(requestOptions) {
|
|
30
|
+
return core.HttpResponsePromise.fromPromise(this.__createAppV1(requestOptions));
|
|
31
|
+
}
|
|
32
|
+
__createAppV1(requestOptions) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
36
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
37
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/webhook_setup/create_app/v1"),
|
|
38
|
+
method: "POST",
|
|
39
|
+
headers: _headers,
|
|
40
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
41
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
42
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
43
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
44
|
+
});
|
|
45
|
+
if (_response.ok) {
|
|
46
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
47
|
+
}
|
|
48
|
+
if (_response.error.reason === "status-code") {
|
|
49
|
+
throw new errors.ChrtError({
|
|
50
|
+
statusCode: _response.error.statusCode,
|
|
51
|
+
body: _response.error.body,
|
|
52
|
+
rawResponse: _response.rawResponse,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
switch (_response.error.reason) {
|
|
56
|
+
case "non-json":
|
|
57
|
+
throw new errors.ChrtError({
|
|
58
|
+
statusCode: _response.error.statusCode,
|
|
59
|
+
body: _response.error.rawBody,
|
|
60
|
+
rawResponse: _response.rawResponse,
|
|
61
|
+
});
|
|
62
|
+
case "timeout":
|
|
63
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/webhook_setup/create_app/v1.");
|
|
64
|
+
case "unknown":
|
|
65
|
+
throw new errors.ChrtError({
|
|
66
|
+
message: _response.error.errorMessage,
|
|
67
|
+
rawResponse: _response.rawResponse,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a 1-day magic link URL to access the Svix App Portal. The link contains a one-time token - request a fresh link for each portal session. Admins/owners get full access, operators get read-only. | authz: min_org_role=operator | () -> (WebhookAppPortalAccessRes)
|
|
74
|
+
*
|
|
75
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.notifications.webhookSetup.appPortalAccessV1()
|
|
79
|
+
*/
|
|
80
|
+
appPortalAccessV1(requestOptions) {
|
|
81
|
+
return core.HttpResponsePromise.fromPromise(this.__appPortalAccessV1(requestOptions));
|
|
82
|
+
}
|
|
83
|
+
__appPortalAccessV1(requestOptions) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a, _b, _c, _d;
|
|
86
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
87
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
88
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/webhook_setup/app_portal_access/v1"),
|
|
89
|
+
method: "POST",
|
|
90
|
+
headers: _headers,
|
|
91
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
92
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
93
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
94
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
+
});
|
|
96
|
+
if (_response.ok) {
|
|
97
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
98
|
+
}
|
|
99
|
+
if (_response.error.reason === "status-code") {
|
|
100
|
+
throw new errors.ChrtError({
|
|
101
|
+
statusCode: _response.error.statusCode,
|
|
102
|
+
body: _response.error.body,
|
|
103
|
+
rawResponse: _response.rawResponse,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
switch (_response.error.reason) {
|
|
107
|
+
case "non-json":
|
|
108
|
+
throw new errors.ChrtError({
|
|
109
|
+
statusCode: _response.error.statusCode,
|
|
110
|
+
body: _response.error.rawBody,
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
});
|
|
113
|
+
case "timeout":
|
|
114
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/webhook_setup/app_portal_access/v1.");
|
|
115
|
+
case "unknown":
|
|
116
|
+
throw new errors.ChrtError({
|
|
117
|
+
message: _response.error.errorMessage,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Enables webhook notifications for the organization. Idempotent. | authz: min_org_role=administrator | () -> (bool)
|
|
125
|
+
*
|
|
126
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.notifications.webhookSetup.turnOnV1()
|
|
130
|
+
*/
|
|
131
|
+
turnOnV1(requestOptions) {
|
|
132
|
+
return core.HttpResponsePromise.fromPromise(this.__turnOnV1(requestOptions));
|
|
133
|
+
}
|
|
134
|
+
__turnOnV1(requestOptions) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
var _a, _b, _c, _d;
|
|
137
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
138
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
139
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/webhook_setup/turn_on/v1"),
|
|
140
|
+
method: "PUT",
|
|
141
|
+
headers: _headers,
|
|
142
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
143
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
144
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
145
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
146
|
+
});
|
|
147
|
+
if (_response.ok) {
|
|
148
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
149
|
+
}
|
|
150
|
+
if (_response.error.reason === "status-code") {
|
|
151
|
+
throw new errors.ChrtError({
|
|
152
|
+
statusCode: _response.error.statusCode,
|
|
153
|
+
body: _response.error.body,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
switch (_response.error.reason) {
|
|
158
|
+
case "non-json":
|
|
159
|
+
throw new errors.ChrtError({
|
|
160
|
+
statusCode: _response.error.statusCode,
|
|
161
|
+
body: _response.error.rawBody,
|
|
162
|
+
rawResponse: _response.rawResponse,
|
|
163
|
+
});
|
|
164
|
+
case "timeout":
|
|
165
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /notifications/webhook_setup/turn_on/v1.");
|
|
166
|
+
case "unknown":
|
|
167
|
+
throw new errors.ChrtError({
|
|
168
|
+
message: _response.error.errorMessage,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Disables webhook notifications for the organization. Idempotent. | authz: min_org_role=administrator | () -> (bool)
|
|
176
|
+
*
|
|
177
|
+
* @param {WebhookSetup.RequestOptions} requestOptions - Request-specific configuration.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* await client.notifications.webhookSetup.turnOffV1()
|
|
181
|
+
*/
|
|
182
|
+
turnOffV1(requestOptions) {
|
|
183
|
+
return core.HttpResponsePromise.fromPromise(this.__turnOffV1(requestOptions));
|
|
184
|
+
}
|
|
185
|
+
__turnOffV1(requestOptions) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
var _a, _b, _c, _d;
|
|
188
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
189
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
190
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "notifications/webhook_setup/turn_off/v1"),
|
|
191
|
+
method: "PUT",
|
|
192
|
+
headers: _headers,
|
|
193
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
194
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
195
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
196
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
197
|
+
});
|
|
198
|
+
if (_response.ok) {
|
|
199
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
200
|
+
}
|
|
201
|
+
if (_response.error.reason === "status-code") {
|
|
202
|
+
throw new errors.ChrtError({
|
|
203
|
+
statusCode: _response.error.statusCode,
|
|
204
|
+
body: _response.error.body,
|
|
205
|
+
rawResponse: _response.rawResponse,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
switch (_response.error.reason) {
|
|
209
|
+
case "non-json":
|
|
210
|
+
throw new errors.ChrtError({
|
|
211
|
+
statusCode: _response.error.statusCode,
|
|
212
|
+
body: _response.error.rawBody,
|
|
213
|
+
rawResponse: _response.rawResponse,
|
|
214
|
+
});
|
|
215
|
+
case "timeout":
|
|
216
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /notifications/webhook_setup/turn_off/v1.");
|
|
217
|
+
case "unknown":
|
|
218
|
+
throw new errors.ChrtError({
|
|
219
|
+
message: _response.error.errorMessage,
|
|
220
|
+
rawResponse: _response.rawResponse,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
_getAuthorizationHeader() {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
228
|
+
if (bearer != null) {
|
|
229
|
+
return `Bearer ${bearer}`;
|
|
230
|
+
}
|
|
231
|
+
return undefined;
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
export interface BillingLineItemGroupMessageWebhookPayload {
|
|
6
|
+
event_type?: "billing.line_item_group.message";
|
|
7
|
+
/** UTC timestamp when the event occurred */
|
|
8
|
+
event_timestamp: string;
|
|
9
|
+
/** The message that was added to the line item group */
|
|
10
|
+
message: Chrt.LineItemGroupMessage1;
|
|
11
|
+
/** The line item group the message was added to */
|
|
12
|
+
line_item_group_id: string;
|
|
13
|
+
}
|