Skip to content

Commit

Permalink
add documentation ignore to healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Jan 17, 2025
1 parent 66a5935 commit 8cd8ab2
Show file tree
Hide file tree
Showing 119 changed files with 255 additions and 3,681 deletions.
33 changes: 3 additions & 30 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
lockVersion: 2.0.0
id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5
management:
docChecksum: 72ee652703e7c5bf6e49092765924b4d
docChecksum: e13e9f257b632aa7d9006e0ca6bac271
docVersion: "1.0"
speakeasyVersion: 1.469.0
generationVersion: 2.493.21
releaseVersion: 0.0.5
configChecksum: ff92708e8fbd60ee1e9fda95b454414a
releaseVersion: 0.1.0
configChecksum: f2665e7189365830c6eac6afd60624cd
published: true
features:
typescript:
acceptHeaders: 2.81.2
additionalDependencies: 0.1.0
additionalProperties: 0.1.1
constsAndDefaults: 0.1.11
core: 3.18.16
defaultEnabledRetries: 0.1.0
Expand Down Expand Up @@ -119,9 +118,6 @@ generatedFiles:
- docs/models/components/filtertopicsresponsedto.md
- docs/models/components/getsubscriberpreferencesresponsedto.md
- docs/models/components/gettopicresponsedto.md
- docs/models/components/idempotencetestingresponse.md
- docs/models/components/idempotencybehaviorenum.md
- docs/models/components/idempotencytestingdto.md
- docs/models/components/integrationresponsedto.md
- docs/models/components/issues.md
- docs/models/components/markallmessageasrequestdto.md
Expand Down Expand Up @@ -228,17 +224,11 @@ generatedFiles:
- docs/models/components/workflowresponse.md
- docs/models/components/workflowresponsedata.md
- docs/models/components/workflowtostepcontrolvaluesdto.md
- docs/models/errors/details.md
- docs/models/errors/errordto.md
- docs/models/errors/errors.md
- docs/models/errors/errort.md
- docs/models/errors/healthcontrollerhealthcheckresponsebody.md
- docs/models/errors/info.md
- docs/models/errors/validationerrordto.md
- docs/models/errors/value.md
- docs/models/operations/channel.md
- docs/models/operations/details.md
- docs/models/operations/errort.md
- docs/models/operations/eventscontrollerbroadcasteventtoallrequest.md
- docs/models/operations/eventscontrollerbroadcasteventtoallresponse.md
- docs/models/operations/eventscontrollercancelrequest.md
Expand All @@ -247,13 +237,6 @@ generatedFiles:
- docs/models/operations/eventscontrollertriggerbulkresponse.md
- docs/models/operations/eventscontrollertriggerrequest.md
- docs/models/operations/eventscontrollertriggerresponse.md
- docs/models/operations/healthcontrollergeneraterandomnumberrequest.md
- docs/models/operations/healthcontrollergeneraterandomnumberresponse.md
- docs/models/operations/healthcontrollerhealthcheckrequest.md
- docs/models/operations/healthcontrollerhealthcheckresponsebody.md
- docs/models/operations/healthcontrollertestidempotencyrequest.md
- docs/models/operations/healthcontrollertestidempotencyresponse.md
- docs/models/operations/info.md
- docs/models/operations/integrationscontrollercreateintegrationrequest.md
- docs/models/operations/integrationscontrollercreateintegrationresponse.md
- docs/models/operations/integrationscontrollergetactiveintegrationsrequest.md
Expand Down Expand Up @@ -362,8 +345,6 @@ generatedFiles:
- package.json
- src/core.ts
- src/funcs/cancel.ts
- src/funcs/generateRandomNumber.ts
- src/funcs/healthControllerHealthCheck.ts
- src/funcs/integrationsCreate.ts
- src/funcs/integrationsDelete.ts
- src/funcs/integrationsList.ts
Expand Down Expand Up @@ -399,7 +380,6 @@ generatedFiles:
- src/funcs/subscribersPropertiesUpdateOnlineFlag.ts
- src/funcs/subscribersRetrieve.ts
- src/funcs/subscribersUpdate.ts
- src/funcs/testIdempotency.ts
- src/funcs/topicsCreate.ts
- src/funcs/topicsDelete.ts
- src/funcs/topicsList.ts
Expand Down Expand Up @@ -483,9 +463,6 @@ generatedFiles:
- src/models/components/filtertopicsresponsedto.ts
- src/models/components/getsubscriberpreferencesresponsedto.ts
- src/models/components/gettopicresponsedto.ts
- src/models/components/idempotencetestingresponse.ts
- src/models/components/idempotencybehaviorenum.ts
- src/models/components/idempotencytestingdto.ts
- src/models/components/index.ts
- src/models/components/integrationresponsedto.ts
- src/models/components/markallmessageasrequestdto.ts
Expand Down Expand Up @@ -553,7 +530,6 @@ generatedFiles:
- src/models/components/workflowresponse.ts
- src/models/components/workflowtostepcontrolvaluesdto.ts
- src/models/errors/errordto.ts
- src/models/errors/healthcontrollerhealthcheck.ts
- src/models/errors/httpclienterrors.ts
- src/models/errors/index.ts
- src/models/errors/sdkerror.ts
Expand All @@ -563,9 +539,6 @@ generatedFiles:
- src/models/operations/eventscontrollercancel.ts
- src/models/operations/eventscontrollertrigger.ts
- src/models/operations/eventscontrollertriggerbulk.ts
- src/models/operations/healthcontrollergeneraterandomnumber.ts
- src/models/operations/healthcontrollerhealthcheck.ts
- src/models/operations/healthcontrollertestidempotency.ts
- src/models/operations/index.ts
- src/models/operations/integrationscontrollercreateintegration.ts
- src/models/operations/integrationscontrollergetactiveintegrations.ts
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.5
version: 0.1.0
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.469.0
sources:
json-development:
sourceNamespace: json-development
sourceRevisionDigest: sha256:aa51e11f7c7f58ba6c9aae991e0c9094ae43574b3b560d545234933069348dbb
sourceBlobDigest: sha256:d94a02331a5697ba9e62b4762064fc64b2245960b3eba89e2ab7f2cd75abd8dd
sourceRevisionDigest: sha256:f86a7c4644f11cb6d3c8f6f55be75b5176a72b6796ffb020f3f74e4f56ba39d4
sourceBlobDigest: sha256:9f11c13a8f35483564a47ef29be554048b0cc6c518f6bc21ec2ce8995e9b59bb
tags:
- latest
- "1.0"
targets:
my-first-target:
source: json-development
sourceNamespace: json-development
sourceRevisionDigest: sha256:aa51e11f7c7f58ba6c9aae991e0c9094ae43574b3b560d545234933069348dbb
sourceBlobDigest: sha256:d94a02331a5697ba9e62b4762064fc64b2245960b3eba89e2ab7f2cd75abd8dd
sourceRevisionDigest: sha256:f86a7c4644f11cb6d3c8f6f55be75b5176a72b6796ffb020f3f74e4f56ba39d4
sourceBlobDigest: sha256:9f11c13a8f35483564a47ef29be554048b0cc6c518f6bc21ec2ce8995e9b59bb
codeSamplesNamespace: code-samples-typescript
codeSamplesRevisionDigest: sha256:963f699df6bf82e256a5fcdfbafbc6dae6c910aafd770a105788de33f3e02018
codeSamplesRevisionDigest: sha256:d2ee210eda22dfe3f16ea4c82effabf47936ef8afad1ff6403e12b0de808a03a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
125 changes: 105 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,6 @@ run();

