-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
197 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 638752126a119d018ef8df6f0469c2d5 | ||
docChecksum: 16dd020f6df7a2248312d6e6929c5bd8 | ||
docVersion: "1.0" | ||
speakeasyVersion: 1.456.0 | ||
speakeasyVersion: 1.456.1 | ||
generationVersion: 2.481.0 | ||
releaseVersion: 0.0.1-alpha.126 | ||
configChecksum: 321610cbe190b4daaf2a167aaf872e83 | ||
releaseVersion: 0.0.1-alpha.128 | ||
configChecksum: 81be7c124849006891a1ec2be722fec7 | ||
published: true | ||
features: | ||
typescript: | ||
|
@@ -56,6 +56,7 @@ generatedFiles: | |
- docs/models/components/addsubscribersrequestdto.md | ||
- docs/models/components/assignsubscribertotopicdto.md | ||
- docs/models/components/backoffunit.md | ||
- docs/models/components/bulkcreatesubscriberresponsedto.md | ||
- docs/models/components/bulksubscribercreatedto.md | ||
- docs/models/components/bulktriggereventdto.md | ||
- docs/models/components/channel.md | ||
|
@@ -68,6 +69,7 @@ generatedFiles: | |
- docs/models/components/channelsettingsproviderid.md | ||
- docs/models/components/channeltypeenum.md | ||
- docs/models/components/content.md | ||
- docs/models/components/createdsubscriberdto.md | ||
- docs/models/components/createintegrationrequestdto.md | ||
- docs/models/components/createintegrationrequestdtochannel.md | ||
- docs/models/components/createsubscriberrequestdto.md | ||
|
@@ -96,6 +98,7 @@ generatedFiles: | |
- docs/models/components/emailblockstyles.md | ||
- docs/models/components/emailblocktype.md | ||
- docs/models/components/failedassignmentsdto.md | ||
- docs/models/components/failedoperationdto.md | ||
- docs/models/components/feedid.md | ||
- docs/models/components/feedidentifier.md | ||
- docs/models/components/feedresponsedto.md | ||
|
@@ -182,6 +185,7 @@ generatedFiles: | |
- docs/models/components/type.md | ||
- docs/models/components/unit.md | ||
- docs/models/components/unseencountresponse.md | ||
- docs/models/components/updatedsubscriberdto.md | ||
- docs/models/components/updateintegrationrequestdto.md | ||
- docs/models/components/updatesubscriberchannelrequestdto.md | ||
- docs/models/components/updatesubscriberchannelrequestdtoproviderid.md | ||
|
@@ -385,13 +389,15 @@ generatedFiles: | |
- src/models/components/actortypeenum.ts | ||
- src/models/components/addsubscribersrequestdto.ts | ||
- src/models/components/assignsubscribertotopicdto.ts | ||
- src/models/components/bulkcreatesubscriberresponsedto.ts | ||
- src/models/components/bulksubscribercreatedto.ts | ||
- src/models/components/bulktriggereventdto.ts | ||
- src/models/components/channelcredentials.ts | ||
- src/models/components/channelcredentialsdto.ts | ||
- src/models/components/channelpreference.ts | ||
- src/models/components/channelsettings.ts | ||
- src/models/components/channeltypeenum.ts | ||
- src/models/components/createdsubscriberdto.ts | ||
- src/models/components/createintegrationrequestdto.ts | ||
- src/models/components/createsubscriberrequestdto.ts | ||
- src/models/components/createtopicrequestdto.ts | ||
|
@@ -407,6 +413,7 @@ generatedFiles: | |
- src/models/components/emailblock.ts | ||
- src/models/components/emailblockstyles.ts | ||
- src/models/components/failedassignmentsdto.ts | ||
- src/models/components/failedoperationdto.ts | ||
- src/models/components/feedresponsedto.ts | ||
- src/models/components/filtertopicsresponsedto.ts | ||
- src/models/components/getsubscriberpreferencesresponsedto.ts | ||
|
@@ -453,6 +460,7 @@ generatedFiles: | |
- src/models/components/triggereventtoallrequestdto.ts | ||
- src/models/components/triggerrecipientstypeenum.ts | ||
- src/models/components/unseencountresponse.ts | ||
- src/models/components/updatedsubscriberdto.ts | ||
- src/models/components/updateintegrationrequestdto.ts | ||
- src/models/components/updatesubscriberchannelrequestdto.ts | ||
- src/models/components/updatesubscriberglobalpreferencesrequestdto.ts | ||
|
@@ -876,14 +884,14 @@ examples: | |
SubscribersController_bulkCreateSubscribers: | ||
speakeasy-default-subscribers-controller-bulk-create-subscribers: | ||
requestBody: | ||
application/json: {"subscribers": ["<value>"]} | ||
application/json: {"subscribers": [{"subscriberId": "<id>", "email": "[email protected]"}]} | ||
responses: | ||
"400": | ||
application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} | ||
"404": | ||
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"}} | ||
"200": | ||
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 "}}} | ||
application/json: {"updated": [{"subscriberId": "<id>"}], "created": [{"subscriberId": "<id>"}, {"subscriberId": "<id>"}, {"subscriberId": "<id>"}]} | ||
"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 "}}} | ||
SubscribersController_updateSubscriberChannel: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,16 @@ import { BulkSubscriberCreateDto } from "@novu/api/models/components"; | |
|
||
let value: BulkSubscriberCreateDto = { | ||
subscribers: [ | ||
"<value>", | ||
{ | ||
subscriberId: "<id>", | ||
email: "[email protected]", | ||
}, | ||
], | ||
}; | ||
``` | ||
|
||
## Fields | ||
|
||
| Field | Type | Required | Description | | ||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | ||
| `subscribers` | *string*[] | :heavy_check_mark: | An array of subscribers to be created in bulk. | | ||
| Field | Type | Required | Description | Example | | ||
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | ||
| `subscribers` | [components.CreateSubscriberRequestDto](../../models/components/createsubscriberrequestdto.md)[] | :heavy_check_mark: | An array of subscribers to be created in bulk. | [<br/>{<br/>"email": "[email protected]",<br/>"name": "John Doe"<br/>}<br/>] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -415,7 +415,10 @@ const novu = new Novu({ | |
async function run() { | ||
const result = await novu.subscribers.createBulk({ | ||
subscribers: [ | ||
"<value>", | ||
{ | ||
subscriberId: "<id>", | ||
email: "[email protected]", | ||
}, | ||
], | ||
}); | ||
|
||
|
@@ -443,7 +446,10 @@ const novu = new NovuCore({ | |
async function run() { | ||
const res = await subscribersCreateBulk(novu, { | ||
subscribers: [ | ||
"<value>", | ||
{ | ||
subscriberId: "<id>", | ||
email: "[email protected]", | ||
}, | ||
], | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ actions: | |
"x-codeSamples": | ||
- "lang": "typescript" | ||
"label": "TypeScript" | ||
"source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await novu.subscribers.createBulk({\n subscribers: [\n \"<value>\",\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" | ||
"source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await novu.subscribers.createBulk({\n subscribers: [\n {\n subscriberId: \"<id>\",\n email: \"[email protected]\",\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" | ||
- target: $["paths"]["/v1/subscribers/{subscriberId}"]["delete"] | ||
update: | ||
"x-codeSamples": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5518,8 +5518,38 @@ | |
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"description": "" | ||
"200": { | ||
"description": "OK", | ||
"headers": { | ||
"Content-Type": { | ||
"$ref": "#/components/headers/Content-Type" | ||
}, | ||
"RateLimit-Limit": { | ||
"$ref": "#/components/headers/RateLimit-Limit" | ||
}, | ||
"RateLimit-Remaining": { | ||
"$ref": "#/components/headers/RateLimit-Remaining" | ||
}, | ||
"RateLimit-Reset": { | ||
"$ref": "#/components/headers/RateLimit-Reset" | ||
}, | ||
"RateLimit-Policy": { | ||
"$ref": "#/components/headers/RateLimit-Policy" | ||
}, | ||
"Idempotency-Key": { | ||
"$ref": "#/components/headers/Idempotency-Key" | ||
}, | ||
"Idempotency-Replay": { | ||
"$ref": "#/components/headers/Idempotency-Replay" | ||
} | ||
}, | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/BulkCreateSubscriberResponseDto" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad Request", | ||
|
@@ -14907,14 +14937,88 @@ | |
"subscriberId" | ||
] | ||
}, | ||
"UpdatedSubscriberDto": { | ||
"type": "object", | ||
"properties": { | ||
"subscriberId": { | ||
"type": "string", | ||
"description": "The ID of the subscriber that was updated." | ||
} | ||
}, | ||
"required": [ | ||
"subscriberId" | ||
] | ||
}, | ||
"CreatedSubscriberDto": { | ||
"type": "object", | ||
"properties": { | ||
"subscriberId": { | ||
"type": "string", | ||
"description": "The ID of the subscriber that was created." | ||
} | ||
}, | ||
"required": [ | ||
"subscriberId" | ||
] | ||
}, | ||
"FailedOperationDto": { | ||
"type": "object", | ||
"properties": { | ||
"message": { | ||
"type": "string", | ||
"description": "The error message associated with the failed operation." | ||
}, | ||
"subscriberId": { | ||
"type": "string", | ||
"description": "The subscriber ID associated with the failed operation. This field is optional." | ||
} | ||
} | ||
}, | ||
"BulkCreateSubscriberResponseDto": { | ||
"type": "object", | ||
"properties": { | ||
"updated": { | ||
"description": "An array of subscribers that were successfully updated.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/UpdatedSubscriberDto" | ||
} | ||
}, | ||
"created": { | ||
"description": "An array of subscribers that were successfully created.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/CreatedSubscriberDto" | ||
} | ||
}, | ||
"failed": { | ||
"description": "An array of failed operations with error messages and optional subscriber IDs.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/FailedOperationDto" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"updated", | ||
"created", | ||
"failed" | ||
] | ||
}, | ||
"BulkSubscriberCreateDto": { | ||
"type": "object", | ||
"properties": { | ||
"subscribers": { | ||
"description": "An array of subscribers to be created in bulk.", | ||
"example": [ | ||
{ | ||
"email": "[email protected]", | ||
"name": "John Doe" | ||
} | ||
], | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
"$ref": "#/components/schemas/CreateSubscriberRequestDto" | ||
} | ||
} | ||
}, | ||
|
Oops, something went wrong.