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 9e37005 commit 72ee1fc
Show file tree
Hide file tree
Showing 67 changed files with 708 additions and 370 deletions.
12 changes: 9 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: 35963394102651185183cb39783f9f06
docChecksum: 4b36fe460ecfa5e6aa11068eeab90760
docVersion: "1.0"
speakeasyVersion: 1.459.3
generationVersion: 2.483.6
releaseVersion: 0.0.1-alpha.160
configChecksum: d2739e1ef96f6a9278437faa96b090d2
releaseVersion: 0.0.1-alpha.161
configChecksum: 5ce72a67bc70abe7b1e8fc15a1d15d1b
published: true
features:
typescript:
Expand Down Expand Up @@ -110,6 +110,7 @@ generatedFiles:
- docs/models/components/getsubscriberpreferencesresponsedto.md
- docs/models/components/gettopicresponsedto.md
- docs/models/components/idempotencybodydto.md
- docs/models/components/idempotencyresponse.md
- docs/models/components/integrationresponsedto.md
- docs/models/components/markallmessageasrequestdto.md
- docs/models/components/markallmessageasrequestdtomarkas.md
Expand Down Expand Up @@ -458,6 +459,7 @@ generatedFiles:
- src/models/components/getsubscriberpreferencesresponsedto.ts
- src/models/components/gettopicresponsedto.ts
- src/models/components/idempotencybodydto.ts
- src/models/components/idempotencyresponse.ts
- src/models/components/index.ts
- src/models/components/integrationresponsedto.ts
- src/models/components/markallmessageasrequestdto.ts
Expand Down Expand Up @@ -1481,11 +1483,15 @@ examples:
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 "}}}
"200":
application/json: {}
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 "}}}
"200":
application/json: {}
generatedTests: {}
4 changes: 2 additions & 2 deletions .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.160
version: 0.0.1-alpha.161
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand All @@ -35,7 +35,7 @@ typescript:
shared: models/components
webhooks: models/webhooks
inputModelSuffix: input
maxMethodParams: 2
maxMethodParams: 3
methodArguments: require-security-and-request
moduleFormat: commonjs
outputModelSuffix: output
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:da5fb7431143430e1ce74172372176d5152b2023d4b2e769a1fb49dae3735a40
sourceBlobDigest: sha256:cba57b7a4d413d0bd74580b3ae0e412cfbbbc8c47e83cb9b31963a96e1f82d38
sourceRevisionDigest: sha256:e5df5761b3b40d19ae327d67b66b8a8c6fa38045b742c8d1ee4bfa3b8a168aed
sourceBlobDigest: sha256:5b6f1bcaf66498e48f4e40f3e1ca9b58fba561c1fe2aef9b937d7d0f0acabde2
tags:
- latest
- "1.0"
targets:
my-first-target:
source: json-development
sourceNamespace: json-development
sourceRevisionDigest: sha256:da5fb7431143430e1ce74172372176d5152b2023d4b2e769a1fb49dae3735a40
sourceBlobDigest: sha256:cba57b7a4d413d0bd74580b3ae0e412cfbbbc8c47e83cb9b31963a96e1f82d38
sourceRevisionDigest: sha256:e5df5761b3b40d19ae327d67b66b8a8c6fa38045b742c8d1ee4bfa3b8a168aed
sourceBlobDigest: sha256:5b6f1bcaf66498e48f4e40f3e1ca9b58fba561c1fe2aef9b937d7d0f0acabde2
codeSamplesNamespace: code-samples-typescript
codeSamplesRevisionDigest: sha256:a699e4eaa7d5ef58294f053c1fdceaefbd17b33f89d841f234a245cd9e857b65
codeSamplesRevisionDigest: sha256:7151412014bca86b58f1c758cf6cb6a7f1b5cb910c8e17b7f5b8014853c75778
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ const novu = new Novu({
});

async function run() {
const result = await novu.subscribers.list({});
const result = await novu.subscribers.list();

for await (const page of result) {
// Handle the page
Expand Down
14 changes: 14 additions & 0 deletions docs/models/components/idempotencyresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# IdempotencyResponse

## Example Usage

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

let value: IdempotencyResponse = {};
```

## Fields

| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |
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: "1730798212513",
updatedAt: "1734884629263",
createdAt: "1730804354894",
updatedAt: "1734890771644",
},
createdAt: "1722833275840",
createdAt: "1722839418222",
content: {
type: "text",
content: "<value>",
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: "1724240221940",
updatedAt: "1734895652337",
createdAt: "1724246364310",
updatedAt: "1734901794707",
};
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let value: SubscribersControllerCreateSubscriberResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1716497768074",
updatedAt: "1734893446889",
createdAt: "1716503910382",
updatedAt: "1734899589197",
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let value: SubscribersControllerGetSubscriberResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1717806145975",
updatedAt: "1734919701679",
createdAt: "1717812288283",
updatedAt: "1734925843988",
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ let value: SubscribersControllerListSubscribersResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1707941778671",
updatedAt: "1734952207993",
createdAt: "1707947920980",
updatedAt: "1734958350302",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ let value: SubscribersControllerListSubscribersResponseBody = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1728623253221",
updatedAt: "1734910460894",
createdAt: "1728629395529",
updatedAt: "1734916603202",
},
],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ let value: SubscribersControllerMarkActionAsSeenResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1706483175435",
updatedAt: "1734942987301",
createdAt: "1706489317798",
updatedAt: "1734949129664",
},
createdAt: "1706451548994",
createdAt: "1706457691357",
content: "<value>",
transactionId: "<id>",
channel: "sms",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ let value: SubscribersControllerMarkMessagesAsResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1724017413183",
updatedAt: "1734892473825",
createdAt: "1724023555517",
updatedAt: "1734898616159",
},
createdAt: "1718126565750",
createdAt: "1718132708085",
content: {
type: "button",
content: "<value>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let value: SubscribersControllerModifySubscriberChannelResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1705320259996",
updatedAt: "1734928197561",
createdAt: "1705326402328",
updatedAt: "1734934339893",
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberChannelResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1724922873847",
updatedAt: "1734901650699",
createdAt: "1724929016175",
updatedAt: "1734907793027",
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1710055613853",
updatedAt: "1734881728721",
createdAt: "1710061756162",
updatedAt: "1734887871030",
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberResponse = {
organizationId: "<id>",
environmentId: "<id>",
deleted: false,
createdAt: "1722898741979",
updatedAt: "1734923474019",
createdAt: "1722904884287",
updatedAt: "1734929616327",
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ let value: TestingControllerIdempotencyGetResponse = {
"<value>",
],
},
result: {},
};
```

## Fields

| Field | Type | Required | Description |
| -------------------------- | -------------------------- | -------------------------- | -------------------------- |
| `headers` | Record<string, *string*[]> | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `headers` | Record<string, *string*[]> | :heavy_check_mark: | N/A |
| `result` | [components.IdempotencyResponse](../../models/components/idempotencyresponse.md) | :heavy_check_mark: | N/A |
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ let value: TestingControllerIdempotencyResponse = {
"<value>",
],
},
result: {},
};
```

## Fields

| Field | Type | Required | Description |
| -------------------------- | -------------------------- | -------------------------- | -------------------------- |
| `headers` | Record<string, *string*[]> | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `headers` | Record<string, *string*[]> | :heavy_check_mark: | N/A |
| `result` | [components.IdempotencyResponse](../../models/components/idempotencyresponse.md) | :heavy_check_mark: | N/A |
Loading

0 comments on commit 72ee1fc

Please sign in to comment.