Skip to content

Commit

Permalink
add idempotency test endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Dec 23, 2024
1 parent aec6be8 commit 9e37005
Show file tree
Hide file tree
Showing 51 changed files with 2,345 additions and 59 deletions.
97 changes: 94 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: c44753254591cbe61d3691d61752b559
docChecksum: 35963394102651185183cb39783f9f06
docVersion: "1.0"
speakeasyVersion: 1.459.3
generationVersion: 2.483.6
releaseVersion: 0.0.1-alpha.155
configChecksum: 140d1b867263378e7d099b09740ea09a
releaseVersion: 0.0.1-alpha.160
configChecksum: d2739e1ef96f6a9278437faa96b090d2
published: true
features:
typescript:
Expand Down Expand Up @@ -109,6 +109,7 @@ generatedFiles:
- docs/models/components/filtertopicsresponsedto.md
- docs/models/components/getsubscriberpreferencesresponsedto.md
- docs/models/components/gettopicresponsedto.md
- docs/models/components/idempotencybodydto.md
- docs/models/components/integrationresponsedto.md
- docs/models/components/markallmessageasrequestdto.md
- docs/models/components/markallmessageasrequestdtomarkas.md
Expand Down Expand Up @@ -298,6 +299,10 @@ generatedFiles:
- docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md
- docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md
- docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md
- docs/models/operations/testingcontrolleridempotencygetrequest.md
- docs/models/operations/testingcontrolleridempotencygetresponse.md
- docs/models/operations/testingcontrolleridempotencyrequest.md
- docs/models/operations/testingcontrolleridempotencyresponse.md
- docs/models/operations/topicscontrollerassignrequest.md
- docs/models/operations/topicscontrollerassignresponse.md
- docs/models/operations/topicscontrollercreatetopicrequest.md
Expand All @@ -314,6 +319,7 @@ generatedFiles:
- docs/models/operations/topicscontrollerremovesubscribersresponse.md
- docs/models/operations/topicscontrollerrenametopicrequest.md
- docs/models/operations/topicscontrollerrenametopicresponse.md
- docs/sdks/admin/README.md
- docs/sdks/authentication/README.md
- docs/sdks/credentials/README.md
- docs/sdks/integrations/README.md
Expand All @@ -332,6 +338,8 @@ generatedFiles:
- jsr.json
- package.json
- src/core.ts
- src/funcs/adminTestingControllerIdempotency.ts
- src/funcs/adminTestingControllerIdempotencyGet.ts
- src/funcs/cancel.ts
- src/funcs/integrationsCreate.ts
- src/funcs/integrationsDelete.ts
Expand Down Expand Up @@ -368,6 +376,9 @@ generatedFiles:
- src/funcs/subscribersPropertiesUpdateOnlineFlag.ts
- src/funcs/subscribersRetrieve.ts
- src/funcs/subscribersUpdate.ts
- src/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts
- src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts
- src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts
- src/funcs/topicsCreate.ts
- src/funcs/topicsDelete.ts
- src/funcs/topicsList.ts
Expand Down Expand Up @@ -446,6 +457,7 @@ generatedFiles:
- src/models/components/filtertopicsresponsedto.ts
- src/models/components/getsubscriberpreferencesresponsedto.ts
- src/models/components/gettopicresponsedto.ts
- src/models/components/idempotencybodydto.ts
- src/models/components/index.ts
- src/models/components/integrationresponsedto.ts
- src/models/components/markallmessageasrequestdto.ts
Expand Down Expand Up @@ -554,6 +566,8 @@ generatedFiles:
- src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts
- src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts
- src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts
- src/models/operations/testingcontrolleridempotency.ts
- src/models/operations/testingcontrolleridempotencyget.ts
- src/models/operations/topicscontrollerassign.ts
- src/models/operations/topicscontrollercreatetopic.ts
- src/models/operations/topicscontrollerdeletetopic.ts
Expand All @@ -562,6 +576,7 @@ generatedFiles:
- src/models/operations/topicscontrollerlisttopics.ts
- src/models/operations/topicscontrollerremovesubscribers.ts
- src/models/operations/topicscontrollerrenametopic.ts
- src/sdk/admin.ts
- src/sdk/authentication.ts
- src/sdk/credentials.ts
- src/sdk/index.ts
Expand Down Expand Up @@ -1397,4 +1412,80 @@ 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 "}}}
TestApiRateLimitController_noCategoryNoCost:
speakeasy-default-test-api-rate-limit-controller-no-category-no-cost:
responses:
"200":
application/json: true
TestApiRateLimitController_noCategorySingleCost:
speakeasy-default-test-api-rate-limit-controller-no-category-single-cost:
responses:
"200":
application/json: false
TestApiRateLimitController_globalCategoryNoCost:
speakeasy-default-test-api-rate-limit-controller-global-category-no-cost:
responses:
"200":
application/json: false
TestApiRateLimitController_globalCategorySingleCost:
speakeasy-default-test-api-rate-limit-controller-global-category-single-cost:
responses:
"200":
application/json: false
TestApiRateLimitController_global:
speakeasy-default-test-api-rate-limit-controller-global:
responses:
"200":
application/json: true
TestApiRateLimitController_triggerCategoryNoCost:
speakeasy-default-test-api-rate-limit-controller-trigger-category-no-cost:
responses:
"200":
application/json: false
TestApiRateLimitController_triggerCategorySingleCost:
speakeasy-default-test-api-rate-limit-controller-trigger-category-single-cost:
responses:
"200":
application/json: true
TestApiRateLimitController_triggerCategoryBulkCost:
speakeasy-default-test-api-rate-limit-controller-trigger-category-bulk-cost:
responses:
"200":
application/json: false
TestApiRateLimitBulkController_noCategoryNoCostOverride:
speakeasy-default-test-api-rate-limit-bulk-controller-no-category-no-cost-override:
responses:
"200":
application/json: false
TestApiRateLimitBulkController_noCategorySingleCostOverride:
speakeasy-default-test-api-rate-limit-bulk-controller-no-category-single-cost-override:
responses:
"200":
application/json: false
TestApiRateLimitBulkController_globalCategoryNoCostOverride:
speakeasy-default-test-api-rate-limit-bulk-controller-global-category-no-cost-override:
responses:
"200":
application/json: false
TestApiAuthController_userRoute:
speakeasy-default-test-api-auth-controller-user-route:
responses:
"200":
application/json: true
TestingController_idempotency:
speakeasy-default-testing-controller-idempotency:
requestBody:
application/json: {"data": "6704.42"}
responses:
"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", "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 "}}}
TestingController_idempotencyGet:
speakeasy-default-testing-controller-idempotency-get:
responses:
"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", "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 "}}}
generatedTests: {}
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.155
version: 0.0.1-alpha.160
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.459.3
sources:
json-development:
sourceNamespace: json-development
sourceRevisionDigest: sha256:3077a7b042d328f79c032e705661a8086a4717ff52c29c44989c1f6229a59d99
sourceBlobDigest: sha256:420d537f7267b371462089202aa34d4fe8a803b3cff0bc7a51f703db0fea0526
sourceRevisionDigest: sha256:da5fb7431143430e1ce74172372176d5152b2023d4b2e769a1fb49dae3735a40
sourceBlobDigest: sha256:cba57b7a4d413d0bd74580b3ae0e412cfbbbc8c47e83cb9b31963a96e1f82d38
tags:
- latest
- "1.0"
targets:
my-first-target:
source: json-development
sourceNamespace: json-development
sourceRevisionDigest: sha256:3077a7b042d328f79c032e705661a8086a4717ff52c29c44989c1f6229a59d99
sourceBlobDigest: sha256:420d537f7267b371462089202aa34d4fe8a803b3cff0bc7a51f703db0fea0526
sourceRevisionDigest: sha256:da5fb7431143430e1ce74172372176d5152b2023d4b2e769a1fb49dae3735a40
sourceBlobDigest: sha256:cba57b7a4d413d0bd74580b3ae0e412cfbbbc8c47e83cb9b31963a96e1f82d38
codeSamplesNamespace: code-samples-typescript
codeSamplesRevisionDigest: sha256:71a6211046af6c9ea3c863458534b7713960a2feef71d3c080f19242cfdd4c8a
codeSamplesRevisionDigest: sha256:a699e4eaa7d5ef58294f053c1fdceaefbd17b33f89d841f234a245cd9e857b65
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ run();
<details open>
<summary>Available methods</summary>

