Skip to content

Commit

Permalink
chore: regen sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicBella committed Jan 27, 2025
1 parent 2c98890 commit 005c64c
Show file tree
Hide file tree
Showing 61 changed files with 1,460 additions and 1,043 deletions.
5 changes: 5 additions & 0 deletions .changeset/auto-bump-magicbell-1737958016.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'magicbell': minor
---

Automatic minor version bump for changes in `magicbell`.
5 changes: 5 additions & 0 deletions .changeset/auto-bump-project-client-1737958016.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@magicbell/project-client': minor
---

Automatic minor version bump for changes in `@magicbell/project-client`.
5 changes: 5 additions & 0 deletions .changeset/auto-bump-user-client-1737958016.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@magicbell/user-client': minor
---

Automatic minor version bump for changes in `@magicbell/user-client`.
2 changes: 1 addition & 1 deletion packages/magicbell/src/schemas/users/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export const ListUsersNotificationsResponseSchema = {

properties: {
user: {
nullable: false,
type: 'object',
nullable: false,
additionalProperties: false,

properties: {
Expand Down
5 changes: 2 additions & 3 deletions packages/project-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Welcome to the Client SDK documentation. This guide will help you get started wi

## About the API

OpenAPI 3.1.0 Specification for MagicBell API.
OpenAPI 3.0.3 Specification for MagicBell API.

## Table of Contents

Expand Down Expand Up @@ -83,7 +83,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.broadcasts.listBroadcasts({
pageSize: 8,
pageSize: 2,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -120,7 +120,6 @@ The SDK includes several models that represent the data structures used in API r
| :------------------------------------------------------------------------------------------- | :---------- |
| [ArrayOfBroadcasts](documentation/models/ArrayOfBroadcasts.md) | |
| [Broadcast](documentation/models/Broadcast.md) | |
| [ProjectDeliveryConfig](documentation/models/ProjectDeliveryConfig.md) | |
| [CategoryDeliveryConfig](documentation/models/CategoryDeliveryConfig.md) | |
| [ArrayOfMetadataApnsTokens](documentation/models/ArrayOfMetadataApnsTokens.md) | |
| [MetadataApnsToken](documentation/models/MetadataApnsToken.md) | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

| Name | Type | Required | Description |
| :------- | :------------------------------- | :------- | :---------- |
| category | string || |
| channels | CategoryDeliveryConfigChannels[] || |
| key | string || |
| disabled | boolean || |

# CategoryDeliveryConfigChannels

**Properties**

| Name | Type | Required | Description |
| :------- | :--------------- | :------- | :---------- |
| channel | ChannelsChannel2 || |
| delay | number || |
| disabled | boolean || |
| if | string || |
| priority | number || |
| Name | Type | Required | Description |
| :------- | :------ | :------- | :---------- |
| channel | Channel || |
| delay | number || |
| disabled | boolean || |
| if | string || |
| priority | number || |

# ChannelsChannel2
# Channel

**Properties**

Expand Down

This file was deleted.

13 changes: 6 additions & 7 deletions packages/project-client/documentation/models/SesConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

**Properties**

| Name | Type | Required | Description |
| :-------- | :------------ | :------- | :----------------------------------------------- |
| keyId | string || AWS Access Key ID |
| region | string || AWS Region |
| secretKey | string || AWS Secret Key |
| endpoint | string || HTTP endpoint to send requests to (testing only) |
| from | SesConfigFrom || |
| Name | Type | Required | Description |
| :-------- | :------------ | :------- | :---------------- |
| keyId | string || AWS Access Key ID |
| region | string || AWS Region |
| secretKey | string || AWS Secret Key |
| from | SesConfigFrom || |

# SesConfigFrom

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.broadcasts.listBroadcasts({
pageSize: 8,
pageSize: 2,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -141,8 +141,8 @@ import { Broadcast, Client } from '@magicbell/project-client';
const statusStatus = StatusStatus.ENQUEUED;

const summary: Summary = {
failures: 2,
total: 9,
failures: 9,
total: 6,
};

const broadcastStatus: BroadcastStatus = {
Expand Down
82 changes: 22 additions & 60 deletions packages/project-client/documentation/services/ChannelsService.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ A list of all methods in the `ChannelsService` service. Click on the method name
| :---------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [getProjectDeliveryconfig](#getprojectdeliveryconfig) | |
| [saveProjectDeliveryconfig](#saveprojectdeliveryconfig) | |
| [saveCategoriesDeliveryconfig](#savecategoriesdeliveryconfig) | |
| [getMobilePushApnsUserTokens](#getmobilepushapnsusertokens) | Lists all mobile_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. |
| [getMobilePushApnsUserToken](#getmobilepushapnsusertoken) | Retrieves a specific mobile_push token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata. |
| [discardMobilePushApnsUserToken](#discardmobilepushapnsusertoken) | Revokes a specific user's mobile_push token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone. |
Expand All @@ -31,9 +30,15 @@ A list of all methods in the `ChannelsService` service. Click on the method name
- HTTP Method: `GET`
- Endpoint: `/channels/deliveryconfig`

**Parameters**

| Name | Type | Required | Description |
| :--- | :----- | :------- | :---------- |
| key | string || |

**Return Type**

`ProjectDeliveryConfig`
`CategoryDeliveryConfig`

**Example Usage Code Snippet**

Expand All @@ -45,7 +50,9 @@ import { Client } from '@magicbell/project-client';
token: 'YOUR_TOKEN',
});

const { data } = await client.channels.getProjectDeliveryconfig();
const { data } = await client.channels.getProjectDeliveryconfig({
key: 'key',
});

console.log(data);
})();
Expand All @@ -58,51 +65,6 @@ import { Client } from '@magicbell/project-client';

**Parameters**

| Name | Type | Required | Description |
| :--- | :---------------------------------------------------------- | :------- | :---------------- |
| body | [ProjectDeliveryConfig](../models/ProjectDeliveryConfig.md) || The request body. |

**Return Type**

`ProjectDeliveryConfig`

**Example Usage Code Snippet**

```typescript
import { Client, ProjectDeliveryConfig } from '@magicbell/project-client';

(async () => {
const client = new Client({
token: 'YOUR_TOKEN',
});

const channelsChannel1 = ChannelsChannel1.IN_APP;

const projectDeliveryConfigChannels: ProjectDeliveryConfigChannels = {
channel: channelsChannel1,
delay: 8,
disabled: true,
if: 'if',
priority: 3,
};

const projectDeliveryConfig: ProjectDeliveryConfig = {
channels: [projectDeliveryConfigChannels],
};

const { data } = await client.channels.saveProjectDeliveryconfig(projectDeliveryConfig);

console.log(data);
})();
```

## saveCategoriesDeliveryconfig

- HTTP Method: `POST`
- Endpoint: `/channels/deliveryconfig/categories`

**Parameters**

| Name | Type | Required | Description |
| :--- | :------------------------------------------------------------ | :------- | :---------------- |
| body | [CategoryDeliveryConfig](../models/CategoryDeliveryConfig.md) || The request body. |
Expand All @@ -121,23 +83,23 @@ import { CategoryDeliveryConfig, Client } from '@magicbell/project-client';
token: 'YOUR_TOKEN',
});

const channelsChannel2 = ChannelsChannel2.IN_APP;
const channel = Channel.IN_APP;

const categoryDeliveryConfigChannels: CategoryDeliveryConfigChannels = {
channel: channelsChannel2,
delay: 6,
channel: channel,
delay: 1,
disabled: true,
if: 'if',
priority: 1,
priority: 2,
};

const categoryDeliveryConfig: CategoryDeliveryConfig = {
category: 'category',
channels: [categoryDeliveryConfigChannels],
disabled: true,
key: 'key',
};

const { data } = await client.channels.saveCategoriesDeliveryconfig(categoryDeliveryConfig);
const { data } = await client.channels.saveProjectDeliveryconfig(categoryDeliveryConfig);

console.log(data);
})();
Expand Down Expand Up @@ -174,7 +136,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.channels.getMobilePushApnsUserTokens('user_id', {
pageSize: 3,
pageSize: 4,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -282,7 +244,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.channels.getMobilePushExpoUserTokens('user_id', {
pageSize: 6,
pageSize: 9,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -390,7 +352,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.channels.getMobilePushFcmUserTokens('user_id', {
pageSize: 4,
pageSize: 8,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -498,7 +460,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.channels.getSlackUserTokens('user_id', {
pageSize: 8,
pageSize: 2,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -606,7 +568,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.channels.getTeamsUserTokens('user_id', {
pageSize: 8,
pageSize: 6,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down Expand Up @@ -714,7 +676,7 @@ import { Client } from '@magicbell/project-client';
});

const { data } = await client.channels.getWebPushUserTokens('user_id', {
pageSize: 4,
pageSize: 8,
pageAfter: 'page[after]',
pageBefore: 'page[before]',
});
Expand Down
Loading

0 comments on commit 005c64c

Please sign in to comment.