diff --git a/.changeset/auto-bump-magicbell-js-1765369961.md b/.changeset/auto-bump-magicbell-js-1765369961.md new file mode 100644 index 000000000..3e8c8d7f5 --- /dev/null +++ b/.changeset/auto-bump-magicbell-js-1765369961.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 1bd1d4411..d8d289bf7 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: 1, + limit: 9, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -178,6 +178,7 @@ The SDK includes several models that represent the data structures used in API r | [UserCollection](docs/project-client/models/UserCollection.md) | | | [User](docs/project-client/models/User.md) | | | [Links](docs/project-client/models/Links.md) | | +| [WorkflowList](docs/project-client/models/WorkflowList.md) | | | [WorkflowDefinition](docs/project-client/models/WorkflowDefinition.md) | | | [ExecuteWorkflowRequest](docs/project-client/models/ExecuteWorkflowRequest.md) | | | [CreateRunResponse](docs/project-client/models/CreateRunResponse.md) | | @@ -238,7 +239,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listInboxTokens({ - limit: 123, + limit: 10, 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 11c2024d4..df01651aa 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: 1, + limit: 9, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -180,6 +180,7 @@ The SDK includes several models that represent the data structures used in API r | [UserCollection](models/UserCollection.md) | | | [User](models/User.md) | | | [Links](models/Links.md) | | +| [WorkflowList](models/WorkflowList.md) | | | [WorkflowDefinition](models/WorkflowDefinition.md) | | | [ExecuteWorkflowRequest](models/ExecuteWorkflowRequest.md) | | | [CreateRunResponse](models/CreateRunResponse.md) | | diff --git a/packages/magicbell-js/docs/project-client/models/ApnsConfigPayload.md b/packages/magicbell-js/docs/project-client/models/ApnsConfigPayload.md index 21e515bda..289b003dc 100644 --- a/packages/magicbell-js/docs/project-client/models/ApnsConfigPayload.md +++ b/packages/magicbell-js/docs/project-client/models/ApnsConfigPayload.md @@ -5,14 +5,16 @@ | Name | Type | Required | Description | | :------------- | :------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | appId | string | ✅ | The default bundle identifier of the application that is configured with this project. It can be overriden on a per token basis, when registering device tokens. | -| badge | Badge | ✅ | | +| badge | Badge | ✅ | Controls whether the app icon badge counts unread or unseen notifications. | | certificate | string | ✅ | The APNs certificate in P8 format. Generate it at [developer.apple.com](https://developer.apple.com/account/resources/authkeys/add) with the 'Apple Push Notification service (APNs)' option selected. | -| keyId | string | ✅ | | -| teamId | string | ✅ | | -| payloadVersion | PayloadVersion | ❌ | | +| keyId | string | ✅ | The 10-character Key ID from your Apple Developer account used with the P8 certificate. | +| teamId | string | ✅ | The Apple Developer Team ID that owns the configured key. | +| payloadVersion | PayloadVersion | ❌ | Internal payload format version used by MagicBell. | # Badge +Controls whether the app icon badge counts unread or unseen notifications. + **Properties** | Name | Type | Required | Description | @@ -22,6 +24,8 @@ # PayloadVersion +Internal payload format version used by MagicBell. + **Properties** | Name | Type | Required | Description | diff --git a/packages/magicbell-js/docs/project-client/models/ApnsToken.md b/packages/magicbell-js/docs/project-client/models/ApnsToken.md index 32e54dc7f..6092856a2 100644 --- a/packages/magicbell-js/docs/project-client/models/ApnsToken.md +++ b/packages/magicbell-js/docs/project-client/models/ApnsToken.md @@ -2,19 +2,19 @@ **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 | InstallationId | ❌ | (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 | ✅ | The timestamp when the token was created. | +| deviceToken | string | ✅ | The APNs device token to register with MagicBell. | +| id | string | ✅ | The unique identifier for the token. | +| appId | string | ❌ | The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| installationId | InstallationId | ❌ | The APNs environment this token belongs to. If omitted we assume it targets `production`. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | # InstallationId -(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. +The APNs environment this token belongs to. If omitted we assume it targets `production`. **Properties** diff --git a/packages/magicbell-js/docs/project-client/models/Broadcast.md b/packages/magicbell-js/docs/project-client/models/Broadcast.md index 607926388..874f0fd51 100644 --- a/packages/magicbell-js/docs/project-client/models/Broadcast.md +++ b/packages/magicbell-js/docs/project-client/models/Broadcast.md @@ -2,109 +2,127 @@ **Properties** -| Name | Type | Required | Description | -| :--------------- | :---------------- | :------- | :-------------------------------------------- | -| recipients | [User](User.md)[] | ✅ | | -| title | string | ✅ | | -| actionUrl | string | ❌ | | -| category | string | ❌ | | -| content | string | ❌ | | -| createdAt | string | ❌ | The timestamp when the broadcast was created. | -| customAttributes | any | ❌ | | -| id | string | ❌ | The unique id for this broadcast. | -| overrides | Overrides | ❌ | | -| status | BroadcastStatus | ❌ | | -| topic | string | ❌ | | +| Name | Type | Required | Description | +| :--------------- | :---------------- | :------- | :-------------------------------------------------------------------------- | +| recipients | [User](User.md)[] | ✅ | A collection of users or filters that determine who receives the broadcast. | +| title | string | ✅ | The subject or headline that will be shown to recipients. | +| actionUrl | string | ❌ | The URL recipients will be directed to when interacting with the broadcast. | +| category | string | ❌ | The label used to group broadcasts. | +| content | string | ❌ | The body content delivered with the broadcast. | +| createdAt | string | ❌ | The timestamp when the broadcast was created. | +| customAttributes | any | ❌ | Arbitrary custom data associated with the broadcast. | +| id | string | ❌ | The unique id for this broadcast. | +| overrides | Overrides | ❌ | Channel- or provider-specific values that override the defaults. | +| status | BroadcastStatus | ❌ | The runtime state of the broadcast execution. | +| topic | string | ❌ | The topic that further classifies the broadcast. | # Overrides +Channel- or provider-specific values that override the defaults. + **Properties** -| Name | Type | Required | Description | -| :-------- | :---------------- | :------- | :---------- | -| channels | OverridesChannels | ❌ | | -| providers | Providers | ❌ | | +| Name | Type | Required | Description | +| :-------- | :---------------- | :------- | :------------------------------------------------------------- | +| channels | OverridesChannels | ❌ | Overrides that are scoped to individual delivery channels. | +| providers | Providers | ❌ | Overrides that are scoped to specific providers for a channel. | # OverridesChannels +Overrides that are scoped to individual delivery channels. + **Properties** -| Name | Type | Required | Description | -| :--------- | :--------- | :------- | :---------- | -| email | Email | ❌ | | -| inApp | InApp | ❌ | | -| mobilePush | MobilePush | ❌ | | -| sms | Sms | ❌ | | +| Name | Type | Required | Description | +| :--------- | :--------- | :------- | :--------------------------------------- | +| email | Email | ❌ | Overrides for email notifications. | +| inApp | InApp | ❌ | Overrides for in-app notifications. | +| mobilePush | MobilePush | ❌ | Overrides for mobile push notifications. | +| sms | Sms | ❌ | Overrides for SMS notifications. | # Email +Overrides for email notifications. + **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| actionUrl | string | ❌ | | -| content | string | ❌ | | -| title | string | ❌ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------------------------------------------------------- | +| actionUrl | string | ❌ | The link associated with the channel-specific notification. | +| content | string | ❌ | The channel-specific content. | +| title | string | ❌ | The channel-specific title. | # InApp +Overrides for in-app notifications. + **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| actionUrl | string | ❌ | | -| content | string | ❌ | | -| title | string | ❌ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------------------------------------------------------- | +| actionUrl | string | ❌ | The link associated with the channel-specific notification. | +| content | string | ❌ | The channel-specific content. | +| title | string | ❌ | The channel-specific title. | # MobilePush +Overrides for mobile push notifications. + **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| actionUrl | string | ❌ | | -| content | string | ❌ | | -| title | string | ❌ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------------------------------------------------------- | +| actionUrl | string | ❌ | The link associated with the channel-specific notification. | +| content | string | ❌ | The channel-specific content. | +| title | string | ❌ | The channel-specific title. | # Sms +Overrides for SMS notifications. + **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| actionUrl | string | ❌ | | -| content | string | ❌ | | -| title | string | ❌ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------------------------------------------------------- | +| actionUrl | string | ❌ | The link associated with the channel-specific notification. | +| content | string | ❌ | The channel-specific content. | +| title | string | ❌ | The channel-specific title. | # Providers +Overrides that are scoped to specific providers for a channel. + **Properties** -| Name | Type | Required | Description | -| :------- | :--- | :------- | :---------- | -| apns | any | ❌ | | -| expo | any | ❌ | | -| fcm | any | ❌ | | -| mailgun | any | ❌ | | -| sendgrid | any | ❌ | | -| ses | any | ❌ | | -| slack | any | ❌ | | -| teams | any | ❌ | | -| twilio | any | ❌ | | -| webPush | any | ❌ | | +| Name | Type | Required | Description | +| :------- | :--- | :------- | :--------------------------------------------------------------- | +| apns | any | ❌ | Provider-specific overrides for Apple Push Notification service. | +| expo | any | ❌ | Provider-specific overrides for Expo push notifications. | +| fcm | any | ❌ | Provider-specific overrides for Firebase Cloud Messaging. | +| mailgun | any | ❌ | Provider-specific overrides for Mailgun. | +| sendgrid | any | ❌ | Provider-specific overrides for Sendgrid. | +| ses | any | ❌ | Provider-specific overrides for AWS SES. | +| slack | any | ❌ | Provider-specific overrides for Slack. | +| teams | any | ❌ | Provider-specific overrides for Microsoft Teams. | +| twilio | any | ❌ | Provider-specific overrides for Twilio. | +| webPush | any | ❌ | Provider-specific overrides for the web push provider. | # BroadcastStatus +The runtime state of the broadcast execution. + **Properties** -| Name | Type | Required | Description | -| :------ | :-------------------- | :------- | :---------- | -| errors | [Errors](Errors.md)[] | ✅ | | -| status | StatusStatus | ✅ | | -| summary | Summary | ✅ | | +| Name | Type | Required | Description | +| :------ | :-------------------- | :------- | :----------------------------------------------------------- | +| errors | [Errors](Errors.md)[] | ✅ | A list of errors encountered while processing the broadcast. | +| status | StatusStatus | ✅ | The overall processing status of the broadcast. | +| summary | Summary | ✅ | The summary counts for total recipients and failures. | # StatusStatus +The overall processing status of the broadcast. + **Properties** | Name | Type | Required | Description | @@ -115,6 +133,8 @@ # Summary +The summary counts for total recipients and failures. + **Properties** | Name | Type | Required | Description | diff --git a/packages/magicbell-js/docs/project-client/models/CategoryDeliveryConfig.md b/packages/magicbell-js/docs/project-client/models/CategoryDeliveryConfig.md index eff3fb663..3ee4cdeb0 100644 --- a/packages/magicbell-js/docs/project-client/models/CategoryDeliveryConfig.md +++ b/packages/magicbell-js/docs/project-client/models/CategoryDeliveryConfig.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------- | :-------------------------------------------------------------------- | :------- | :---------- | -| channels | [CategoryDeliveryConfigChannels](CategoryDeliveryConfigChannels.md)[] | ✅ | | -| key | string | ✅ | | -| disabled | boolean | ❌ | | +| Name | Type | Required | Description | +| :------- | :-------------------------------------------------------------------- | :------- | :--------------------------------------------------------- | +| channels | [CategoryDeliveryConfigChannels](CategoryDeliveryConfigChannels.md)[] | ✅ | Ordered channel steps the delivery planner should execute. | +| key | string | ✅ | Unique identifier for this delivery plan. | +| disabled | boolean | ❌ | Disables the plan so it cannot be executed. | diff --git a/packages/magicbell-js/docs/project-client/models/CreateRunResponse.md b/packages/magicbell-js/docs/project-client/models/CreateRunResponse.md index 26aeff60d..ec219a6a6 100644 --- a/packages/magicbell-js/docs/project-client/models/CreateRunResponse.md +++ b/packages/magicbell-js/docs/project-client/models/CreateRunResponse.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------- | +| id | string | ✅ | Identifier of the workflow run that was created. | diff --git a/packages/magicbell-js/docs/project-client/models/DiscardResult.md b/packages/magicbell-js/docs/project-client/models/DiscardResult.md index 083d20e7d..c25c4bfe5 100644 --- a/packages/magicbell-js/docs/project-client/models/DiscardResult.md +++ b/packages/magicbell-js/docs/project-client/models/DiscardResult.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| discardedAt | string | ❌ | | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------- | +| discardedAt | string | ❌ | The timestamp when the token was discarded. | +| id | string | ❌ | The unique identifier for the discarded token. | diff --git a/packages/magicbell-js/docs/project-client/models/Event.md b/packages/magicbell-js/docs/project-client/models/Event.md index 153eb667a..be6312d5b 100644 --- a/packages/magicbell-js/docs/project-client/models/Event.md +++ b/packages/magicbell-js/docs/project-client/models/Event.md @@ -2,12 +2,13 @@ **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| id | string | ✅ | | -| timestamp | string | ✅ | | -| type | string | ✅ | | -| code | number | ❌ | | -| context | any | ❌ | | -| level | string | ❌ | | -| log | string | ❌ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :---------------------------------------------- | +| id | string | ✅ | The unique identifier for the event. | +| timestamp | string | ✅ | The time at which the event was recorded. | +| type | string | ✅ | The type of event that occurred. | +| code | number | ❌ | The numeric code that categorizes the event. | +| context | any | ❌ | Additional contextual attributes for the event. | +| level | string | ❌ | The severity level assigned to the event. | +| log | string | ❌ | A human-readable log message. | +| payload | any | ❌ | The raw payload delivered by the event source. | diff --git a/packages/magicbell-js/docs/project-client/models/ExecuteWorkflowRequest.md b/packages/magicbell-js/docs/project-client/models/ExecuteWorkflowRequest.md index 1d389efb9..aaff8a0b6 100644 --- a/packages/magicbell-js/docs/project-client/models/ExecuteWorkflowRequest.md +++ b/packages/magicbell-js/docs/project-client/models/ExecuteWorkflowRequest.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| key | string | ✅ | | -| input | any | ❌ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :----------------------------------------------------------------------------- | +| key | string | ✅ | The unique workflow key to execute (e.g. integration.stripe.charge.succeeded). | +| input | any | ❌ | Optional JSON payload that will be passed as the workflow input context. | diff --git a/packages/magicbell-js/docs/project-client/models/ExpoConfigPayload.md b/packages/magicbell-js/docs/project-client/models/ExpoConfigPayload.md index a30886bc6..b9d99e9ed 100644 --- a/packages/magicbell-js/docs/project-client/models/ExpoConfigPayload.md +++ b/packages/magicbell-js/docs/project-client/models/ExpoConfigPayload.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| accessToken | string | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :------------------------------------------------------------- | +| accessToken | string | ✅ | The Expo access token used to authenticate push notifications. | diff --git a/packages/magicbell-js/docs/project-client/models/ExpoToken.md b/packages/magicbell-js/docs/project-client/models/ExpoToken.md index e2f769d5d..bbfa6bebe 100644 --- a/packages/magicbell-js/docs/project-client/models/ExpoToken.md +++ b/packages/magicbell-js/docs/project-client/models/ExpoToken.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| deviceToken | string | ✅ | The Expo push token returned by the Expo client. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | diff --git a/packages/magicbell-js/docs/project-client/models/FcmConfigPayload.md b/packages/magicbell-js/docs/project-client/models/FcmConfigPayload.md index 6627351e2..9408070fd 100644 --- a/packages/magicbell-js/docs/project-client/models/FcmConfigPayload.md +++ b/packages/magicbell-js/docs/project-client/models/FcmConfigPayload.md @@ -2,22 +2,24 @@ **Properties** -| Name | Type | Required | Description | -| :---------------------- | :----- | :------- | :---------- | -| authProviderX509CertUrl | string | ✅ | | -| authUri | string | ✅ | | -| clientEmail | string | ✅ | | -| clientId | string | ✅ | | -| clientX509CertUrl | string | ✅ | | -| privateKey | string | ✅ | | -| privateKeyId | string | ✅ | | -| projectId | string | ✅ | | -| tokenUri | string | ✅ | | -| type | Type\_ | ✅ | | -| universeDomain | string | ✅ | | +| Name | Type | Required | Description | +| :---------------------- | :----- | :------- | :----------------------------------------------------------------------------------------------- | +| authProviderX509CertUrl | string | ✅ | URL for Google's OAuth provider x509 certificates used to validate tokens. | +| authUri | string | ✅ | OAuth authorization endpoint used when exchanging Firebase credentials. | +| clientEmail | string | ✅ | The client email address from the Firebase service account. | +| clientId | string | ✅ | The numeric client identifier for the Firebase service account. | +| clientX509CertUrl | string | ✅ | URL to the public x509 certificate for this service account. | +| privateKey | string | ✅ | The PEM encoded service account private key used to sign Firebase credentials. | +| privateKeyId | string | ✅ | Identifier of the private key inside the downloaded service account JSON. | +| projectId | string | ✅ | The Firebase project ID associated with this service account. | +| tokenUri | string | ✅ | OAuth token endpoint used to mint access tokens for FCM. | +| type | Type\_ | ✅ | Indicates the kind of Google credential. Service accounts always use the `service_account` type. | +| universeDomain | string | ✅ | The Google Cloud universe domain hosting the Firebase APIs. | # Type\_ +Indicates the kind of Google credential. Service accounts always use the `service_account` type. + **Properties** | Name | Type | Required | Description | diff --git a/packages/magicbell-js/docs/project-client/models/FcmToken.md b/packages/magicbell-js/docs/project-client/models/FcmToken.md index b72590a37..811432b32 100644 --- a/packages/magicbell-js/docs/project-client/models/FcmToken.md +++ b/packages/magicbell-js/docs/project-client/models/FcmToken.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| deviceToken | string | ✅ | The Firebase Cloud Messaging device registration token to associate with the user. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | diff --git a/packages/magicbell-js/docs/project-client/models/GetRunResponse.md b/packages/magicbell-js/docs/project-client/models/GetRunResponse.md index 9515c9fb9..600ffe415 100644 --- a/packages/magicbell-js/docs/project-client/models/GetRunResponse.md +++ b/packages/magicbell-js/docs/project-client/models/GetRunResponse.md @@ -6,6 +6,7 @@ | :---------- | :------------------- | :------- | :---------- | | createdAt | string | ❌ | | | id | string | ❌ | | +| input | any | ❌ | | | status | GetRunResponseStatus | ❌ | | | workflowKey | string | ❌ | | diff --git a/packages/magicbell-js/docs/project-client/models/InboxConfigPayload.md b/packages/magicbell-js/docs/project-client/models/InboxConfigPayload.md index 847e6e87a..64c5a01c6 100644 --- a/packages/magicbell-js/docs/project-client/models/InboxConfigPayload.md +++ b/packages/magicbell-js/docs/project-client/models/InboxConfigPayload.md @@ -2,186 +2,222 @@ **Properties** -| Name | Type | Required | Description | -| :----- | :----- | :------- | :---------- | -| images | Images | ✅ | | -| locale | string | ✅ | | -| theme | Theme | ✅ | | +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------------------------------------------------------------- | +| images | Images | ✅ | Image overrides for assets used in the inbox UI. | +| locale | string | ✅ | Locale code (ISO language tag) used to localize built-in strings. | +| theme | Theme | ✅ | Visual customization options for the hosted inbox widget. | # Images +Image overrides for assets used in the inbox UI. + **Properties** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| emptyInboxUrl | string | ✅ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :------------------------------------------------------ | +| emptyInboxUrl | string | ✅ | URL for the illustration shown when the inbox is empty. | # Theme +Visual customization options for the hosted inbox widget. + **Properties** -| Name | Type | Required | Description | -| :----------- | :----------- | :------- | :---------- | -| banner | Banner | ❌ | | -| dialog | Dialog | ❌ | | -| footer | Footer | ❌ | | -| header | Header | ❌ | | -| icon | Icon | ❌ | | -| notification | Notification | ❌ | | -| unseenBadge | UnseenBadge | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----------- | :------- | :--------------------------------------------- | +| banner | Banner | ❌ | Top banner styling options. | +| dialog | Dialog | ❌ | Styling for confirmation and action dialogs. | +| footer | Footer | ❌ | Footer styling for the inbox modal. | +| header | Header | ❌ | Header styling for the inbox modal. | +| icon | Icon | ❌ | Launcher icon styling overrides. | +| notification | Notification | ❌ | Styling overrides for notification list items. | +| unseenBadge | UnseenBadge | ❌ | Badge styling for unseen notification counts. | # Banner +Top banner styling options. + **Properties** -| Name | Type | Required | Description | -| :---------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| fontSize | string | ✅ | | -| textColor | string | ✅ | | -| backgroundOpacity | number | ❌ | | +| Name | Type | Required | Description | +| :---------------- | :----- | :------- | :---------------------------------------- | +| backgroundColor | string | ✅ | Banner background color. | +| fontSize | string | ✅ | Font size for banner text. | +| textColor | string | ✅ | Banner text color. | +| backgroundOpacity | number | ❌ | Opacity applied to the banner background. | # Dialog +Styling for confirmation and action dialogs. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| accentColor | string | ✅ | | -| backgroundColor | string | ✅ | | -| textColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :---------------------------------------------- | +| accentColor | string | ✅ | Accent color for dialog buttons and highlights. | +| backgroundColor | string | ✅ | Dialog background color. | +| textColor | string | ✅ | Dialog text color. | # Footer +Footer styling for the inbox modal. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| borderRadius | string | ✅ | | -| fontSize | string | ✅ | | -| textColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :--------------------------------------------- | +| backgroundColor | string | ✅ | Footer background color. | +| borderRadius | string | ✅ | Border radius applied to the footer container. | +| fontSize | string | ✅ | Font size used in the footer. | +| textColor | string | ✅ | Footer text color. | # Header +Header styling for the inbox modal. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| borderRadius | string | ✅ | | -| fontFamily | string | ✅ | | -| fontSize | string | ✅ | | -| textColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :--------------------------------------------- | +| backgroundColor | string | ✅ | Header background color. | +| borderRadius | string | ✅ | Border radius applied to the header container. | +| fontFamily | string | ✅ | CSS font family for the header title. | +| fontSize | string | ✅ | Font size used in the header. | +| textColor | string | ✅ | Header text color. | # Icon +Launcher icon styling overrides. + **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| borderColor | string | ✅ | | -| width | string | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :------------------------------------------- | +| borderColor | string | ✅ | CSS color used for the icon border. | +| width | string | ✅ | Width of the launcher icon (any CSS length). | # Notification +Styling overrides for notification list items. + **Properties** -| Name | Type | Required | Description | -| :------ | :-------- | :------- | :---------- | -| default | Default\_ | ✅ | | -| unread | Unread | ✅ | | -| unseen | Unseen | ✅ | | +| Name | Type | Required | Description | +| :------ | :-------- | :------- | :---------------------------------------------- | +| default | Default\_ | ✅ | Base styles applied to every notification item. | +| unread | Unread | ✅ | Overrides for unread notifications. | +| unseen | Unseen | ✅ | Overrides for unseen notifications. | # Default\_ +Base styles applied to every notification item. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----------- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| borderRadius | string | ✅ | | -| fontFamily | string | ✅ | | -| fontSize | string | ✅ | | -| margin | string | ✅ | | -| textColor | string | ✅ | | -| hover | DefaultHover | ❌ | | -| state | DefaultState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :----------- | :------- | :--------------------------------------------------------- | +| backgroundColor | string | ✅ | Background color for notifications in their default state. | +| borderRadius | string | ✅ | Border radius applied to each notification card. | +| fontFamily | string | ✅ | Font family for notification text. | +| fontSize | string | ✅ | Font size for notification text. | +| margin | string | ✅ | CSS margin applied around each notification card. | +| textColor | string | ✅ | Default text color for notifications. | +| hover | DefaultHover | ❌ | Styles applied when a notification is hovered. | +| state | DefaultState | ❌ | Accent colors for notification state indicators. | # DefaultHover +Styles applied when a notification is hovered. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :------------------------- | +| backgroundColor | string | ✅ | Background color on hover. | # DefaultState +Accent colors for notification state indicators. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | string | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :---------------------------------- | +| color | string | ✅ | Color used for the state indicator. | # Unread +Overrides for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :---------- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| textColor | string | ✅ | | -| hover | UnreadHover | ❌ | | -| state | UnreadState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :---------- | :------- | :------------------------------------------------ | +| backgroundColor | string | ✅ | Background color applied to unread notifications. | +| textColor | string | ✅ | Text color used when a notification is unread. | +| hover | UnreadHover | ❌ | Hover styles for unread notifications. | +| state | UnreadState | ❌ | State indicator styling for unread notifications. | # UnreadHover +Hover styles for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :-------------------------------------------------- | +| backgroundColor | string | ✅ | Background color on hover for unread notifications. | # UnreadState +State indicator styling for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | string | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :------------------------------------ | +| color | string | ✅ | Color for the unread state indicator. | # Unseen +Overrides for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :---------- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| textColor | string | ✅ | | -| hover | UnseenHover | ❌ | | -| state | UnseenState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :---------- | :------- | :------------------------------------------------ | +| backgroundColor | string | ✅ | Background color applied to unseen notifications. | +| textColor | string | ✅ | Text color used when a notification is unseen. | +| hover | UnseenHover | ❌ | Hover styles for unseen notifications. | +| state | UnseenState | ❌ | State indicator styling for unseen notifications. | # UnseenHover +Hover styles for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :-------------------------------------------------- | +| backgroundColor | string | ✅ | Background color on hover for unseen notifications. | # UnseenState +State indicator styling for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | string | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :------------------------------------ | +| color | string | ✅ | Color for the unseen state indicator. | # UnseenBadge +Badge styling for unseen notification counts. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :---------------------- | +| backgroundColor | string | ✅ | Badge background color. | diff --git a/packages/magicbell-js/docs/project-client/models/InboxTokenResponse.md b/packages/magicbell-js/docs/project-client/models/InboxTokenResponse.md index 7db13da71..5208a4935 100644 --- a/packages/magicbell-js/docs/project-client/models/InboxTokenResponse.md +++ b/packages/magicbell-js/docs/project-client/models/InboxTokenResponse.md @@ -2,11 +2,11 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| token | string | ✅ | | -| connectionId | string | ❌ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| id | string | ✅ | The unique identifier for the token. | +| token | string | ✅ | The in-app inbox token generated for this user. | +| connectionId | string | ❌ | Realtime connection ID to restrict delivery to a specific Ably connection. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | diff --git a/packages/magicbell-js/docs/project-client/models/SlackToken.md b/packages/magicbell-js/docs/project-client/models/SlackToken.md index d832f025f..d371e16fd 100644 --- a/packages/magicbell-js/docs/project-client/models/SlackToken.md +++ b/packages/magicbell-js/docs/project-client/models/SlackToken.md @@ -4,22 +4,22 @@ | Name | Type | Required | Description | | :---------- | :---------------- | :------- | :-------------------------------------------------------------------------------------------------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | +| createdAt | string | ✅ | The timestamp when the token was created. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | | oauth | Oauth | ❌ | | -| updatedAt | string | ❌ | | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | | webhook | SlackTokenWebhook | ❌ | Obtained directly from the incoming_webhook object in the installation response from the Slack API. | # Oauth **Properties** -| Name | Type | Required | Description | -| :------------- | :----- | :------- | :---------- | -| channelId | string | ✅ | | -| installationId | string | ✅ | | -| scope | string | ❌ | | +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :--------------------------------------------------------------- | +| channelId | string | ✅ | The ID of the Slack channel this installation is associated with | +| installationId | string | ✅ | A unique identifier for this Slack workspace installation | +| scope | string | ❌ | The OAuth scope granted during installation | # SlackTokenWebhook @@ -27,6 +27,6 @@ Obtained directly from the incoming_webhook object in the installation response **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| url | string | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| url | string | ✅ | The URL for the incoming webhook from Slack | diff --git a/packages/magicbell-js/docs/project-client/models/TeamsToken.md b/packages/magicbell-js/docs/project-client/models/TeamsToken.md index 8f0112e18..21436fc98 100644 --- a/packages/magicbell-js/docs/project-client/models/TeamsToken.md +++ b/packages/magicbell-js/docs/project-client/models/TeamsToken.md @@ -2,13 +2,13 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :---------------- | :------- | :---------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | -| webhook | TeamsTokenWebhook | ❌ | | +| Name | Type | Required | Description | +| :---------- | :---------------- | :------- | :--------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | +| webhook | TeamsTokenWebhook | ❌ | | # TeamsTokenWebhook diff --git a/packages/magicbell-js/docs/project-client/models/User.md b/packages/magicbell-js/docs/project-client/models/User.md index bb5c6e296..ed4024d88 100644 --- a/packages/magicbell-js/docs/project-client/models/User.md +++ b/packages/magicbell-js/docs/project-client/models/User.md @@ -2,15 +2,15 @@ **Properties** -| Name | Type | Required | Description | -| :--------------- | :----- | :------- | :---------- | -| createdAt | string | ❌ | | -| customAttributes | any | ❌ | | -| email | string | ❌ | | -| externalId | string | ❌ | | -| firstName | string | ❌ | | -| id | string | ❌ | | -| lastName | string | ❌ | | -| lastNotifiedAt | string | ❌ | | -| lastSeenAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :-------------------------------------------------------- | +| createdAt | string | ❌ | The timestamp when the user was created. | +| customAttributes | any | ❌ | Arbitrary custom values stored on the user. | +| email | string | ❌ | The primary email address of the user. | +| externalId | string | ❌ | The user identifier from an external system. | +| firstName | string | ❌ | The first name of the user. | +| id | string | ❌ | The unique identifier for the user. | +| lastName | string | ❌ | The last name of the user. | +| lastNotifiedAt | string | ❌ | The timestamp when the user last received a notification. | +| lastSeenAt | string | ❌ | The timestamp when the user last opened the inbox. | +| updatedAt | string | ❌ | The timestamp when the user was last updated. | diff --git a/packages/magicbell-js/docs/project-client/models/WebPushToken.md b/packages/magicbell-js/docs/project-client/models/WebPushToken.md index 5307016ac..ba37f9e56 100644 --- a/packages/magicbell-js/docs/project-client/models/WebPushToken.md +++ b/packages/magicbell-js/docs/project-client/models/WebPushToken.md @@ -4,12 +4,12 @@ | Name | Type | Required | Description | | :---------- | :----- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| createdAt | string | ✅ | | +| createdAt | string | ✅ | The timestamp when the token was created. | | endpoint | string | ✅ | The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to. | -| id | string | ✅ | | +| id | string | ✅ | The unique identifier for the token. | | keys | Keys | ✅ | The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription. | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | # Keys diff --git a/packages/magicbell-js/docs/project-client/models/WorkflowDefinition.md b/packages/magicbell-js/docs/project-client/models/WorkflowDefinition.md index f99ce2644..f5bf22b11 100644 --- a/packages/magicbell-js/docs/project-client/models/WorkflowDefinition.md +++ b/packages/magicbell-js/docs/project-client/models/WorkflowDefinition.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------- | :------------------ | :------- | :---------- | -| key | string | ✅ | | -| steps | [Steps](Steps.md)[] | ✅ | | -| disabled | boolean | ❌ | | +| Name | Type | Required | Description | +| :------- | :------------------------------------------------------ | :------- | :--------------------------------------------------------------------- | +| key | string | ✅ | Unique identifier for this workflow definition. | +| steps | [WorkflowDefinitionSteps](WorkflowDefinitionSteps.md)[] | ✅ | Ordered list describing each action that will run inside the workflow. | +| disabled | boolean | ❌ | When true, prevents the workflow from being triggered. | diff --git a/packages/magicbell-js/docs/project-client/models/WorkflowList.md b/packages/magicbell-js/docs/project-client/models/WorkflowList.md new file mode 100644 index 000000000..4875be143 --- /dev/null +++ b/packages/magicbell-js/docs/project-client/models/WorkflowList.md @@ -0,0 +1,7 @@ +# WorkflowList + +**Properties** + +| Name | Type | Required | Description | +| :---- | :------------------ | :------- | :---------- | +| items | [Items](Items.md)[] | ❌ | | diff --git a/packages/magicbell-js/docs/project-client/services/BroadcastsService.md b/packages/magicbell-js/docs/project-client/services/BroadcastsService.md index f5704dce0..6d93b71a7 100644 --- a/packages/magicbell-js/docs/project-client/services/BroadcastsService.md +++ b/packages/magicbell-js/docs/project-client/services/BroadcastsService.md @@ -17,11 +17,11 @@ Retrieves a paginated list of broadcasts for the project. Returns basic informat **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -38,7 +38,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.broadcasts.listBroadcasts({ - limit: 1, + limit: 9, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -158,8 +158,8 @@ import { const statusStatus = StatusStatus.ENQUEUED; const summary: Summary = { - failures: 4, - total: 5, + failures: 3, + total: 7, }; const broadcastStatus: BroadcastStatus = { diff --git a/packages/magicbell-js/docs/project-client/services/ChannelsService.md b/packages/magicbell-js/docs/project-client/services/ChannelsService.md index 6df720318..2b3083968 100644 --- a/packages/magicbell-js/docs/project-client/services/ChannelsService.md +++ b/packages/magicbell-js/docs/project-client/services/ChannelsService.md @@ -120,12 +120,12 @@ Lists all Inbox tokens associated with a specific user. This endpoint is availab **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -142,7 +142,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserInboxTokens('user_id', { - limit: 3, + limit: 4, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -228,12 +228,12 @@ Lists all APNs tokens associated with a specific user. This endpoint is availabl **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -250,7 +250,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserApnsTokens('user_id', { - limit: 3, + limit: 4, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -336,12 +336,12 @@ Lists all Expo tokens associated with a specific user. This endpoint is availabl **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -358,7 +358,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserExpoTokens('user_id', { - limit: 123, + limit: 8, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -444,12 +444,12 @@ Lists all FCM tokens associated with a specific user. This endpoint is available **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -466,7 +466,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserFcmTokens('user_id', { - limit: 2, + limit: 3, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -552,12 +552,12 @@ Lists all MagicBell SlackBot tokens associated with a specific user. This endpoi **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -574,7 +574,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserMagicbellSlackbotTokens('user_id', { - limit: 8, + limit: 5, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -660,12 +660,12 @@ Lists all Slack tokens associated with a specific user. This endpoint is availab **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -768,12 +768,12 @@ Lists all Teams tokens associated with a specific user. This endpoint is availab **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -876,12 +876,12 @@ Lists all Web Push tokens associated with a specific user. This endpoint is avai **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| userId | string | ✅ | | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| userId | string | ✅ | | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -898,7 +898,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.channels.listUserWebPushTokens('user_id', { - limit: 123, + limit: 10, 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 e26516034..8774789c2 100644 --- a/packages/magicbell-js/docs/project-client/services/EventsService.md +++ b/packages/magicbell-js/docs/project-client/services/EventsService.md @@ -16,11 +16,11 @@ Retrieves a paginated list of events for the project. **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -37,7 +37,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.events.listEvents({ - limit: 1, + limit: 2, 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 83cd0e07b..b6294ccb9 100644 --- a/packages/magicbell-js/docs/project-client/services/IntegrationsService.md +++ b/packages/magicbell-js/docs/project-client/services/IntegrationsService.md @@ -63,11 +63,11 @@ Lists all available and configured integrations for the project. Returns a summa **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -84,7 +84,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.integrations.listIntegrations({ - limit: 2, + limit: 6, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -154,13 +154,12 @@ import { ApnsConfigPayload, Badge, Client, PayloadVersion } from 'magicbell-js/p const apnsConfigPayload: ApnsConfigPayload = { appId: "app_id", badge: badge, - certificate: " BEGIN PRIVATE KEY-- - 2tSdsGz= - --------- END PRIVATE KEYYYYYYYYYYY-------- - ", - keyId: "proident s", + certificate: "BEGIN PRIVATE KEY------- + gFxJylwSefd= + ---------- END PRIVATE KEYYY-------", + keyId: "reprehende", payloadVersion: payloadVersion, - teamId: "laborum ut" + teamId: "incididunt" }; const { data } = await client.integrations.saveApnsIntegration(apnsConfigPayload); @@ -178,9 +177,9 @@ Deletes the APNs integration configuration from the project. This will disable t **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -273,9 +272,9 @@ Deletes the EventSource integration configuration from the project. This will di **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -368,9 +367,9 @@ Deletes the Expo integration configuration from the project. This will disable t **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -452,9 +451,10 @@ import { Client, FcmConfigPayload, Type_ } from 'magicbell-js/project-client'; clientEmail: "client_email", clientId: "client_id", clientX509CertUrl: "client_x509_cert_url", - privateKey: "----BEGINZZASTRAXC- - NBdNmSp - ------- ENDTLCHMVK----------", + privateKey: "---------- BEGINYE---------- + HvohQopACH + ---- ENDVQKST-- + ", privateKeyId: "private_key_id", projectId: "project_id", tokenUri: "token_uri", @@ -477,9 +477,9 @@ Deletes the FCM integration configuration from the project. This will disable th **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -572,9 +572,9 @@ Deletes the GitHub integration configuration from the project. This will disable **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -675,7 +675,7 @@ import { const banner: Banner = { backgroundColor: 'backgroundColor', - backgroundOpacity: 4.93, + backgroundOpacity: 9.35, fontSize: 'fontSize', textColor: 'textColor', }; @@ -796,9 +796,9 @@ Deletes the Inbox integration configuration from the project. This will disable **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -891,9 +891,9 @@ Deletes the MagicBell SlackBot integration configuration from the project. This **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -996,9 +996,9 @@ Deletes the Mailgun integration configuration from the project. This will disabl **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1091,9 +1091,9 @@ Deletes the Ping Email integration configuration from the project. This will dis **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1203,9 +1203,9 @@ Deletes the SendGrid integration configuration from the project. This will disab **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1306,9 +1306,9 @@ Deletes the Amazon SES integration configuration from the project. This will dis **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1383,10 +1383,10 @@ import { Client, SlackConfigPayload } from 'magicbell-js/project-client'; }); const slackConfigPayload: SlackConfigPayload = { - appId: 'O7RI', - clientId: '104.7350704', - clientSecret: 'officia fugiat nostrud Excepteur', - signingSecret: 'non sit exanim ad enim eaexlabor', + appId: 'ZL', + clientId: '0354.1286', + clientSecret: 'voluptatenulla anim consequat ve', + signingSecret: 'inirureconsequat Ut nisiexercita', }; const { data } = await client.integrations.saveSlackIntegration(slackConfigPayload); @@ -1404,9 +1404,9 @@ Deletes the Slack integration configuration from the project. This will disable **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1517,9 +1517,9 @@ Deletes the SMTP integration configuration from the project. This will disable t **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1613,9 +1613,9 @@ Deletes the Stripe integration configuration from the project. This will disable **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1693,7 +1693,7 @@ import { Client, TwilioConfigPayload } from 'magicbell-js/project-client'; accountSid: 'account_sid', apiKey: 'api_key', apiSecret: 'api_secret', - from: '+28378825295343', + from: '+59052747', }; const { data } = await client.integrations.saveTwilioIntegration(twilioConfigPayload); @@ -1711,9 +1711,9 @@ Deletes the Twilio integration configuration from the project. This will disable **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** @@ -1807,9 +1807,9 @@ Deletes the Web Push integration configuration from the project. This will disab **Parameters** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :----------------------------------------------------- | +| id | string | ❌ | the unique identifier of the integration to be deleted | **Example Usage Code Snippet** diff --git a/packages/magicbell-js/docs/project-client/services/UsersService.md b/packages/magicbell-js/docs/project-client/services/UsersService.md index 762828edc..9035759cf 100644 --- a/packages/magicbell-js/docs/project-client/services/UsersService.md +++ b/packages/magicbell-js/docs/project-client/services/UsersService.md @@ -17,12 +17,12 @@ Lists all users in the project. **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | -| query | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | +| query | string | ❌ | filter users by their email address or external ID | **Return Type** @@ -39,7 +39,7 @@ import { Client } from 'magicbell-js/project-client'; }); const { data } = await client.users.listUsers({ - limit: 1, + limit: 6, startingAfter: 'starting_after', endingBefore: 'ending_before', query: 'query', diff --git a/packages/magicbell-js/docs/project-client/services/WorkflowsService.md b/packages/magicbell-js/docs/project-client/services/WorkflowsService.md index af2fdcac1..308f71efa 100644 --- a/packages/magicbell-js/docs/project-client/services/WorkflowsService.md +++ b/packages/magicbell-js/docs/project-client/services/WorkflowsService.md @@ -4,12 +4,40 @@ A list of all methods in the `WorkflowsService` service. Click on the method nam | Methods | Description | | :-------------------------------------- | :------------------------------------------------------- | +| [fetchWorkflows](#fetchworkflows) | Retrieves all workflow definitions for the project | | [saveWorkflow](#saveworkflow) | Creates or updates a workflow definition for the project | | [fetchWorkflow](#fetchworkflow) | Retrieves a workflow definition by key | | [createWorkflowRun](#createworkflowrun) | Executes a workflow with the provided input parameters | | [fetchWorkflowRun](#fetchworkflowrun) | Retrieves the status and details of a workflow run | | [listWorkflowRuns](#listworkflowruns) | Retrieves all runs for a specific workflow | +## fetchWorkflows + +Retrieves all workflow definitions for the project + +- HTTP Method: `GET` +- Endpoint: `/workflows` + +**Return Type** + +`WorkflowList` + +**Example Usage Code Snippet** + +```typescript +import { Client } from 'magicbell-js/project-client'; + +(async () => { + const client = new Client({ + token: 'YOUR_TOKEN', + }); + + const { data } = await client.workflows.fetchWorkflows(); + + console.log(data); +})(); +``` + ## saveWorkflow Creates or updates a workflow definition for the project @@ -30,14 +58,14 @@ Creates or updates a workflow definition for the project **Example Usage Code Snippet** ```typescript -import { Client, Steps, WorkflowDefinition } from 'magicbell-js/project-client'; +import { Client, WorkflowDefinition, WorkflowDefinitionSteps } from 'magicbell-js/project-client'; (async () => { const client = new Client({ token: 'YOUR_TOKEN', }); - const steps: Steps = { + const workflowDefinitionSteps: WorkflowDefinitionSteps = { command: 'command', if: 'if', input: {}, @@ -46,7 +74,7 @@ import { Client, Steps, WorkflowDefinition } from 'magicbell-js/project-client'; const workflowDefinition: WorkflowDefinition = { disabled: true, key: 'key', - steps: [steps], + steps: [workflowDefinitionSteps], }; const { data } = await client.workflows.saveWorkflow(workflowDefinition); diff --git a/packages/magicbell-js/docs/project-client/snippets/snippets.json b/packages/magicbell-js/docs/project-client/snippets/snippets.json index a4efa16b1..849c5dc5a 100644 --- a/packages/magicbell-js/docs/project-client/snippets/snippets.json +++ b/packages/magicbell-js/docs/project-client/snippets/snippets.json @@ -1,8 +1,8 @@ { "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: 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" + "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: 9,\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: 3,\n total: 7\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" @@ -14,35 +14,35 @@ "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" }, "/users/{user_id}/channels/in_app/inbox/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.listUserInboxTokens(\n \"user_id\",\n {\n limit: 3,\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.listUserInboxTokens(\n \"user_id\",\n {\n limit: 4,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/in_app/inbox/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.fetchUserInboxToken(\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.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: 3,\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: 4,\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: 123,\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: 8,\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: 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.listUserFcmTokens(\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/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", "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.deleteUserFcmToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/slack/magicbell_slackbot/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.listUserMagicbellSlackbotTokens(\n \"user_id\",\n {\n limit: 8,\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.listUserMagicbellSlackbotTokens(\n \"user_id\",\n {\n limit: 5,\n startingAfter: \"starting_after\",\n endingBefore: \"ending_before\",\n }\n);\n\n console.log(data);\n})();\n" }, "/users/{user_id}/channels/slack/magicbell_slackbot/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.fetchUserMagicbellSlackbotToken(\n \"user_id\",\n \"token_id\"\n);\n\n console.log(data);\n})();\n", @@ -63,24 +63,24 @@ "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: 123,\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: 10,\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: 1,\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: 2,\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: 2,\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: 6,\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 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", + "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 gFxJylwSefd=\n ---------- END PRIVATE KEYYY-------\",\n keyId: \"reprehende\",\n payloadVersion: payloadVersion,\n teamId: \"incididunt\"\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: \"----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", + "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: \"---------- BEGINYE----------\n HvohQopACH\n ---- ENDVQKST--\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", "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: 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", + "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: 9.35,\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: \"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", + "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: \"ZL\",\n clientId: \"0354.1286\",\n clientSecret: \"voluptatenulla anim consequat ve\",\n signingSecret: \"inirureconsequat Ut nisiexercita\"\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: \"+28378825295343\"\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: \"+59052747\"\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,14 +159,15 @@ "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: 1,\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: 6,\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}": { "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.users.deleteUser(\"user_id\");\n\n console.log(data);\n})();\n" }, "/workflows": { - "put": "import { Client, Steps, WorkflowDefinition } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const steps: Steps = {\t\n command: \"command\",\n if: \"if\",\n input: {}\n };\n \n const workflowDefinition: WorkflowDefinition = {\t\n disabled: true,\n key: \"key\",\n steps: [steps]\n };\n\n const { data } = await client.workflows.saveWorkflow(workflowDefinition);\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.workflows.fetchWorkflows();\n\n console.log(data);\n})();\n", + "put": "import { Client, WorkflowDefinition, WorkflowDefinitionSteps } from 'magicbell-js/project-client';\n\n(async () => {\n const client = new Client({\n\ttoken: 'YOUR_TOKEN',\n});\n\n \n const workflowDefinitionSteps: WorkflowDefinitionSteps = {\t\n command: \"command\",\n if: \"if\",\n input: {}\n };\n \n const workflowDefinition: WorkflowDefinition = {\t\n disabled: true,\n key: \"key\",\n steps: [workflowDefinitionSteps]\n };\n\n const { data } = await client.workflows.saveWorkflow(workflowDefinition);\n\n console.log(data);\n})();\n" }, "/workflows/*": { "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.fetchWorkflow();\n\n console.log(data);\n})();\n" @@ -181,7 +182,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: 1,\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: 9,\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 b84972e0d..0683ad2e6 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: 123, + limit: 10, startingAfter: 'starting_after', endingBefore: 'ending_before', }); diff --git a/packages/magicbell-js/docs/user-client/models/ApnsToken.md b/packages/magicbell-js/docs/user-client/models/ApnsToken.md index 9b3e86656..def33220c 100644 --- a/packages/magicbell-js/docs/user-client/models/ApnsToken.md +++ b/packages/magicbell-js/docs/user-client/models/ApnsToken.md @@ -2,19 +2,19 @@ **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 | ✅ | The timestamp when the token was created. | +| deviceToken | string | ✅ | The APNs device token to register with MagicBell. | +| id | string | ✅ | The unique identifier for the token. | +| appId | string | ❌ | The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| installationId | ApnsTokenInstallationId | ❌ | The APNs environment this token belongs to. If omitted we assume it targets `production`. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | # ApnsTokenInstallationId -(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. +The APNs environment this token belongs to. If omitted we assume it targets `production`. **Properties** diff --git a/packages/magicbell-js/docs/user-client/models/ApnsTokenPayload.md b/packages/magicbell-js/docs/user-client/models/ApnsTokenPayload.md index c3008312e..7341ed9fd 100644 --- a/packages/magicbell-js/docs/user-client/models/ApnsTokenPayload.md +++ b/packages/magicbell-js/docs/user-client/models/ApnsTokenPayload.md @@ -2,15 +2,15 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :----------------------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| deviceToken | 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. | -| installationId | ApnsTokenPayloadInstallationId | ❌ | (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. | +| Name | Type | Required | Description | +| :------------- | :----------------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | +| deviceToken | string | ✅ | The APNs device token to register with MagicBell. | +| appId | string | ❌ | The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. | +| installationId | ApnsTokenPayloadInstallationId | ❌ | The APNs environment this token belongs to. If omitted we assume it targets `production`. | # ApnsTokenPayloadInstallationId -(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. +The APNs environment this token belongs to. If omitted we assume it targets `production`. **Properties** diff --git a/packages/magicbell-js/docs/user-client/models/DiscardResult.md b/packages/magicbell-js/docs/user-client/models/DiscardResult.md index 083d20e7d..c25c4bfe5 100644 --- a/packages/magicbell-js/docs/user-client/models/DiscardResult.md +++ b/packages/magicbell-js/docs/user-client/models/DiscardResult.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| discardedAt | string | ❌ | | -| id | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------- | +| discardedAt | string | ❌ | The timestamp when the token was discarded. | +| id | string | ❌ | The unique identifier for the discarded token. | diff --git a/packages/magicbell-js/docs/user-client/models/ExpoToken.md b/packages/magicbell-js/docs/user-client/models/ExpoToken.md index e2f769d5d..bbfa6bebe 100644 --- a/packages/magicbell-js/docs/user-client/models/ExpoToken.md +++ b/packages/magicbell-js/docs/user-client/models/ExpoToken.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| deviceToken | string | ✅ | The Expo push token returned by the Expo client. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | diff --git a/packages/magicbell-js/docs/user-client/models/ExpoTokenPayload.md b/packages/magicbell-js/docs/user-client/models/ExpoTokenPayload.md index 2590224e3..e84fb075d 100644 --- a/packages/magicbell-js/docs/user-client/models/ExpoTokenPayload.md +++ b/packages/magicbell-js/docs/user-client/models/ExpoTokenPayload.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| deviceToken | string | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :----------------------------------------------- | +| deviceToken | string | ✅ | The Expo push token returned by the Expo client. | diff --git a/packages/magicbell-js/docs/user-client/models/FcmToken.md b/packages/magicbell-js/docs/user-client/models/FcmToken.md index b72590a37..811432b32 100644 --- a/packages/magicbell-js/docs/user-client/models/FcmToken.md +++ b/packages/magicbell-js/docs/user-client/models/FcmToken.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| deviceToken | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| deviceToken | string | ✅ | The Firebase Cloud Messaging device registration token to associate with the user. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | diff --git a/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md b/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md index ae56db763..d9fe1eaf8 100644 --- a/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md +++ b/packages/magicbell-js/docs/user-client/models/FcmTokenPayload.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| deviceToken | string | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------------------------------- | +| deviceToken | string | ✅ | The Firebase Cloud Messaging device registration token to associate with the user. | diff --git a/packages/magicbell-js/docs/user-client/models/InboxConfigPayload.md b/packages/magicbell-js/docs/user-client/models/InboxConfigPayload.md index 45a073c53..d3b9a6e76 100644 --- a/packages/magicbell-js/docs/user-client/models/InboxConfigPayload.md +++ b/packages/magicbell-js/docs/user-client/models/InboxConfigPayload.md @@ -2,186 +2,222 @@ **Properties** -| Name | Type | Required | Description | -| :----- | :----- | :------- | :---------- | -| images | Images | ✅ | | -| locale | string | ✅ | | -| theme | Theme | ✅ | | +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------------------------------------------------------------- | +| images | Images | ✅ | Image overrides for assets used in the inbox UI. | +| locale | string | ✅ | Locale code (ISO language tag) used to localize built-in strings. | +| theme | Theme | ✅ | Visual customization options for the hosted inbox widget. | # Images +Image overrides for assets used in the inbox UI. + **Properties** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| emptyInboxUrl | string | ✅ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :------------------------------------------------------ | +| emptyInboxUrl | string | ✅ | URL for the illustration shown when the inbox is empty. | # Theme +Visual customization options for the hosted inbox widget. + **Properties** -| Name | Type | Required | Description | -| :----------- | :---------------- | :------- | :---------- | -| banner | Banner | ❌ | | -| dialog | Dialog | ❌ | | -| footer | Footer | ❌ | | -| header | Header | ❌ | | -| icon | Icon | ❌ | | -| notification | ThemeNotification | ❌ | | -| unseenBadge | UnseenBadge | ❌ | | +| Name | Type | Required | Description | +| :----------- | :---------------- | :------- | :--------------------------------------------- | +| banner | Banner | ❌ | Top banner styling options. | +| dialog | Dialog | ❌ | Styling for confirmation and action dialogs. | +| footer | Footer | ❌ | Footer styling for the inbox modal. | +| header | Header | ❌ | Header styling for the inbox modal. | +| icon | Icon | ❌ | Launcher icon styling overrides. | +| notification | ThemeNotification | ❌ | Styling overrides for notification list items. | +| unseenBadge | UnseenBadge | ❌ | Badge styling for unseen notification counts. | # Banner +Top banner styling options. + **Properties** -| Name | Type | Required | Description | -| :---------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| fontSize | string | ✅ | | -| textColor | string | ✅ | | -| backgroundOpacity | number | ❌ | | +| Name | Type | Required | Description | +| :---------------- | :----- | :------- | :---------------------------------------- | +| backgroundColor | string | ✅ | Banner background color. | +| fontSize | string | ✅ | Font size for banner text. | +| textColor | string | ✅ | Banner text color. | +| backgroundOpacity | number | ❌ | Opacity applied to the banner background. | # Dialog +Styling for confirmation and action dialogs. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| accentColor | string | ✅ | | -| backgroundColor | string | ✅ | | -| textColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :---------------------------------------------- | +| accentColor | string | ✅ | Accent color for dialog buttons and highlights. | +| backgroundColor | string | ✅ | Dialog background color. | +| textColor | string | ✅ | Dialog text color. | # Footer +Footer styling for the inbox modal. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| borderRadius | string | ✅ | | -| fontSize | string | ✅ | | -| textColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :--------------------------------------------- | +| backgroundColor | string | ✅ | Footer background color. | +| borderRadius | string | ✅ | Border radius applied to the footer container. | +| fontSize | string | ✅ | Font size used in the footer. | +| textColor | string | ✅ | Footer text color. | # Header +Header styling for the inbox modal. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| borderRadius | string | ✅ | | -| fontFamily | string | ✅ | | -| fontSize | string | ✅ | | -| textColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :--------------------------------------------- | +| backgroundColor | string | ✅ | Header background color. | +| borderRadius | string | ✅ | Border radius applied to the header container. | +| fontFamily | string | ✅ | CSS font family for the header title. | +| fontSize | string | ✅ | Font size used in the header. | +| textColor | string | ✅ | Header text color. | # Icon +Launcher icon styling overrides. + **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| borderColor | string | ✅ | | -| width | string | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :------------------------------------------- | +| borderColor | string | ✅ | CSS color used for the icon border. | +| width | string | ✅ | Width of the launcher icon (any CSS length). | # ThemeNotification +Styling overrides for notification list items. + **Properties** -| Name | Type | Required | Description | -| :------ | :-------- | :------- | :---------- | -| default | Default\_ | ✅ | | -| unread | Unread | ✅ | | -| unseen | Unseen | ✅ | | +| Name | Type | Required | Description | +| :------ | :-------- | :------- | :---------------------------------------------- | +| default | Default\_ | ✅ | Base styles applied to every notification item. | +| unread | Unread | ✅ | Overrides for unread notifications. | +| unseen | Unseen | ✅ | Overrides for unseen notifications. | # Default\_ +Base styles applied to every notification item. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----------- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| borderRadius | string | ✅ | | -| fontFamily | string | ✅ | | -| fontSize | string | ✅ | | -| margin | string | ✅ | | -| textColor | string | ✅ | | -| hover | DefaultHover | ❌ | | -| state | DefaultState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :----------- | :------- | :--------------------------------------------------------- | +| backgroundColor | string | ✅ | Background color for notifications in their default state. | +| borderRadius | string | ✅ | Border radius applied to each notification card. | +| fontFamily | string | ✅ | Font family for notification text. | +| fontSize | string | ✅ | Font size for notification text. | +| margin | string | ✅ | CSS margin applied around each notification card. | +| textColor | string | ✅ | Default text color for notifications. | +| hover | DefaultHover | ❌ | Styles applied when a notification is hovered. | +| state | DefaultState | ❌ | Accent colors for notification state indicators. | # DefaultHover +Styles applied when a notification is hovered. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :------------------------- | +| backgroundColor | string | ✅ | Background color on hover. | # DefaultState +Accent colors for notification state indicators. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | string | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :---------------------------------- | +| color | string | ✅ | Color used for the state indicator. | # Unread +Overrides for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :---------- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| textColor | string | ✅ | | -| hover | UnreadHover | ❌ | | -| state | UnreadState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :---------- | :------- | :------------------------------------------------ | +| backgroundColor | string | ✅ | Background color applied to unread notifications. | +| textColor | string | ✅ | Text color used when a notification is unread. | +| hover | UnreadHover | ❌ | Hover styles for unread notifications. | +| state | UnreadState | ❌ | State indicator styling for unread notifications. | # UnreadHover +Hover styles for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :-------------------------------------------------- | +| backgroundColor | string | ✅ | Background color on hover for unread notifications. | # UnreadState +State indicator styling for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | string | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :------------------------------------ | +| color | string | ✅ | Color for the unread state indicator. | # Unseen +Overrides for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :---------- | :------- | :---------- | -| backgroundColor | string | ✅ | | -| textColor | string | ✅ | | -| hover | UnseenHover | ❌ | | -| state | UnseenState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :---------- | :------- | :------------------------------------------------ | +| backgroundColor | string | ✅ | Background color applied to unseen notifications. | +| textColor | string | ✅ | Text color used when a notification is unseen. | +| hover | UnseenHover | ❌ | Hover styles for unseen notifications. | +| state | UnseenState | ❌ | State indicator styling for unseen notifications. | # UnseenHover +Hover styles for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :-------------------------------------------------- | +| backgroundColor | string | ✅ | Background color on hover for unseen notifications. | # UnseenState +State indicator styling for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | string | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :------------------------------------ | +| color | string | ✅ | Color for the unseen state indicator. | # UnseenBadge +Badge styling for unseen notification counts. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | string | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :---------------------- | +| backgroundColor | string | ✅ | Badge background color. | diff --git a/packages/magicbell-js/docs/user-client/models/InboxToken.md b/packages/magicbell-js/docs/user-client/models/InboxToken.md index 7fd27c19b..b422bd639 100644 --- a/packages/magicbell-js/docs/user-client/models/InboxToken.md +++ b/packages/magicbell-js/docs/user-client/models/InboxToken.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| token | string | ✅ | | -| connectionId | string | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------------------------- | +| token | string | ✅ | The in-app inbox token generated for this user. | +| connectionId | string | ❌ | Realtime connection ID to restrict delivery to a specific Ably connection. | diff --git a/packages/magicbell-js/docs/user-client/models/InboxTokenResponse.md b/packages/magicbell-js/docs/user-client/models/InboxTokenResponse.md index 7db13da71..5208a4935 100644 --- a/packages/magicbell-js/docs/user-client/models/InboxTokenResponse.md +++ b/packages/magicbell-js/docs/user-client/models/InboxTokenResponse.md @@ -2,11 +2,11 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| token | string | ✅ | | -| connectionId | string | ❌ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| id | string | ✅ | The unique identifier for the token. | +| token | string | ✅ | The in-app inbox token generated for this user. | +| connectionId | string | ❌ | Realtime connection ID to restrict delivery to a specific Ably connection. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | diff --git a/packages/magicbell-js/docs/user-client/models/Notification.md b/packages/magicbell-js/docs/user-client/models/Notification.md index bf83c1f38..c490bca39 100644 --- a/packages/magicbell-js/docs/user-client/models/Notification.md +++ b/packages/magicbell-js/docs/user-client/models/Notification.md @@ -2,20 +2,20 @@ **Properties** -| Name | Type | Required | Description | -| :--------------- | :----- | :------- | :---------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| title | string | ✅ | | -| updatedAt | string | ✅ | | -| userId | string | ✅ | | -| actionUrl | string | ❌ | | -| archivedAt | string | ❌ | | -| category | string | ❌ | | -| content | string | ❌ | | -| customAttributes | any | ❌ | | -| discardedAt | string | ❌ | | -| readAt | string | ❌ | | -| seenAt | string | ❌ | | -| sentAt | string | ❌ | | -| topic | string | ❌ | | +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :------------------------------------------------------ | +| createdAt | string | ✅ | The timestamp when the notification was created. | +| id | string | ✅ | The unique identifier for the notification. | +| title | string | ✅ | The title that is displayed to recipients. | +| updatedAt | string | ✅ | The timestamp when the notification was last updated. | +| userId | string | ✅ | The user that should receive the notification. | +| actionUrl | string | ❌ | The link associated with the notification. | +| archivedAt | string | ❌ | The timestamp when the notification was archived. | +| category | string | ❌ | The category grouping for the notification. | +| content | string | ❌ | The body content of the notification. | +| customAttributes | any | ❌ | The custom data stored with the notification. | +| discardedAt | string | ❌ | The timestamp when the notification was discarded. | +| readAt | string | ❌ | The timestamp when the notification was marked as read. | +| seenAt | string | ❌ | The timestamp when the notification was seen. | +| sentAt | string | ❌ | The timestamp when the notification was sent. | +| topic | string | ❌ | The topic for additional classification. | diff --git a/packages/magicbell-js/docs/user-client/models/SlackInstallation.md b/packages/magicbell-js/docs/user-client/models/SlackInstallation.md index 33c979565..16a96a4a3 100644 --- a/packages/magicbell-js/docs/user-client/models/SlackInstallation.md +++ b/packages/magicbell-js/docs/user-client/models/SlackInstallation.md @@ -2,59 +2,59 @@ **Properties** -| Name | Type | Required | Description | -| :------------------ | :-------------- | :------- | :---------- | -| accessToken | string | ✅ | | -| appId | string | ✅ | | -| authedUser | AuthedUser | ✅ | | -| team | Team | ✅ | | -| botUserId | string | ❌ | | -| enterprise | Enterprise | ❌ | | -| expiresIn | number | ❌ | | -| id | string | ❌ | | -| incomingWebhook | IncomingWebhook | ❌ | | -| isEnterpriseInstall | boolean | ❌ | | -| refreshToken | string | ❌ | | -| scope | string | ❌ | | -| tokenType | string | ❌ | | +| Name | Type | Required | Description | +| :------------------ | :-------------- | :------- | :----------------------------------------------------------------- | +| accessToken | string | ✅ | Bot token returned from the Slack OAuth exchange. | +| appId | string | ✅ | Slack app identifier for the installed app. | +| authedUser | AuthedUser | ✅ | | +| team | Team | ✅ | | +| botUserId | string | ❌ | Slack user ID of the installed bot. | +| enterprise | Enterprise | ❌ | | +| expiresIn | number | ❌ | Seconds until the bot access token expires. | +| id | string | ❌ | Unique identifier MagicBell assigns to the Slack installation. | +| incomingWebhook | IncomingWebhook | ❌ | | +| isEnterpriseInstall | boolean | ❌ | Indicates whether the installation occurred on an enterprise grid. | +| refreshToken | string | ❌ | Refresh token for regenerating the bot access token. | +| scope | string | ❌ | Space-delimited OAuth scopes granted to the bot token. | +| tokenType | string | ❌ | Type of bot token returned by Slack. | # AuthedUser **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| id | string | ✅ | | -| accessToken | string | ❌ | | -| expiresIn | number | ❌ | | -| refreshToken | string | ❌ | | -| scope | string | ❌ | | -| tokenType | string | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------ | +| id | string | ✅ | Slack user ID for the installer. | +| accessToken | string | ❌ | User token returned from the OAuth exchange. | +| expiresIn | number | ❌ | Seconds until the user token expires. | +| refreshToken | string | ❌ | Refresh token for the authed user. | +| scope | string | ❌ | Space-delimited OAuth scopes granted to the user token. | +| tokenType | string | ❌ | Token type value provided by Slack. | # Team **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ✅ | | -| name | string | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| id | string | ✅ | Workspace ID where the app was installed. | +| name | string | ❌ | Workspace name where the app was installed. | # Enterprise **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | string | ✅ | | -| name | string | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :-------------------------- | +| id | string | ✅ | Enterprise grid identifier. | +| name | string | ✅ | Enterprise grid name. | # IncomingWebhook **Properties** -| Name | Type | Required | Description | -| :--------------- | :----- | :------- | :---------- | -| channel | string | ✅ | | -| configurationUrl | string | ✅ | | -| url | string | ✅ | | +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :------------------------------------------- | +| channel | string | ✅ | Human readable name for the webhook channel. | +| configurationUrl | string | ✅ | URL users can visit to manage the webhook. | +| url | string | ✅ | Webhook URL that Slack posts events to. | diff --git a/packages/magicbell-js/docs/user-client/models/SlackStartInstall.md b/packages/magicbell-js/docs/user-client/models/SlackStartInstall.md index 28c79bcd2..08ad47c0f 100644 --- a/packages/magicbell-js/docs/user-client/models/SlackStartInstall.md +++ b/packages/magicbell-js/docs/user-client/models/SlackStartInstall.md @@ -2,9 +2,9 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :------- | :------- | :---------- | -| appId | string | ✅ | | -| authUrl | string | ❌ | | -| extraScopes | string[] | ❌ | | -| redirectUrl | string | ❌ | | +| Name | Type | Required | Description | +| :---------- | :------- | :------- | :------------------------------------------------------------------ | +| appId | string | ✅ | Slack app ID that the installation flow should use. | +| authUrl | string | ❌ | Optional override for the authorization URL returned to the client. | +| extraScopes | string[] | ❌ | Additional OAuth scopes to request during installation. | +| redirectUrl | string | ❌ | Custom redirect URL to use after OAuth completes. | diff --git a/packages/magicbell-js/docs/user-client/models/SlackToken.md b/packages/magicbell-js/docs/user-client/models/SlackToken.md index 48ab5db49..7ffba0f40 100644 --- a/packages/magicbell-js/docs/user-client/models/SlackToken.md +++ b/packages/magicbell-js/docs/user-client/models/SlackToken.md @@ -4,22 +4,22 @@ | Name | Type | Required | Description | | :---------- | :---------------- | :------- | :-------------------------------------------------------------------------------------------------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | +| createdAt | string | ✅ | The timestamp when the token was created. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | | oauth | SlackTokenOauth | ❌ | | -| updatedAt | string | ❌ | | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | | webhook | SlackTokenWebhook | ❌ | Obtained directly from the incoming_webhook object in the installation response from the Slack API. | # SlackTokenOauth **Properties** -| Name | Type | Required | Description | -| :------------- | :----- | :------- | :---------- | -| channelId | string | ✅ | | -| installationId | string | ✅ | | -| scope | string | ❌ | | +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :--------------------------------------------------------------- | +| channelId | string | ✅ | The ID of the Slack channel this installation is associated with | +| installationId | string | ✅ | A unique identifier for this Slack workspace installation | +| scope | string | ❌ | The OAuth scope granted during installation | # SlackTokenWebhook @@ -27,6 +27,6 @@ Obtained directly from the incoming_webhook object in the installation response **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| url | string | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| url | string | ✅ | The URL for the incoming webhook from Slack | diff --git a/packages/magicbell-js/docs/user-client/models/SlackTokenPayload.md b/packages/magicbell-js/docs/user-client/models/SlackTokenPayload.md index a1558462f..051f2e8be 100644 --- a/packages/magicbell-js/docs/user-client/models/SlackTokenPayload.md +++ b/packages/magicbell-js/docs/user-client/models/SlackTokenPayload.md @@ -11,11 +11,11 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :----- | :------- | :---------- | -| channelId | string | ✅ | | -| installationId | string | ✅ | | -| scope | string | ❌ | | +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :--------------------------------------------------------------- | +| channelId | string | ✅ | The ID of the Slack channel this installation is associated with | +| installationId | string | ✅ | A unique identifier for this Slack workspace installation | +| scope | string | ❌ | The OAuth scope granted during installation | # SlackTokenPayloadWebhook @@ -23,6 +23,6 @@ Obtained directly from the incoming_webhook object in the installation response **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| url | string | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| url | string | ✅ | The URL for the incoming webhook from Slack | diff --git a/packages/magicbell-js/docs/user-client/models/TeamsToken.md b/packages/magicbell-js/docs/user-client/models/TeamsToken.md index 8f0112e18..21436fc98 100644 --- a/packages/magicbell-js/docs/user-client/models/TeamsToken.md +++ b/packages/magicbell-js/docs/user-client/models/TeamsToken.md @@ -2,13 +2,13 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :---------------- | :------- | :---------- | -| createdAt | string | ✅ | | -| id | string | ✅ | | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | -| webhook | TeamsTokenWebhook | ❌ | | +| Name | Type | Required | Description | +| :---------- | :---------------- | :------- | :--------------------------------------------------------- | +| createdAt | string | ✅ | The timestamp when the token was created. | +| id | string | ✅ | The unique identifier for the token. | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | +| webhook | TeamsTokenWebhook | ❌ | | # TeamsTokenWebhook diff --git a/packages/magicbell-js/docs/user-client/models/WebPushStartInstallationResponse.md b/packages/magicbell-js/docs/user-client/models/WebPushStartInstallationResponse.md index c5bd67c00..a1ccdb04f 100644 --- a/packages/magicbell-js/docs/user-client/models/WebPushStartInstallationResponse.md +++ b/packages/magicbell-js/docs/user-client/models/WebPushStartInstallationResponse.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| authToken | string | ✅ | | -| publicKey | string | ✅ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :--------------------------------------------------------- | +| authToken | string | ✅ | Auth secret returned from PushSubscription.getKey('auth'). | +| publicKey | string | ✅ | VAPID public key generated for this web push installation. | diff --git a/packages/magicbell-js/docs/user-client/models/WebPushToken.md b/packages/magicbell-js/docs/user-client/models/WebPushToken.md index 56fba5b6b..199720230 100644 --- a/packages/magicbell-js/docs/user-client/models/WebPushToken.md +++ b/packages/magicbell-js/docs/user-client/models/WebPushToken.md @@ -4,12 +4,12 @@ | Name | Type | Required | Description | | :---------- | :--------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| createdAt | string | ✅ | | +| createdAt | string | ✅ | The timestamp when the token was created. | | endpoint | string | ✅ | The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to. | -| id | string | ✅ | | +| id | string | ✅ | The unique identifier for the token. | | keys | WebPushTokenKeys | ✅ | The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription. | -| discardedAt | string | ❌ | | -| updatedAt | string | ❌ | | +| discardedAt | string | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | string | ❌ | The timestamp when the token metadata last changed. | # WebPushTokenKeys diff --git a/packages/magicbell-js/docs/user-client/services/ChannelsService.md b/packages/magicbell-js/docs/user-client/services/ChannelsService.md index 4d0b74eaa..bcbb94914 100644 --- a/packages/magicbell-js/docs/user-client/services/ChannelsService.md +++ b/packages/magicbell-js/docs/user-client/services/ChannelsService.md @@ -48,11 +48,11 @@ Lists all Inbox tokens belonging to the authenticated user. Returns a paginated **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -69,7 +69,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listInboxTokens({ - limit: 123, + limit: 10, 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: 'insint adipisic', + token: 'ut sint volupta', }; const { data } = await client.channels.saveInboxToken(inboxToken); @@ -191,11 +191,11 @@ Lists all APNs tokens belonging to the authenticated user. Returns a paginated l **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -252,7 +252,7 @@ import { ApnsTokenPayload, ApnsTokenPayloadInstallationId, Client } from 'magicb const apnsTokenPayload: ApnsTokenPayload = { appId: 'app_id', - deviceToken: 'doea occaecat q', + deviceToken: 'ipsumlaboreaute', installationId: apnsTokenPayloadInstallationId, }; @@ -337,11 +337,11 @@ Lists all Expo tokens belonging to the authenticated user. Returns a paginated l **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -358,7 +358,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listExpoTokens({ - limit: 8, + limit: 3, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -479,11 +479,11 @@ Lists all FCM tokens belonging to the authenticated user. Returns a paginated li **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -500,7 +500,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listFcmTokens({ - limit: 3, + limit: 7, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -537,7 +537,7 @@ import { Client, FcmTokenPayload } from 'magicbell-js/user-client'; }); const fcmTokenPayload: FcmTokenPayload = { - deviceToken: 'voluptate incid', + deviceToken: 'eu amet incidid', }; const { data } = await client.channels.saveFcmToken(fcmTokenPayload); @@ -621,11 +621,11 @@ Lists all MagicBell SlackBot tokens belonging to the authenticated user. Returns **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -642,7 +642,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listMagicbellSlackbotTokens({ - limit: 2, + limit: 5, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -774,11 +774,11 @@ Lists all Slack tokens belonging to the authenticated user. Returns a paginated **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -927,11 +927,11 @@ Lists all Teams tokens belonging to the authenticated user. Returns a paginated **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -948,7 +948,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listTeamsTokens({ - limit: 123, + limit: 6, startingAfter: 'starting_after', endingBefore: 'ending_before', }); @@ -1144,11 +1144,11 @@ Lists all Web Push tokens belonging to the authenticated user. Returns a paginat **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | **Return Type** @@ -1165,7 +1165,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.channels.listWebPushTokens({ - limit: 1, + limit: 7, 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 9cbfab8d4..10aa1b40d 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: 8.51, + backgroundOpacity: 8.17, fontSize: 'fontSize', textColor: 'textColor', }; @@ -232,48 +232,52 @@ import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Tea (async () => { const client = new Client({ - token: 'YOUR_TOKEN', - }); + token: 'YOUR_TOKEN', +}); + const authedUser: AuthedUser = { - accessToken: 'access_token', - expiresIn: 123, - id: 'id', - refreshToken: 'refresh_token', - scope: 'scope', - tokenType: 'token_type', + accessToken: "access_token", + expiresIn: 1, + id: "id", + refreshToken: "refresh_token", + scope: "scope", + tokenType: "token_type" }; + const enterprise: Enterprise = { - id: 'id', - name: 'name', + id: "id", + name: "name" }; + const incomingWebhook: IncomingWebhook = { - channel: 'channel', - configurationUrl: 'configuration_url', - url: 'url', + channel: "channel", + configurationUrl: "configuration_url", + url: "url" }; + const team: Team = { - id: 'id', - name: 'name', + id: "id", + name: "name" }; const slackInstallation: SlackInstallation = { - accessToken: 'access_token', - appId: 'app_id', + accessToken: "access_token", + appId: "app_id", authedUser: authedUser, - botUserId: 'bot_user_id', + botUserId: "bot_user_id", enterprise: enterprise, - expiresIn: 1, - id: '8-P^R', + expiresIn: 4, + id: "CCAJ-G\", incomingWebhook: incomingWebhook, isEnterpriseInstall: true, - refreshToken: 'refresh_token', - scope: 'scope', + refreshToken: "refresh_token", + scope: "scope", team: team, - tokenType: 'token_type', + tokenType: "token_type" }; const { data } = await client.integrations.saveMagicbellSlackbotInstallation(slackInstallation); @@ -385,48 +389,52 @@ import { AuthedUser, Client, Enterprise, IncomingWebhook, SlackInstallation, Tea (async () => { const client = new Client({ - token: 'YOUR_TOKEN', - }); + token: 'YOUR_TOKEN', +}); + const authedUser: AuthedUser = { - accessToken: 'access_token', - expiresIn: 123, - id: 'id', - refreshToken: 'refresh_token', - scope: 'scope', - tokenType: 'token_type', + accessToken: "access_token", + expiresIn: 1, + id: "id", + refreshToken: "refresh_token", + scope: "scope", + tokenType: "token_type" }; + const enterprise: Enterprise = { - id: 'id', - name: 'name', + id: "id", + name: "name" }; + const incomingWebhook: IncomingWebhook = { - channel: 'channel', - configurationUrl: 'configuration_url', - url: 'url', + channel: "channel", + configurationUrl: "configuration_url", + url: "url" }; + const team: Team = { - id: 'id', - name: 'name', + id: "id", + name: "name" }; const slackInstallation: SlackInstallation = { - accessToken: 'access_token', - appId: 'app_id', + accessToken: "access_token", + appId: "app_id", authedUser: authedUser, - botUserId: 'bot_user_id', + botUserId: "bot_user_id", enterprise: enterprise, - expiresIn: 1, - id: '8-P^R', + expiresIn: 4, + id: "CCAJ-G\", incomingWebhook: incomingWebhook, isEnterpriseInstall: true, - refreshToken: 'refresh_token', - scope: 'scope', + refreshToken: "refresh_token", + scope: "scope", team: team, - tokenType: 'token_type', + tokenType: "token_type" }; const { data } = await client.integrations.saveSlackInstallation(slackInstallation); diff --git a/packages/magicbell-js/docs/user-client/services/NotificationsService.md b/packages/magicbell-js/docs/user-client/services/NotificationsService.md index dfcb8781d..8c08b1fa0 100644 --- a/packages/magicbell-js/docs/user-client/services/NotificationsService.md +++ b/packages/magicbell-js/docs/user-client/services/NotificationsService.md @@ -22,14 +22,14 @@ Lists all notifications for a user. **Parameters** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | number | ❌ | | -| startingAfter | string | ❌ | | -| endingBefore | string | ❌ | | -| status | string | ❌ | | -| category | string | ❌ | | -| topic | string | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :-------------------------------------------------------------------------------- | +| limit | number | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | string | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | string | ❌ | a cursor for use in pagination, points to the first ID in next page | +| status | string | ❌ | filter notifications by their read state, one of 'unread' \| 'read' \| 'archived' | +| category | string | ❌ | filter notifications by their category | +| topic | string | ❌ | filter notifications by their topic | **Return Type** @@ -46,7 +46,7 @@ import { Client } from 'magicbell-js/user-client'; }); const { data } = await client.notifications.listNotifications({ - limit: 5, + limit: 1, startingAfter: 'starting_after', endingBefore: 'ending_before', status: 'status', @@ -67,10 +67,10 @@ Archive all notifications. **Parameters** -| Name | Type | Required | Description | -| :------- | :----- | :------- | :---------- | -| category | string | ❌ | | -| topic | string | ❌ | | +| Name | Type | Required | Description | +| :------- | :----- | :------- | :------------------------------------- | +| category | string | ❌ | filter notifications by their category | +| topic | string | ❌ | filter notifications by their topic | **Example Usage Code Snippet** @@ -100,10 +100,10 @@ Marks all notifications as read. **Parameters** -| Name | Type | Required | Description | -| :------- | :----- | :------- | :---------- | -| category | string | ❌ | | -| topic | string | ❌ | | +| Name | Type | Required | Description | +| :------- | :----- | :------- | :------------------------------------- | +| category | string | ❌ | filter notifications by their category | +| topic | string | ❌ | filter notifications by their topic | **Example Usage Code Snippet** diff --git a/packages/magicbell-js/docs/user-client/snippets/snippets.json b/packages/magicbell-js/docs/user-client/snippets/snippets.json index d475d4b4d..c56cb9e87 100644 --- a/packages/magicbell-js/docs/user-client/snippets/snippets.json +++ b/packages/magicbell-js/docs/user-client/snippets/snippets.json @@ -1,8 +1,8 @@ { "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: 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" + "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: 10,\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: \"ut sint volupta\"\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", @@ -10,14 +10,14 @@ }, "/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: 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" + "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: \"ipsumlaboreaute\",\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: 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.listExpoTokens({\n limit: 3,\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: 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" + "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: 7,\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: \"eu amet incidid\"\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: 2,\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: 5,\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}": { @@ -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: 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.listTeamsTokens({\n limit: 6,\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: 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.listWebPushTokens({\n limit: 7,\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: 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" + "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.17,\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: 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" + "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: 1,\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: 4,\n id: \"CCAJ-G\\\",\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: 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" + "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: 1,\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: 4,\n id: \"CCAJ-G\\\",\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: 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" + "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: 1,\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: 123,\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: 10,\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/broadcasts/broadcasts-service.ts b/packages/magicbell-js/src/project-client/services/broadcasts/broadcasts-service.ts index 4c0947e95..63aea03eb 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/broadcasts-service.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/broadcasts-service.ts @@ -13,9 +13,9 @@ import { ListBroadcastsParams } from './request-params.js'; export class BroadcastsService extends BaseService { /** * Retrieves a paginated list of broadcasts for the project. Returns basic information about each broadcast including its creation time and status. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast-status.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast-status.ts index d719a8f9f..9211e6000 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast-status.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast-status.ts @@ -15,11 +15,11 @@ export const broadcastStatus = z.lazy(() => { }); /** - * - * @typedef {BroadcastStatus} broadcastStatus - * @property {Errors[]} - * @property {StatusStatus} - * @property {Summary} + * The runtime state of the broadcast execution. + * @typedef {BroadcastStatus} broadcastStatus - The runtime state of the broadcast execution. - The runtime state of the broadcast execution. + * @property {Errors[]} - A list of errors encountered while processing the broadcast. + * @property {StatusStatus} - The overall processing status of the broadcast. + * @property {Summary} - The summary counts for total recipients and failures. */ export type BroadcastStatus = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast.ts index 694b74829..4a80d0345 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/broadcast.ts @@ -41,17 +41,17 @@ export const broadcast = z.lazy(() => { /** * * @typedef {Broadcast} broadcast - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The URL recipients will be directed to when interacting with the broadcast. + * @property {string} - The label used to group broadcasts. + * @property {string} - The body content delivered with the broadcast. * @property {string} - The timestamp when the broadcast was created. - * @property {any} + * @property {any} - Arbitrary custom data associated with the broadcast. * @property {string} - The unique id for this broadcast. - * @property {Overrides} - * @property {User[]} - * @property {BroadcastStatus} - * @property {string} - * @property {string} + * @property {Overrides} - Channel- or provider-specific values that override the defaults. + * @property {User[]} - A collection of users or filters that determine who receives the broadcast. + * @property {BroadcastStatus} - The runtime state of the broadcast execution. + * @property {string} - The subject or headline that will be shown to recipients. + * @property {string} - The topic that further classifies the broadcast. */ export type Broadcast = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/email.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/email.ts index 2d4bd3d39..319313cb2 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/email.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/email.ts @@ -12,11 +12,11 @@ export const email = z.lazy(() => { }); /** - * - * @typedef {Email} email - * @property {string} - * @property {string} - * @property {string} + * Overrides for email notifications. + * @typedef {Email} email - Overrides for email notifications. - Overrides for email notifications. + * @property {string} - The link associated with the channel-specific notification. + * @property {string} - The channel-specific content. + * @property {string} - The channel-specific title. */ export type Email = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/errors.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/errors.ts index 6d30b1086..80b420c3f 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/errors.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/errors.ts @@ -12,7 +12,7 @@ export const errors = z.lazy(() => { /** * * @typedef {Errors} errors - * @property {string} + * @property {string} - The details about the processing error. */ export type Errors = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/in-app.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/in-app.ts index 8729ae243..ae7ac5ad2 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/in-app.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/in-app.ts @@ -12,11 +12,11 @@ export const inApp = z.lazy(() => { }); /** - * - * @typedef {InApp} inApp - * @property {string} - * @property {string} - * @property {string} + * Overrides for in-app notifications. + * @typedef {InApp} inApp - Overrides for in-app notifications. - Overrides for in-app notifications. + * @property {string} - The link associated with the channel-specific notification. + * @property {string} - The channel-specific content. + * @property {string} - The channel-specific title. */ export type InApp = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/mobile-push.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/mobile-push.ts index 522bc98f7..9bc90a2a8 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/mobile-push.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/mobile-push.ts @@ -12,11 +12,11 @@ export const mobilePush = z.lazy(() => { }); /** - * - * @typedef {MobilePush} mobilePush - * @property {string} - * @property {string} - * @property {string} + * Overrides for mobile push notifications. + * @typedef {MobilePush} mobilePush - Overrides for mobile push notifications. - Overrides for mobile push notifications. + * @property {string} - The link associated with the channel-specific notification. + * @property {string} - The channel-specific content. + * @property {string} - The channel-specific title. */ export type MobilePush = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides-channels.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides-channels.ts index 29f7ae002..fa61ee0cf 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides-channels.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides-channels.ts @@ -18,12 +18,12 @@ export const overridesChannels = z.lazy(() => { }); /** - * - * @typedef {OverridesChannels} overridesChannels - * @property {Email} - * @property {InApp} - * @property {MobilePush} - * @property {Sms} + * Overrides that are scoped to individual delivery channels. + * @typedef {OverridesChannels} overridesChannels - Overrides that are scoped to individual delivery channels. - Overrides that are scoped to individual delivery channels. + * @property {Email} - Overrides for email notifications. + * @property {InApp} - Overrides for in-app notifications. + * @property {MobilePush} - Overrides for mobile push notifications. + * @property {Sms} - Overrides for SMS notifications. */ export type OverridesChannels = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides.ts index dc7c866a2..2d54f6704 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/overrides.ts @@ -19,10 +19,10 @@ export const overrides = z.lazy(() => { }); /** - * - * @typedef {Overrides} overrides - * @property {OverridesChannels} - * @property {Providers} + * Channel- or provider-specific values that override the defaults. + * @typedef {Overrides} overrides - Channel- or provider-specific values that override the defaults. - Channel- or provider-specific values that override the defaults. + * @property {OverridesChannels} - Overrides that are scoped to individual delivery channels. + * @property {Providers} - Overrides that are scoped to specific providers for a channel. */ export type Overrides = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/providers.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/providers.ts index 80bbc0b6a..8d741e3aa 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/providers.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/providers.ts @@ -19,18 +19,18 @@ export const providers = z.lazy(() => { }); /** - * - * @typedef {Providers} providers - * @property {any} - * @property {any} - * @property {any} - * @property {any} - * @property {any} - * @property {any} - * @property {any} - * @property {any} - * @property {any} - * @property {any} + * Overrides that are scoped to specific providers for a channel. + * @typedef {Providers} providers - Overrides that are scoped to specific providers for a channel. - Overrides that are scoped to specific providers for a channel. + * @property {any} - Provider-specific overrides for Apple Push Notification service. + * @property {any} - Provider-specific overrides for Expo push notifications. + * @property {any} - Provider-specific overrides for Firebase Cloud Messaging. + * @property {any} - Provider-specific overrides for Mailgun. + * @property {any} - Provider-specific overrides for Sendgrid. + * @property {any} - Provider-specific overrides for AWS SES. + * @property {any} - Provider-specific overrides for Slack. + * @property {any} - Provider-specific overrides for Microsoft Teams. + * @property {any} - Provider-specific overrides for Twilio. + * @property {any} - Provider-specific overrides for the web push provider. */ export type Providers = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/sms.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/sms.ts index 376848522..6433691af 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/sms.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/sms.ts @@ -12,11 +12,11 @@ export const sms = z.lazy(() => { }); /** - * - * @typedef {Sms} sms - * @property {string} - * @property {string} - * @property {string} + * Overrides for SMS notifications. + * @typedef {Sms} sms - Overrides for SMS notifications. - Overrides for SMS notifications. + * @property {string} - The link associated with the channel-specific notification. + * @property {string} - The channel-specific content. + * @property {string} - The channel-specific title. */ export type Sms = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/broadcasts/models/summary.ts b/packages/magicbell-js/src/project-client/services/broadcasts/models/summary.ts index 38cc3620d..8a747f568 100644 --- a/packages/magicbell-js/src/project-client/services/broadcasts/models/summary.ts +++ b/packages/magicbell-js/src/project-client/services/broadcasts/models/summary.ts @@ -11,8 +11,8 @@ export const summary = z.lazy(() => { }); /** - * - * @typedef {Summary} summary + * The summary counts for total recipients and failures. + * @typedef {Summary} summary - The summary counts for total recipients and failures. - The summary counts for total recipients and failures. * @property {number} - The number of failures while processing the broadcast. * @property {number} - The number of recipients that the broadcast was sent to. */ diff --git a/packages/magicbell-js/src/project-client/services/channels/channels-service.ts b/packages/magicbell-js/src/project-client/services/channels/channels-service.ts index cb49d2a8d..1812a460c 100644 --- a/packages/magicbell-js/src/project-client/services/channels/channels-service.ts +++ b/packages/magicbell-js/src/project-client/services/channels/channels-service.ts @@ -106,9 +106,9 @@ export class ChannelsService extends BaseService { /** * Lists all Inbox tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -236,9 +236,9 @@ export class ChannelsService extends BaseService { /** * Lists all APNs tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -366,9 +366,9 @@ export class ChannelsService extends BaseService { /** * Lists all Expo tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -496,9 +496,9 @@ export class ChannelsService extends BaseService { /** * Lists all FCM tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -626,9 +626,9 @@ export class ChannelsService extends BaseService { /** * Lists all MagicBell SlackBot tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -756,9 +756,9 @@ export class ChannelsService extends BaseService { /** * Lists all Slack tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -886,9 +886,9 @@ export class ChannelsService extends BaseService { /** * Lists all Teams tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -1016,9 +1016,9 @@ export class ChannelsService extends BaseService { /** * Lists all Web Push tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens. * @param {string} userId - - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ 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 8346c318b..132b38978 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 @@ -21,13 +21,13 @@ export const apnsToken = z.lazy(() => { /** * * @typedef {ApnsToken} apnsToken - * @property {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. - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @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} + * @property {string} - The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. + * @property {string} - The timestamp when the token was created. + * @property {string} - The APNs device token to register with MagicBell. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {InstallationId} - The APNs environment this token belongs to. If omitted we assume it targets `production`. + * @property {string} - The timestamp when the token metadata last changed. */ export type ApnsToken = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config-channels.ts b/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config-channels.ts index 737f34663..2f5f595a7 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config-channels.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config-channels.ts @@ -14,9 +14,9 @@ export const categoryDeliveryConfigChannels = z.lazy(() => { /** * * @typedef {CategoryDeliveryConfigChannels} categoryDeliveryConfigChannels - * @property {Channel} - * @property {number} - * @property {string} + * @property {Channel} - Name of the channel used for this step. + * @property {number} - Delay in seconds to wait after the previous step. + * @property {string} - Conditional expression evaluated before running the step. */ export type CategoryDeliveryConfigChannels = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config.ts b/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config.ts index c75bbd1be..43143274b 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/category-delivery-config.ts @@ -24,9 +24,9 @@ export const categoryDeliveryConfig = z.lazy(() => { /** * * @typedef {CategoryDeliveryConfig} categoryDeliveryConfig - * @property {CategoryDeliveryConfigChannels[]} - * @property {boolean} - * @property {string} + * @property {CategoryDeliveryConfigChannels[]} - Ordered channel steps the delivery planner should execute. + * @property {boolean} - Disables the plan so it cannot be executed. + * @property {string} - Unique identifier for this delivery plan. */ export type CategoryDeliveryConfig = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/discard-result.ts b/packages/magicbell-js/src/project-client/services/channels/models/discard-result.ts index 9c17fa849..96165e3d5 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/discard-result.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/discard-result.ts @@ -13,8 +13,8 @@ export const discardResult = z.lazy(() => { /** * * @typedef {DiscardResult} discardResult - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was discarded. + * @property {string} - The unique identifier for the discarded token. */ export type DiscardResult = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/expo-token.ts b/packages/magicbell-js/src/project-client/services/channels/models/expo-token.ts index 331376143..d77589cb5 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/expo-token.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/expo-token.ts @@ -16,11 +16,11 @@ export const expoToken = z.lazy(() => { /** * * @typedef {ExpoToken} expoToken - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The Expo push token returned by the Expo client. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The timestamp when the token metadata last changed. */ export type ExpoToken = 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 5ea134958..3e288131c 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 @@ -16,11 +16,11 @@ export const fcmToken = z.lazy(() => { /** * * @typedef {FcmToken} fcmToken - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The Firebase Cloud Messaging device registration token to associate with the user. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The timestamp when the token metadata last changed. */ export type FcmToken = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/inbox-token-response.ts b/packages/magicbell-js/src/project-client/services/channels/models/inbox-token-response.ts index a94e711cd..8c5be7509 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/inbox-token-response.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/inbox-token-response.ts @@ -17,12 +17,12 @@ export const inboxTokenResponse = z.lazy(() => { /** * * @typedef {InboxTokenResponse} inboxTokenResponse - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - Realtime connection ID to restrict delivery to a specific Ably connection. + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The in-app inbox token generated for this user. + * @property {string} - The timestamp when the token metadata last changed. */ export type InboxTokenResponse = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/oauth.ts b/packages/magicbell-js/src/project-client/services/channels/models/oauth.ts index 3998669ba..8f4fef919 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/oauth.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/oauth.ts @@ -14,9 +14,9 @@ export const oauth = z.lazy(() => { /** * * @typedef {Oauth} oauth - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The ID of the Slack channel this installation is associated with + * @property {string} - A unique identifier for this Slack workspace installation + * @property {string} - The OAuth scope granted during installation */ export type Oauth = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/slack-token-webhook.ts b/packages/magicbell-js/src/project-client/services/channels/models/slack-token-webhook.ts index 71b6a69af..971942232 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/slack-token-webhook.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/slack-token-webhook.ts @@ -12,7 +12,7 @@ export const slackTokenWebhook = z.lazy(() => { /** * Obtained directly from the incoming_webhook object in the installation response from the Slack API. * @typedef {SlackTokenWebhook} slackTokenWebhook - Obtained directly from the incoming_webhook object in the installation response from the Slack API. - Obtained directly from the incoming_webhook object in the installation response from the Slack API. - * @property {string} + * @property {string} - The URL for the incoming webhook from Slack */ export type SlackTokenWebhook = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/slack-token.ts b/packages/magicbell-js/src/project-client/services/channels/models/slack-token.ts index b4696f572..d2bbae90f 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/slack-token.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/slack-token.ts @@ -25,11 +25,11 @@ export const slackToken = z.lazy(() => { /** * * @typedef {SlackToken} slackToken - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. * @property {Oauth} - * @property {string} + * @property {string} - The timestamp when the token metadata last changed. * @property {SlackTokenWebhook} - Obtained directly from the incoming_webhook object in the installation response from the Slack API. */ export type SlackToken = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/teams-token.ts b/packages/magicbell-js/src/project-client/services/channels/models/teams-token.ts index 6d3f3be5c..14c96f706 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/teams-token.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/teams-token.ts @@ -23,10 +23,10 @@ export const teamsToken = z.lazy(() => { /** * * @typedef {TeamsToken} teamsToken - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The timestamp when the token metadata last changed. * @property {TeamsTokenWebhook} */ export type TeamsToken = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/channels/models/web-push-token.ts b/packages/magicbell-js/src/project-client/services/channels/models/web-push-token.ts index e0c499c6f..debb98f52 100644 --- a/packages/magicbell-js/src/project-client/services/channels/models/web-push-token.ts +++ b/packages/magicbell-js/src/project-client/services/channels/models/web-push-token.ts @@ -19,12 +19,12 @@ export const webPushToken = z.lazy(() => { /** * * @typedef {WebPushToken} webPushToken - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. * @property {string} - The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to. - * @property {string} + * @property {string} - The unique identifier for the token. * @property {Keys} - The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription. - * @property {string} + * @property {string} - The timestamp when the token metadata last changed. */ export type WebPushToken = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/common/user.ts b/packages/magicbell-js/src/project-client/services/common/user.ts index 02b0197ed..143795009 100644 --- a/packages/magicbell-js/src/project-client/services/common/user.ts +++ b/packages/magicbell-js/src/project-client/services/common/user.ts @@ -21,16 +21,16 @@ export const user = z.lazy(() => { /** * * @typedef {User} user - * @property {string} - * @property {any} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the user was created. + * @property {any} - Arbitrary custom values stored on the user. + * @property {string} - The primary email address of the user. + * @property {string} - The user identifier from an external system. + * @property {string} - The first name of the user. + * @property {string} - The unique identifier for the user. + * @property {string} - The last name of the user. + * @property {string} - The timestamp when the user last received a notification. + * @property {string} - The timestamp when the user last opened the inbox. + * @property {string} - The timestamp when the user was last updated. */ export type User = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/events/events-service.ts b/packages/magicbell-js/src/project-client/services/events/events-service.ts index 9bf303ecd..a4742b243 100644 --- a/packages/magicbell-js/src/project-client/services/events/events-service.ts +++ b/packages/magicbell-js/src/project-client/services/events/events-service.ts @@ -13,9 +13,9 @@ import { ListEventsParams } from './request-params.js'; export class EventsService extends BaseService { /** * Retrieves a paginated list of events for the project. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ diff --git a/packages/magicbell-js/src/project-client/services/events/models/event.ts b/packages/magicbell-js/src/project-client/services/events/models/event.ts index 4f5bdc716..c66988ba9 100644 --- a/packages/magicbell-js/src/project-client/services/events/models/event.ts +++ b/packages/magicbell-js/src/project-client/services/events/models/event.ts @@ -10,6 +10,7 @@ export const event = z.lazy(() => { id: z.string(), level: z.string().optional(), log: z.string().optional().nullable(), + payload: z.any().optional().nullable(), timestamp: z.string(), type: z.string(), }); @@ -18,13 +19,14 @@ export const event = z.lazy(() => { /** * * @typedef {Event} event - * @property {number} - * @property {any} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {number} - The numeric code that categorizes the event. + * @property {any} - Additional contextual attributes for the event. + * @property {string} - The unique identifier for the event. + * @property {string} - The severity level assigned to the event. + * @property {string} - A human-readable log message. + * @property {any} - The raw payload delivered by the event source. + * @property {string} - The time at which the event was recorded. + * @property {string} - The type of event that occurred. */ export type Event = z.infer; @@ -40,6 +42,7 @@ export const eventResponse = z.lazy(() => { id: z.string(), level: z.string().optional(), log: z.string().optional().nullable(), + payload: z.any().optional().nullable(), timestamp: z.string(), type: z.string(), }) @@ -49,6 +52,7 @@ export const eventResponse = z.lazy(() => { id: data['id'], level: data['level'], log: data['log'], + payload: data['payload'], timestamp: data['timestamp'], type: data['type'], })); @@ -66,6 +70,7 @@ export const eventRequest = z.lazy(() => { id: z.string(), level: z.string().optional(), log: z.string().optional().nullable(), + payload: z.any().optional().nullable(), timestamp: z.string(), type: z.string(), }) @@ -75,6 +80,7 @@ export const eventRequest = z.lazy(() => { id: data['id'], level: data['level'], log: data['log'], + payload: data['payload'], timestamp: data['timestamp'], type: data['type'], })); diff --git a/packages/magicbell-js/src/project-client/services/integrations/integrations-service.ts b/packages/magicbell-js/src/project-client/services/integrations/integrations-service.ts index 05daa2eb8..e217d7660 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/integrations-service.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/integrations-service.ts @@ -123,9 +123,9 @@ import { export class IntegrationsService extends BaseService { /** * Lists all available and configured integrations for the project. Returns a summary of each integration including its type, status, and basic configuration information. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -224,7 +224,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the APNs integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -315,7 +315,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the EventSource integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -406,7 +406,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Expo integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -497,7 +497,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the FCM integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -588,7 +588,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the GitHub integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -679,7 +679,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Inbox integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -772,7 +772,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the MagicBell SlackBot integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -863,7 +863,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Mailgun integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -954,7 +954,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Ping Email integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1045,7 +1045,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the SendGrid integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1136,7 +1136,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Amazon SES integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1227,7 +1227,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Slack integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1315,7 +1315,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the SMTP integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1406,7 +1406,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Stripe integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1497,7 +1497,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Twilio integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -1588,7 +1588,7 @@ export class IntegrationsService extends BaseService { /** * Deletes the Web Push integration configuration from the project. This will disable the integration's functionality within the project. - * @param {string} [params.id] - + * @param {string} [params.id] - the unique identifier of the integration to be deleted * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/apns-config-payload.ts b/packages/magicbell-js/src/project-client/services/integrations/models/apns-config-payload.ts index d59a922b4..e8c749894 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/apns-config-payload.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/apns-config-payload.ts @@ -20,11 +20,11 @@ export const apnsConfigPayload = z.lazy(() => { * * @typedef {ApnsConfigPayload} apnsConfigPayload * @property {string} - The default bundle identifier of the application that is configured with this project. It can be overriden on a per token basis, when registering device tokens. - * @property {Badge} + * @property {Badge} - Controls whether the app icon badge counts unread or unseen notifications. * @property {string} - The APNs certificate in P8 format. Generate it at [developer.apple.com](https://developer.apple.com/account/resources/authkeys/add) with the 'Apple Push Notification service (APNs)' option selected. - * @property {string} - * @property {PayloadVersion} - * @property {string} + * @property {string} - The 10-character Key ID from your Apple Developer account used with the P8 certificate. + * @property {PayloadVersion} - Internal payload format version used by MagicBell. + * @property {string} - The Apple Developer Team ID that owns the configured key. */ export type ApnsConfigPayload = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/banner.ts b/packages/magicbell-js/src/project-client/services/integrations/models/banner.ts index 9dcd5eab4..84f0888bc 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/banner.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/banner.ts @@ -13,12 +13,12 @@ export const banner = z.lazy(() => { }); /** - * - * @typedef {Banner} banner - * @property {string} - * @property {number} - * @property {string} - * @property {string} + * Top banner styling options. + * @typedef {Banner} banner - Top banner styling options. - Top banner styling options. + * @property {string} - Banner background color. + * @property {number} - Opacity applied to the banner background. + * @property {string} - Font size for banner text. + * @property {string} - Banner text color. */ export type Banner = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/default-hover.ts b/packages/magicbell-js/src/project-client/services/integrations/models/default-hover.ts index c0ac1f3ed..e2be5847f 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/default-hover.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/default-hover.ts @@ -10,9 +10,9 @@ export const defaultHover = z.lazy(() => { }); /** - * - * @typedef {DefaultHover} defaultHover - * @property {string} + * Styles applied when a notification is hovered. + * @typedef {DefaultHover} defaultHover - Styles applied when a notification is hovered. - Styles applied when a notification is hovered. + * @property {string} - Background color on hover. */ export type DefaultHover = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/default-state.ts b/packages/magicbell-js/src/project-client/services/integrations/models/default-state.ts index aa1f42fd1..1f3c0e2b9 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/default-state.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/default-state.ts @@ -10,9 +10,9 @@ export const defaultState = z.lazy(() => { }); /** - * - * @typedef {DefaultState} defaultState - * @property {string} + * Accent colors for notification state indicators. + * @typedef {DefaultState} defaultState - Accent colors for notification state indicators. - Accent colors for notification state indicators. + * @property {string} - Color used for the state indicator. */ export type DefaultState = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/default_.ts b/packages/magicbell-js/src/project-client/services/integrations/models/default_.ts index 58b8b4339..3c05c5a7a 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/default_.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/default_.ts @@ -20,16 +20,16 @@ export const default_ = z.lazy(() => { }); /** - * - * @typedef {Default_} default_ - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {DefaultHover} - * @property {string} - * @property {DefaultState} - * @property {string} + * Base styles applied to every notification item. + * @typedef {Default_} default_ - Base styles applied to every notification item. - Base styles applied to every notification item. + * @property {string} - Background color for notifications in their default state. + * @property {string} - Border radius applied to each notification card. + * @property {string} - Font family for notification text. + * @property {string} - Font size for notification text. + * @property {DefaultHover} - Styles applied when a notification is hovered. + * @property {string} - CSS margin applied around each notification card. + * @property {DefaultState} - Accent colors for notification state indicators. + * @property {string} - Default text color for notifications. */ export type Default_ = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/dialog.ts b/packages/magicbell-js/src/project-client/services/integrations/models/dialog.ts index 0b24c6124..8ce0c8eef 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/dialog.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/dialog.ts @@ -12,11 +12,11 @@ export const dialog = z.lazy(() => { }); /** - * - * @typedef {Dialog} dialog - * @property {string} - * @property {string} - * @property {string} + * Styling for confirmation and action dialogs. + * @typedef {Dialog} dialog - Styling for confirmation and action dialogs. - Styling for confirmation and action dialogs. + * @property {string} - Accent color for dialog buttons and highlights. + * @property {string} - Dialog background color. + * @property {string} - Dialog text color. */ export type Dialog = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/expo-config-payload.ts b/packages/magicbell-js/src/project-client/services/integrations/models/expo-config-payload.ts index 6dee819f1..14254dc84 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/expo-config-payload.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/expo-config-payload.ts @@ -12,7 +12,7 @@ export const expoConfigPayload = z.lazy(() => { /** * * @typedef {ExpoConfigPayload} expoConfigPayload - * @property {string} + * @property {string} - The Expo access token used to authenticate push notifications. */ export type ExpoConfigPayload = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/fcm-config-payload.ts b/packages/magicbell-js/src/project-client/services/integrations/models/fcm-config-payload.ts index a7417ac62..2f0abfe06 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/fcm-config-payload.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/fcm-config-payload.ts @@ -22,17 +22,17 @@ export const fcmConfigPayload = z.lazy(() => { /** * * @typedef {FcmConfigPayload} fcmConfigPayload - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {Type_} - * @property {string} + * @property {string} - URL for Google's OAuth provider x509 certificates used to validate tokens. + * @property {string} - OAuth authorization endpoint used when exchanging Firebase credentials. + * @property {string} - The client email address from the Firebase service account. + * @property {string} - The numeric client identifier for the Firebase service account. + * @property {string} - URL to the public x509 certificate for this service account. + * @property {string} - The PEM encoded service account private key used to sign Firebase credentials. + * @property {string} - Identifier of the private key inside the downloaded service account JSON. + * @property {string} - The Firebase project ID associated with this service account. + * @property {string} - OAuth token endpoint used to mint access tokens for FCM. + * @property {Type_} - Indicates the kind of Google credential. Service accounts always use the `service_account` type. + * @property {string} - The Google Cloud universe domain hosting the Firebase APIs. */ export type FcmConfigPayload = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/footer.ts b/packages/magicbell-js/src/project-client/services/integrations/models/footer.ts index 3c7d36e17..3c0ca0d33 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/footer.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/footer.ts @@ -13,12 +13,12 @@ export const footer = z.lazy(() => { }); /** - * - * @typedef {Footer} footer - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * Footer styling for the inbox modal. + * @typedef {Footer} footer - Footer styling for the inbox modal. - Footer styling for the inbox modal. + * @property {string} - Footer background color. + * @property {string} - Border radius applied to the footer container. + * @property {string} - Font size used in the footer. + * @property {string} - Footer text color. */ export type Footer = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/header.ts b/packages/magicbell-js/src/project-client/services/integrations/models/header.ts index 565b46c32..1ddaa5a52 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/header.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/header.ts @@ -14,13 +14,13 @@ export const header = z.lazy(() => { }); /** - * - * @typedef {Header} header - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * Header styling for the inbox modal. + * @typedef {Header} header - Header styling for the inbox modal. - Header styling for the inbox modal. + * @property {string} - Header background color. + * @property {string} - Border radius applied to the header container. + * @property {string} - CSS font family for the header title. + * @property {string} - Font size used in the header. + * @property {string} - Header text color. */ export type Header = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/icon.ts b/packages/magicbell-js/src/project-client/services/integrations/models/icon.ts index 5283c8e1b..07d6b27ad 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/icon.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/icon.ts @@ -11,10 +11,10 @@ export const icon = z.lazy(() => { }); /** - * - * @typedef {Icon} icon - * @property {string} - * @property {string} + * Launcher icon styling overrides. + * @typedef {Icon} icon - Launcher icon styling overrides. - Launcher icon styling overrides. + * @property {string} - CSS color used for the icon border. + * @property {string} - Width of the launcher icon (any CSS length). */ export type Icon = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/images.ts b/packages/magicbell-js/src/project-client/services/integrations/models/images.ts index c8028fd7c..83297bb7f 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/images.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/images.ts @@ -10,9 +10,9 @@ export const images = z.lazy(() => { }); /** - * - * @typedef {Images} images - * @property {string} + * Image overrides for assets used in the inbox UI. + * @typedef {Images} images - Image overrides for assets used in the inbox UI. - Image overrides for assets used in the inbox UI. + * @property {string} - URL for the illustration shown when the inbox is empty. */ export type Images = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/inbox-config-payload.ts b/packages/magicbell-js/src/project-client/services/integrations/models/inbox-config-payload.ts index c30356635..60501f832 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/inbox-config-payload.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/inbox-config-payload.ts @@ -17,9 +17,9 @@ export const inboxConfigPayload = z.lazy(() => { /** * * @typedef {InboxConfigPayload} inboxConfigPayload - * @property {Images} - * @property {string} - * @property {Theme} + * @property {Images} - Image overrides for assets used in the inbox UI. + * @property {string} - Locale code (ISO language tag) used to localize built-in strings. + * @property {Theme} - Visual customization options for the hosted inbox widget. */ export type InboxConfigPayload = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/notification.ts b/packages/magicbell-js/src/project-client/services/integrations/models/notification.ts index da8c41ae8..7e92c2355 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/notification.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/notification.ts @@ -16,11 +16,11 @@ export const notification = z.lazy(() => { }); /** - * - * @typedef {Notification} notification - * @property {Default_} - * @property {Unread} - * @property {Unseen} + * Styling overrides for notification list items. + * @typedef {Notification} notification - Styling overrides for notification list items. - Styling overrides for notification list items. + * @property {Default_} - Base styles applied to every notification item. + * @property {Unread} - Overrides for unread notifications. + * @property {Unseen} - Overrides for unseen notifications. */ export type Notification = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/theme.ts b/packages/magicbell-js/src/project-client/services/integrations/models/theme.ts index 39b6c539b..763e3b7fe 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/theme.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/theme.ts @@ -24,15 +24,15 @@ export const theme = z.lazy(() => { }); /** - * - * @typedef {Theme} theme - * @property {Banner} - * @property {Dialog} - * @property {Footer} - * @property {Header} - * @property {Icon} - * @property {Notification} - * @property {UnseenBadge} + * Visual customization options for the hosted inbox widget. + * @typedef {Theme} theme - Visual customization options for the hosted inbox widget. - Visual customization options for the hosted inbox widget. + * @property {Banner} - Top banner styling options. + * @property {Dialog} - Styling for confirmation and action dialogs. + * @property {Footer} - Footer styling for the inbox modal. + * @property {Header} - Header styling for the inbox modal. + * @property {Icon} - Launcher icon styling overrides. + * @property {Notification} - Styling overrides for notification list items. + * @property {UnseenBadge} - Badge styling for unseen notification counts. */ export type Theme = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unread-hover.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unread-hover.ts index 31729f454..5993c99e4 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unread-hover.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unread-hover.ts @@ -10,9 +10,9 @@ export const unreadHover = z.lazy(() => { }); /** - * - * @typedef {UnreadHover} unreadHover - * @property {string} + * Hover styles for unread notifications. + * @typedef {UnreadHover} unreadHover - Hover styles for unread notifications. - Hover styles for unread notifications. + * @property {string} - Background color on hover for unread notifications. */ export type UnreadHover = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unread-state.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unread-state.ts index c8579a300..c9fccd9ad 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unread-state.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unread-state.ts @@ -10,9 +10,9 @@ export const unreadState = z.lazy(() => { }); /** - * - * @typedef {UnreadState} unreadState - * @property {string} + * State indicator styling for unread notifications. + * @typedef {UnreadState} unreadState - State indicator styling for unread notifications. - State indicator styling for unread notifications. + * @property {string} - Color for the unread state indicator. */ export type UnreadState = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unread.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unread.ts index 1b9527ad5..0f4cb372d 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unread.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unread.ts @@ -16,12 +16,12 @@ export const unread = z.lazy(() => { }); /** - * - * @typedef {Unread} unread - * @property {string} - * @property {UnreadHover} - * @property {UnreadState} - * @property {string} + * Overrides for unread notifications. + * @typedef {Unread} unread - Overrides for unread notifications. - Overrides for unread notifications. + * @property {string} - Background color applied to unread notifications. + * @property {UnreadHover} - Hover styles for unread notifications. + * @property {UnreadState} - State indicator styling for unread notifications. + * @property {string} - Text color used when a notification is unread. */ export type Unread = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unseen-badge.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unseen-badge.ts index 5c8343b90..7142fd58b 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unseen-badge.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unseen-badge.ts @@ -10,9 +10,9 @@ export const unseenBadge = z.lazy(() => { }); /** - * - * @typedef {UnseenBadge} unseenBadge - * @property {string} + * Badge styling for unseen notification counts. + * @typedef {UnseenBadge} unseenBadge - Badge styling for unseen notification counts. - Badge styling for unseen notification counts. + * @property {string} - Badge background color. */ export type UnseenBadge = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unseen-hover.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unseen-hover.ts index 13db5026f..413a3122a 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unseen-hover.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unseen-hover.ts @@ -10,9 +10,9 @@ export const unseenHover = z.lazy(() => { }); /** - * - * @typedef {UnseenHover} unseenHover - * @property {string} + * Hover styles for unseen notifications. + * @typedef {UnseenHover} unseenHover - Hover styles for unseen notifications. - Hover styles for unseen notifications. + * @property {string} - Background color on hover for unseen notifications. */ export type UnseenHover = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unseen-state.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unseen-state.ts index 4e4fb86aa..0e27e2ab2 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unseen-state.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unseen-state.ts @@ -10,9 +10,9 @@ export const unseenState = z.lazy(() => { }); /** - * - * @typedef {UnseenState} unseenState - * @property {string} + * State indicator styling for unseen notifications. + * @typedef {UnseenState} unseenState - State indicator styling for unseen notifications. - State indicator styling for unseen notifications. + * @property {string} - Color for the unseen state indicator. */ export type UnseenState = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/integrations/models/unseen.ts b/packages/magicbell-js/src/project-client/services/integrations/models/unseen.ts index e45848d3c..276361162 100644 --- a/packages/magicbell-js/src/project-client/services/integrations/models/unseen.ts +++ b/packages/magicbell-js/src/project-client/services/integrations/models/unseen.ts @@ -16,12 +16,12 @@ export const unseen = z.lazy(() => { }); /** - * - * @typedef {Unseen} unseen - * @property {string} - * @property {UnseenHover} - * @property {UnseenState} - * @property {string} + * Overrides for unseen notifications. + * @typedef {Unseen} unseen - Overrides for unseen notifications. - Overrides for unseen notifications. + * @property {string} - Background color applied to unseen notifications. + * @property {UnseenHover} - Hover styles for unseen notifications. + * @property {UnseenState} - State indicator styling for unseen notifications. + * @property {string} - Text color used when a notification is unseen. */ export type Unseen = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/users/users-service.ts b/packages/magicbell-js/src/project-client/services/users/users-service.ts index b25e60270..4833f6016 100644 --- a/packages/magicbell-js/src/project-client/services/users/users-service.ts +++ b/packages/magicbell-js/src/project-client/services/users/users-service.ts @@ -13,10 +13,10 @@ import { ListUsersParams } from './request-params.js'; export class UsersService extends BaseService { /** * Lists all users in the project. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - - * @param {string} [params.query] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page + * @param {string} [params.query] - filter users by their email address or external ID * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/create-run-response.ts b/packages/magicbell-js/src/project-client/services/workflows/models/create-run-response.ts index d193b59ef..55156e065 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/models/create-run-response.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/models/create-run-response.ts @@ -12,7 +12,7 @@ export const createRunResponse = z.lazy(() => { /** * * @typedef {CreateRunResponse} createRunResponse - * @property {string} + * @property {string} - Identifier of the workflow run that was created. */ export type CreateRunResponse = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/execute-workflow-request.ts b/packages/magicbell-js/src/project-client/services/workflows/models/execute-workflow-request.ts index 3497c0d14..e66ea88c1 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/models/execute-workflow-request.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/models/execute-workflow-request.ts @@ -13,8 +13,8 @@ export const executeWorkflowRequest = z.lazy(() => { /** * * @typedef {ExecuteWorkflowRequest} executeWorkflowRequest - * @property {any} - * @property {string} + * @property {any} - Optional JSON payload that will be passed as the workflow input context. + * @property {string} - The unique workflow key to execute (e.g. integration.stripe.charge.succeeded). */ export type ExecuteWorkflowRequest = z.infer; diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/get-run-response.ts b/packages/magicbell-js/src/project-client/services/workflows/models/get-run-response.ts index b62204083..fec5110c4 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/models/get-run-response.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/models/get-run-response.ts @@ -14,6 +14,7 @@ export const getRunResponse = z.lazy(() => { return z.object({ createdAt: z.string().optional(), id: z.string().optional(), + input: z.any().optional(), status: getRunResponseStatus.optional(), workflowKey: z.string().optional(), }); @@ -24,6 +25,7 @@ export const getRunResponse = z.lazy(() => { * @typedef {GetRunResponse} getRunResponse * @property {string} * @property {string} + * @property {any} * @property {GetRunResponseStatus} * @property {string} */ @@ -38,12 +40,14 @@ export const getRunResponseResponse = z.lazy(() => { .object({ created_at: z.string().optional(), id: z.string().optional(), + input: z.any().optional(), status: getRunResponseStatusResponse.optional(), workflow_key: z.string().optional(), }) .transform((data) => ({ createdAt: data['created_at'], id: data['id'], + input: data['input'], status: data['status'], workflowKey: data['workflow_key'], })); @@ -58,12 +62,14 @@ export const getRunResponseRequest = z.lazy(() => { .object({ createdAt: z.string().optional(), id: z.string().optional(), + input: z.any().optional(), status: getRunResponseStatusRequest.optional(), workflowKey: z.string().optional(), }) .transform((data) => ({ created_at: data['createdAt'], id: data['id'], + input: data['input'], status: data['status'], workflow_key: data['workflowKey'], })); diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/index.ts b/packages/magicbell-js/src/project-client/services/workflows/models/index.ts index e5d5f9976..d016c1bec 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/models/index.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/models/index.ts @@ -2,8 +2,11 @@ export type { CreateRunResponse } from './create-run-response.js'; export type { ExecuteWorkflowRequest } from './execute-workflow-request.js'; export type { GetRunResponse } from './get-run-response.js'; export type { GetRunResponseStatus } from './get-run-response-status.js'; -export type { Steps } from './steps.js'; +export type { Items } from './items.js'; +export type { ItemsSteps } from './items-steps.js'; export type { WorkflowDefinition } from './workflow-definition.js'; +export type { WorkflowDefinitionSteps } from './workflow-definition-steps.js'; +export type { WorkflowList } from './workflow-list.js'; export type { WorkflowRun } from './workflow-run.js'; export type { WorkflowRunCollection } from './workflow-run-collection.js'; export type { WorkflowRunStatus } from './workflow-run-status.js'; diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/steps.ts b/packages/magicbell-js/src/project-client/services/workflows/models/items-steps.ts similarity index 71% rename from packages/magicbell-js/src/project-client/services/workflows/models/steps.ts rename to packages/magicbell-js/src/project-client/services/workflows/models/items-steps.ts index 7e627950d..31c89cc9f 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/models/steps.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/models/items-steps.ts @@ -3,9 +3,9 @@ import { z } from 'zod'; /** * The shape of the model inside the application code - what the users use */ -export const steps = z.lazy(() => { +export const itemsSteps = z.lazy(() => { return z.object({ - command: z.string().regex(/^[A-Za-z0-9\_\:]+$/), + command: z.string().regex(/^[a-z_]+$/), if: z.string().optional().nullable(), input: z.any().optional().nullable(), }); @@ -13,21 +13,21 @@ export const steps = z.lazy(() => { /** * - * @typedef {Steps} steps - * @property {string} + * @typedef {ItemsSteps} itemsSteps + * @property {string} - Command to execute (e.g., broadcast, pause, wait, abort) * @property {string} * @property {any} */ -export type Steps = z.infer; +export type ItemsSteps = z.infer; /** * The shape of the model mapping from the api schema into the application shape. * Is equal to application shape if all property names match the api schema */ -export const stepsResponse = z.lazy(() => { +export const itemsStepsResponse = z.lazy(() => { return z .object({ - command: z.string().regex(/^[A-Za-z0-9\_\:]+$/), + command: z.string().regex(/^[a-z_]+$/), if: z.string().optional().nullable(), input: z.any().optional().nullable(), }) @@ -42,10 +42,10 @@ export const stepsResponse = z.lazy(() => { * The shape of the model mapping from the application shape into the api schema. * Is equal to application shape if all property names match the api schema */ -export const stepsRequest = z.lazy(() => { +export const itemsStepsRequest = z.lazy(() => { return z .object({ - command: z.string().regex(/^[A-Za-z0-9\_\:]+$/), + command: z.string().regex(/^[a-z_]+$/), if: z.string().optional().nullable(), input: z.any().optional().nullable(), }) diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/items.ts b/packages/magicbell-js/src/project-client/services/workflows/models/items.ts new file mode 100644 index 000000000..e57d99a89 --- /dev/null +++ b/packages/magicbell-js/src/project-client/services/workflows/models/items.ts @@ -0,0 +1,68 @@ +import { z } from 'zod'; + +import { ItemsSteps, itemsSteps, itemsStepsRequest, itemsStepsResponse } from './items-steps.js'; + +/** + * The shape of the model inside the application code - what the users use + */ +export const items = z.lazy(() => { + return z.object({ + disabled: z.boolean().optional(), + key: z + .string() + .min(3) + .regex(/^[A-Za-z0-9\_\.\-\:]+$/), + steps: z.array(itemsSteps), + }); +}); + +/** + * + * @typedef {Items} items + * @property {boolean} + * @property {string} + * @property {ItemsSteps[]} + */ +export type Items = z.infer; + +/** + * The shape of the model mapping from the api schema into the application shape. + * Is equal to application shape if all property names match the api schema + */ +export const itemsResponse = z.lazy(() => { + return z + .object({ + disabled: z.boolean().optional(), + key: z + .string() + .min(3) + .regex(/^[A-Za-z0-9\_\.\-\:]+$/), + steps: z.array(itemsStepsResponse), + }) + .transform((data) => ({ + disabled: data['disabled'], + key: data['key'], + steps: data['steps'], + })); +}); + +/** + * The shape of the model mapping from the application shape into the api schema. + * Is equal to application shape if all property names match the api schema + */ +export const itemsRequest = z.lazy(() => { + return z + .object({ + disabled: z.boolean().optional(), + key: z + .string() + .min(3) + .regex(/^[A-Za-z0-9\_\.\-\:]+$/), + steps: z.array(itemsStepsRequest), + }) + .transform((data) => ({ + disabled: data['disabled'], + key: data['key'], + steps: data['steps'], + })); +}); diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition-steps.ts b/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition-steps.ts new file mode 100644 index 000000000..bb848b553 --- /dev/null +++ b/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition-steps.ts @@ -0,0 +1,57 @@ +import { z } from 'zod'; + +/** + * The shape of the model inside the application code - what the users use + */ +export const workflowDefinitionSteps = z.lazy(() => { + return z.object({ + command: z.string().regex(/^[a-z_]+$/), + if: z.string().optional().nullable(), + input: z.any().optional().nullable(), + }); +}); + +/** + * + * @typedef {WorkflowDefinitionSteps} workflowDefinitionSteps + * @property {string} - Command to execute (e.g., broadcast, pause, wait, abort) + * @property {string} - JMESPath condition that must evaluate truthy for the step to run. + * @property {any} - Optional payload passed to the command when it executes. + */ +export type WorkflowDefinitionSteps = z.infer; + +/** + * The shape of the model mapping from the api schema into the application shape. + * Is equal to application shape if all property names match the api schema + */ +export const workflowDefinitionStepsResponse = z.lazy(() => { + return z + .object({ + command: z.string().regex(/^[a-z_]+$/), + if: z.string().optional().nullable(), + input: z.any().optional().nullable(), + }) + .transform((data) => ({ + command: data['command'], + if: data['if'], + input: data['input'], + })); +}); + +/** + * The shape of the model mapping from the application shape into the api schema. + * Is equal to application shape if all property names match the api schema + */ +export const workflowDefinitionStepsRequest = z.lazy(() => { + return z + .object({ + command: z.string().regex(/^[a-z_]+$/), + if: z.string().optional().nullable(), + input: z.any().optional().nullable(), + }) + .transform((data) => ({ + command: data['command'], + if: data['if'], + input: data['input'], + })); +}); diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition.ts b/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition.ts index c93280915..67dc34962 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/models/workflow-definition.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; -import { Steps, steps, stepsRequest, stepsResponse } from './steps.js'; +import { + WorkflowDefinitionSteps, + workflowDefinitionSteps, + workflowDefinitionStepsRequest, + workflowDefinitionStepsResponse, +} from './workflow-definition-steps.js'; /** * The shape of the model inside the application code - what the users use @@ -12,16 +17,16 @@ export const workflowDefinition = z.lazy(() => { .string() .min(3) .regex(/^[A-Za-z0-9\_\.\-\:]+$/), - steps: z.array(steps), + steps: z.array(workflowDefinitionSteps), }); }); /** * * @typedef {WorkflowDefinition} workflowDefinition - * @property {boolean} - * @property {string} - * @property {Steps[]} + * @property {boolean} - When true, prevents the workflow from being triggered. + * @property {string} - Unique identifier for this workflow definition. + * @property {WorkflowDefinitionSteps[]} - Ordered list describing each action that will run inside the workflow. */ export type WorkflowDefinition = z.infer; @@ -37,7 +42,7 @@ export const workflowDefinitionResponse = z.lazy(() => { .string() .min(3) .regex(/^[A-Za-z0-9\_\.\-\:]+$/), - steps: z.array(stepsResponse), + steps: z.array(workflowDefinitionStepsResponse), }) .transform((data) => ({ disabled: data['disabled'], @@ -58,7 +63,7 @@ export const workflowDefinitionRequest = z.lazy(() => { .string() .min(3) .regex(/^[A-Za-z0-9\_\.\-\:]+$/), - steps: z.array(stepsRequest), + steps: z.array(workflowDefinitionStepsRequest), }) .transform((data) => ({ disabled: data['disabled'], diff --git a/packages/magicbell-js/src/project-client/services/workflows/models/workflow-list.ts b/packages/magicbell-js/src/project-client/services/workflows/models/workflow-list.ts new file mode 100644 index 000000000..223307364 --- /dev/null +++ b/packages/magicbell-js/src/project-client/services/workflows/models/workflow-list.ts @@ -0,0 +1,47 @@ +import { z } from 'zod'; + +import { Items, items, itemsRequest, itemsResponse } from './items.js'; + +/** + * The shape of the model inside the application code - what the users use + */ +export const workflowList = z.lazy(() => { + return z.object({ + items: z.array(items).optional(), + }); +}); + +/** + * + * @typedef {WorkflowList} workflowList + * @property {Items[]} + */ +export type WorkflowList = z.infer; + +/** + * The shape of the model mapping from the api schema into the application shape. + * Is equal to application shape if all property names match the api schema + */ +export const workflowListResponse = z.lazy(() => { + return z + .object({ + items: z.array(itemsResponse).optional(), + }) + .transform((data) => ({ + items: data['items'], + })); +}); + +/** + * The shape of the model mapping from the application shape into the api schema. + * Is equal to application shape if all property names match the api schema + */ +export const workflowListRequest = z.lazy(() => { + return z + .object({ + items: z.array(itemsRequest).optional(), + }) + .transform((data) => ({ + items: data['items'], + })); +}); diff --git a/packages/magicbell-js/src/project-client/services/workflows/workflows-service.ts b/packages/magicbell-js/src/project-client/services/workflows/workflows-service.ts index 62727f064..a3333f524 100644 --- a/packages/magicbell-js/src/project-client/services/workflows/workflows-service.ts +++ b/packages/magicbell-js/src/project-client/services/workflows/workflows-service.ts @@ -14,9 +14,36 @@ import { workflowDefinitionRequest, workflowDefinitionResponse, } from './models/workflow-definition.js'; +import { WorkflowList, workflowListResponse } from './models/workflow-list.js'; import { WorkflowRunCollection, workflowRunCollectionResponse } from './models/workflow-run-collection.js'; export class WorkflowsService extends BaseService { + /** + * Retrieves all workflow definitions for the project + * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. + * @returns {Promise>} - OK + */ + async fetchWorkflows(requestConfig?: RequestConfig): Promise> { + const request = new RequestBuilder() + .setBaseUrl(requestConfig?.baseUrl || this.config.baseUrl || this.config.environment || Environment.DEFAULT) + .setConfig(this.config) + .setMethod('GET') + .setPath('/workflows') + .setRequestSchema(z.any()) + .addAccessTokenAuth(this.config.token, 'Bearer') + .setRequestContentType(ContentType.Json) + .addResponse({ + schema: workflowListResponse, + contentType: ContentType.Json, + status: 200, + }) + .setRetryAttempts(this.config, requestConfig) + .setRetryDelayMs(this.config, requestConfig) + .setResponseValidation(this.config, requestConfig) + .build(); + return this.client.call(request); + } + /** * Creates or updates a workflow definition for the project * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. diff --git a/packages/magicbell-js/src/user-client/services/channels/channels-service.ts b/packages/magicbell-js/src/user-client/services/channels/channels-service.ts index 97356321d..fc6994bd7 100644 --- a/packages/magicbell-js/src/user-client/services/channels/channels-service.ts +++ b/packages/magicbell-js/src/user-client/services/channels/channels-service.ts @@ -58,9 +58,9 @@ import { export class ChannelsService extends BaseService { /** * Lists all Inbox tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -192,9 +192,9 @@ export class ChannelsService extends BaseService { /** * Lists all APNs tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -326,9 +326,9 @@ export class ChannelsService extends BaseService { /** * Lists all Expo tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -460,9 +460,9 @@ export class ChannelsService extends BaseService { /** * Lists all FCM tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -594,9 +594,9 @@ export class ChannelsService extends BaseService { /** * Lists all MagicBell SlackBot tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -734,9 +734,9 @@ export class ChannelsService extends BaseService { /** * Lists all Slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -871,9 +871,9 @@ export class ChannelsService extends BaseService { /** * Lists all Teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -1062,9 +1062,9 @@ export class ChannelsService extends BaseService { /** * Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ diff --git a/packages/magicbell-js/src/user-client/services/channels/models/apns-token-payload.ts b/packages/magicbell-js/src/user-client/services/channels/models/apns-token-payload.ts index c89e0480e..897704b7a 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/apns-token-payload.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/apns-token-payload.ts @@ -17,9 +17,9 @@ export const apnsTokenPayload = z.lazy(() => { /** * * @typedef {ApnsTokenPayload} apnsTokenPayload - * @property {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. - * @property {string} - * @property {ApnsTokenPayloadInstallationId} - (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. + * @property {string} - The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. + * @property {string} - The APNs device token to register with MagicBell. + * @property {ApnsTokenPayloadInstallationId} - The APNs environment this token belongs to. If omitted we assume it targets `production`. */ export type ApnsTokenPayload = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/apns-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/apns-token.ts index 131b7f5fd..19f212346 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/apns-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/apns-token.ts @@ -21,13 +21,13 @@ export const apnsToken = z.lazy(() => { /** * * @typedef {ApnsToken} apnsToken - * @property {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. - * @property {string} - * @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 {string} + * @property {string} - The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. + * @property {string} - The timestamp when the token was created. + * @property {string} - The APNs device token to register with MagicBell. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {ApnsTokenInstallationId} - The APNs environment this token belongs to. If omitted we assume it targets `production`. + * @property {string} - The timestamp when the token metadata last changed. */ export type ApnsToken = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/discard-result.ts b/packages/magicbell-js/src/user-client/services/channels/models/discard-result.ts index 9c17fa849..96165e3d5 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/discard-result.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/discard-result.ts @@ -13,8 +13,8 @@ export const discardResult = z.lazy(() => { /** * * @typedef {DiscardResult} discardResult - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was discarded. + * @property {string} - The unique identifier for the discarded token. */ export type DiscardResult = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/expo-token-payload.ts b/packages/magicbell-js/src/user-client/services/channels/models/expo-token-payload.ts index 21b030b19..f5ac7558f 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/expo-token-payload.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/expo-token-payload.ts @@ -12,7 +12,7 @@ export const expoTokenPayload = z.lazy(() => { /** * * @typedef {ExpoTokenPayload} expoTokenPayload - * @property {string} + * @property {string} - The Expo push token returned by the Expo client. */ export type ExpoTokenPayload = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/expo-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/expo-token.ts index 331376143..d77589cb5 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/expo-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/expo-token.ts @@ -16,11 +16,11 @@ export const expoToken = z.lazy(() => { /** * * @typedef {ExpoToken} expoToken - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The Expo push token returned by the Expo client. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The timestamp when the token metadata last changed. */ export type ExpoToken = z.infer; 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 db4ca89c2..f68bcda71 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 @@ -12,7 +12,7 @@ export const fcmTokenPayload = z.lazy(() => { /** * * @typedef {FcmTokenPayload} fcmTokenPayload - * @property {string} + * @property {string} - The Firebase Cloud Messaging device registration token to associate with the user. */ export type FcmTokenPayload = z.infer; 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 5ea134958..3e288131c 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 @@ -16,11 +16,11 @@ export const fcmToken = z.lazy(() => { /** * * @typedef {FcmToken} fcmToken - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The Firebase Cloud Messaging device registration token to associate with the user. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The timestamp when the token metadata last changed. */ export type FcmToken = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/inbox-token-response.ts b/packages/magicbell-js/src/user-client/services/channels/models/inbox-token-response.ts index a94e711cd..8c5be7509 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/inbox-token-response.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/inbox-token-response.ts @@ -17,12 +17,12 @@ export const inboxTokenResponse = z.lazy(() => { /** * * @typedef {InboxTokenResponse} inboxTokenResponse - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - Realtime connection ID to restrict delivery to a specific Ably connection. + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The in-app inbox token generated for this user. + * @property {string} - The timestamp when the token metadata last changed. */ export type InboxTokenResponse = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/inbox-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/inbox-token.ts index 72286bea4..e3a78b7e2 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/inbox-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/inbox-token.ts @@ -13,8 +13,8 @@ export const inboxToken = z.lazy(() => { /** * * @typedef {InboxToken} inboxToken - * @property {string} - * @property {string} + * @property {string} - Realtime connection ID to restrict delivery to a specific Ably connection. + * @property {string} - The in-app inbox token generated for this user. */ export type InboxToken = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-oauth.ts b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-oauth.ts index 3d4fea298..7f94b3ebe 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-oauth.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-oauth.ts @@ -14,9 +14,9 @@ export const slackTokenOauth = z.lazy(() => { /** * * @typedef {SlackTokenOauth} slackTokenOauth - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The ID of the Slack channel this installation is associated with + * @property {string} - A unique identifier for this Slack workspace installation + * @property {string} - The OAuth scope granted during installation */ export type SlackTokenOauth = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-oauth.ts b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-oauth.ts index 235ca2b1f..6a5337cbd 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-oauth.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-oauth.ts @@ -14,9 +14,9 @@ export const slackTokenPayloadOauth = z.lazy(() => { /** * * @typedef {SlackTokenPayloadOauth} slackTokenPayloadOauth - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The ID of the Slack channel this installation is associated with + * @property {string} - A unique identifier for this Slack workspace installation + * @property {string} - The OAuth scope granted during installation */ export type SlackTokenPayloadOauth = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-webhook.ts b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-webhook.ts index f27a56588..a7199bbf9 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-webhook.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-payload-webhook.ts @@ -12,7 +12,7 @@ export const slackTokenPayloadWebhook = z.lazy(() => { /** * Obtained directly from the incoming_webhook object in the installation response from the Slack API. * @typedef {SlackTokenPayloadWebhook} slackTokenPayloadWebhook - Obtained directly from the incoming_webhook object in the installation response from the Slack API. - Obtained directly from the incoming_webhook object in the installation response from the Slack API. - * @property {string} + * @property {string} - The URL for the incoming webhook from Slack */ export type SlackTokenPayloadWebhook = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-webhook.ts b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-webhook.ts index 71b6a69af..971942232 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/slack-token-webhook.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/slack-token-webhook.ts @@ -12,7 +12,7 @@ export const slackTokenWebhook = z.lazy(() => { /** * Obtained directly from the incoming_webhook object in the installation response from the Slack API. * @typedef {SlackTokenWebhook} slackTokenWebhook - Obtained directly from the incoming_webhook object in the installation response from the Slack API. - Obtained directly from the incoming_webhook object in the installation response from the Slack API. - * @property {string} + * @property {string} - The URL for the incoming webhook from Slack */ export type SlackTokenWebhook = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/slack-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/slack-token.ts index f038c623b..e72925ef3 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/slack-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/slack-token.ts @@ -30,11 +30,11 @@ export const slackToken = z.lazy(() => { /** * * @typedef {SlackToken} slackToken - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. * @property {SlackTokenOauth} - * @property {string} + * @property {string} - The timestamp when the token metadata last changed. * @property {SlackTokenWebhook} - Obtained directly from the incoming_webhook object in the installation response from the Slack API. */ export type SlackToken = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/teams-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/teams-token.ts index 6d3f3be5c..14c96f706 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/teams-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/teams-token.ts @@ -23,10 +23,10 @@ export const teamsToken = z.lazy(() => { /** * * @typedef {TeamsToken} teamsToken - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. + * @property {string} - The unique identifier for the token. + * @property {string} - The timestamp when the token metadata last changed. * @property {TeamsTokenWebhook} */ export type TeamsToken = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/channels/models/web-push-token.ts b/packages/magicbell-js/src/user-client/services/channels/models/web-push-token.ts index 8e006e404..0c79a5e44 100644 --- a/packages/magicbell-js/src/user-client/services/channels/models/web-push-token.ts +++ b/packages/magicbell-js/src/user-client/services/channels/models/web-push-token.ts @@ -24,12 +24,12 @@ export const webPushToken = z.lazy(() => { /** * * @typedef {WebPushToken} webPushToken - * @property {string} - * @property {string} + * @property {string} - The timestamp when the token was created. + * @property {string} - The timestamp when the token was discarded, if applicable. * @property {string} - The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to. - * @property {string} + * @property {string} - The unique identifier for the token. * @property {WebPushTokenKeys} - The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription. - * @property {string} + * @property {string} - The timestamp when the token metadata last changed. */ export type WebPushToken = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/authed-user.ts b/packages/magicbell-js/src/user-client/services/integrations/models/authed-user.ts index c76717734..2649c6692 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/authed-user.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/authed-user.ts @@ -17,12 +17,12 @@ export const authedUser = z.lazy(() => { /** * * @typedef {AuthedUser} authedUser - * @property {string} - * @property {number} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - User token returned from the OAuth exchange. + * @property {number} - Seconds until the user token expires. + * @property {string} - Slack user ID for the installer. + * @property {string} - Refresh token for the authed user. + * @property {string} - Space-delimited OAuth scopes granted to the user token. + * @property {string} - Token type value provided by Slack. */ export type AuthedUser = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/banner.ts b/packages/magicbell-js/src/user-client/services/integrations/models/banner.ts index 9dcd5eab4..84f0888bc 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/banner.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/banner.ts @@ -13,12 +13,12 @@ export const banner = z.lazy(() => { }); /** - * - * @typedef {Banner} banner - * @property {string} - * @property {number} - * @property {string} - * @property {string} + * Top banner styling options. + * @typedef {Banner} banner - Top banner styling options. - Top banner styling options. + * @property {string} - Banner background color. + * @property {number} - Opacity applied to the banner background. + * @property {string} - Font size for banner text. + * @property {string} - Banner text color. */ export type Banner = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/default-hover.ts b/packages/magicbell-js/src/user-client/services/integrations/models/default-hover.ts index c0ac1f3ed..e2be5847f 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/default-hover.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/default-hover.ts @@ -10,9 +10,9 @@ export const defaultHover = z.lazy(() => { }); /** - * - * @typedef {DefaultHover} defaultHover - * @property {string} + * Styles applied when a notification is hovered. + * @typedef {DefaultHover} defaultHover - Styles applied when a notification is hovered. - Styles applied when a notification is hovered. + * @property {string} - Background color on hover. */ export type DefaultHover = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/default-state.ts b/packages/magicbell-js/src/user-client/services/integrations/models/default-state.ts index aa1f42fd1..1f3c0e2b9 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/default-state.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/default-state.ts @@ -10,9 +10,9 @@ export const defaultState = z.lazy(() => { }); /** - * - * @typedef {DefaultState} defaultState - * @property {string} + * Accent colors for notification state indicators. + * @typedef {DefaultState} defaultState - Accent colors for notification state indicators. - Accent colors for notification state indicators. + * @property {string} - Color used for the state indicator. */ export type DefaultState = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/default_.ts b/packages/magicbell-js/src/user-client/services/integrations/models/default_.ts index 58b8b4339..3c05c5a7a 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/default_.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/default_.ts @@ -20,16 +20,16 @@ export const default_ = z.lazy(() => { }); /** - * - * @typedef {Default_} default_ - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {DefaultHover} - * @property {string} - * @property {DefaultState} - * @property {string} + * Base styles applied to every notification item. + * @typedef {Default_} default_ - Base styles applied to every notification item. - Base styles applied to every notification item. + * @property {string} - Background color for notifications in their default state. + * @property {string} - Border radius applied to each notification card. + * @property {string} - Font family for notification text. + * @property {string} - Font size for notification text. + * @property {DefaultHover} - Styles applied when a notification is hovered. + * @property {string} - CSS margin applied around each notification card. + * @property {DefaultState} - Accent colors for notification state indicators. + * @property {string} - Default text color for notifications. */ export type Default_ = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/dialog.ts b/packages/magicbell-js/src/user-client/services/integrations/models/dialog.ts index 0b24c6124..8ce0c8eef 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/dialog.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/dialog.ts @@ -12,11 +12,11 @@ export const dialog = z.lazy(() => { }); /** - * - * @typedef {Dialog} dialog - * @property {string} - * @property {string} - * @property {string} + * Styling for confirmation and action dialogs. + * @typedef {Dialog} dialog - Styling for confirmation and action dialogs. - Styling for confirmation and action dialogs. + * @property {string} - Accent color for dialog buttons and highlights. + * @property {string} - Dialog background color. + * @property {string} - Dialog text color. */ export type Dialog = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/enterprise.ts b/packages/magicbell-js/src/user-client/services/integrations/models/enterprise.ts index bb31e68a0..0e537791e 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/enterprise.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/enterprise.ts @@ -13,8 +13,8 @@ export const enterprise = z.lazy(() => { /** * * @typedef {Enterprise} enterprise - * @property {string} - * @property {string} + * @property {string} - Enterprise grid identifier. + * @property {string} - Enterprise grid name. */ export type Enterprise = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/footer.ts b/packages/magicbell-js/src/user-client/services/integrations/models/footer.ts index 3c7d36e17..3c0ca0d33 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/footer.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/footer.ts @@ -13,12 +13,12 @@ export const footer = z.lazy(() => { }); /** - * - * @typedef {Footer} footer - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * Footer styling for the inbox modal. + * @typedef {Footer} footer - Footer styling for the inbox modal. - Footer styling for the inbox modal. + * @property {string} - Footer background color. + * @property {string} - Border radius applied to the footer container. + * @property {string} - Font size used in the footer. + * @property {string} - Footer text color. */ export type Footer = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/header.ts b/packages/magicbell-js/src/user-client/services/integrations/models/header.ts index 565b46c32..1ddaa5a52 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/header.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/header.ts @@ -14,13 +14,13 @@ export const header = z.lazy(() => { }); /** - * - * @typedef {Header} header - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * Header styling for the inbox modal. + * @typedef {Header} header - Header styling for the inbox modal. - Header styling for the inbox modal. + * @property {string} - Header background color. + * @property {string} - Border radius applied to the header container. + * @property {string} - CSS font family for the header title. + * @property {string} - Font size used in the header. + * @property {string} - Header text color. */ export type Header = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/icon.ts b/packages/magicbell-js/src/user-client/services/integrations/models/icon.ts index 5283c8e1b..07d6b27ad 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/icon.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/icon.ts @@ -11,10 +11,10 @@ export const icon = z.lazy(() => { }); /** - * - * @typedef {Icon} icon - * @property {string} - * @property {string} + * Launcher icon styling overrides. + * @typedef {Icon} icon - Launcher icon styling overrides. - Launcher icon styling overrides. + * @property {string} - CSS color used for the icon border. + * @property {string} - Width of the launcher icon (any CSS length). */ export type Icon = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/images.ts b/packages/magicbell-js/src/user-client/services/integrations/models/images.ts index c8028fd7c..83297bb7f 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/images.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/images.ts @@ -10,9 +10,9 @@ export const images = z.lazy(() => { }); /** - * - * @typedef {Images} images - * @property {string} + * Image overrides for assets used in the inbox UI. + * @typedef {Images} images - Image overrides for assets used in the inbox UI. - Image overrides for assets used in the inbox UI. + * @property {string} - URL for the illustration shown when the inbox is empty. */ export type Images = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/inbox-config-payload.ts b/packages/magicbell-js/src/user-client/services/integrations/models/inbox-config-payload.ts index c30356635..60501f832 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/inbox-config-payload.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/inbox-config-payload.ts @@ -17,9 +17,9 @@ export const inboxConfigPayload = z.lazy(() => { /** * * @typedef {InboxConfigPayload} inboxConfigPayload - * @property {Images} - * @property {string} - * @property {Theme} + * @property {Images} - Image overrides for assets used in the inbox UI. + * @property {string} - Locale code (ISO language tag) used to localize built-in strings. + * @property {Theme} - Visual customization options for the hosted inbox widget. */ export type InboxConfigPayload = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/incoming-webhook.ts b/packages/magicbell-js/src/user-client/services/integrations/models/incoming-webhook.ts index a7bac229c..427004c2c 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/incoming-webhook.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/incoming-webhook.ts @@ -14,9 +14,9 @@ export const incomingWebhook = z.lazy(() => { /** * * @typedef {IncomingWebhook} incomingWebhook - * @property {string} - * @property {string} - * @property {string} + * @property {string} - Human readable name for the webhook channel. + * @property {string} - URL users can visit to manage the webhook. + * @property {string} - Webhook URL that Slack posts events to. */ export type IncomingWebhook = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/slack-installation.ts b/packages/magicbell-js/src/user-client/services/integrations/models/slack-installation.ts index dfdce5521..c04b65060 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/slack-installation.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/slack-installation.ts @@ -37,19 +37,19 @@ export const slackInstallation = z.lazy(() => { /** * * @typedef {SlackInstallation} slackInstallation - * @property {string} - * @property {string} + * @property {string} - Bot token returned from the Slack OAuth exchange. + * @property {string} - Slack app identifier for the installed app. * @property {AuthedUser} - * @property {string} + * @property {string} - Slack user ID of the installed bot. * @property {Enterprise} - * @property {number} - * @property {string} + * @property {number} - Seconds until the bot access token expires. + * @property {string} - Unique identifier MagicBell assigns to the Slack installation. * @property {IncomingWebhook} - * @property {boolean} - * @property {string} - * @property {string} + * @property {boolean} - Indicates whether the installation occurred on an enterprise grid. + * @property {string} - Refresh token for regenerating the bot access token. + * @property {string} - Space-delimited OAuth scopes granted to the bot token. * @property {Team} - * @property {string} + * @property {string} - Type of bot token returned by Slack. */ export type SlackInstallation = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/slack-start-install.ts b/packages/magicbell-js/src/user-client/services/integrations/models/slack-start-install.ts index 8f1f4b828..73d41e965 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/slack-start-install.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/slack-start-install.ts @@ -15,10 +15,10 @@ export const slackStartInstall = z.lazy(() => { /** * * @typedef {SlackStartInstall} slackStartInstall - * @property {string} - * @property {string} - * @property {string[]} - * @property {string} + * @property {string} - Slack app ID that the installation flow should use. + * @property {string} - Optional override for the authorization URL returned to the client. + * @property {string[]} - Additional OAuth scopes to request during installation. + * @property {string} - Custom redirect URL to use after OAuth completes. */ export type SlackStartInstall = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/team.ts b/packages/magicbell-js/src/user-client/services/integrations/models/team.ts index ee86f9976..e5d01d978 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/team.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/team.ts @@ -13,8 +13,8 @@ export const team = z.lazy(() => { /** * * @typedef {Team} team - * @property {string} - * @property {string} + * @property {string} - Workspace ID where the app was installed. + * @property {string} - Workspace name where the app was installed. */ export type Team = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/theme-notification.ts b/packages/magicbell-js/src/user-client/services/integrations/models/theme-notification.ts index 32eb1a028..9383b83fa 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/theme-notification.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/theme-notification.ts @@ -16,11 +16,11 @@ export const themeNotification = z.lazy(() => { }); /** - * - * @typedef {ThemeNotification} themeNotification - * @property {Default_} - * @property {Unread} - * @property {Unseen} + * Styling overrides for notification list items. + * @typedef {ThemeNotification} themeNotification - Styling overrides for notification list items. - Styling overrides for notification list items. + * @property {Default_} - Base styles applied to every notification item. + * @property {Unread} - Overrides for unread notifications. + * @property {Unseen} - Overrides for unseen notifications. */ export type ThemeNotification = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/theme.ts b/packages/magicbell-js/src/user-client/services/integrations/models/theme.ts index abab3b390..99314b8f3 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/theme.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/theme.ts @@ -29,15 +29,15 @@ export const theme = z.lazy(() => { }); /** - * - * @typedef {Theme} theme - * @property {Banner} - * @property {Dialog} - * @property {Footer} - * @property {Header} - * @property {Icon} - * @property {ThemeNotification} - * @property {UnseenBadge} + * Visual customization options for the hosted inbox widget. + * @typedef {Theme} theme - Visual customization options for the hosted inbox widget. - Visual customization options for the hosted inbox widget. + * @property {Banner} - Top banner styling options. + * @property {Dialog} - Styling for confirmation and action dialogs. + * @property {Footer} - Footer styling for the inbox modal. + * @property {Header} - Header styling for the inbox modal. + * @property {Icon} - Launcher icon styling overrides. + * @property {ThemeNotification} - Styling overrides for notification list items. + * @property {UnseenBadge} - Badge styling for unseen notification counts. */ export type Theme = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unread-hover.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unread-hover.ts index 31729f454..5993c99e4 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unread-hover.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unread-hover.ts @@ -10,9 +10,9 @@ export const unreadHover = z.lazy(() => { }); /** - * - * @typedef {UnreadHover} unreadHover - * @property {string} + * Hover styles for unread notifications. + * @typedef {UnreadHover} unreadHover - Hover styles for unread notifications. - Hover styles for unread notifications. + * @property {string} - Background color on hover for unread notifications. */ export type UnreadHover = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unread-state.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unread-state.ts index c8579a300..c9fccd9ad 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unread-state.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unread-state.ts @@ -10,9 +10,9 @@ export const unreadState = z.lazy(() => { }); /** - * - * @typedef {UnreadState} unreadState - * @property {string} + * State indicator styling for unread notifications. + * @typedef {UnreadState} unreadState - State indicator styling for unread notifications. - State indicator styling for unread notifications. + * @property {string} - Color for the unread state indicator. */ export type UnreadState = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unread.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unread.ts index 1b9527ad5..0f4cb372d 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unread.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unread.ts @@ -16,12 +16,12 @@ export const unread = z.lazy(() => { }); /** - * - * @typedef {Unread} unread - * @property {string} - * @property {UnreadHover} - * @property {UnreadState} - * @property {string} + * Overrides for unread notifications. + * @typedef {Unread} unread - Overrides for unread notifications. - Overrides for unread notifications. + * @property {string} - Background color applied to unread notifications. + * @property {UnreadHover} - Hover styles for unread notifications. + * @property {UnreadState} - State indicator styling for unread notifications. + * @property {string} - Text color used when a notification is unread. */ export type Unread = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unseen-badge.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unseen-badge.ts index 5c8343b90..7142fd58b 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unseen-badge.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unseen-badge.ts @@ -10,9 +10,9 @@ export const unseenBadge = z.lazy(() => { }); /** - * - * @typedef {UnseenBadge} unseenBadge - * @property {string} + * Badge styling for unseen notification counts. + * @typedef {UnseenBadge} unseenBadge - Badge styling for unseen notification counts. - Badge styling for unseen notification counts. + * @property {string} - Badge background color. */ export type UnseenBadge = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unseen-hover.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unseen-hover.ts index 13db5026f..413a3122a 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unseen-hover.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unseen-hover.ts @@ -10,9 +10,9 @@ export const unseenHover = z.lazy(() => { }); /** - * - * @typedef {UnseenHover} unseenHover - * @property {string} + * Hover styles for unseen notifications. + * @typedef {UnseenHover} unseenHover - Hover styles for unseen notifications. - Hover styles for unseen notifications. + * @property {string} - Background color on hover for unseen notifications. */ export type UnseenHover = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unseen-state.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unseen-state.ts index 4e4fb86aa..0e27e2ab2 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unseen-state.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unseen-state.ts @@ -10,9 +10,9 @@ export const unseenState = z.lazy(() => { }); /** - * - * @typedef {UnseenState} unseenState - * @property {string} + * State indicator styling for unseen notifications. + * @typedef {UnseenState} unseenState - State indicator styling for unseen notifications. - State indicator styling for unseen notifications. + * @property {string} - Color for the unseen state indicator. */ export type UnseenState = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/unseen.ts b/packages/magicbell-js/src/user-client/services/integrations/models/unseen.ts index e45848d3c..276361162 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/unseen.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/unseen.ts @@ -16,12 +16,12 @@ export const unseen = z.lazy(() => { }); /** - * - * @typedef {Unseen} unseen - * @property {string} - * @property {UnseenHover} - * @property {UnseenState} - * @property {string} + * Overrides for unseen notifications. + * @typedef {Unseen} unseen - Overrides for unseen notifications. - Overrides for unseen notifications. + * @property {string} - Background color applied to unseen notifications. + * @property {UnseenHover} - Hover styles for unseen notifications. + * @property {UnseenState} - State indicator styling for unseen notifications. + * @property {string} - Text color used when a notification is unseen. */ export type Unseen = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/integrations/models/web-push-start-installation-response.ts b/packages/magicbell-js/src/user-client/services/integrations/models/web-push-start-installation-response.ts index dab542d93..73c09b782 100644 --- a/packages/magicbell-js/src/user-client/services/integrations/models/web-push-start-installation-response.ts +++ b/packages/magicbell-js/src/user-client/services/integrations/models/web-push-start-installation-response.ts @@ -13,8 +13,8 @@ export const webPushStartInstallationResponse = z.lazy(() => { /** * * @typedef {WebPushStartInstallationResponse} webPushStartInstallationResponse - * @property {string} - * @property {string} + * @property {string} - Auth secret returned from PushSubscription.getKey('auth'). + * @property {string} - VAPID public key generated for this web push installation. */ export type WebPushStartInstallationResponse = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/notifications/models/notification.ts b/packages/magicbell-js/src/user-client/services/notifications/models/notification.ts index f232633b0..7b24edb85 100644 --- a/packages/magicbell-js/src/user-client/services/notifications/models/notification.ts +++ b/packages/magicbell-js/src/user-client/services/notifications/models/notification.ts @@ -26,21 +26,21 @@ export const notification = z.lazy(() => { /** * * @typedef {Notification} notification - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {any} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} - * @property {string} + * @property {string} - The link associated with the notification. + * @property {string} - The timestamp when the notification was archived. + * @property {string} - The category grouping for the notification. + * @property {string} - The body content of the notification. + * @property {string} - The timestamp when the notification was created. + * @property {any} - The custom data stored with the notification. + * @property {string} - The timestamp when the notification was discarded. + * @property {string} - The unique identifier for the notification. + * @property {string} - The timestamp when the notification was marked as read. + * @property {string} - The timestamp when the notification was seen. + * @property {string} - The timestamp when the notification was sent. + * @property {string} - The title that is displayed to recipients. + * @property {string} - The topic for additional classification. + * @property {string} - The timestamp when the notification was last updated. + * @property {string} - The user that should receive the notification. */ export type Notification = z.infer; diff --git a/packages/magicbell-js/src/user-client/services/notifications/notifications-service.ts b/packages/magicbell-js/src/user-client/services/notifications/notifications-service.ts index 35f68f060..515a9411e 100644 --- a/packages/magicbell-js/src/user-client/services/notifications/notifications-service.ts +++ b/packages/magicbell-js/src/user-client/services/notifications/notifications-service.ts @@ -17,12 +17,12 @@ import { export class NotificationsService extends BaseService { /** * Lists all notifications for a user. - * @param {number} [params.limit] - - * @param {string} [params.startingAfter] - - * @param {string} [params.endingBefore] - - * @param {string} [params.status] - - * @param {string} [params.category] - - * @param {string} [params.topic] - + * @param {number} [params.limit] - defines the maximum number of items to return per page (default: 50) + * @param {string} [params.startingAfter] - a cursor for use in pagination, points to the last ID in previous page + * @param {string} [params.endingBefore] - a cursor for use in pagination, points to the first ID in next page + * @param {string} [params.status] - filter notifications by their read state, one of 'unread' | 'read' | 'archived' + * @param {string} [params.category] - filter notifications by their category + * @param {string} [params.topic] - filter notifications by their topic * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - OK */ @@ -76,8 +76,8 @@ export class NotificationsService extends BaseService { /** * Archive all notifications. - * @param {string} [params.category] - - * @param {string} [params.topic] - + * @param {string} [params.category] - filter notifications by their category + * @param {string} [params.topic] - filter notifications by their topic * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */ @@ -115,8 +115,8 @@ export class NotificationsService extends BaseService { /** * Marks all notifications as read. - * @param {string} [params.category] - - * @param {string} [params.topic] - + * @param {string} [params.category] - filter notifications by their category + * @param {string} [params.topic] - filter notifications by their topic * @param {RequestConfig} [requestConfig] - The request configuration for retry and validation. * @returns {Promise>} - No Content */