Skip to content

Commit

Permalink
change handle different content types
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Dec 20, 2024
1 parent 910fcbb commit 44423fd
Show file tree
Hide file tree
Showing 82 changed files with 475 additions and 146 deletions.
10 changes: 5 additions & 5 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: 7b3dfe3f8873dc99e60a2f159cc989b8
docChecksum: cb61acfded49d9d7d567537f3d5abae8
docVersion: "1.0"
speakeasyVersion: 1.456.1
generationVersion: 2.481.0
releaseVersion: 0.0.1-alpha.146
configChecksum: c62cc9d17cb743c0a9d12cac4c7fae1b
releaseVersion: 0.0.1-alpha.147
configChecksum: df5450f4a859f7206c408ca9947c0e3d
published: true
features:
typescript:
Expand Down Expand Up @@ -919,7 +919,7 @@ examples:
path:
subscriberId: "<id>"
requestBody:
application/json: {"providerId": "pushpad", "credentials": {"webhookUrl": "https://grown-worth.name"}}
application/json: {"providerId": "pushpad", "credentials": {"webhookUrl": "https://example.com/webhook"}}
responses:
"200":
application/json: {"subscriberId": "<id>", "_organizationId": "<id>", "_environmentId": "<id>", "deleted": true, "createdAt": "<value>", "updatedAt": "<value>"}
Expand All @@ -935,7 +935,7 @@ examples:
path:
subscriberId: "<id>"
requestBody:
application/json: {"providerId": "zulip", "credentials": {"webhookUrl": "https://talkative-pop.org"}}
application/json: {"providerId": "zulip", "credentials": {"webhookUrl": "https://example.com/webhook"}}
responses:
"200":
application/json: {"subscriberId": "<id>", "_organizationId": "<id>", "_environmentId": "<id>", "deleted": false, "createdAt": "<value>", "updatedAt": "<value>"}
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.146
version: 0.0.1-alpha.147
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.456.1
sources:
json-development:
sourceNamespace: json-development
sourceRevisionDigest: sha256:db6c4507f14cd0cacf8fda9f6036598b88789bca6e2f9982230c6fc823b0f2aa
sourceBlobDigest: sha256:ce3b4d52a905810de4bd56c8b1e4088539306fa58a6c48283e0c17f6d8b3f620
sourceRevisionDigest: sha256:5b6a11c154ebc882cc4be4f4bfc3c4bc728b6137a3ee49246c331fc9f0930a2e
sourceBlobDigest: sha256:06375546af8a7a5e6239ac098974ef41279a3b5b71b0c5f306ea8c098acdc840
tags:
- latest
- "1.0"
targets:
my-first-target:
source: json-development
sourceNamespace: json-development
sourceRevisionDigest: sha256:db6c4507f14cd0cacf8fda9f6036598b88789bca6e2f9982230c6fc823b0f2aa
sourceBlobDigest: sha256:ce3b4d52a905810de4bd56c8b1e4088539306fa58a6c48283e0c17f6d8b3f620
sourceRevisionDigest: sha256:5b6a11c154ebc882cc4be4f4bfc3c4bc728b6137a3ee49246c331fc9f0930a2e
sourceBlobDigest: sha256:06375546af8a7a5e6239ac098974ef41279a3b5b71b0c5f306ea8c098acdc840
codeSamplesNamespace: code-samples-typescript
codeSamplesRevisionDigest: sha256:60fa4c6e8b20f012fb64970cd2f5df5b7b60073fae3dac0e16e5a1b61b66c5c6
codeSamplesRevisionDigest: sha256:bfcf8ce99ad00118d86c430e91ed220c215b3e6767366cdab4934c09c1b3f11b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
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: 1381.83,
page: 1965.82,
};
```

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: 4142.63,
count: 3179.83,
templates: [
"<value>",
],
channels: [
"in_app",
"sms",
],
};
```
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: "ReadConfirmation",
detail: "<value>",
isRetry: false,
isTest: false,
providerId: "fcm",
source: "Credentials",
providerId: "generic-sms",
source: "Payload",
};
```

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

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

## Values
Expand Down
8 changes: 4 additions & 4 deletions docs/models/components/activitynotificationjobresponsedto.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ let value: ActivityNotificationJobResponseDto = {
{
id: "<id>",
jobId: "<id>",
status: "Queued",
status: "Failed",
detail: "<value>",
isRetry: false,
isTest: false,
providerId: "sendgrid",
source: "Webhook",
providerId: "push-webhook",
source: "Credentials",
},
],
step: {
Expand All @@ -27,7 +27,7 @@ let value: ActivityNotificationJobResponseDto = {
{},
],
},
providerId: "sendgrid",
providerId: "pusher-beams",
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: 2961.40,
monthlySent: 1187.28,
weeklySent: 1201.97,
monthlySent: 2961.40,
};
```

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_custom",
};
```

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 = "none";
```