### [admin](docs/sdks/admin/README.md)

* [testingControllerIdempotency](docs/sdks/admin/README.md#testingcontrolleridempotency)
* [testingControllerIdempotencyGet](docs/sdks/admin/README.md#testingcontrolleridempotencyget)

### [integrations](docs/sdks/integrations/README.md)

* [list](docs/sdks/integrations/README.md#list) - Get integrations
Expand Down Expand Up @@ -253,6 +258,9 @@ run();
* [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event
* [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all
* [cancel](docs/sdks/novu/README.md#cancel) - Cancel triggered event
* [testApiRateLimitBulkControllerNoCategoryNoCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorynocostoverride)
* [testApiRateLimitBulkControllerNoCategorySingleCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorysinglecostoverride)
* [testApiRateLimitBulkControllerGlobalCategoryNoCostOverride](docs/sdks/novu/README.md#testapiratelimitbulkcontrollerglobalcategorynocostoverride)

### [subscribers](docs/sdks/subscribers/README.md)

Expand Down Expand Up @@ -328,6 +336,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).

<summary>Available standalone functions</summary>

- [`adminTestingControllerIdempotency`](docs/sdks/admin/README.md#testingcontrolleridempotency)
- [`adminTestingControllerIdempotencyGet`](docs/sdks/admin/README.md#testingcontrolleridempotencyget)
- [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event
- [`integrationsCreate`](docs/sdks/integrations/README.md#create) - Create integration
- [`integrationsDelete`](docs/sdks/integrations/README.md#delete) - Delete integration
Expand Down Expand Up @@ -364,6 +374,9 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
- [`subscribersPropertiesUpdateOnlineFlag`](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status
- [`subscribersRetrieve`](docs/sdks/subscribers/README.md#retrieve) - Get subscriber
- [`subscribersUpdate`](docs/sdks/subscribers/README.md#update) - Update subscriber
- [`testApiRateLimitBulkControllerGlobalCategoryNoCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollerglobalcategorynocostoverride)
- [`testApiRateLimitBulkControllerNoCategoryNoCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorynocostoverride)
- [`testApiRateLimitBulkControllerNoCategorySingleCostOverride`](docs/sdks/novu/README.md#testapiratelimitbulkcontrollernocategorysinglecostoverride)
- [`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) - Get topic list filtered
Expand Down
5 changes: 1 addition & 4 deletions docs/models/components/bulktriggereventdto.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ let value: BulkTriggerEventDto = {
},
},
},
to: {
topicKey: "<value>",
type: "Subscriber",
},
to: "SUBSCRIBER_ID",
},
],
};
Expand Down
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 = 5666.01;
const value: number = 2653.89;
```

17 changes: 17 additions & 0 deletions docs/models/components/idempotencybodydto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# IdempotencyBodyDto

## Example Usage

```typescript
import { IdempotencyBodyDto } from "@novu/api/models/components";

let value: IdempotencyBodyDto = {
data: 5654.21,
};
```

## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `data` | *number* | :heavy_check_mark: | N/A |
6 changes: 3 additions & 3 deletions docs/models/components/messageresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ let value: MessageResponseDto = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1730790945133",
updatedAt: "1734877361883",
createdAt: "1730798212513",
updatedAt: "1734884629263",
},
createdAt: "1722826008461",
createdAt: "1722833275840",
content: {
type: "text",
content: "<value>",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/providerid.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The ID of the chat or push provider.
```typescript
import { ProviderId } from "@novu/api/models/components";

let value: ProviderId = "ryver";
let value: ProviderId = "rocket-chat";
```

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

let value: Status = "error";
let value: Status = "no_workflow_active_steps_defined";
```

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

let value: SubscriberChannelDto = {
providerId: "rocket-chat",
providerId: "discord",
credentials: {},
};
```
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/subscriberresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ let value: SubscriberResponseDto = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1724232954523",
updatedAt: "1734888384920",
createdAt: "1724240221940",
updatedAt: "1734895652337",
};
```

Expand Down
5 changes: 3 additions & 2 deletions docs/models/components/to.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ The recipients list of people who will receive the notification.
```typescript
const value: components.One[] = [
{
subscriberId: "<id>",
topicKey: "<value>",
type: "Subscriber",
},
];
```
Expand All @@ -34,7 +35,7 @@ const value: components.SubscriberPayloadDto = {
```typescript
const value: components.TopicPayloadDto = {
topicKey: "<value>",
type: "Subscriber",
type: "Topic",
};
```

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

let value: TopicPayloadDto = {
topicKey: "<value>",
type: "Subscriber",
type: "Topic",
};
```

Expand Down
6 changes: 3 additions & 3 deletions docs/models/components/triggereventrequestdto.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ let value: TriggerEventRequestDto = {
},
},
},
to: [
"SUBSCRIBER_ID",
],
to: {
subscriberId: "<id>",
},
};
```

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

let value: TriggerEventResponseDto = {
acknowledged: false,
status: "no_workflow_active_steps_defined",
status: "error",
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/errors/value.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const value: string = "<value>";
### `number`

```typescript
const value: number = 5654.21;
const value: number = 1832.80;
```

### `boolean`
Expand Down
Loading

0 comments on commit 9e37005

Please sign in to comment.