From c138115f092f791cfb855509280c13b083538923 Mon Sep 17 00:00:00 2001 From: MagicBella Date: Mon, 24 Nov 2025 06:07:54 +0000 Subject: [PATCH] chore: regen sdks --- .../auto-bump-magicbell-js-1763964473.md | 5 +++ packages/magicbell-js/README.md | 4 +-- .../docs/project-client/README.md | 2 +- .../docs/project-client/models/ApnsToken.md | 20 +++++------ .../docs/project-client/models/FcmToken.md | 24 ++++--------- .../services/BroadcastsService.md | 4 +-- .../services/ChannelsService.md | 14 ++++---- .../project-client/services/EventsService.md | 2 +- .../services/IntegrationsService.md | 31 ++++++++-------- .../project-client/services/UsersService.md | 2 +- .../project-client/snippets/snippets.json | 36 +++++++++---------- .../magicbell-js/docs/user-client/README.md | 2 +- .../docs/user-client/models/FcmToken.md | 24 ++++--------- .../user-client/models/FcmTokenPayload.md | 16 ++------- .../user-client/services/ChannelsService.md | 27 +++++++------- .../services/IntegrationsService.md | 14 ++++---- .../services/NotificationsService.md | 2 +- .../docs/user-client/snippets/snippets.json | 32 ++++++++--------- .../models/apns-token-installation-id.ts | 6 ---- .../services/channels/models/apns-token.ts | 2 +- .../services/channels/models/fcm-token.ts | 6 ---- .../services/channels/models/index.ts | 3 +- ...-installation-id.ts => installation-id.ts} | 2 +- .../models/fcm-token-installation-id.ts | 6 ---- .../fcm-token-payload-installation-id.ts | 6 ---- .../channels/models/fcm-token-payload.ts | 6 ---- .../services/channels/models/fcm-token.ts | 6 ---- .../services/channels/models/index.ts | 2 -- 28 files changed, 119 insertions(+), 187 deletions(-) create mode 100644 .changeset/auto-bump-magicbell-js-1763964473.md delete mode 100644 packages/magicbell-js/src/project-client/services/channels/models/apns-token-installation-id.ts rename packages/magicbell-js/src/project-client/services/channels/models/{fcm-token-installation-id.ts => installation-id.ts} (70%) delete mode 100644 packages/magicbell-js/src/user-client/services/channels/models/fcm-token-installation-id.ts delete mode 100644 packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload-installation-id.ts diff --git a/.changeset/auto-bump-magicbell-js-1763964473.md b/.changeset/auto-bump-magicbell-js-1763964473.md new file mode 100644 index 000000000..3e8c8d7f5 --- /dev/null +++ b/.changeset/auto-bump-magicbell-js-1763964473.md @@ -0,0 +1,5 @@ +--- +'magicbell-js': minor +--- + +Automatic minor version bump for changes in `magicbell-js`. diff --git a/packages/magicbell-js/README.md b/packages/magicbell-js/README.md index eaec88ee0..1bd1d4411 100644 --- a/packages/magicbell-js/README.md +++ b/packages/magicbell-js/README.md @@ -64,7 +64,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.broadcasts.listBroadcasts({ - limit: 10, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -238,7 +238,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listInboxTokens({ - limit: 4, + limit: 123, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/project-client/README.md b/packages/magicbell-js/docs/project-client/README.md index 8839f1a84..11c2024d4 100644 --- a/packages/magicbell-js/docs/project-client/README.md +++ b/packages/magicbell-js/docs/project-client/README.md @@ -66,7 +66,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.broadcasts.listBroadcasts({ - limit: 10, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/project-client/models/ApnsToken.md b/packages/magicbell-js/docs/project-client/models/ApnsToken.md index 9b3e86656..32e54dc7f 100644 --- a/packages/magicbell-js/docs/project-client/models/ApnsToken.md +++ b/packages/magicbell-js/docs/project-client/models/ApnsToken.md @@ -2,17 +2,17 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :---------------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| appId | string | ❌ | (Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration. | -| discardedAt | string | ❌ | | -| installationId | ApnsTokenInstallationId | ❌ | (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :------------- | :------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| createdAt | string | ✅ | | +| deviceToken | string | ✅ | | +| id | string | ✅ | | +| appId | string | ❌ | (Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration. | +| discardedAt | string | ❌ | | +| installationId | InstallationId | ❌ | (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. | +| updatedAt | string | ❌ | | -# ApnsTokenInstallationId +# InstallationId (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. diff --git a/packages/magicbell-js/docs/project-client/models/FcmToken.md b/packages/magicbell-js/docs/project-client/models/FcmToken.md index a1b67f1e2..b72590a37 100644 --- a/packages/magicbell-js/docs/project-client/models/FcmToken.md +++ b/packages/magicbell-js/docs/project-client/models/FcmToken.md @@ -2,20 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :--------------------- | :------- | :---------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| installationId | FcmTokenInstallationId | ❌ | | -| updatedAt | string | ❌ | | - -# FcmTokenInstallationId - -**Properties** - -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :------------ | -| DEVELOPMENT | string | ✅ | "development" | -| PRODUCTION | string | ✅ | "production" | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :---------- | +| createdAt | string | ✅ | | +| deviceToken | string | ✅ | | +| id | string | ✅ | | +| discardedAt | string | ❌ | | +| updatedAt | string | ❌ | | diff --git a/packages/magicbell-js/docs/project-client/services/BroadcastsService.md b/packages/magicbell-js/docs/project-client/services/BroadcastsService.md index 3ddf82ada..f5704dce0 100644 --- a/packages/magicbell-js/docs/project-client/services/BroadcastsService.md +++ b/packages/magicbell-js/docs/project-client/services/BroadcastsService.md @@ -38,7 +38,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.broadcasts.listBroadcasts({ - limit: 10, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -158,7 +158,7 @@ import { const statusStatus = StatusStatus.ENQUEUED; const summary: Summary = { - failures: 7, + failures: 4, total: 5, }; diff --git a/packages/magicbell-js/docs/project-client/services/ChannelsService.md b/packages/magicbell-js/docs/project-client/services/ChannelsService.md index 21e82e142..6df720318 100644 --- a/packages/magicbell-js/docs/project-client/services/ChannelsService.md +++ b/packages/magicbell-js/docs/project-client/services/ChannelsService.md @@ -62,7 +62,7 @@ import { CategoryDeliveryConfig, CategoryDeliveryConfigChannels, Channel, Client const categoryDeliveryConfigChannels: CategoryDeliveryConfigChannels = { channel: channel, - delay: 9, + delay: 1, if: 'if', }; @@ -250,7 +250,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserApnsTokens('user_id', { - limit: 9, + limit: 3, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -358,7 +358,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserExpoTokens('user_id', { - limit: 4, + limit: 123, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -466,7 +466,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserFcmTokens('user_id', { - limit: 1, + limit: 2, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -682,7 +682,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserSlackTokens('user_id', { - limit: 2, + limit: 8, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -790,7 +790,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserTeamsTokens('user_id', { - limit: 10, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -898,7 +898,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserWebPushTokens('user_id', { - limit: 9, + limit: 123, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/project-client/services/EventsService.md b/packages/magicbell-js/docs/project-client/services/EventsService.md index 51d969c05..e26516034 100644 --- a/packages/magicbell-js/docs/project-client/services/EventsService.md +++ b/packages/magicbell-js/docs/project-client/services/EventsService.md @@ -37,7 +37,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.events.listEvents({ - limit: 9, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/project-client/services/IntegrationsService.md b/packages/magicbell-js/docs/project-client/services/IntegrationsService.md index 201f493a4..83cd0e07b 100644 --- a/packages/magicbell-js/docs/project-client/services/IntegrationsService.md +++ b/packages/magicbell-js/docs/project-client/services/IntegrationsService.md @@ -84,7 +84,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.integrations.listIntegrations({ - limit: 8, + limit: 2, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -154,13 +154,13 @@ import { ApnsConfigPayload, Badge, Client, PayloadVersion } from 'magicbell-js/p const apnsConfigPayload: ApnsConfigPayload = { appId: "app_id", badge: badge, - certificate: "----BEGIN PRIVATE KEY------- - LJfxDl7= - -END PRIVATE KEYYY----------- + certificate: " BEGIN PRIVATE KEY-- + 2tSdsGz= + --------- END PRIVATE KEYYYYYYYYYYY-------- ", - keyId: "nulla anim", + keyId: "proident s", payloadVersion: payloadVersion, - teamId: "inirurecon" + teamId: "laborum ut" }; const { data } = await client.integrations.saveApnsIntegration(apnsConfigPayload); @@ -452,10 +452,9 @@ import { Client, FcmConfigPayload, Type_ } from 'magicbell-js/project-client'; clientEmail: "client_email", clientId: "client_id", clientX509CertUrl: "client_x509_cert_url", - privateKey: "BEGINXANBXVGZX------- - ky4I+= - ----ENDUJ------- - ", + privateKey: "----BEGINZZASTRAXC- + NBdNmSp + ------- ENDTLCHMVK----------", privateKeyId: "private_key_id", projectId: "project_id", tokenUri: "token_uri", @@ -676,7 +675,7 @@ import { const banner: Banner = { backgroundColor: 'backgroundColor', - backgroundOpacity: 0.59, + backgroundOpacity: 4.93, fontSize: 'fontSize', textColor: 'textColor', }; @@ -1384,10 +1383,10 @@ import { Client, SlackConfigPayload } from 'magicbell-js/project-client'; }); const slackConfigPayload: SlackConfigPayload = { - appId: '0N', - clientId: '5304524.8556302494', - clientSecret: 'amet culpa Excepteurculpa quis a', - signingSecret: 'ut irurereprehenderit voluptatea', + appId: 'O7RI', + clientId: '104.7350704', + clientSecret: 'officia fugiat nostrud Excepteur', + signingSecret: 'non sit exanim ad enim eaexlabor', }; const { data } = await client.integrations.saveSlackIntegration(slackConfigPayload); @@ -1694,7 +1693,7 @@ import { Client, TwilioConfigPayload } from 'magicbell-js/project-client'; accountSid: 'account_sid', apiKey: 'api_key', apiSecret: 'api_secret', - from: '+8217286788160', + from: '+28378825295343', }; const { data } = await client.integrations.saveTwilioIntegration(twilioConfigPayload); diff --git a/packages/magicbell-js/docs/project-client/services/UsersService.md b/packages/magicbell-js/docs/project-client/services/UsersService.md index 4dd123879..762828edc 100644 --- a/packages/magicbell-js/docs/project-client/services/UsersService.md +++ b/packages/magicbell-js/docs/project-client/services/UsersService.md @@ -39,7 +39,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.users.listUsers({ - limit: 8, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', query: 'query', diff --git a/packages/magicbell-js/docs/project-client/snippets/snippets.json b/packages/magicbell-js/docs/project-client/snippets/snippets.json index 7ef52c5a8..a4efa16b1 100644 --- a/packages/magicbell-js/docs/project-client/snippets/snippets.json +++ b/packages/magicbell-js/docs/project-client/snippets/snippets.json @@ -1,14 +1,14 @@ { "endpoints": { "/broadcasts": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.broadcasts.listBroadcasts({\n limit: 10,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", - "post": "import { Broadcast, BroadcastStatus, Client, Email, Errors, InApp, MobilePush, Overrides, OverridesChannels, Providers, Sms, StatusStatus, Summary, User } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const email: Email = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n \n const inApp: InApp = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n \n const mobilePush: MobilePush = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n \n const sms: Sms = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n const overridesChannels: OverridesChannels = {\t\n email: email,\n inApp: inApp,\n mobilePush: mobilePush,\n sms: sms\n };\n \n \n const providers: Providers = {\t\n apns: {},\n expo: {},\n fcm: {},\n mailgun: {},\n sendgrid: {},\n ses: {},\n slack: {},\n teams: {},\n twilio: {},\n webPush: {}\n };\n \n const overrides: Overrides = {\t\n channels: overridesChannels,\n providers: providers\n };\n \n \n const user: User = {\t\n createdAt: \"created_at\",\n customAttributes: {},\n email: \"email\",\n externalId: \"external_id\",\n firstName: \"first_name\",\n id: \"id\",\n lastName: \"last_name\",\n lastNotifiedAt: \"last_notified_at\",\n lastSeenAt: \"last_seen_at\",\n updatedAt: \"updated_at\"\n };\n \n \n const errors: Errors = {\t\n message: \"message\"\n };\n \n const statusStatus = StatusStatus.ENQUEUED\n \n \n const summary: Summary = {\t\n failures: 7,\n total: 5\n };\n \n const broadcastStatus: BroadcastStatus = {\t\n errors: [errors],\n status: statusStatus,\n summary: summary\n };\n \n const broadcast: Broadcast = {\t\n actionUrl: \"action_url\",\n category: \"category\",\n content: \"content\",\n createdAt: \"created_at\",\n customAttributes: {},\n id: \"id\",\n overrides: overrides,\n recipients: [user],\n status: broadcastStatus,\n title: \"title\",\n topic: \"topic\"\n };\n\n const { data } = await client.broadcasts.createBroadcast(broadcast);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.broadcasts.listBroadcasts({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "post": "import { Broadcast, BroadcastStatus, Client, Email, Errors, InApp, MobilePush, Overrides, OverridesChannels, Providers, Sms, StatusStatus, Summary, User } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const email: Email = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n \n const inApp: InApp = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n \n const mobilePush: MobilePush = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n \n const sms: Sms = {\t\n actionUrl: \"action_url\",\n content: \"content\",\n title: \"title\"\n };\n \n const overridesChannels: OverridesChannels = {\t\n email: email,\n inApp: inApp,\n mobilePush: mobilePush,\n sms: sms\n };\n \n \n const providers: Providers = {\t\n apns: {},\n expo: {},\n fcm: {},\n mailgun: {},\n sendgrid: {},\n ses: {},\n slack: {},\n teams: {},\n twilio: {},\n webPush: {}\n };\n \n const overrides: Overrides = {\t\n channels: overridesChannels,\n providers: providers\n };\n \n \n const user: User = {\t\n createdAt: \"created_at\",\n customAttributes: {},\n email: \"email\",\n externalId: \"external_id\",\n firstName: \"first_name\",\n id: \"id\",\n lastName: \"last_name\",\n lastNotifiedAt: \"last_notified_at\",\n lastSeenAt: \"last_seen_at\",\n updatedAt: \"updated_at\"\n };\n \n \n const errors: Errors = {\t\n message: \"message\"\n };\n \n const statusStatus = StatusStatus.ENQUEUED\n \n \n const summary: Summary = {\t\n failures: 4,\n total: 5\n };\n \n const broadcastStatus: BroadcastStatus = {\t\n errors: [errors],\n status: statusStatus,\n summary: summary\n };\n \n const broadcast: Broadcast = {\t\n actionUrl: \"action_url\",\n category: \"category\",\n content: \"content\",\n createdAt: \"created_at\",\n customAttributes: {},\n id: \"id\",\n overrides: overrides,\n recipients: [user],\n status: broadcastStatus,\n title: \"title\",\n topic: \"topic\"\n };\n\n const { data } = await client.broadcasts.createBroadcast(broadcast);\n\n console.log(data);\n})();\n" }, "/broadcasts/{broadcast_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.broadcasts.fetchBroadcast(\"broadcast_id\");\n\n console.log(data);\n})();\n" }, "/channels": { - "put": "import { CategoryDeliveryConfig, CategoryDeliveryConfigChannels, Channel, Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const channel = Channel.IN_APP\n \n const categoryDeliveryConfigChannels: CategoryDeliveryConfigChannels = {\t\n channel: channel,\n delay: 9,\n if: \"if\"\n };\n \n const categoryDeliveryConfig: CategoryDeliveryConfig = {\t\n channels: [categoryDeliveryConfigChannels],\n disabled: true,\n key: \"key\"\n };\n\n const { data } = await client.channels.saveChannelsConfig(categoryDeliveryConfig);\n\n console.log(data);\n})();\n" + "put": "import { CategoryDeliveryConfig, CategoryDeliveryConfigChannels, Channel, Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const channel = Channel.IN_APP\n \n const categoryDeliveryConfigChannels: CategoryDeliveryConfigChannels = {\t\n channel: channel,\n delay: 1,\n if: \"if\"\n };\n \n const categoryDeliveryConfig: CategoryDeliveryConfig = {\t\n channels: [categoryDeliveryConfigChannels],\n disabled: true,\n key: \"key\"\n };\n\n const { data } = await client.channels.saveChannelsConfig(categoryDeliveryConfig);\n\n console.log(data);\n})();\n" }, "/channels/{key}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchChannelsConfig(\"key\");\n\n console.log(data);\n})();\n" @@ -21,21 +21,21 @@ "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserInboxToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/mobile_push/apns/tokens": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserApnsTokens(\n \"user_id\",\n {\n limit: 9,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserApnsTokens(\n \"user_id\",\n {\n limit: 3,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/mobile_push/apns/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchUserApnsToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserApnsToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/mobile_push/expo/tokens": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserExpoTokens(\n \"user_id\",\n {\n limit: 4,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserExpoTokens(\n \"user_id\",\n {\n limit: 123,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/mobile_push/expo/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchUserExpoToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserExpoToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/mobile_push/fcm/tokens": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserFcmTokens(\n \"user_id\",\n {\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserFcmTokens(\n \"user_id\",\n {\n limit: 2,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchUserFcmToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", @@ -49,38 +49,38 @@ "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserMagicbellSlackbotToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/slack/tokens": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserSlackTokens(\n \"user_id\",\n {\n limit: 2,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserSlackTokens(\n \"user_id\",\n {\n limit: 8,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/slack/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchUserSlackToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserSlackToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/teams/tokens": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserTeamsTokens(\n \"user_id\",\n {\n limit: 10,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserTeamsTokens(\n \"user_id\",\n {\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/teams/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchUserTeamsToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserTeamsToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/web_push/tokens": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserWebPushTokens(\n \"user_id\",\n {\n limit: 9,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listUserWebPushTokens(\n \"user_id\",\n {\n limit: 123,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/web_push/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchUserWebPushToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteUserWebPushToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/events": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.events.listEvents({\n limit: 9,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.events.listEvents({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n" }, "/events/{event_id}": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.events.fetchEvent(\"event_id\");\n\n console.log(data);\n})();\n" }, "/integrations": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listIntegrations({\n limit: 8,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listIntegrations({\n limit: 2,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n" }, "/integrations/apns": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listApnsIntegrations();\n\n console.log(data);\n})();\n", - "put": "import { ApnsConfigPayload, Badge, Client, PayloadVersion } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const badge = Badge.UNREAD\n \n const payloadVersion = PayloadVersion._1\n \n const apnsConfigPayload: ApnsConfigPayload = {\t\n appId: \"app_id\",\n badge: badge,\n certificate: \"----BEGIN PRIVATE KEY-------\n LJfxDl7=\n -END PRIVATE KEYYY-----------\n \",\n keyId: \"nulla anim\",\n payloadVersion: payloadVersion,\n teamId: \"inirurecon\"\n };\n\n const { data } = await client.integrations.saveApnsIntegration(apnsConfigPayload);\n\n console.log(data);\n})();\n", + "put": "import { ApnsConfigPayload, Badge, Client, PayloadVersion } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const badge = Badge.UNREAD\n \n const payloadVersion = PayloadVersion._1\n \n const apnsConfigPayload: ApnsConfigPayload = {\t\n appId: \"app_id\",\n badge: badge,\n certificate: \" BEGIN PRIVATE KEY--\n 2tSdsGz=\n --------- END PRIVATE KEYYYYYYYYYYY--------\n \",\n keyId: \"proident s\",\n payloadVersion: payloadVersion,\n teamId: \"laborum ut\"\n };\n\n const { data } = await client.integrations.saveApnsIntegration(apnsConfigPayload);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.deleteApnsIntegration({\n id: \"id\",\n });\n\n console.log(data);\n})();\n" }, "/integrations/eventsource": { @@ -95,7 +95,7 @@ }, "/integrations/fcm": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listFcmIntegrations();\n\n console.log(data);\n})();\n", - "put": "import { Client, FcmConfigPayload, Type_ } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const type_ = Type_.SERVICE_ACCOUNT\n \n const fcmConfigPayload: FcmConfigPayload = {\t\n authProviderX509CertUrl: \"auth_provider_x509_cert_url\",\n authUri: \"auth_uri\",\n clientEmail: \"client_email\",\n clientId: \"client_id\",\n clientX509CertUrl: \"client_x509_cert_url\",\n privateKey: \"BEGINXANBXVGZX-------\n ky4I+=\n ----ENDUJ-------\n \",\n privateKeyId: \"private_key_id\",\n projectId: \"project_id\",\n tokenUri: \"token_uri\",\n type: type_,\n universeDomain: \"universe_domain\"\n };\n\n const { data } = await client.integrations.saveFcmIntegration(fcmConfigPayload);\n\n console.log(data);\n})();\n", + "put": "import { Client, FcmConfigPayload, Type_ } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const type_ = Type_.SERVICE_ACCOUNT\n \n const fcmConfigPayload: FcmConfigPayload = {\t\n authProviderX509CertUrl: \"auth_provider_x509_cert_url\",\n authUri: \"auth_uri\",\n clientEmail: \"client_email\",\n clientId: \"client_id\",\n clientX509CertUrl: \"client_x509_cert_url\",\n privateKey: \"----BEGINZZASTRAXC-\n NBdNmSp\n ------- ENDTLCHMVK----------\",\n privateKeyId: \"private_key_id\",\n projectId: \"project_id\",\n tokenUri: \"token_uri\",\n type: type_,\n universeDomain: \"universe_domain\"\n };\n\n const { data } = await client.integrations.saveFcmIntegration(fcmConfigPayload);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.deleteFcmIntegration({\n id: \"id\",\n });\n\n console.log(data);\n})();\n" }, "/integrations/github": { @@ -105,7 +105,7 @@ }, "/integrations/inbox": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listInboxIntegrations();\n\n console.log(data);\n})();\n", - "put": "import { Banner, Client, DefaultHover, DefaultState, Default_, Dialog, Footer, Header, Icon, Images, InboxConfigPayload, Notification, Theme, Unread, UnreadHover, UnreadState, Unseen, UnseenBadge, UnseenHover, UnseenState } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const images: Images = {\t\n emptyInboxUrl: \"emptyInboxUrl\"\n };\n \n \n const banner: Banner = {\t\n backgroundColor: \"backgroundColor\",\n backgroundOpacity: 0.59,\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const dialog: Dialog = {\t\n accentColor: \"accentColor\",\n backgroundColor: \"backgroundColor\",\n textColor: \"textColor\"\n };\n \n \n const footer: Footer = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const header: Header = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const icon: Icon = {\t\n borderColor: \"borderColor\",\n width: \"width\"\n };\n \n \n const defaultHover: DefaultHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const defaultState: DefaultState = {\t\n color: \"color\"\n };\n \n const default_: Default_ = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n hover: defaultHover,\n margin: \"margin\",\n state: defaultState,\n textColor: \"textColor\"\n };\n \n \n const unreadHover: UnreadHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unreadState: UnreadState = {\t\n color: \"color\"\n };\n \n const unread: Unread = {\t\n backgroundColor: \"backgroundColor\",\n hover: unreadHover,\n state: unreadState,\n textColor: \"textColor\"\n };\n \n \n const unseenHover: UnseenHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unseenState: UnseenState = {\t\n color: \"color\"\n };\n \n const unseen: Unseen = {\t\n backgroundColor: \"backgroundColor\",\n hover: unseenHover,\n state: unseenState,\n textColor: \"textColor\"\n };\n \n const notification: Notification = {\t\n default: default_,\n unread: unread,\n unseen: unseen\n };\n \n \n const unseenBadge: UnseenBadge = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n const theme: Theme = {\t\n banner: banner,\n dialog: dialog,\n footer: footer,\n header: header,\n icon: icon,\n notification: notification,\n unseenBadge: unseenBadge\n };\n \n const inboxConfigPayload: InboxConfigPayload = {\t\n images: images,\n locale: \"locale\",\n theme: theme\n };\n\n const { data } = await client.integrations.saveInboxIntegration(inboxConfigPayload);\n\n console.log(data);\n})();\n", + "put": "import { Banner, Client, DefaultHover, DefaultState, Default_, Dialog, Footer, Header, Icon, Images, InboxConfigPayload, Notification, Theme, Unread, UnreadHover, UnreadState, Unseen, UnseenBadge, UnseenHover, UnseenState } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const images: Images = {\t\n emptyInboxUrl: \"emptyInboxUrl\"\n };\n \n \n const banner: Banner = {\t\n backgroundColor: \"backgroundColor\",\n backgroundOpacity: 4.93,\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const dialog: Dialog = {\t\n accentColor: \"accentColor\",\n backgroundColor: \"backgroundColor\",\n textColor: \"textColor\"\n };\n \n \n const footer: Footer = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const header: Header = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const icon: Icon = {\t\n borderColor: \"borderColor\",\n width: \"width\"\n };\n \n \n const defaultHover: DefaultHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const defaultState: DefaultState = {\t\n color: \"color\"\n };\n \n const default_: Default_ = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n hover: defaultHover,\n margin: \"margin\",\n state: defaultState,\n textColor: \"textColor\"\n };\n \n \n const unreadHover: UnreadHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unreadState: UnreadState = {\t\n color: \"color\"\n };\n \n const unread: Unread = {\t\n backgroundColor: \"backgroundColor\",\n hover: unreadHover,\n state: unreadState,\n textColor: \"textColor\"\n };\n \n \n const unseenHover: UnseenHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unseenState: UnseenState = {\t\n color: \"color\"\n };\n \n const unseen: Unseen = {\t\n backgroundColor: \"backgroundColor\",\n hover: unseenHover,\n state: unseenState,\n textColor: \"textColor\"\n };\n \n const notification: Notification = {\t\n default: default_,\n unread: unread,\n unseen: unseen\n };\n \n \n const unseenBadge: UnseenBadge = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n const theme: Theme = {\t\n banner: banner,\n dialog: dialog,\n footer: footer,\n header: header,\n icon: icon,\n notification: notification,\n unseenBadge: unseenBadge\n };\n \n const inboxConfigPayload: InboxConfigPayload = {\t\n images: images,\n locale: \"locale\",\n theme: theme\n };\n\n const { data } = await client.integrations.saveInboxIntegration(inboxConfigPayload);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.deleteInboxIntegration({\n id: \"id\",\n });\n\n console.log(data);\n})();\n" }, "/integrations/magicbell_slackbot": { @@ -135,7 +135,7 @@ }, "/integrations/slack": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listSlackIntegrations();\n\n console.log(data);\n})();\n", - "put": "import { Client, SlackConfigPayload } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackConfigPayload: SlackConfigPayload = {\t\n appId: \"0N\",\n clientId: \"5304524.8556302494\",\n clientSecret: \"amet culpa Excepteurculpa quis a\",\n signingSecret: \"ut irurereprehenderit voluptatea\"\n };\n\n const { data } = await client.integrations.saveSlackIntegration(slackConfigPayload);\n\n console.log(data);\n})();\n", + "put": "import { Client, SlackConfigPayload } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackConfigPayload: SlackConfigPayload = {\t\n appId: \"O7RI\",\n clientId: \"104.7350704\",\n clientSecret: \"officia fugiat nostrud Excepteur\",\n signingSecret: \"non sit exanim ad enim eaexlabor\"\n };\n\n const { data } = await client.integrations.saveSlackIntegration(slackConfigPayload);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.deleteSlackIntegration({\n id: \"id\",\n });\n\n console.log(data);\n})();\n" }, "/integrations/smtp": { @@ -150,7 +150,7 @@ }, "/integrations/twilio": { "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.listTwilioIntegrations();\n\n console.log(data);\n})();\n", - "put": "import { Client, TwilioConfigPayload } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const twilioConfigPayload: TwilioConfigPayload = {\t\n accountSid: \"account_sid\",\n apiKey: \"api_key\",\n apiSecret: \"api_secret\",\n from: \"+8217286788160\"\n };\n\n const { data } = await client.integrations.saveTwilioIntegration(twilioConfigPayload);\n\n console.log(data);\n})();\n", + "put": "import { Client, TwilioConfigPayload } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const twilioConfigPayload: TwilioConfigPayload = {\t\n accountSid: \"account_sid\",\n apiKey: \"api_key\",\n apiSecret: \"api_secret\",\n from: \"+28378825295343\"\n };\n\n const { data } = await client.integrations.saveTwilioIntegration(twilioConfigPayload);\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.deleteTwilioIntegration({\n id: \"id\",\n });\n\n console.log(data);\n})();\n" }, "/integrations/web_push": { @@ -159,7 +159,7 @@ "delete": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.deleteWebPushIntegration({\n id: \"id\",\n });\n\n console.log(data);\n})();\n" }, "/users": { - "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.users.listUsers({\n limit: 8,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n query: \"query\",\n });\n\n console.log(data);\n})();\n", + "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.users.listUsers({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n query: \"query\",\n });\n\n console.log(data);\n})();\n", "put": "import { Client, User } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const user: User = {\t\n createdAt: \"created_at\",\n customAttributes: {},\n email: \"email\",\n externalId: \"external_id\",\n firstName: \"first_name\",\n id: \"id\",\n lastName: \"last_name\",\n lastNotifiedAt: \"last_notified_at\",\n lastSeenAt: \"last_seen_at\",\n updatedAt: \"updated_at\"\n };\n\n const { data } = await client.users.saveUser(user);\n\n console.log(data);\n})();\n" }, "/users/{user_id}": { @@ -181,7 +181,7 @@ "get": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.workflows.listWorkflowRuns(\"workflow_key\");\n\n console.log(data);\n})();\n" } }, - "example": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.broadcasts.listBroadcasts({\n limit: 10,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "example": "import { Client } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.broadcasts.listBroadcasts({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "authentication": { "bearer": { "constructor": "const sdk = new Client({ token: 'YOUR_TOKEN' });", diff --git a/packages/magicbell-js/docs/user-client/README.md b/packages/magicbell-js/docs/user-client/README.md index 6ccf6c9d2..b84972e0d 100644 --- a/packages/magicbell-js/docs/user-client/README.md +++ b/packages/magicbell-js/docs/user-client/README.md @@ -66,7 +66,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listInboxTokens({ - limit: 4, + limit: 123, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/user-client/models/FcmToken.md b/packages/magicbell-js/docs/user-client/models/FcmToken.md index a1b67f1e2..b72590a37 100644 --- a/packages/magicbell-js/docs/user-client/models/FcmToken.md +++ b/packages/magicbell-js/docs/user-client/models/FcmToken.md @@ -2,20 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :--------------------- | :------- | :---------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| installationId | FcmTokenInstallationId | ❌ | | -| updatedAt | string | ❌ | | - -# FcmTokenInstallationId - -**Properties** - -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :------------ | -| DEVELOPMENT | string | ✅ | "development" | -| PRODUCTION | string | ✅ | "production" | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :---------- | +| createdAt | string | ✅ | | +| deviceToken | string | ✅ | | +| id | string | ✅ | | +| discardedAt | string | ❌ | | +| updatedAt | string | ❌ | | diff --git a/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md b/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md index f74fb02b4..ae56db763 100644 --- a/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md +++ b/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md @@ -2,16 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :---------------------------- | :------- | :---------- | -| deviceToken | string | ✅ | | -| installationId | FcmTokenPayloadInstallationId | ❌ | | - -# FcmTokenPayloadInstallationId - -**Properties** - -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :------------ | -| DEVELOPMENT | string | ✅ | "development" | -| PRODUCTION | string | ✅ | "production" | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :---------- | +| deviceToken | string | ✅ | | diff --git a/packages/magicbell-js/docs/user-client/services/ChannelsService.md b/packages/magicbell-js/docs/user-client/services/ChannelsService.md index 1d2186de6..4d0b74eaa 100644 --- a/packages/magicbell-js/docs/user-client/services/ChannelsService.md +++ b/packages/magicbell-js/docs/user-client/services/ChannelsService.md @@ -69,7 +69,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listInboxTokens({ - limit: 4, + limit: 123, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -107,7 +107,7 @@ import { Client, InboxToken } from 'magicbell-js/user-client'; const inboxToken: InboxToken = { connectionId: 'connection_id', - token: 'veniam ipsum ex', + token: 'insint adipisic', }; const { data } = await client.channels.saveInboxToken(inboxToken); @@ -212,7 +212,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listApnsTokens({ - limit: 1, + limit: 10, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -252,7 +252,7 @@ import { ApnsTokenPayload, ApnsTokenPayloadInstallationId, Client } from 'magicb const apnsTokenPayload: ApnsTokenPayload = { appId: 'app_id', - deviceToken: 'aliqua sintut e', + deviceToken: 'doea occaecat q', installationId: apnsTokenPayloadInstallationId, }; @@ -358,7 +358,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listExpoTokens({ - limit: 1, + limit: 8, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -500,7 +500,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listFcmTokens({ - limit: 5, + limit: 3, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -529,18 +529,15 @@ Saves the FCM token for the authenticated user. This token serves as a credentia **Example Usage Code Snippet** ```typescript -import { Client, FcmTokenPayload, FcmTokenPayloadInstallationId } from 'magicbell-js/user-client'; +import { Client, FcmTokenPayload } from 'magicbell-js/user-client'; (async () => { const client = new Client({ token: 'YOUR_TOKEN', }); - const fcmTokenPayloadInstallationId = FcmTokenPayloadInstallationId.DEVELOPMENT; - const fcmTokenPayload: FcmTokenPayload = { - deviceToken: 'velit fugiatsin', - installationId: fcmTokenPayloadInstallationId, + deviceToken: 'voluptate incid', }; const { data } = await client.channels.saveFcmToken(fcmTokenPayload); @@ -645,7 +642,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listMagicbellSlackbotTokens({ - limit: 1, + limit: 2, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -798,7 +795,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listSlackTokens({ - limit: 123, + limit: 4, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -951,7 +948,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listTeamsTokens({ - limit: 4, + limit: 123, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -1168,7 +1165,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listWebPushTokens({ - limit: 8, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/user-client/services/IntegrationsService.md b/packages/magicbell-js/docs/user-client/services/IntegrationsService.md index 0d102d93b..9cbfab8d4 100644 --- a/packages/magicbell-js/docs/user-client/services/IntegrationsService.md +++ b/packages/magicbell-js/docs/user-client/services/IntegrationsService.md @@ -69,7 +69,7 @@ import { const banner: Banner = { backgroundColor: 'backgroundColor', - backgroundOpacity: 5.32, + backgroundOpacity: 8.51, fontSize: 'fontSize', textColor: 'textColor', }; @@ -237,7 +237,7 @@ import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Tea const authedUser: AuthedUser = { accessToken: 'access_token', - expiresIn: 8, + expiresIn: 123, id: 'id', refreshToken: 'refresh_token', scope: 'scope', @@ -266,8 +266,8 @@ import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Tea authedUser: authedUser, botUserId: 'bot_user_id', enterprise: enterprise, - expiresIn: 2, - id: 'WOAWCLK-uyMR{#2hsP', + expiresIn: 1, + id: '8-P^R', incomingWebhook: incomingWebhook, isEnterpriseInstall: true, refreshToken: 'refresh_token', @@ -390,7 +390,7 @@ import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Tea const authedUser: AuthedUser = { accessToken: 'access_token', - expiresIn: 8, + expiresIn: 123, id: 'id', refreshToken: 'refresh_token', scope: 'scope', @@ -419,8 +419,8 @@ import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Tea authedUser: authedUser, botUserId: 'bot_user_id', enterprise: enterprise, - expiresIn: 2, - id: 'WOAWCLK-uyMR{#2hsP', + expiresIn: 1, + id: '8-P^R', incomingWebhook: incomingWebhook, isEnterpriseInstall: true, refreshToken: 'refresh_token', diff --git a/packages/magicbell-js/docs/user-client/services/NotificationsService.md b/packages/magicbell-js/docs/user-client/services/NotificationsService.md index aa5a67725..dfcb8781d 100644 --- a/packages/magicbell-js/docs/user-client/services/NotificationsService.md +++ b/packages/magicbell-js/docs/user-client/services/NotificationsService.md @@ -46,7 +46,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.notifications.listNotifications({ - limit: 3, + limit: 5, startingAfter: 'starting_after', endingBefore: 'ending_before', status: 'status', diff --git a/packages/magicbell-js/docs/user-client/snippets/snippets.json b/packages/magicbell-js/docs/user-client/snippets/snippets.json index b926ac1e2..d475d4b4d 100644 --- a/packages/magicbell-js/docs/user-client/snippets/snippets.json +++ b/packages/magicbell-js/docs/user-client/snippets/snippets.json @@ -1,23 +1,23 @@ { "endpoints": { "/channels/in_app/inbox/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listInboxTokens({\n limit: 4,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", - "put": "import { Client, InboxToken } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const inboxToken: InboxToken = {\t\n connectionId: \"connection_id\",\n token: \"veniam ipsum ex\"\n };\n\n const { data } = await client.channels.saveInboxToken(inboxToken);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listInboxTokens({\n limit: 123,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "put": "import { Client, InboxToken } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const inboxToken: InboxToken = {\t\n connectionId: \"connection_id\",\n token: \"insint adipisic\"\n };\n\n const { data } = await client.channels.saveInboxToken(inboxToken);\n\n console.log(data);\n})();\n" }, "/channels/in_app/inbox/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchInboxToken(\"token_id\");\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteInboxToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/channels/mobile_push/apns/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listApnsTokens({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", - "put": "import { ApnsTokenPayload, ApnsTokenPayloadInstallationId, Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const apnsTokenPayloadInstallationId = ApnsTokenPayloadInstallationId.DEVELOPMENT\n \n const apnsTokenPayload: ApnsTokenPayload = {\t\n appId: \"app_id\",\n deviceToken: \"aliqua sintut e\",\n installationId: apnsTokenPayloadInstallationId\n };\n\n const { data } = await client.channels.saveApnsToken(apnsTokenPayload);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listApnsTokens({\n limit: 10,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "put": "import { ApnsTokenPayload, ApnsTokenPayloadInstallationId, Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const apnsTokenPayloadInstallationId = ApnsTokenPayloadInstallationId.DEVELOPMENT\n \n const apnsTokenPayload: ApnsTokenPayload = {\t\n appId: \"app_id\",\n deviceToken: \"doea occaecat q\",\n installationId: apnsTokenPayloadInstallationId\n };\n\n const { data } = await client.channels.saveApnsToken(apnsTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/mobile_push/apns/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchApnsToken(\"token_id\");\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteApnsToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/channels/mobile_push/expo/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listExpoTokens({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listExpoTokens({\n limit: 8,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "put": "import { Client, ExpoTokenPayload } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const expoTokenPayload: ExpoTokenPayload = {\t\n deviceToken: \"device_token\"\n };\n\n const { data } = await client.channels.saveExpoToken(expoTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/mobile_push/expo/tokens/{token_id}": { @@ -25,15 +25,15 @@ "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteExpoToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/channels/mobile_push/fcm/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listFcmTokens({\n limit: 5,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", - "put": "import { Client, FcmTokenPayload, FcmTokenPayloadInstallationId } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const fcmTokenPayloadInstallationId = FcmTokenPayloadInstallationId.DEVELOPMENT\n \n const fcmTokenPayload: FcmTokenPayload = {\t\n deviceToken: \"velit fugiatsin\",\n installationId: fcmTokenPayloadInstallationId\n };\n\n const { data } = await client.channels.saveFcmToken(fcmTokenPayload);\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listFcmTokens({\n limit: 3,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "put": "import { Client, FcmTokenPayload } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const fcmTokenPayload: FcmTokenPayload = {\t\n deviceToken: \"voluptate incid\"\n };\n\n const { data } = await client.channels.saveFcmToken(fcmTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/mobile_push/fcm/tokens/{token_id}": { "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.fetchFcmToken(\"token_id\");\n\n console.log(data);\n})();\n", "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteFcmToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/channels/slack/magicbell_slackbot/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listMagicbellSlackbotTokens({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listMagicbellSlackbotTokens({\n limit: 2,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "put": "import { Client, SlackTokenPayload, SlackTokenPayloadOauth, SlackTokenPayloadWebhook } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackTokenPayloadOauth: SlackTokenPayloadOauth = {\t\n channelId: \"channel_id\",\n installationId: \"installation_id\",\n scope: \"scope\"\n };\n \n \n const slackTokenPayloadWebhook: SlackTokenPayloadWebhook = {\t\n url: \"url\"\n };\n \n const slackTokenPayload: SlackTokenPayload = {\t\n oauth: slackTokenPayloadOauth,\n webhook: slackTokenPayloadWebhook\n };\n\n const { data } = await client.channels.saveMagicbellSlackbotToken(slackTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/slack/magicbell_slackbot/tokens/{token_id}": { @@ -41,7 +41,7 @@ "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteMagicbellSlackbotToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/channels/slack/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listSlackTokens({\n limit: 123,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listSlackTokens({\n limit: 4,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "put": "import { Client, SlackTokenPayload, SlackTokenPayloadOauth, SlackTokenPayloadWebhook } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackTokenPayloadOauth: SlackTokenPayloadOauth = {\t\n channelId: \"channel_id\",\n installationId: \"installation_id\",\n scope: \"scope\"\n };\n \n \n const slackTokenPayloadWebhook: SlackTokenPayloadWebhook = {\t\n url: \"url\"\n };\n \n const slackTokenPayload: SlackTokenPayload = {\t\n oauth: slackTokenPayloadOauth,\n webhook: slackTokenPayloadWebhook\n };\n\n const { data } = await client.channels.saveSlackToken(slackTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/slack/tokens/{token_id}": { @@ -49,7 +49,7 @@ "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteSlackToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/channels/teams/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listTeamsTokens({\n limit: 4,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listTeamsTokens({\n limit: 123,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "put": "import { Client, TeamsTokenPayload, TeamsTokenPayloadWebhook } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const teamsTokenPayloadWebhook: TeamsTokenPayloadWebhook = {\t\n url: \"url\"\n };\n \n const teamsTokenPayload: TeamsTokenPayload = {\t\n webhook: teamsTokenPayloadWebhook\n };\n\n const { data } = await client.channels.saveTeamsToken(teamsTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/teams/tokens/{token_id}": { @@ -61,7 +61,7 @@ "put": "import { Categories, Channels, Client, UserPreferences } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const channels: Channels = {\t\n enabled: true,\n name: \"name\"\n };\n \n const categories: Categories = {\t\n channels: [channels],\n key: \"key\",\n label: \"label\"\n };\n \n const userPreferences: UserPreferences = {\t\n categories: [categories]\n };\n\n const { data } = await client.channels.saveUserPreferences(userPreferences);\n\n console.log(data);\n})();\n" }, "/channels/web_push/tokens": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listWebPushTokens({\n limit: 8,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listWebPushTokens({\n limit: 1,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "put": "import { Client, WebPushTokenPayload, WebPushTokenPayloadKeys } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const webPushTokenPayloadKeys: WebPushTokenPayloadKeys = {\t\n auth: \"auth\",\n p256dh: \"p256dh\"\n };\n \n const webPushTokenPayload: WebPushTokenPayload = {\t\n endpoint: \"endpoint\",\n keys: webPushTokenPayloadKeys\n };\n\n const { data } = await client.channels.saveWebPushToken(webPushTokenPayload);\n\n console.log(data);\n})();\n" }, "/channels/web_push/tokens/{token_id}": { @@ -69,13 +69,13 @@ "delete": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.deleteWebPushToken(\"token_id\");\n\n console.log(data);\n})();\n" }, "/integrations/inbox/installations": { - "put": "import { Banner, Client, DefaultHover, DefaultState, Default_, Dialog, Footer, Header, Icon, Images, InboxConfigPayload, Theme, ThemeNotification, Unread, UnreadHover, UnreadState, Unseen, UnseenBadge, UnseenHover, UnseenState } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const images: Images = {\t\n emptyInboxUrl: \"emptyInboxUrl\"\n };\n \n \n const banner: Banner = {\t\n backgroundColor: \"backgroundColor\",\n backgroundOpacity: 5.32,\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const dialog: Dialog = {\t\n accentColor: \"accentColor\",\n backgroundColor: \"backgroundColor\",\n textColor: \"textColor\"\n };\n \n \n const footer: Footer = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const header: Header = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const icon: Icon = {\t\n borderColor: \"borderColor\",\n width: \"width\"\n };\n \n \n const defaultHover: DefaultHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const defaultState: DefaultState = {\t\n color: \"color\"\n };\n \n const default_: Default_ = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n hover: defaultHover,\n margin: \"margin\",\n state: defaultState,\n textColor: \"textColor\"\n };\n \n \n const unreadHover: UnreadHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unreadState: UnreadState = {\t\n color: \"color\"\n };\n \n const unread: Unread = {\t\n backgroundColor: \"backgroundColor\",\n hover: unreadHover,\n state: unreadState,\n textColor: \"textColor\"\n };\n \n \n const unseenHover: UnseenHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unseenState: UnseenState = {\t\n color: \"color\"\n };\n \n const unseen: Unseen = {\t\n backgroundColor: \"backgroundColor\",\n hover: unseenHover,\n state: unseenState,\n textColor: \"textColor\"\n };\n \n const themeNotification: ThemeNotification = {\t\n default: default_,\n unread: unread,\n unseen: unseen\n };\n \n \n const unseenBadge: UnseenBadge = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n const theme: Theme = {\t\n banner: banner,\n dialog: dialog,\n footer: footer,\n header: header,\n icon: icon,\n notification: themeNotification,\n unseenBadge: unseenBadge\n };\n \n const inboxConfigPayload: InboxConfigPayload = {\t\n images: images,\n locale: \"locale\",\n theme: theme\n };\n\n const { data } = await client.integrations.saveInboxInstallation(inboxConfigPayload);\n\n console.log(data);\n})();\n" + "put": "import { Banner, Client, DefaultHover, DefaultState, Default_, Dialog, Footer, Header, Icon, Images, InboxConfigPayload, Theme, ThemeNotification, Unread, UnreadHover, UnreadState, Unseen, UnseenBadge, UnseenHover, UnseenState } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const images: Images = {\t\n emptyInboxUrl: \"emptyInboxUrl\"\n };\n \n \n const banner: Banner = {\t\n backgroundColor: \"backgroundColor\",\n backgroundOpacity: 8.51,\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const dialog: Dialog = {\t\n accentColor: \"accentColor\",\n backgroundColor: \"backgroundColor\",\n textColor: \"textColor\"\n };\n \n \n const footer: Footer = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const header: Header = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n textColor: \"textColor\"\n };\n \n \n const icon: Icon = {\t\n borderColor: \"borderColor\",\n width: \"width\"\n };\n \n \n const defaultHover: DefaultHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const defaultState: DefaultState = {\t\n color: \"color\"\n };\n \n const default_: Default_ = {\t\n backgroundColor: \"backgroundColor\",\n borderRadius: \"borderRadius\",\n fontFamily: \"fontFamily\",\n fontSize: \"fontSize\",\n hover: defaultHover,\n margin: \"margin\",\n state: defaultState,\n textColor: \"textColor\"\n };\n \n \n const unreadHover: UnreadHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unreadState: UnreadState = {\t\n color: \"color\"\n };\n \n const unread: Unread = {\t\n backgroundColor: \"backgroundColor\",\n hover: unreadHover,\n state: unreadState,\n textColor: \"textColor\"\n };\n \n \n const unseenHover: UnseenHover = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n \n const unseenState: UnseenState = {\t\n color: \"color\"\n };\n \n const unseen: Unseen = {\t\n backgroundColor: \"backgroundColor\",\n hover: unseenHover,\n state: unseenState,\n textColor: \"textColor\"\n };\n \n const themeNotification: ThemeNotification = {\t\n default: default_,\n unread: unread,\n unseen: unseen\n };\n \n \n const unseenBadge: UnseenBadge = {\t\n backgroundColor: \"backgroundColor\"\n };\n \n const theme: Theme = {\t\n banner: banner,\n dialog: dialog,\n footer: footer,\n header: header,\n icon: icon,\n notification: themeNotification,\n unseenBadge: unseenBadge\n };\n \n const inboxConfigPayload: InboxConfigPayload = {\t\n images: images,\n locale: \"locale\",\n theme: theme\n };\n\n const { data } = await client.integrations.saveInboxInstallation(inboxConfigPayload);\n\n console.log(data);\n})();\n" }, "/integrations/inbox/installations/start": { "post": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.startInboxInstallation();\n\n console.log(data);\n})();\n" }, "/integrations/magicbell_slackbot/installations": { - "put": "import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Team } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const authedUser: AuthedUser = {\t\n accessToken: \"access_token\",\n expiresIn: 8,\n id: \"id\",\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n tokenType: \"token_type\"\n };\n \n \n const enterprise: Enterprise = {\t\n id: \"id\",\n name: \"name\"\n };\n \n \n const incomingWebhook: IncomingWebhook = {\t\n channel: \"channel\",\n configurationUrl: \"configuration_url\",\n url: \"url\"\n };\n \n \n const team: Team = {\t\n id: \"id\",\n name: \"name\"\n };\n \n const slackInstallation: SlackInstallation = {\t\n accessToken: \"access_token\",\n appId: \"app_id\",\n authedUser: authedUser,\n botUserId: \"bot_user_id\",\n enterprise: enterprise,\n expiresIn: 2,\n id: \"WOAWCLK-uyMR{#2hsP\",\n incomingWebhook: incomingWebhook,\n isEnterpriseInstall: true,\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n team: team,\n tokenType: \"token_type\"\n };\n\n const { data } = await client.integrations.saveMagicbellSlackbotInstallation(slackInstallation);\n\n console.log(data);\n})();\n" + "put": "import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Team } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const authedUser: AuthedUser = {\t\n accessToken: \"access_token\",\n expiresIn: 123,\n id: \"id\",\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n tokenType: \"token_type\"\n };\n \n \n const enterprise: Enterprise = {\t\n id: \"id\",\n name: \"name\"\n };\n \n \n const incomingWebhook: IncomingWebhook = {\t\n channel: \"channel\",\n configurationUrl: \"configuration_url\",\n url: \"url\"\n };\n \n \n const team: Team = {\t\n id: \"id\",\n name: \"name\"\n };\n \n const slackInstallation: SlackInstallation = {\t\n accessToken: \"access_token\",\n appId: \"app_id\",\n authedUser: authedUser,\n botUserId: \"bot_user_id\",\n enterprise: enterprise,\n expiresIn: 1,\n id: \"8-P^R\",\n incomingWebhook: incomingWebhook,\n isEnterpriseInstall: true,\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n team: team,\n tokenType: \"token_type\"\n };\n\n const { data } = await client.integrations.saveMagicbellSlackbotInstallation(slackInstallation);\n\n console.log(data);\n})();\n" }, "/integrations/magicbell_slackbot/installations/finish": { "post": "import { Client, SlackFinishInstallResponse } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackFinishInstallResponse: SlackFinishInstallResponse = {\t\n appId: \"app_id\",\n code: \"code\",\n redirectUrl: \"redirect_url\"\n };\n\n const { data } = await client.integrations.finishMagicbellSlackbotInstallation(slackFinishInstallResponse);\n\n console.log(data);\n})();\n" @@ -84,7 +84,7 @@ "post": "import { Client, SlackStartInstall } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackStartInstall: SlackStartInstall = {\t\n appId: \"app_id\",\n authUrl: \"auth_url\",\n extraScopes: [\"extra_scopes\"],\n redirectUrl: \"redirect_url\"\n };\n\n const { data } = await client.integrations.startMagicbellSlackbotInstallation(slackStartInstall);\n\n console.log(data);\n})();\n" }, "/integrations/slack/installations": { - "put": "import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Team } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const authedUser: AuthedUser = {\t\n accessToken: \"access_token\",\n expiresIn: 8,\n id: \"id\",\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n tokenType: \"token_type\"\n };\n \n \n const enterprise: Enterprise = {\t\n id: \"id\",\n name: \"name\"\n };\n \n \n const incomingWebhook: IncomingWebhook = {\t\n channel: \"channel\",\n configurationUrl: \"configuration_url\",\n url: \"url\"\n };\n \n \n const team: Team = {\t\n id: \"id\",\n name: \"name\"\n };\n \n const slackInstallation: SlackInstallation = {\t\n accessToken: \"access_token\",\n appId: \"app_id\",\n authedUser: authedUser,\n botUserId: \"bot_user_id\",\n enterprise: enterprise,\n expiresIn: 2,\n id: \"WOAWCLK-uyMR{#2hsP\",\n incomingWebhook: incomingWebhook,\n isEnterpriseInstall: true,\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n team: team,\n tokenType: \"token_type\"\n };\n\n const { data } = await client.integrations.saveSlackInstallation(slackInstallation);\n\n console.log(data);\n})();\n" + "put": "import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Team } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const authedUser: AuthedUser = {\t\n accessToken: \"access_token\",\n expiresIn: 123,\n id: \"id\",\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n tokenType: \"token_type\"\n };\n \n \n const enterprise: Enterprise = {\t\n id: \"id\",\n name: \"name\"\n };\n \n \n const incomingWebhook: IncomingWebhook = {\t\n channel: \"channel\",\n configurationUrl: \"configuration_url\",\n url: \"url\"\n };\n \n \n const team: Team = {\t\n id: \"id\",\n name: \"name\"\n };\n \n const slackInstallation: SlackInstallation = {\t\n accessToken: \"access_token\",\n appId: \"app_id\",\n authedUser: authedUser,\n botUserId: \"bot_user_id\",\n enterprise: enterprise,\n expiresIn: 1,\n id: \"8-P^R\",\n incomingWebhook: incomingWebhook,\n isEnterpriseInstall: true,\n refreshToken: \"refresh_token\",\n scope: \"scope\",\n team: team,\n tokenType: \"token_type\"\n };\n\n const { data } = await client.integrations.saveSlackInstallation(slackInstallation);\n\n console.log(data);\n})();\n" }, "/integrations/slack/installations/finish": { "post": "import { Client, SlackFinishInstallResponse } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const slackFinishInstallResponse: SlackFinishInstallResponse = {\t\n appId: \"app_id\",\n code: \"code\",\n redirectUrl: \"redirect_url\"\n };\n\n const { data } = await client.integrations.finishSlackInstallation(slackFinishInstallResponse);\n\n console.log(data);\n})();\n" @@ -99,7 +99,7 @@ "post": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.integrations.startWebPushInstallation();\n\n console.log(data);\n})();\n" }, "/notifications": { - "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.notifications.listNotifications({\n limit: 3,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n status: \"status\",\n category: \"category\",\n topic: \"topic\",\n });\n\n console.log(data);\n})();\n" + "get": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.notifications.listNotifications({\n limit: 5,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n status: \"status\",\n category: \"category\",\n topic: \"topic\",\n });\n\n console.log(data);\n})();\n" }, "/notifications/archive": { "post": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.notifications.archiveAllNotifications({\n category: \"category\",\n topic: \"topic\",\n });\n\n console.log(data);\n})();\n" @@ -123,7 +123,7 @@ "post": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.notifications.markNotificationUnread(\"notification_id\");\n\n console.log(data);\n})();\n" } }, - "example": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listInboxTokens({\n limit: 4,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", + "example": "import { Client } from 'magicbell-js/user-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n const { data } = await client.channels.listInboxTokens({\n limit: 123,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n });\n\n console.log(data);\n})();\n", "authentication": { "bearer": { "constructor": "const sdk = new Client({ token: 'YOUR_TOKEN' });", diff --git a/packages/magicbell-js/src/project-client/services/channels/models/apns-token-installation-id.ts b/packages/magicbell-js/src/project-client/services/channels/models/apns-token-installation-id.ts deleted file mode 100644 index a3cc702cf..000000000 --- a/packages/magicbell-js/src/project-client/services/channels/models/apns-token-installation-id.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { z } from 'zod'; - -export enum ApnsTokenInstallationId { - DEVELOPMENT = 'development', - PRODUCTION = 'production', -} diff --git a/packages/magicbell-js/src/project-client/services/channels/models/apns-token.ts b/packages/magicbell-js/src/project-client/services/channels/models/apns-token.ts index 131b7f5fd..8346c318b 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/apns-token.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/apns-token.ts @@ -26,7 +26,7 @@ export const apnsToken = z.lazy(() => { * @property {string} * @property {string} * @property {string} - * @property {ApnsTokenInstallationId} - (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. + * @property {InstallationId} - (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. * @property {string} */ export type ApnsToken = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/fcm-token.ts b/packages/magicbell-js/src/project-client/services/channels/models/fcm-token.ts index 5d42f724d..5ea134958 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/fcm-token.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/fcm-token.ts @@ -9,7 +9,6 @@ export const fcmToken = z.lazy(() => { deviceToken: z.string().min(64), discardedAt: z.string().optional().nullable(), id: z.string(), - installationId: z.string().optional(), updatedAt: z.string().optional().nullable(), }); }); @@ -21,7 +20,6 @@ export const fcmToken = z.lazy(() => { * @property {string} * @property {string} * @property {string} - * @property {FcmTokenInstallationId} * @property {string} */ export type FcmToken = z.infer; @@ -37,7 +35,6 @@ export const fcmTokenResponse = z.lazy(() => { device_token: z.string().min(64), discarded_at: z.string().optional().nullable(), id: z.string(), - installation_id: z.string().optional(), updated_at: z.string().optional().nullable(), }) .transform((data) => ({ @@ -45,7 +42,6 @@ export const fcmTokenResponse = z.lazy(() => { deviceToken: data['device_token'], discardedAt: data['discarded_at'], id: data['id'], - installationId: data['installation_id'], updatedAt: data['updated_at'], })); }); @@ -61,7 +57,6 @@ export const fcmTokenRequest = z.lazy(() => { deviceToken: z.string().min(64), discardedAt: z.string().optional().nullable(), id: z.string(), - installationId: z.string().optional(), updatedAt: z.string().optional().nullable(), }) .transform((data) => ({ @@ -69,7 +64,6 @@ export const fcmTokenRequest = z.lazy(() => { device_token: data['deviceToken'], discarded_at: data['discardedAt'], id: data['id'], - installation_id: data['installationId'], updated_at: data['updatedAt'], })); }); diff --git a/packages/magicbell-js/src/project-client/services/channels/models/index.ts b/packages/magicbell-js/src/project-client/services/channels/models/index.ts index 67eb450b6..634c958a8 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/index.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/index.ts @@ -1,6 +1,5 @@ export type { ApnsToken } from './apns-token.js'; export type { ApnsTokenCollection } from './apns-token-collection.js'; -export { ApnsTokenInstallationId } from './apns-token-installation-id.js'; export type { CategoryDeliveryConfig } from './category-delivery-config.js'; export type { CategoryDeliveryConfigChannels } from './category-delivery-config-channels.js'; export { Channel } from './channel.js'; @@ -9,9 +8,9 @@ export type { ExpoToken } from './expo-token.js'; export type { ExpoTokenCollection } from './expo-token-collection.js'; export type { FcmToken } from './fcm-token.js'; export type { FcmTokenCollection } from './fcm-token-collection.js'; -export { FcmTokenInstallationId } from './fcm-token-installation-id.js'; export type { InboxTokenResponse } from './inbox-token-response.js'; export type { InboxTokenResponseCollection } from './inbox-token-response-collection.js'; +export { InstallationId } from './installation-id.js'; export type { Keys } from './keys.js'; export type { Oauth } from './oauth.js'; export type { SlackToken } from './slack-token.js'; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/fcm-token-installation-id.ts b/packages/magicbell-js/src/project-client/services/channels/models/installation-id.ts similarity index 70% rename from packages/magicbell-js/src/project-client/services/channels/models/fcm-token-installation-id.ts rename to packages/magicbell-js/src/project-client/services/channels/models/installation-id.ts index cca08dfa5..b1daca70b 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/fcm-token-installation-id.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/installation-id.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; -export enum FcmTokenInstallationId { +export enum InstallationId { DEVELOPMENT = 'development', PRODUCTION = 'production', } diff --git a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-installation-id.ts b/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-installation-id.ts deleted file mode 100644 index cca08dfa5..000000000 --- a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-installation-id.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { z } from 'zod'; - -export enum FcmTokenInstallationId { - DEVELOPMENT = 'development', - PRODUCTION = 'production', -} diff --git a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload-installation-id.ts b/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload-installation-id.ts deleted file mode 100644 index 9c7fc1fae..000000000 --- a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload-installation-id.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { z } from 'zod'; - -export enum FcmTokenPayloadInstallationId { - DEVELOPMENT = 'development', - PRODUCTION = 'production', -} diff --git a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload.ts b/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload.ts index 5ce167c73..db4ca89c2 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/fcm-token-payload.ts @@ -6,7 +6,6 @@ import { z } from 'zod'; export const fcmTokenPayload = z.lazy(() => { return z.object({ deviceToken: z.string().min(64), - installationId: z.string().optional(), }); }); @@ -14,7 +13,6 @@ export const fcmTokenPayload = z.lazy(() => { * * @typedef {FcmTokenPayload} fcmTokenPayload * @property {string} - * @property {FcmTokenPayloadInstallationId} */ export type FcmTokenPayload = z.infer; @@ -26,11 +24,9 @@ export const fcmTokenPayloadResponse = z.lazy(() => { return z .object({ device_token: z.string().min(64), - installation_id: z.string().optional(), }) .transform((data) => ({ deviceToken: data['device_token'], - installationId: data['installation_id'], })); }); @@ -42,10 +38,8 @@ export const fcmTokenPayloadRequest = z.lazy(() => { return z .object({ deviceToken: z.string().min(64), - installationId: z.string().optional(), }) .transform((data) => ({ device_token: data['deviceToken'], - installation_id: data['installationId'], })); }); diff --git a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/fcm-token.ts index 5d42f724d..5ea134958 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/fcm-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/fcm-token.ts @@ -9,7 +9,6 @@ export const fcmToken = z.lazy(() => { deviceToken: z.string().min(64), discardedAt: z.string().optional().nullable(), id: z.string(), - installationId: z.string().optional(), updatedAt: z.string().optional().nullable(), }); }); @@ -21,7 +20,6 @@ export const fcmToken = z.lazy(() => { * @property {string} * @property {string} * @property {string} - * @property {FcmTokenInstallationId} * @property {string} */ export type FcmToken = z.infer; @@ -37,7 +35,6 @@ export const fcmTokenResponse = z.lazy(() => { device_token: z.string().min(64), discarded_at: z.string().optional().nullable(), id: z.string(), - installation_id: z.string().optional(), updated_at: z.string().optional().nullable(), }) .transform((data) => ({ @@ -45,7 +42,6 @@ export const fcmTokenResponse = z.lazy(() => { deviceToken: data['device_token'], discardedAt: data['discarded_at'], id: data['id'], - installationId: data['installation_id'], updatedAt: data['updated_at'], })); }); @@ -61,7 +57,6 @@ export const fcmTokenRequest = z.lazy(() => { deviceToken: z.string().min(64), discardedAt: z.string().optional().nullable(), id: z.string(), - installationId: z.string().optional(), updatedAt: z.string().optional().nullable(), }) .transform((data) => ({ @@ -69,7 +64,6 @@ export const fcmTokenRequest = z.lazy(() => { device_token: data['deviceToken'], discarded_at: data['discardedAt'], id: data['id'], - installation_id: data['installationId'], updated_at: data['updatedAt'], })); }); diff --git a/packages/magicbell-js/src/user-client/services/channels/models/index.ts b/packages/magicbell-js/src/user-client/services/channels/models/index.ts index 32772024c..14879b0d3 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/index.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/index.ts @@ -11,9 +11,7 @@ export type { ExpoTokenCollection } from './expo-token-collection.js'; export type { ExpoTokenPayload } from './expo-token-payload.js'; export type { FcmToken } from './fcm-token.js'; export type { FcmTokenCollection } from './fcm-token-collection.js'; -export { FcmTokenInstallationId } from './fcm-token-installation-id.js'; export type { FcmTokenPayload } from './fcm-token-payload.js'; -export { FcmTokenPayloadInstallationId } from './fcm-token-payload-installation-id.js'; export type { InboxToken } from './inbox-token.js'; export type { InboxTokenResponse } from './inbox-token-response.js'; export type { InboxTokenResponseCollection } from './inbox-token-response-collection.js';