## 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 = "hours";
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/channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The channel type for the integration, which defines how the integration communic
```typescript
import { Channel } from "@novu/api/models/components";

let value: Channel = "chat";
let value: Channel = "in_app";
```

## Values
Expand Down
33 changes: 22 additions & 11 deletions docs/models/components/channelcredentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@
import { ChannelCredentials } from "@novu/api/models/components";

let value: ChannelCredentials = {
webhookUrl: "https://forsaken-contractor.name",
webhookUrl: "https://example.com/webhook",
channel: "general",
deviceTokens: [
"token1",
"token2",
"token3",
],
alertUid: "12345-abcde",
title: "Critical Alert",
imageUrl: "https://example.com/image.png",
state: "resolved",
externalUrl: "https://example.com/details",
};
```

## Fields

| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `webhookUrl` | *string* | :heavy_check_mark: | Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider. |
| `channel` | *string* | :heavy_minus_sign: | Channel specification for Mattermost chat notifications |
| `deviceTokens` | *string*[] | :heavy_minus_sign: | Contains an array of the subscriber device tokens for a given provider. Used on Push integrations |
| `alertUid` | *string* | :heavy_minus_sign: | alert_uid for grafana on-call webhook payload |
| `title` | *string* | :heavy_minus_sign: | title to be used with grafana on call webhook |
| `imageUrl` | *string* | :heavy_minus_sign: | image_url property fo grafana on call webhook |
| `state` | *string* | :heavy_minus_sign: | state property fo grafana on call webhook |
| `externalUrl` | *string* | :heavy_minus_sign: | link_to_upstream_details property fo grafana on call webhook |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `webhookUrl` | *string* | :heavy_minus_sign: | Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider. | https://example.com/webhook |
| `channel` | *string* | :heavy_minus_sign: | Channel specification for Mattermost chat notifications. | general |
| `deviceTokens` | *string*[] | :heavy_minus_sign: | Contains an array of the subscriber device tokens for a given provider. Used on Push integrations. | [<br/>"token1",<br/>"token2",<br/>"token3"<br/>] |
| `alertUid` | *string* | :heavy_minus_sign: | Alert UID for Grafana on-call webhook payload. | 12345-abcde |
| `title` | *string* | :heavy_minus_sign: | Title to be used with Grafana on-call webhook. | Critical Alert |
| `imageUrl` | *string* | :heavy_minus_sign: | Image URL property for Grafana on-call webhook. | https://example.com/image.png |
| `state` | *string* | :heavy_minus_sign: | State property for Grafana on-call webhook. | resolved |
| `externalUrl` | *string* | :heavy_minus_sign: | Link to upstream details property for Grafana on-call webhook. | https://example.com/details |
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: "sms",
type: "in_app",
enabled: false,
};
```
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 @@ -5,7 +5,7 @@
```typescript
import { Channels } from "@novu/api/models/components";

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

## Values
Expand Down
13 changes: 12 additions & 1 deletion docs/models/components/channelsettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ import { ChannelSettings } from "@novu/api/models/components";
let value: ChannelSettings = {
providerId: "whatsapp-business",
credentials: {
webhookUrl: "https://glass-pigpen.com",
webhookUrl: "https://example.com/webhook",
channel: "general",
deviceTokens: [
"token1",
"token2",
"token3",
],
alertUid: "12345-abcde",
title: "Critical Alert",
imageUrl: "https://example.com/image.png",
state: "resolved",
externalUrl: "https://example.com/details",
},
integrationId: "<id>",
};
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 @@ Channel type through which the message is sent
```typescript
import { ChannelTypeEnum } from "@novu/api/models/components";

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

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

let value: CreateIntegrationRequestDto = {
providerId: "<id>",
channel: "sms",
channel: "email",
};
```

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 = "email";
let value: CreateIntegrationRequestDtoChannel = "sms";
```

## 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 = 201.08;
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 = 2532.92;
```

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

let value: DigestRegularMetadata = {
type: "backoff",
type: "regular",
};
```

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

let value: DigestRegularMetadataType = "regular";
let value: DigestRegularMetadataType = "backoff";
```

## 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 = "minutes";
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: "text",
type: "button",
content: "<value>",
};
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/emailblockstyles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { EmailBlockStyles } from "@novu/api/models/components";

let value: EmailBlockStyles = {
textAlign: "left",
textAlign: "right",
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/emailblocktypeenum.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Type of the email block
```typescript
import { EmailBlockTypeEnum } from "@novu/api/models/components";

let value: EmailBlockTypeEnum = "button";
let value: EmailBlockTypeEnum = "text";
```

## Values
Expand Down
Loading

0 comments on commit 44423fd

Please sign in to comment.