Skip to content

Commit

Permalink
change add error definition
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Dec 17, 2024
1 parent 23e99e7 commit 343f8b6
Show file tree
Hide file tree
Showing 69 changed files with 174 additions and 135 deletions.
19 changes: 16 additions & 3 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5
management:
docChecksum: a9703d5643e8ba816486f931480f58c3
docChecksum: e433af56cec249c24c2247377e8bb0da
docVersion: "1.0"
speakeasyVersion: 1.455.7
generationVersion: 2.480.1
releaseVersion: 0.0.1-alpha.115
configChecksum: 23e2dc35ee7dd20bfc9e099fa0d22755
releaseVersion: 0.0.1-alpha.116
configChecksum: a1fc3b15ca60c64e72ff938f46047199
published: true
features:
typescript:
Expand Down Expand Up @@ -1198,6 +1198,19 @@ examples:
application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}}
"422":
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}}
"":
parameters:
query:
page: 0
pageSize: 10
key: "exampleKey"
responses:
"200":
application/json: {"data": [], "page": 1, "pageSize": 10, "totalCount": 10}
"400":
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}
"422":
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {"key": "<value>", "key1": "<value>"}}}}
TopicsController_deleteTopic:
speakeasy-default-topics-controller-delete-topic:
parameters:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.0.1-alpha.115
version: 0.0.1-alpha.116
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.455.7
sources:
json-development:
sourceNamespace: json-development
sourceRevisionDigest: sha256:c6d5713ef1650885e080077ef38a13257268cf1fdd99704370f955f14df1447b
sourceBlobDigest: sha256:438d74237c3887242687b732cc9bddfc5bfd2370dd79074cf72e52ca01778e83
sourceRevisionDigest: sha256:338a0e52295e928870c14e11c2e7b2af5d4822039277ee312e56f2bcd4f78558
sourceBlobDigest: sha256:8920d454c53dd439ff78be8a445075ba4ac7b9037689d46fc6abc65ecb44b82f
tags:
- latest
- "1.0"
targets:
my-first-target:
source: json-development
sourceNamespace: json-development
sourceRevisionDigest: sha256:c6d5713ef1650885e080077ef38a13257268cf1fdd99704370f955f14df1447b
sourceBlobDigest: sha256:438d74237c3887242687b732cc9bddfc5bfd2370dd79074cf72e52ca01778e83
sourceRevisionDigest: sha256:338a0e52295e928870c14e11c2e7b2af5d4822039277ee312e56f2bcd4f78558
sourceBlobDigest: sha256:8920d454c53dd439ff78be8a445075ba4ac7b9037689d46fc6abc65ecb44b82f
codeSamplesNamespace: code-samples-typescript
codeSamplesRevisionDigest: sha256:d9c243641c0ccb12940820bd0a678617079c721b3ebdfb4b914b962f4bc8b6a9
codeSamplesRevisionDigest: sha256:f5142a5f3c385893336038ac97adfdab3020d62abec7930524091b2af76d18f0
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ run();
### [topics](docs/sdks/topics/README.md)

