magicbell-js 1.1.1 → 1.3.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 +66 -5
- package/dist/commonjs/project-client/services/broadcasts/models/broadcast-collection.d.ts +274 -274
- package/dist/commonjs/project-client/services/broadcasts/models/broadcast.d.ts +168 -168
- package/dist/commonjs/project-client/services/broadcasts/models/email.d.ts +3 -3
- package/dist/commonjs/project-client/services/broadcasts/models/in-app.d.ts +3 -3
- package/dist/commonjs/project-client/services/broadcasts/models/mobile-push.d.ts +3 -3
- package/dist/commonjs/project-client/services/broadcasts/models/overrides-channels.d.ts +27 -27
- package/dist/commonjs/project-client/services/broadcasts/models/overrides.d.ts +39 -39
- package/dist/commonjs/project-client/services/broadcasts/models/sms.d.ts +3 -3
- package/dist/commonjs/project-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/commonjs/project-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/commonjs/project-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/commonjs/project-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/commonjs/project-client/services/common/user.d.ts +6 -6
- package/dist/commonjs/project-client/services/integrations/integrations-service.d.ts +43 -1
- package/dist/commonjs/project-client/services/integrations/integrations-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/integrations/integrations-service.js +168 -0
- package/dist/commonjs/project-client/services/integrations/integrations-service.js.map +1 -1
- package/dist/commonjs/project-client/services/integrations/models/github-config-collection.d.ts +312 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-collection.d.ts.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-collection.js +46 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-collection.js.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-payload.d.ts +48 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-payload.d.ts.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-payload.js +39 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config-payload.js.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config.d.ts +122 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config.d.ts.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config.js +50 -0
- package/dist/commonjs/project-client/services/integrations/models/github-config.js.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/inbox-config-collection.d.ts +182 -182
- package/dist/commonjs/project-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/commonjs/project-client/services/integrations/models/inbox-config.d.ts +140 -140
- package/dist/commonjs/project-client/services/integrations/models/index.d.ts +6 -0
- package/dist/commonjs/project-client/services/integrations/models/index.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/integrations/models/index.js.map +1 -1
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-collection.d.ts +312 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-collection.d.ts.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-collection.js +46 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-collection.js.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-payload.d.ts +48 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-payload.d.ts.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-payload.js +39 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config-payload.js.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config.d.ts +122 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config.d.ts.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config.js +50 -0
- package/dist/commonjs/project-client/services/integrations/models/stripe-config.js.map +1 -0
- package/dist/commonjs/project-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/commonjs/project-client/services/integrations/request-params.d.ts +6 -0
- package/dist/commonjs/project-client/services/integrations/request-params.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/users/models/user-collection.d.ts +10 -10
- package/dist/commonjs/{socket.d.ts → realtime.d.ts} +2 -2
- package/dist/commonjs/realtime.d.ts.map +1 -0
- package/dist/commonjs/realtime.js +200 -0
- package/dist/commonjs/realtime.js.map +1 -0
- package/dist/commonjs/user-client/services/channels/channels-service.d.ts +13 -0
- package/dist/commonjs/user-client/services/channels/channels-service.d.ts.map +1 -1
- package/dist/commonjs/user-client/services/channels/channels-service.js +53 -0
- package/dist/commonjs/user-client/services/channels/channels-service.js.map +1 -1
- package/dist/commonjs/user-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/categories.d.ts +145 -0
- package/dist/commonjs/user-client/services/channels/models/categories.d.ts.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/categories.js +62 -0
- package/dist/commonjs/user-client/services/channels/models/categories.js.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/channels.d.ts +62 -0
- package/dist/commonjs/user-client/services/channels/models/channels.d.ts.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/channels.js +44 -0
- package/dist/commonjs/user-client/services/channels/models/channels.js.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/commonjs/user-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/commonjs/user-client/services/channels/models/index.d.ts +3 -0
- package/dist/commonjs/user-client/services/channels/models/index.d.ts.map +1 -1
- package/dist/commonjs/user-client/services/channels/models/index.js.map +1 -1
- package/dist/commonjs/user-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/channels/models/user-preferences.d.ts +239 -0
- package/dist/commonjs/user-client/services/channels/models/user-preferences.d.ts.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/user-preferences.js +40 -0
- package/dist/commonjs/user-client/services/channels/models/user-preferences.js.map +1 -0
- package/dist/commonjs/user-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/commonjs/user-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/commonjs/user-client/services/integrations/models/authed-user.d.ts +8 -8
- package/dist/commonjs/user-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/commonjs/user-client/services/integrations/models/slack-installation.d.ts +57 -57
- package/dist/commonjs/user-client/services/integrations/models/slack-start-install.d.ts +8 -8
- package/dist/commonjs/user-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/commonjs/user-client/services/notifications/models/notification-collection.d.ts +56 -56
- package/dist/commonjs/user-client/services/notifications/models/notification.d.ts +32 -32
- package/dist/esm/project-client/services/broadcasts/models/broadcast-collection.d.ts +274 -274
- package/dist/esm/project-client/services/broadcasts/models/broadcast.d.ts +168 -168
- package/dist/esm/project-client/services/broadcasts/models/email.d.ts +3 -3
- package/dist/esm/project-client/services/broadcasts/models/in-app.d.ts +3 -3
- package/dist/esm/project-client/services/broadcasts/models/mobile-push.d.ts +3 -3
- package/dist/esm/project-client/services/broadcasts/models/overrides-channels.d.ts +27 -27
- package/dist/esm/project-client/services/broadcasts/models/overrides.d.ts +39 -39
- package/dist/esm/project-client/services/broadcasts/models/sms.d.ts +3 -3
- package/dist/esm/project-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/esm/project-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/esm/project-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/esm/project-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/esm/project-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/esm/project-client/services/common/user.d.ts +6 -6
- package/dist/esm/project-client/services/integrations/integrations-service.d.ts +43 -1
- package/dist/esm/project-client/services/integrations/integrations-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/integrations/integrations-service.js +168 -0
- package/dist/esm/project-client/services/integrations/integrations-service.js.map +1 -1
- package/dist/esm/project-client/services/integrations/models/github-config-collection.d.ts +312 -0
- package/dist/esm/project-client/services/integrations/models/github-config-collection.d.ts.map +1 -0
- package/dist/esm/project-client/services/integrations/models/github-config-collection.js +43 -0
- package/dist/esm/project-client/services/integrations/models/github-config-collection.js.map +1 -0
- package/dist/esm/project-client/services/integrations/models/github-config-payload.d.ts +48 -0
- package/dist/esm/project-client/services/integrations/models/github-config-payload.d.ts.map +1 -0
- package/dist/esm/project-client/services/integrations/models/github-config-payload.js +36 -0
- package/dist/esm/project-client/services/integrations/models/github-config-payload.js.map +1 -0
- package/dist/esm/project-client/services/integrations/models/github-config.d.ts +122 -0
- package/dist/esm/project-client/services/integrations/models/github-config.d.ts.map +1 -0
- package/dist/esm/project-client/services/integrations/models/github-config.js +47 -0
- package/dist/esm/project-client/services/integrations/models/github-config.js.map +1 -0
- package/dist/esm/project-client/services/integrations/models/inbox-config-collection.d.ts +182 -182
- package/dist/esm/project-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/esm/project-client/services/integrations/models/inbox-config.d.ts +140 -140
- package/dist/esm/project-client/services/integrations/models/index.d.ts +6 -0
- package/dist/esm/project-client/services/integrations/models/index.d.ts.map +1 -1
- package/dist/esm/project-client/services/integrations/models/index.js.map +1 -1
- package/dist/esm/project-client/services/integrations/models/stripe-config-collection.d.ts +312 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-collection.d.ts.map +1 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-collection.js +43 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-collection.js.map +1 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-payload.d.ts +48 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-payload.d.ts.map +1 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-payload.js +36 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config-payload.js.map +1 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config.d.ts +122 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config.d.ts.map +1 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config.js +47 -0
- package/dist/esm/project-client/services/integrations/models/stripe-config.js.map +1 -0
- package/dist/esm/project-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/esm/project-client/services/integrations/request-params.d.ts +6 -0
- package/dist/esm/project-client/services/integrations/request-params.d.ts.map +1 -1
- package/dist/esm/project-client/services/users/models/user-collection.d.ts +10 -10
- package/dist/esm/{socket.d.ts → realtime.d.ts} +2 -2
- package/dist/esm/realtime.d.ts.map +1 -0
- package/dist/esm/realtime.js +196 -0
- package/dist/esm/realtime.js.map +1 -0
- package/dist/esm/user-client/services/channels/channels-service.d.ts +13 -0
- package/dist/esm/user-client/services/channels/channels-service.d.ts.map +1 -1
- package/dist/esm/user-client/services/channels/channels-service.js +53 -0
- package/dist/esm/user-client/services/channels/channels-service.js.map +1 -1
- package/dist/esm/user-client/services/channels/models/apns-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/apns-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/categories.d.ts +145 -0
- package/dist/esm/user-client/services/channels/models/categories.d.ts.map +1 -0
- package/dist/esm/user-client/services/channels/models/categories.js +59 -0
- package/dist/esm/user-client/services/channels/models/categories.js.map +1 -0
- package/dist/esm/user-client/services/channels/models/channels.d.ts +62 -0
- package/dist/esm/user-client/services/channels/models/channels.d.ts.map +1 -0
- package/dist/esm/user-client/services/channels/models/channels.js +41 -0
- package/dist/esm/user-client/services/channels/models/channels.js.map +1 -0
- package/dist/esm/user-client/services/channels/models/discard-result.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/expo-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/expo-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/fcm-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/fcm-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/inbox-token-response-collection.d.ts +28 -28
- package/dist/esm/user-client/services/channels/models/inbox-token-response.d.ts +16 -16
- package/dist/esm/user-client/services/channels/models/index.d.ts +3 -0
- package/dist/esm/user-client/services/channels/models/index.d.ts.map +1 -1
- package/dist/esm/user-client/services/channels/models/index.js.map +1 -1
- package/dist/esm/user-client/services/channels/models/slack-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/slack-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/teams-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/teams-token.d.ts +8 -8
- package/dist/esm/user-client/services/channels/models/user-preferences.d.ts +239 -0
- package/dist/esm/user-client/services/channels/models/user-preferences.d.ts.map +1 -0
- package/dist/esm/user-client/services/channels/models/user-preferences.js +37 -0
- package/dist/esm/user-client/services/channels/models/user-preferences.js.map +1 -0
- package/dist/esm/user-client/services/channels/models/web-push-token-collection.d.ts +14 -14
- package/dist/esm/user-client/services/channels/models/web-push-token.d.ts +8 -8
- package/dist/esm/user-client/services/integrations/models/authed-user.d.ts +8 -8
- package/dist/esm/user-client/services/integrations/models/inbox-config-payload.d.ts +98 -98
- package/dist/esm/user-client/services/integrations/models/slack-installation.d.ts +57 -57
- package/dist/esm/user-client/services/integrations/models/slack-start-install.d.ts +8 -8
- package/dist/esm/user-client/services/integrations/models/theme.d.ts +56 -56
- package/dist/esm/user-client/services/notifications/models/notification-collection.d.ts +56 -56
- package/dist/esm/user-client/services/notifications/models/notification.d.ts +32 -32
- package/package.json +9 -9
- package/realtime/package.json +4 -0
- package/src/project-client/services/integrations/integrations-service.ts +196 -0
- package/src/project-client/services/integrations/models/github-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/github-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/github-config.ts +64 -0
- package/src/project-client/services/integrations/models/index.ts +6 -0
- package/src/project-client/services/integrations/models/stripe-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/stripe-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/stripe-config.ts +64 -0
- package/src/project-client/services/integrations/request-params.ts +8 -0
- package/src/{socket.ts → realtime.ts} +1 -1
- package/src/user-client/services/channels/channels-service.ts +55 -0
- package/src/user-client/services/channels/models/categories.ts +71 -0
- package/src/user-client/services/channels/models/channels.ts +51 -0
- package/src/user-client/services/channels/models/index.ts +3 -0
- package/src/user-client/services/channels/models/user-preferences.ts +47 -0
- package/dist/commonjs/socket.d.ts.map +0 -1
- package/dist/commonjs/socket.js +0 -200
- package/dist/commonjs/socket.js.map +0 -1
- package/dist/esm/socket.d.ts.map +0 -1
- package/dist/esm/socket.js +0 -196
- package/dist/esm/socket.js.map +0 -1
- package/socket/package.json +0 -4
|
@@ -20,6 +20,12 @@ import {
|
|
|
20
20
|
} from './models/expo-config-payload.js';
|
|
21
21
|
import { FcmConfigCollection, fcmConfigCollectionResponse } from './models/fcm-config-collection.js';
|
|
22
22
|
import { FcmConfigPayload, fcmConfigPayloadRequest, fcmConfigPayloadResponse } from './models/fcm-config-payload.js';
|
|
23
|
+
import { GithubConfigCollection, githubConfigCollectionResponse } from './models/github-config-collection.js';
|
|
24
|
+
import {
|
|
25
|
+
GithubConfigPayload,
|
|
26
|
+
githubConfigPayloadRequest,
|
|
27
|
+
githubConfigPayloadResponse,
|
|
28
|
+
} from './models/github-config-payload.js';
|
|
23
29
|
import { InboxConfigCollection, inboxConfigCollectionResponse } from './models/inbox-config-collection.js';
|
|
24
30
|
import {
|
|
25
31
|
InboxConfigPayload,
|
|
@@ -56,6 +62,12 @@ import {
|
|
|
56
62
|
slackConfigPayloadRequest,
|
|
57
63
|
slackConfigPayloadResponse,
|
|
58
64
|
} from './models/slack-config-payload.js';
|
|
65
|
+
import { StripeConfigCollection, stripeConfigCollectionResponse } from './models/stripe-config-collection.js';
|
|
66
|
+
import {
|
|
67
|
+
StripeConfigPayload,
|
|
68
|
+
stripeConfigPayloadRequest,
|
|
69
|
+
stripeConfigPayloadResponse,
|
|
70
|
+
} from './models/stripe-config-payload.js';
|
|
59
71
|
import { TwilioConfigCollection, twilioConfigCollectionResponse } from './models/twilio-config-collection.js';
|
|
60
72
|
import {
|
|
61
73
|
TwilioConfigPayload,
|
|
@@ -72,12 +84,14 @@ import {
|
|
|
72
84
|
DeleteApnsIntegrationParams,
|
|
73
85
|
DeleteExpoIntegrationParams,
|
|
74
86
|
DeleteFcmIntegrationParams,
|
|
87
|
+
DeleteGithubIntegrationParams,
|
|
75
88
|
DeleteInboxIntegrationParams,
|
|
76
89
|
DeleteMailgunIntegrationParams,
|
|
77
90
|
DeletePingEmailIntegrationParams,
|
|
78
91
|
DeleteSendgridIntegrationParams,
|
|
79
92
|
DeleteSesIntegrationParams,
|
|
80
93
|
DeleteSlackIntegrationParams,
|
|
94
|
+
DeleteStripeIntegrationParams,
|
|
81
95
|
DeleteTwilioIntegrationParams,
|
|
82
96
|
DeleteWebPushIntegrationParams,
|
|
83
97
|
ListIntegrationsParams,
|
|
@@ -401,6 +415,97 @@ export class IntegrationsService extends BaseService {
|
|
|
401
415
|
return this.client.call<void>(request);
|
|
402
416
|
}
|
|
403
417
|
|
|
418
|
+
/**
|
|
419
|
+
* Retrieves the current GitHub integration configurations for a specific integration type in the project. Returns configuration details and status information.
|
|
420
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
421
|
+
* @returns {Promise<HttpResponse<GithubConfigCollection>>} OK
|
|
422
|
+
*/
|
|
423
|
+
async listGithubIntegrations(requestConfig?: RequestConfig): Promise<HttpResponse<GithubConfigCollection>> {
|
|
424
|
+
const request = new RequestBuilder()
|
|
425
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
426
|
+
.setConfig(this.config)
|
|
427
|
+
.setMethod('GET')
|
|
428
|
+
.setPath('/integrations/github')
|
|
429
|
+
.setRequestSchema(z.any())
|
|
430
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
431
|
+
.setRequestContentType(ContentType.Json)
|
|
432
|
+
.addResponse({
|
|
433
|
+
schema: githubConfigCollectionResponse,
|
|
434
|
+
contentType: ContentType.Json,
|
|
435
|
+
status: 200,
|
|
436
|
+
})
|
|
437
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
438
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
439
|
+
.setResponseValidation(this.config, requestConfig)
|
|
440
|
+
.build();
|
|
441
|
+
return this.client.call<GithubConfigCollection>(request);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Updates or creates the GitHub integration for the project.
|
|
446
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
447
|
+
* @returns {Promise<HttpResponse<GithubConfigPayload>>} OK
|
|
448
|
+
*/
|
|
449
|
+
async saveGithubIntegration(
|
|
450
|
+
body: GithubConfigPayload,
|
|
451
|
+
requestConfig?: RequestConfig,
|
|
452
|
+
): Promise<HttpResponse<GithubConfigPayload>> {
|
|
453
|
+
const request = new RequestBuilder()
|
|
454
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
455
|
+
.setConfig(this.config)
|
|
456
|
+
.setMethod('PUT')
|
|
457
|
+
.setPath('/integrations/github')
|
|
458
|
+
.setRequestSchema(githubConfigPayloadRequest)
|
|
459
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
460
|
+
.setRequestContentType(ContentType.Json)
|
|
461
|
+
.addResponse({
|
|
462
|
+
schema: githubConfigPayloadResponse,
|
|
463
|
+
contentType: ContentType.Json,
|
|
464
|
+
status: 200,
|
|
465
|
+
})
|
|
466
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
467
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
468
|
+
.setResponseValidation(this.config, requestConfig)
|
|
469
|
+
.addHeaderParam({ key: 'Content-Type', value: 'application/json' })
|
|
470
|
+
.addBody(body)
|
|
471
|
+
.build();
|
|
472
|
+
return this.client.call<GithubConfigPayload>(request);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Deletes the GitHub integration configuration from the project. This will disable the integration's functionality within the project.
|
|
477
|
+
* @param {string} [params.id] -
|
|
478
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
479
|
+
* @returns {Promise<HttpResponse<any>>} No Content
|
|
480
|
+
*/
|
|
481
|
+
async deleteGithubIntegration(
|
|
482
|
+
params?: DeleteGithubIntegrationParams,
|
|
483
|
+
requestConfig?: RequestConfig,
|
|
484
|
+
): Promise<HttpResponse<void>> {
|
|
485
|
+
const request = new RequestBuilder()
|
|
486
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
487
|
+
.setConfig(this.config)
|
|
488
|
+
.setMethod('DELETE')
|
|
489
|
+
.setPath('/integrations/github')
|
|
490
|
+
.setRequestSchema(z.any())
|
|
491
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
492
|
+
.setRequestContentType(ContentType.Json)
|
|
493
|
+
.addResponse({
|
|
494
|
+
schema: z.undefined(),
|
|
495
|
+
contentType: ContentType.NoContent,
|
|
496
|
+
status: 204,
|
|
497
|
+
})
|
|
498
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
499
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
500
|
+
.setResponseValidation(this.config, requestConfig)
|
|
501
|
+
.addQueryParam({
|
|
502
|
+
key: 'id',
|
|
503
|
+
value: params?.id,
|
|
504
|
+
})
|
|
505
|
+
.build();
|
|
506
|
+
return this.client.call<void>(request);
|
|
507
|
+
}
|
|
508
|
+
|
|
404
509
|
/**
|
|
405
510
|
* Retrieves the current Inbox integration configurations for a specific integration type in the project. Returns configuration details and status information.
|
|
406
511
|
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
@@ -947,6 +1052,97 @@ export class IntegrationsService extends BaseService {
|
|
|
947
1052
|
return this.client.call<void>(request);
|
|
948
1053
|
}
|
|
949
1054
|
|
|
1055
|
+
/**
|
|
1056
|
+
* Retrieves the current Stripe integration configurations for a specific integration type in the project. Returns configuration details and status information.
|
|
1057
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
1058
|
+
* @returns {Promise<HttpResponse<StripeConfigCollection>>} OK
|
|
1059
|
+
*/
|
|
1060
|
+
async listStripeIntegrations(requestConfig?: RequestConfig): Promise<HttpResponse<StripeConfigCollection>> {
|
|
1061
|
+
const request = new RequestBuilder()
|
|
1062
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
1063
|
+
.setConfig(this.config)
|
|
1064
|
+
.setMethod('GET')
|
|
1065
|
+
.setPath('/integrations/stripe')
|
|
1066
|
+
.setRequestSchema(z.any())
|
|
1067
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
1068
|
+
.setRequestContentType(ContentType.Json)
|
|
1069
|
+
.addResponse({
|
|
1070
|
+
schema: stripeConfigCollectionResponse,
|
|
1071
|
+
contentType: ContentType.Json,
|
|
1072
|
+
status: 200,
|
|
1073
|
+
})
|
|
1074
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
1075
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
1076
|
+
.setResponseValidation(this.config, requestConfig)
|
|
1077
|
+
.build();
|
|
1078
|
+
return this.client.call<StripeConfigCollection>(request);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Updates or creates the Stripe integration for the project.
|
|
1083
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
1084
|
+
* @returns {Promise<HttpResponse<StripeConfigPayload>>} OK
|
|
1085
|
+
*/
|
|
1086
|
+
async saveStripeIntegration(
|
|
1087
|
+
body: StripeConfigPayload,
|
|
1088
|
+
requestConfig?: RequestConfig,
|
|
1089
|
+
): Promise<HttpResponse<StripeConfigPayload>> {
|
|
1090
|
+
const request = new RequestBuilder()
|
|
1091
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
1092
|
+
.setConfig(this.config)
|
|
1093
|
+
.setMethod('PUT')
|
|
1094
|
+
.setPath('/integrations/stripe')
|
|
1095
|
+
.setRequestSchema(stripeConfigPayloadRequest)
|
|
1096
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
1097
|
+
.setRequestContentType(ContentType.Json)
|
|
1098
|
+
.addResponse({
|
|
1099
|
+
schema: stripeConfigPayloadResponse,
|
|
1100
|
+
contentType: ContentType.Json,
|
|
1101
|
+
status: 200,
|
|
1102
|
+
})
|
|
1103
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
1104
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
1105
|
+
.setResponseValidation(this.config, requestConfig)
|
|
1106
|
+
.addHeaderParam({ key: 'Content-Type', value: 'application/json' })
|
|
1107
|
+
.addBody(body)
|
|
1108
|
+
.build();
|
|
1109
|
+
return this.client.call<StripeConfigPayload>(request);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Deletes the Stripe integration configuration from the project. This will disable the integration's functionality within the project.
|
|
1114
|
+
* @param {string} [params.id] -
|
|
1115
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
1116
|
+
* @returns {Promise<HttpResponse<any>>} No Content
|
|
1117
|
+
*/
|
|
1118
|
+
async deleteStripeIntegration(
|
|
1119
|
+
params?: DeleteStripeIntegrationParams,
|
|
1120
|
+
requestConfig?: RequestConfig,
|
|
1121
|
+
): Promise<HttpResponse<void>> {
|
|
1122
|
+
const request = new RequestBuilder()
|
|
1123
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
1124
|
+
.setConfig(this.config)
|
|
1125
|
+
.setMethod('DELETE')
|
|
1126
|
+
.setPath('/integrations/stripe')
|
|
1127
|
+
.setRequestSchema(z.any())
|
|
1128
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
1129
|
+
.setRequestContentType(ContentType.Json)
|
|
1130
|
+
.addResponse({
|
|
1131
|
+
schema: z.undefined(),
|
|
1132
|
+
contentType: ContentType.NoContent,
|
|
1133
|
+
status: 204,
|
|
1134
|
+
})
|
|
1135
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
1136
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
1137
|
+
.setResponseValidation(this.config, requestConfig)
|
|
1138
|
+
.addQueryParam({
|
|
1139
|
+
key: 'id',
|
|
1140
|
+
value: params?.id,
|
|
1141
|
+
})
|
|
1142
|
+
.build();
|
|
1143
|
+
return this.client.call<void>(request);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
950
1146
|
/**
|
|
951
1147
|
* Retrieves the current Twilio integration configurations for a specific integration type in the project. Returns configuration details and status information.
|
|
952
1148
|
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { Links, links, linksRequest, linksResponse } from '../../common/links.js';
|
|
4
|
+
import { GithubConfig, githubConfig, githubConfigRequest, githubConfigResponse } from './github-config.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shape of the model inside the application code - what the users use
|
|
8
|
+
*/
|
|
9
|
+
export const githubConfigCollection = z.lazy(() => {
|
|
10
|
+
return z.object({
|
|
11
|
+
data: z.array(githubConfig).optional(),
|
|
12
|
+
links: links.optional(),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @typedef {GithubConfigCollection} githubConfigCollection
|
|
19
|
+
* @property {GithubConfig[]}
|
|
20
|
+
* @property {Links}
|
|
21
|
+
*/
|
|
22
|
+
export type GithubConfigCollection = z.infer<typeof githubConfigCollection>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
26
|
+
* Is equal to application shape if all property names match the api schema
|
|
27
|
+
*/
|
|
28
|
+
export const githubConfigCollectionResponse = z.lazy(() => {
|
|
29
|
+
return z
|
|
30
|
+
.object({
|
|
31
|
+
data: z.array(githubConfigResponse).optional(),
|
|
32
|
+
links: linksResponse.optional(),
|
|
33
|
+
})
|
|
34
|
+
.transform((data) => ({
|
|
35
|
+
data: data['data'],
|
|
36
|
+
links: data['links'],
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
42
|
+
* Is equal to application shape if all property names match the api schema
|
|
43
|
+
*/
|
|
44
|
+
export const githubConfigCollectionRequest = z.lazy(() => {
|
|
45
|
+
return z
|
|
46
|
+
.object({
|
|
47
|
+
data: z.array(githubConfigRequest).optional(),
|
|
48
|
+
links: linksRequest.optional(),
|
|
49
|
+
})
|
|
50
|
+
.transform((data) => ({
|
|
51
|
+
data: data['data'],
|
|
52
|
+
links: data['links'],
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shape of the model inside the application code - what the users use
|
|
5
|
+
*/
|
|
6
|
+
export const githubConfigPayload = z.lazy(() => {
|
|
7
|
+
return z.object({
|
|
8
|
+
webhookSigningSecret: z.string().min(1).max(100),
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @typedef {GithubConfigPayload} githubConfigPayload
|
|
15
|
+
* @property {string} - The signing secret to verify incoming requests from Github
|
|
16
|
+
*/
|
|
17
|
+
export type GithubConfigPayload = z.infer<typeof githubConfigPayload>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
21
|
+
* Is equal to application shape if all property names match the api schema
|
|
22
|
+
*/
|
|
23
|
+
export const githubConfigPayloadResponse = z.lazy(() => {
|
|
24
|
+
return z
|
|
25
|
+
.object({
|
|
26
|
+
webhook_signing_secret: z.string().min(1).max(100),
|
|
27
|
+
})
|
|
28
|
+
.transform((data) => ({
|
|
29
|
+
webhookSigningSecret: data['webhook_signing_secret'],
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
35
|
+
* Is equal to application shape if all property names match the api schema
|
|
36
|
+
*/
|
|
37
|
+
export const githubConfigPayloadRequest = z.lazy(() => {
|
|
38
|
+
return z
|
|
39
|
+
.object({
|
|
40
|
+
webhookSigningSecret: z.string().min(1).max(100),
|
|
41
|
+
})
|
|
42
|
+
.transform((data) => ({
|
|
43
|
+
webhook_signing_secret: data['webhookSigningSecret'],
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
GithubConfigPayload,
|
|
5
|
+
githubConfigPayload,
|
|
6
|
+
githubConfigPayloadRequest,
|
|
7
|
+
githubConfigPayloadResponse,
|
|
8
|
+
} from './github-config-payload.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The shape of the model inside the application code - what the users use
|
|
12
|
+
*/
|
|
13
|
+
export const githubConfig = z.lazy(() => {
|
|
14
|
+
return z.object({
|
|
15
|
+
config: githubConfigPayload,
|
|
16
|
+
id: z.string(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @typedef {GithubConfig} githubConfig
|
|
24
|
+
* @property {GithubConfigPayload}
|
|
25
|
+
* @property {string}
|
|
26
|
+
* @property {string}
|
|
27
|
+
*/
|
|
28
|
+
export type GithubConfig = z.infer<typeof githubConfig>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
32
|
+
* Is equal to application shape if all property names match the api schema
|
|
33
|
+
*/
|
|
34
|
+
export const githubConfigResponse = z.lazy(() => {
|
|
35
|
+
return z
|
|
36
|
+
.object({
|
|
37
|
+
config: githubConfigPayloadResponse,
|
|
38
|
+
id: z.string(),
|
|
39
|
+
name: z.string(),
|
|
40
|
+
})
|
|
41
|
+
.transform((data) => ({
|
|
42
|
+
config: data['config'],
|
|
43
|
+
id: data['id'],
|
|
44
|
+
name: data['name'],
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
50
|
+
* Is equal to application shape if all property names match the api schema
|
|
51
|
+
*/
|
|
52
|
+
export const githubConfigRequest = z.lazy(() => {
|
|
53
|
+
return z
|
|
54
|
+
.object({
|
|
55
|
+
config: githubConfigPayloadRequest,
|
|
56
|
+
id: z.string(),
|
|
57
|
+
name: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((data) => ({
|
|
60
|
+
config: data['config'],
|
|
61
|
+
id: data['id'],
|
|
62
|
+
name: data['name'],
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
@@ -14,6 +14,9 @@ export type { FcmConfig } from './fcm-config.js';
|
|
|
14
14
|
export type { FcmConfigCollection } from './fcm-config-collection.js';
|
|
15
15
|
export type { FcmConfigPayload } from './fcm-config-payload.js';
|
|
16
16
|
export type { Footer } from './footer.js';
|
|
17
|
+
export type { GithubConfig } from './github-config.js';
|
|
18
|
+
export type { GithubConfigCollection } from './github-config-collection.js';
|
|
19
|
+
export type { GithubConfigPayload } from './github-config-payload.js';
|
|
17
20
|
export type { Header } from './header.js';
|
|
18
21
|
export type { Icon } from './icon.js';
|
|
19
22
|
export type { Images } from './images.js';
|
|
@@ -44,6 +47,9 @@ export type { SesConfigPayloadFrom } from './ses-config-payload-from.js';
|
|
|
44
47
|
export type { SlackConfig } from './slack-config.js';
|
|
45
48
|
export type { SlackConfigCollection } from './slack-config-collection.js';
|
|
46
49
|
export type { SlackConfigPayload } from './slack-config-payload.js';
|
|
50
|
+
export type { StripeConfig } from './stripe-config.js';
|
|
51
|
+
export type { StripeConfigCollection } from './stripe-config-collection.js';
|
|
52
|
+
export type { StripeConfigPayload } from './stripe-config-payload.js';
|
|
47
53
|
export type { Theme } from './theme.js';
|
|
48
54
|
export type { TwilioConfig } from './twilio-config.js';
|
|
49
55
|
export type { TwilioConfigCollection } from './twilio-config-collection.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { Links, links, linksRequest, linksResponse } from '../../common/links.js';
|
|
4
|
+
import { StripeConfig, stripeConfig, stripeConfigRequest, stripeConfigResponse } from './stripe-config.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shape of the model inside the application code - what the users use
|
|
8
|
+
*/
|
|
9
|
+
export const stripeConfigCollection = z.lazy(() => {
|
|
10
|
+
return z.object({
|
|
11
|
+
data: z.array(stripeConfig).optional(),
|
|
12
|
+
links: links.optional(),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @typedef {StripeConfigCollection} stripeConfigCollection
|
|
19
|
+
* @property {StripeConfig[]}
|
|
20
|
+
* @property {Links}
|
|
21
|
+
*/
|
|
22
|
+
export type StripeConfigCollection = z.infer<typeof stripeConfigCollection>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
26
|
+
* Is equal to application shape if all property names match the api schema
|
|
27
|
+
*/
|
|
28
|
+
export const stripeConfigCollectionResponse = z.lazy(() => {
|
|
29
|
+
return z
|
|
30
|
+
.object({
|
|
31
|
+
data: z.array(stripeConfigResponse).optional(),
|
|
32
|
+
links: linksResponse.optional(),
|
|
33
|
+
})
|
|
34
|
+
.transform((data) => ({
|
|
35
|
+
data: data['data'],
|
|
36
|
+
links: data['links'],
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
42
|
+
* Is equal to application shape if all property names match the api schema
|
|
43
|
+
*/
|
|
44
|
+
export const stripeConfigCollectionRequest = z.lazy(() => {
|
|
45
|
+
return z
|
|
46
|
+
.object({
|
|
47
|
+
data: z.array(stripeConfigRequest).optional(),
|
|
48
|
+
links: linksRequest.optional(),
|
|
49
|
+
})
|
|
50
|
+
.transform((data) => ({
|
|
51
|
+
data: data['data'],
|
|
52
|
+
links: data['links'],
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shape of the model inside the application code - what the users use
|
|
5
|
+
*/
|
|
6
|
+
export const stripeConfigPayload = z.lazy(() => {
|
|
7
|
+
return z.object({
|
|
8
|
+
webhookSigningSecret: z.string().min(1).max(100),
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @typedef {StripeConfigPayload} stripeConfigPayload
|
|
15
|
+
* @property {string} - The signing secret to verify incoming requests from Stripe
|
|
16
|
+
*/
|
|
17
|
+
export type StripeConfigPayload = z.infer<typeof stripeConfigPayload>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
21
|
+
* Is equal to application shape if all property names match the api schema
|
|
22
|
+
*/
|
|
23
|
+
export const stripeConfigPayloadResponse = z.lazy(() => {
|
|
24
|
+
return z
|
|
25
|
+
.object({
|
|
26
|
+
webhook_signing_secret: z.string().min(1).max(100),
|
|
27
|
+
})
|
|
28
|
+
.transform((data) => ({
|
|
29
|
+
webhookSigningSecret: data['webhook_signing_secret'],
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
35
|
+
* Is equal to application shape if all property names match the api schema
|
|
36
|
+
*/
|
|
37
|
+
export const stripeConfigPayloadRequest = z.lazy(() => {
|
|
38
|
+
return z
|
|
39
|
+
.object({
|
|
40
|
+
webhookSigningSecret: z.string().min(1).max(100),
|
|
41
|
+
})
|
|
42
|
+
.transform((data) => ({
|
|
43
|
+
webhook_signing_secret: data['webhookSigningSecret'],
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
StripeConfigPayload,
|
|
5
|
+
stripeConfigPayload,
|
|
6
|
+
stripeConfigPayloadRequest,
|
|
7
|
+
stripeConfigPayloadResponse,
|
|
8
|
+
} from './stripe-config-payload.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The shape of the model inside the application code - what the users use
|
|
12
|
+
*/
|
|
13
|
+
export const stripeConfig = z.lazy(() => {
|
|
14
|
+
return z.object({
|
|
15
|
+
config: stripeConfigPayload,
|
|
16
|
+
id: z.string(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @typedef {StripeConfig} stripeConfig
|
|
24
|
+
* @property {StripeConfigPayload}
|
|
25
|
+
* @property {string}
|
|
26
|
+
* @property {string}
|
|
27
|
+
*/
|
|
28
|
+
export type StripeConfig = z.infer<typeof stripeConfig>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
32
|
+
* Is equal to application shape if all property names match the api schema
|
|
33
|
+
*/
|
|
34
|
+
export const stripeConfigResponse = z.lazy(() => {
|
|
35
|
+
return z
|
|
36
|
+
.object({
|
|
37
|
+
config: stripeConfigPayloadResponse,
|
|
38
|
+
id: z.string(),
|
|
39
|
+
name: z.string(),
|
|
40
|
+
})
|
|
41
|
+
.transform((data) => ({
|
|
42
|
+
config: data['config'],
|
|
43
|
+
id: data['id'],
|
|
44
|
+
name: data['name'],
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
50
|
+
* Is equal to application shape if all property names match the api schema
|
|
51
|
+
*/
|
|
52
|
+
export const stripeConfigRequest = z.lazy(() => {
|
|
53
|
+
return z
|
|
54
|
+
.object({
|
|
55
|
+
config: stripeConfigPayloadRequest,
|
|
56
|
+
id: z.string(),
|
|
57
|
+
name: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((data) => ({
|
|
60
|
+
config: data['config'],
|
|
61
|
+
id: data['id'],
|
|
62
|
+
name: data['name'],
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
@@ -16,6 +16,10 @@ export interface DeleteFcmIntegrationParams {
|
|
|
16
16
|
id?: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export interface DeleteGithubIntegrationParams {
|
|
20
|
+
id?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
export interface DeleteInboxIntegrationParams {
|
|
20
24
|
id?: string;
|
|
21
25
|
}
|
|
@@ -40,6 +44,10 @@ export interface DeleteSlackIntegrationParams {
|
|
|
40
44
|
id?: string;
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
export interface DeleteStripeIntegrationParams {
|
|
48
|
+
id?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
export interface DeleteTwilioIntegrationParams {
|
|
44
52
|
id?: string;
|
|
45
53
|
}
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
teamsTokenPayloadRequest,
|
|
42
42
|
teamsTokenPayloadResponse,
|
|
43
43
|
} from './models/teams-token-payload.js';
|
|
44
|
+
import { UserPreferences, userPreferencesRequest, userPreferencesResponse } from './models/user-preferences.js';
|
|
44
45
|
import { WebPushToken, webPushTokenResponse } from './models/web-push-token.js';
|
|
45
46
|
import { WebPushTokenCollection, webPushTokenCollectionResponse } from './models/web-push-token-collection.js';
|
|
46
47
|
import {
|
|
@@ -864,6 +865,60 @@ export class ChannelsService extends BaseService {
|
|
|
864
865
|
return this.client.call<DiscardResult>(request);
|
|
865
866
|
}
|
|
866
867
|
|
|
868
|
+
/**
|
|
869
|
+
* Fetch a user's channel delivery preferences.
|
|
870
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
871
|
+
* @returns {Promise<HttpResponse<UserPreferences>>} OK
|
|
872
|
+
*/
|
|
873
|
+
async fetchUserPreferences(requestConfig?: RequestConfig): Promise<HttpResponse<UserPreferences>> {
|
|
874
|
+
const request = new RequestBuilder()
|
|
875
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
876
|
+
.setConfig(this.config)
|
|
877
|
+
.setMethod('GET')
|
|
878
|
+
.setPath('/channels/user_preferences')
|
|
879
|
+
.setRequestSchema(z.any())
|
|
880
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
881
|
+
.setRequestContentType(ContentType.Json)
|
|
882
|
+
.addResponse({
|
|
883
|
+
schema: userPreferencesResponse,
|
|
884
|
+
contentType: ContentType.Json,
|
|
885
|
+
status: 200,
|
|
886
|
+
})
|
|
887
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
888
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
889
|
+
.setResponseValidation(this.config, requestConfig)
|
|
890
|
+
.build();
|
|
891
|
+
return this.client.call<UserPreferences>(request);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Save a user's channel preferences.
|
|
896
|
+
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
|
897
|
+
* @returns {Promise<HttpResponse<any>>} No Content
|
|
898
|
+
*/
|
|
899
|
+
async saveUserPreferences(body: UserPreferences, requestConfig?: RequestConfig): Promise<HttpResponse<void>> {
|
|
900
|
+
const request = new RequestBuilder()
|
|
901
|
+
.setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT)
|
|
902
|
+
.setConfig(this.config)
|
|
903
|
+
.setMethod('PUT')
|
|
904
|
+
.setPath('/channels/user_preferences')
|
|
905
|
+
.setRequestSchema(userPreferencesRequest)
|
|
906
|
+
.addAccessTokenAuth(this.config.token, 'Bearer')
|
|
907
|
+
.setRequestContentType(ContentType.Json)
|
|
908
|
+
.addResponse({
|
|
909
|
+
schema: z.undefined(),
|
|
910
|
+
contentType: ContentType.NoContent,
|
|
911
|
+
status: 204,
|
|
912
|
+
})
|
|
913
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
914
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
915
|
+
.setResponseValidation(this.config, requestConfig)
|
|
916
|
+
.addHeaderParam({ key: 'Content-Type', value: 'application/json' })
|
|
917
|
+
.addBody(body)
|
|
918
|
+
.build();
|
|
919
|
+
return this.client.call<void>(request);
|
|
920
|
+
}
|
|
921
|
+
|
|
867
922
|
/**
|
|
868
923
|
* Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
|
|
869
924
|
* @param {number} [params.limit] -
|