### [Novu SDK](docs/sdks/novu/README.md)

* [healthControllerHealthCheck](docs/sdks/novu/README.md#healthcontrollerhealthcheck)
* [testIdempotency](docs/sdks/novu/README.md#testidempotency)
* [generateRandomNumber](docs/sdks/novu/README.md#generaterandomnumber)
* [trigger](docs/sdks/novu/README.md#trigger) - Trigger event
* [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event
* [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all
Expand Down Expand Up @@ -330,8 +327,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
<summary>Available standalone functions</summary>

- [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event
- [`generateRandomNumber`](docs/sdks/novu/README.md#generaterandomnumber)
- [`healthControllerHealthCheck`](docs/sdks/novu/README.md#healthcontrollerhealthcheck)
- [`integrationsCreate`](docs/sdks/integrations/README.md#create) - Create integration
- [`integrationsDelete`](docs/sdks/integrations/README.md#delete) - Delete integration
- [`integrationsList`](docs/sdks/integrations/README.md#list) - Get integrations
Expand Down Expand Up @@ -367,7 +362,6 @@ 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
- [`testIdempotency`](docs/sdks/novu/README.md#testidempotency)
- [`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 Expand Up @@ -419,20 +413,24 @@ run();
<!-- Start Error Handling [errors] -->
## Error Handling

Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `healthControllerHealthCheck` method may throw the following errors:
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `trigger` method may throw the following errors:

| Error Type | Status Code | Content Type |
| ---------------------------------------------- | ----------- | ---------------- |
| errors.HealthControllerHealthCheckResponseBody | 503 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
| Error Type | Status Code | Content Type |
| ------------------------- | -------------------------------------- | ---------------- |
| errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| errors.ErrorDto | 414 | application/json |
| errors.ValidationErrorDto | 422 | application/json |
| errors.ErrorDto | 500 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |

If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.

```typescript
import { Novu } from "@novu/api";
import {
HealthControllerHealthCheckResponseBody,
ErrorDto,
SDKValidationError,
ValidationErrorDto,
} from "@novu/api/models/errors";

const novu = new Novu({
Expand All @@ -442,7 +440,19 @@ const novu = new Novu({
async function run() {
let result;
try {
result = await novu.healthControllerHealthCheck();
result = await novu.trigger({
name: "workflow_identifier",
to: [
{
topicKey: "<value>",
type: "Topic",
},
{
topicKey: "<value>",
type: "Topic",
},
],
});

// Handle the result
console.log(result);
Expand All @@ -456,8 +466,23 @@ async function run() {
console.error(err.rawValue);
return;
}
case (err instanceof HealthControllerHealthCheckResponseBody): {
// Handle err.data$: HealthControllerHealthCheckResponseBodyData
case (err instanceof ErrorDto): {
// Handle err.data$: ErrorDtoData
console.error(err);
return;
}
case (err instanceof ErrorDto): {
// Handle err.data$: ErrorDtoData
console.error(err);
return;
}
case (err instanceof ValidationErrorDto): {
// Handle err.data$: ValidationErrorDtoData
console.error(err);
return;
}
case (err instanceof ErrorDto): {
// Handle err.data$: ErrorDtoData
console.error(err);
return;
}
Expand Down Expand Up @@ -509,7 +534,19 @@ const novu = new Novu({
});

async function run() {
const result = await novu.healthControllerHealthCheck();
const result = await novu.trigger({
name: "workflow_identifier",
to: [
{
topicKey: "<value>",
type: "Topic",
},
{
topicKey: "<value>",
type: "Topic",
},
],
});

// Handle the result
console.log(result);
Expand All @@ -531,7 +568,19 @@ const novu = new Novu({
});

async function run() {
const result = await novu.healthControllerHealthCheck();
const result = await novu.trigger({
name: "workflow_identifier",
to: [
{
topicKey: "<value>",
type: "Topic",
},
{
topicKey: "<value>",
type: "Topic",
},
],
});

// Handle the result
console.log(result);
Expand Down Expand Up @@ -611,7 +660,19 @@ const novu = new Novu({
});

async function run() {
const result = await novu.healthControllerHealthCheck();
const result = await novu.trigger({
name: "workflow_identifier",
to: [
{
topicKey: "<value>",
type: "Topic",
},
{
topicKey: "<value>",
type: "Topic",
},
],
});

// Handle the result
console.log(result);
Expand All @@ -636,7 +697,19 @@ const novu = new Novu({
});

async function run() {
const result = await novu.healthControllerHealthCheck({
const result = await novu.trigger({
name: "workflow_identifier",
to: [
{
topicKey: "<value>",
type: "Topic",
},
{
topicKey: "<value>",
type: "Topic",
},
],
}, {
retries: {
strategy: "backoff",
backoff: {
Expand Down Expand Up @@ -676,7 +749,19 @@ const novu = new Novu({
});

async function run() {
const result = await novu.healthControllerHealthCheck();
const result = await novu.trigger({
name: "workflow_identifier",
to: [
{
topicKey: "<value>",
type: "Topic",
},
{
topicKey: "<value>",
type: "Topic",
},
],
});

// Handle the result
console.log(result);
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 @@ -8,8 +8,8 @@ import { ActivitiesResponseDto } from "@novu/api/models/components";
let value: ActivitiesResponseDto = {
hasMore: false,
data: [],
pageSize: 8289.4,
page: 46.95,
pageSize: 6674.11,
page: 1317.97,
};
```

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: 8919.24,
count: 5743.25,
templates: [
"<value>",
],
channels: [
"push",
"chat",
],
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { ActivityNotificationExecutionDetailResponseDto } from "@novu/api/models

let value: ActivityNotificationExecutionDetailResponseDto = {
id: "<id>",
status: "Pending",
status: "ReadConfirmation",
detail: "<value>",
isRetry: false,
isTest: false,
providerId: "mailgun",
source: "Internal",
providerId: "ring-central",
source: "Payload",
};
```

Expand Down
Loading

0 comments on commit 8cd8ab2

Please sign in to comment.