* [create](docs/sdks/topics/README.md#create) - Topic creation
* [list](docs/sdks/topics/README.md#list) - Filter topics
* [list](docs/sdks/topics/README.md#list) - Get topic list filtered
* [delete](docs/sdks/topics/README.md#delete) - Delete topic
* [retrieve](docs/sdks/topics/README.md#retrieve) - Get topic
* [rename](docs/sdks/topics/README.md#rename) - Rename a topic
Expand Down Expand Up @@ -366,7 +366,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
- [`subscribersUpdate`](docs/sdks/subscribers/README.md#update) - Update subscriber
- [`topicsCreate`](docs/sdks/topics/README.md#create) - Topic creation
- [`topicsDelete`](docs/sdks/topics/README.md#delete) - Delete topic
- [`topicsList`](docs/sdks/topics/README.md#list) - Filter topics
- [`topicsList`](docs/sdks/topics/README.md#list) - Get topic list filtered
- [`topicsRename`](docs/sdks/topics/README.md#rename) - Rename a topic
- [`topicsRetrieve`](docs/sdks/topics/README.md#retrieve) - Get topic
- [`topicsSubscribersAssign`](docs/sdks/novusubscribers/README.md#assign) - Subscribers addition
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/activitiesresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ let value: ActivitiesResponseDto = {
transactionId: "<id>",
},
],
pageSize: 1965.82,
page: 3687.25,
pageSize: 2532.92,
page: 4663.11,
};
```

Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/activitygraphstatesresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { ActivityGraphStatesResponse } from "@novu/api/models/components";

let value: ActivityGraphStatesResponse = {
id: "<id>",
count: 3179.83,
count: 6048.46,
templates: [
"<value>",
],
channels: [
"sms",
"chat",
],
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```typescript
import { ActivityGraphStatesResponseChannels } from "@novu/api/models/components";

let value: ActivityGraphStatesResponseChannels = "in_app";
let value: ActivityGraphStatesResponseChannels = "push";
```

## Values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { ActivityNotificationExecutionDetailResponseDto } from "@novu/api/models
let value: ActivityNotificationExecutionDetailResponseDto = {
id: "<id>",
jobId: "<id>",
status: "Pending",
status: "Queued",
detail: "<value>",
isRetry: false,
isTest: false,
providerId: 7392.64,
source: "Credentials",
providerId: 971.01,
source: "Webhook",
};
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Status of the execution detail
```typescript
import { ActivityNotificationExecutionDetailResponseDtoStatus } from "@novu/api/models/components";

let value: ActivityNotificationExecutionDetailResponseDtoStatus = "Failed";
let value: ActivityNotificationExecutionDetailResponseDtoStatus = "Warning";
```

## Values
Expand Down
6 changes: 3 additions & 3 deletions docs/models/components/activitynotificationjobresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ let value: ActivityNotificationJobResponseDto = {
detail: "<value>",
isRetry: false,
isTest: false,
providerId: 8379.45,
source: "Credentials",
providerId: 1103.75,
source: "Payload",
},
],
step: {
id: "<id>",
active: false,
filters: {},
},
providerId: 9764.59,
providerId: 1381.83,
status: "<value>",
};
```
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/activitystatsresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { ActivityStatsResponseDto } from "@novu/api/models/components";

let value: ActivityStatsResponseDto = {
weeklySent: 1201.97,
monthlySent: 2961.40,
weeklySent: 9764.59,
monthlySent: 4686.51,
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/actorfeeditemdto.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ActorFeedItemDto } from "@novu/api/models/components";

let value: ActorFeedItemDto = {
data: null,
type: "user",
type: "system_icon",
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/actortypeenum.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The type of the actor, indicating the role in the notification process.
```typescript
import { ActorTypeEnum } from "@novu/api/models/components";

let value: ActorTypeEnum = "system_custom";
let value: ActorTypeEnum = "system_icon";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/backoffunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```typescript
import { BackoffUnit } from "@novu/api/models/components";

let value: BackoffUnit = "months";
let value: BackoffUnit = "seconds";
```

## Values
Expand Down
9 changes: 3 additions & 6 deletions docs/models/components/bulktriggereventdto.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ let value: BulkTriggerEventDto = {
},
},
},
to: [
{
topicKey: "<value>",
type: "Subscriber",
},
],
to: {
subscriberId: "<id>",
},
},
],
};
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/channelcredentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { ChannelCredentials } from "@novu/api/models/components";

let value: ChannelCredentials = {
webhookUrl: "https://second-hand-elevation.biz/",
webhookUrl: "https://moist-bourgeoisie.name/",
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/channelpreference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { ChannelPreference } from "@novu/api/models/components";

let value: ChannelPreference = {
type: "email",
type: "in_app",
enabled: false,
};
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/channelpreferencetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The type of channel that is enabled or not
```typescript
import { ChannelPreferenceType } from "@novu/api/models/components";

let value: ChannelPreferenceType = "push";
let value: ChannelPreferenceType = "sms";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Channels of the notification
```typescript
import { Channels } from "@novu/api/models/components";

let value: Channels = "delay";
let value: Channels = "sms";
```

## Values
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/channelsettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import { ChannelSettings } from "@novu/api/models/components";

let value: ChannelSettings = {
providerId: "discord",
providerId: "zulip",
credentials: {
webhookUrl: "https://vengeful-farmer.net",
webhookUrl: "https://better-poppy.name/",
},
integrationId: "<id>",
};
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/channelsettingsproviderid.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The provider identifier for the credentials
```typescript
import { ChannelSettingsProviderId } from "@novu/api/models/components";

let value: ChannelSettingsProviderId = "rocket-chat";
let value: ChannelSettingsProviderId = "msteams";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/channeltypeenum.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The channel through which the notification is sent.
```typescript
import { ChannelTypeEnum } from "@novu/api/models/components";

let value: ChannelTypeEnum = "email";
let value: ChannelTypeEnum = "in_app";
```

## Values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The channel type for the integration
```typescript
import { CreateIntegrationRequestDtoChannel } from "@novu/api/models/components";

let value: CreateIntegrationRequestDtoChannel = "sms";
let value: CreateIntegrationRequestDtoChannel = "in_app";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/createsubscriberrequestdtodata.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ const value: boolean = false;
### `number`

```typescript
const value: number = 5865.13;
const value: number = 9292.96;
```

2 changes: 1 addition & 1 deletion docs/models/components/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ const value: boolean = false;
### `number`

```typescript
const value: number = 6531.08;
const value: number = 4386.02;
```

2 changes: 1 addition & 1 deletion docs/models/components/delayregularmetadataunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```typescript
import { DelayRegularMetadataUnit } from "@novu/api/models/components";

let value: DelayRegularMetadataUnit = "minutes";
let value: DelayRegularMetadataUnit = "weeks";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/digesttimedmetadataunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```typescript
import { DigestTimedMetadataUnit } from "@novu/api/models/components";

let value: DigestTimedMetadataUnit = "hours";
let value: DigestTimedMetadataUnit = "seconds";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/emailblock.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { EmailBlock } from "@novu/api/models/components";

let value: EmailBlock = {
type: "button",
type: "text",
content: "<value>",
};
```
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/feedresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ let value: FeedResponseDto = {
updatedAt: new Date("2024-12-10T10:10:59.639Z"),
actor: {
data: null,
type: "system_icon",
type: "system_custom",
},
transactionId: "transaction_123456",
templateIdentifier: "template_abcdef",
providerId: "provider_xyz",
content: "This is a test notification content.",
subject: "Test Notification Subject",
channel: "sms",
channel: "in_app",
read: false,
seen: true,
deleted: false,
Expand Down
18 changes: 9 additions & 9 deletions docs/models/components/filtertopicsresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ let value: FilterTopicsResponseDto = {
],
},
],
page: 2239.25,
pageSize: 3453.52,
totalCount: 9280.81,
page: 1,
pageSize: 10,
totalCount: 10,
};
```

## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `data` | [components.TopicDto](../../models/components/topicdto.md)[] | :heavy_check_mark: | N/A |
| `page` | *number* | :heavy_check_mark: | N/A |
| `pageSize` | *number* | :heavy_check_mark: | N/A |
| `totalCount` | *number* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `data` | [components.TopicDto](../../models/components/topicdto.md)[] | :heavy_check_mark: | The list of topics | [] |
| `page` | *number* | :heavy_check_mark: | The current page number | 1 |
| `pageSize` | *number* | :heavy_check_mark: | The number of items per page | 10 |
| `totalCount` | *number* | :heavy_check_mark: | The total number of items | 10 |
2 changes: 1 addition & 1 deletion docs/models/components/integrationresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let value: IntegrationResponseDto = {
name: "<value>",
identifier: "<value>",
providerId: "<id>",
channel: "chat",
channel: "email",
credentials: {},
active: false,
deleted: false,
Expand Down
Loading

0 comments on commit 343f8b6

Please sign in to comment.