@trycourier/courier 7.10.0 → 7.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +13 -1
- package/resources/notifications/checks.d.mts.map +1 -1
- package/resources/notifications/checks.d.ts +13 -1
- package/resources/notifications/checks.d.ts.map +1 -1
- package/resources/notifications/checks.js +6 -0
- package/resources/notifications/checks.js.map +1 -1
- package/resources/notifications/checks.mjs +6 -0
- package/resources/notifications/checks.mjs.map +1 -1
- package/resources/notifications/index.d.mts +1 -1
- package/resources/notifications/index.d.mts.map +1 -1
- package/resources/notifications/index.d.ts +1 -1
- package/resources/notifications/index.d.ts.map +1 -1
- package/resources/notifications/index.js.map +1 -1
- package/resources/notifications/index.mjs.map +1 -1
- package/resources/notifications/notifications.d.mts +48 -80
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +48 -80
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +3 -3
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +3 -3
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/providers/providers.d.mts +7 -4
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts +7 -4
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.js +6 -4
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/providers.mjs +6 -4
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/routing-strategies.d.mts +5 -14
- package/resources/routing-strategies.d.mts.map +1 -1
- package/resources/routing-strategies.d.ts +5 -14
- package/resources/routing-strategies.d.ts.map +1 -1
- package/resources/routing-strategies.js +2 -2
- package/resources/routing-strategies.mjs +2 -2
- package/src/client.ts +2 -6
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/index.ts +1 -3
- package/src/resources/notifications/checks.ts +13 -1
- package/src/resources/notifications/index.ts +1 -2
- package/src/resources/notifications/notifications.ts +55 -95
- package/src/resources/providers/providers.ts +8 -5
- package/src/resources/routing-strategies.ts +4 -15
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -10,7 +10,7 @@ export declare class RoutingStrategies extends APIResource {
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
|
-
* const
|
|
13
|
+
* const routingStrategyGetResponse =
|
|
14
14
|
* await client.routingStrategies.create({
|
|
15
15
|
* name: 'Email via SendGrid',
|
|
16
16
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -22,7 +22,7 @@ export declare class RoutingStrategies extends APIResource {
|
|
|
22
22
|
* });
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
create(body: RoutingStrategyCreateParams, options?: RequestOptions): APIPromise<
|
|
25
|
+
create(body: RoutingStrategyCreateParams, options?: RequestOptions): APIPromise<RoutingStrategyGetResponse>;
|
|
26
26
|
/**
|
|
27
27
|
* Retrieve a routing strategy by ID. Returns the full entity including routing
|
|
28
28
|
* content and metadata.
|
|
@@ -73,7 +73,7 @@ export declare class RoutingStrategies extends APIResource {
|
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
75
|
* ```ts
|
|
76
|
-
* const
|
|
76
|
+
* const routingStrategyGetResponse =
|
|
77
77
|
* await client.routingStrategies.replace('id', {
|
|
78
78
|
* name: 'Email via SendGrid v2',
|
|
79
79
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -84,7 +84,7 @@ export declare class RoutingStrategies extends APIResource {
|
|
|
84
84
|
* });
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
|
-
replace(id: string, body: RoutingStrategyReplaceParams, options?: RequestOptions): APIPromise<
|
|
87
|
+
replace(id: string, body: RoutingStrategyReplaceParams, options?: RequestOptions): APIPromise<RoutingStrategyGetResponse>;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Paginated list of notification templates associated with a routing strategy.
|
|
@@ -178,15 +178,6 @@ export interface RoutingStrategyListResponse {
|
|
|
178
178
|
paging: Shared.Paging;
|
|
179
179
|
results: Array<RoutingStrategySummary>;
|
|
180
180
|
}
|
|
181
|
-
/**
|
|
182
|
-
* Response returned by create and replace operations.
|
|
183
|
-
*/
|
|
184
|
-
export interface RoutingStrategyMutationResponse {
|
|
185
|
-
/**
|
|
186
|
-
* The routing strategy ID (rs\_ prefix).
|
|
187
|
-
*/
|
|
188
|
-
id: string;
|
|
189
|
-
}
|
|
190
181
|
/**
|
|
191
182
|
* Request body for replacing a routing strategy. Full document replacement;
|
|
192
183
|
* missing optional fields are cleared.
|
|
@@ -328,6 +319,6 @@ export interface RoutingStrategyReplaceParams {
|
|
|
328
319
|
tags?: Array<string> | null;
|
|
329
320
|
}
|
|
330
321
|
export declare namespace RoutingStrategies {
|
|
331
|
-
export { type AssociatedNotificationListResponse as AssociatedNotificationListResponse, type RoutingStrategyCreateRequest as RoutingStrategyCreateRequest, type RoutingStrategyGetResponse as RoutingStrategyGetResponse, type RoutingStrategyListResponse as RoutingStrategyListResponse, type
|
|
322
|
+
export { type AssociatedNotificationListResponse as AssociatedNotificationListResponse, type RoutingStrategyCreateRequest as RoutingStrategyCreateRequest, type RoutingStrategyGetResponse as RoutingStrategyGetResponse, type RoutingStrategyListResponse as RoutingStrategyListResponse, type RoutingStrategyReplaceRequest as RoutingStrategyReplaceRequest, type RoutingStrategySummary as RoutingStrategySummary, type RoutingStrategyCreateParams as RoutingStrategyCreateParams, type RoutingStrategyListParams as RoutingStrategyListParams, type RoutingStrategyListNotificationsParams as RoutingStrategyListNotificationsParams, type RoutingStrategyReplaceParams as RoutingStrategyReplaceParams, };
|
|
332
323
|
}
|
|
333
324
|
//# sourceMappingURL=routing-strategies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-strategies.d.ts","sourceRoot":"","sources":["../src/resources/routing-strategies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"routing-strategies.d.ts","sourceRoot":"","sources":["../src/resources/routing-strategies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAItF;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,O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;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC,OAAO,EACL,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -12,7 +12,7 @@ class RoutingStrategies extends resource_1.APIResource {
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
|
-
* const
|
|
15
|
+
* const routingStrategyGetResponse =
|
|
16
16
|
* await client.routingStrategies.create({
|
|
17
17
|
* name: 'Email via SendGrid',
|
|
18
18
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -88,7 +88,7 @@ class RoutingStrategies extends resource_1.APIResource {
|
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
90
|
* ```ts
|
|
91
|
-
* const
|
|
91
|
+
* const routingStrategyGetResponse =
|
|
92
92
|
* await client.routingStrategies.replace('id', {
|
|
93
93
|
* name: 'Email via SendGrid v2',
|
|
94
94
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -9,7 +9,7 @@ export class RoutingStrategies extends APIResource {
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts
|
|
12
|
-
* const
|
|
12
|
+
* const routingStrategyGetResponse =
|
|
13
13
|
* await client.routingStrategies.create({
|
|
14
14
|
* name: 'Email via SendGrid',
|
|
15
15
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -85,7 +85,7 @@ export class RoutingStrategies extends APIResource {
|
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
87
|
* ```ts
|
|
88
|
-
* const
|
|
88
|
+
* const routingStrategyGetResponse =
|
|
89
89
|
* await client.routingStrategies.replace('id', {
|
|
90
90
|
* name: 'Email via SendGrid v2',
|
|
91
91
|
* routing: { method: 'single', channels: ['email'] },
|
package/src/client.ts
CHANGED
|
@@ -96,7 +96,6 @@ import {
|
|
|
96
96
|
RoutingStrategyListNotificationsParams,
|
|
97
97
|
RoutingStrategyListParams,
|
|
98
98
|
RoutingStrategyListResponse,
|
|
99
|
-
RoutingStrategyMutationResponse,
|
|
100
99
|
RoutingStrategyReplaceParams,
|
|
101
100
|
RoutingStrategyReplaceRequest,
|
|
102
101
|
RoutingStrategySummary,
|
|
@@ -147,10 +146,9 @@ import {
|
|
|
147
146
|
NotificationRetrieveContentResponse,
|
|
148
147
|
NotificationRetrieveParams,
|
|
149
148
|
NotificationTemplateCreateRequest,
|
|
150
|
-
NotificationTemplateGetResponse,
|
|
151
|
-
NotificationTemplateMutationResponse,
|
|
152
149
|
NotificationTemplatePayload,
|
|
153
150
|
NotificationTemplatePublishRequest,
|
|
151
|
+
NotificationTemplateResponse,
|
|
154
152
|
NotificationTemplateState,
|
|
155
153
|
NotificationTemplateSummary,
|
|
156
154
|
NotificationTemplateUpdateRequest,
|
|
@@ -1070,10 +1068,9 @@ export declare namespace Courier {
|
|
|
1070
1068
|
type NotificationGetContent as NotificationGetContent,
|
|
1071
1069
|
type NotificationLocalePutRequest as NotificationLocalePutRequest,
|
|
1072
1070
|
type NotificationTemplateCreateRequest as NotificationTemplateCreateRequest,
|
|
1073
|
-
type NotificationTemplateGetResponse as NotificationTemplateGetResponse,
|
|
1074
|
-
type NotificationTemplateMutationResponse as NotificationTemplateMutationResponse,
|
|
1075
1071
|
type NotificationTemplatePayload as NotificationTemplatePayload,
|
|
1076
1072
|
type NotificationTemplatePublishRequest as NotificationTemplatePublishRequest,
|
|
1073
|
+
type NotificationTemplateResponse as NotificationTemplateResponse,
|
|
1077
1074
|
type NotificationTemplateState as NotificationTemplateState,
|
|
1078
1075
|
type NotificationTemplateSummary as NotificationTemplateSummary,
|
|
1079
1076
|
type NotificationTemplateUpdateRequest as NotificationTemplateUpdateRequest,
|
|
@@ -1099,7 +1096,6 @@ export declare namespace Courier {
|
|
|
1099
1096
|
type RoutingStrategyCreateRequest as RoutingStrategyCreateRequest,
|
|
1100
1097
|
type RoutingStrategyGetResponse as RoutingStrategyGetResponse,
|
|
1101
1098
|
type RoutingStrategyListResponse as RoutingStrategyListResponse,
|
|
1102
|
-
type RoutingStrategyMutationResponse as RoutingStrategyMutationResponse,
|
|
1103
1099
|
type RoutingStrategyReplaceRequest as RoutingStrategyReplaceRequest,
|
|
1104
1100
|
type RoutingStrategySummary as RoutingStrategySummary,
|
|
1105
1101
|
type RoutingStrategyCreateParams as RoutingStrategyCreateParams,
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export const readEnv = (env: string): string | undefined => {
|
|
11
11
|
if (typeof (globalThis as any).process !== 'undefined') {
|
|
12
|
-
return (globalThis as any).process.env?.[env]?.trim()
|
|
12
|
+
return (globalThis as any).process.env?.[env]?.trim() || undefined;
|
|
13
13
|
}
|
|
14
14
|
if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
15
|
-
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
15
|
+
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
|
|
16
16
|
}
|
|
17
17
|
return undefined;
|
|
18
18
|
};
|
package/src/resources/index.ts
CHANGED
|
@@ -98,10 +98,9 @@ export {
|
|
|
98
98
|
type NotificationGetContent,
|
|
99
99
|
type NotificationLocalePutRequest,
|
|
100
100
|
type NotificationTemplateCreateRequest,
|
|
101
|
-
type NotificationTemplateGetResponse,
|
|
102
|
-
type NotificationTemplateMutationResponse,
|
|
103
101
|
type NotificationTemplatePayload,
|
|
104
102
|
type NotificationTemplatePublishRequest,
|
|
103
|
+
type NotificationTemplateResponse,
|
|
105
104
|
type NotificationTemplateState,
|
|
106
105
|
type NotificationTemplateSummary,
|
|
107
106
|
type NotificationTemplateUpdateRequest,
|
|
@@ -146,7 +145,6 @@ export {
|
|
|
146
145
|
type RoutingStrategyCreateRequest,
|
|
147
146
|
type RoutingStrategyGetResponse,
|
|
148
147
|
type RoutingStrategyListResponse,
|
|
149
|
-
type RoutingStrategyMutationResponse,
|
|
150
148
|
type RoutingStrategyReplaceRequest,
|
|
151
149
|
type RoutingStrategySummary,
|
|
152
150
|
type RoutingStrategyCreateParams,
|
|
@@ -9,6 +9,8 @@ import { path } from '../../internal/utils/path';
|
|
|
9
9
|
|
|
10
10
|
export class Checks extends APIResource {
|
|
11
11
|
/**
|
|
12
|
+
* Replace the checks for a notification template submission.
|
|
13
|
+
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```ts
|
|
14
16
|
* const check = await client.notifications.checks.update(
|
|
@@ -36,6 +38,8 @@ export class Checks extends APIResource {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/**
|
|
41
|
+
* Retrieve the checks for a notification template submission.
|
|
42
|
+
*
|
|
39
43
|
* @example
|
|
40
44
|
* ```ts
|
|
41
45
|
* const checks = await client.notifications.checks.list(
|
|
@@ -54,6 +58,8 @@ export class Checks extends APIResource {
|
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
/**
|
|
61
|
+
* Cancel a notification template submission.
|
|
62
|
+
*
|
|
57
63
|
* @example
|
|
58
64
|
* ```ts
|
|
59
65
|
* await client.notifications.checks.delete('submissionId', {
|
|
@@ -80,7 +86,7 @@ export interface CheckListResponse {
|
|
|
80
86
|
|
|
81
87
|
export interface CheckUpdateParams {
|
|
82
88
|
/**
|
|
83
|
-
* Path param
|
|
89
|
+
* Path param: Notification template ID.
|
|
84
90
|
*/
|
|
85
91
|
id: string;
|
|
86
92
|
|
|
@@ -91,10 +97,16 @@ export interface CheckUpdateParams {
|
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
export interface CheckListParams {
|
|
100
|
+
/**
|
|
101
|
+
* Notification template ID.
|
|
102
|
+
*/
|
|
94
103
|
id: string;
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
export interface CheckDeleteParams {
|
|
107
|
+
/**
|
|
108
|
+
* Notification template ID.
|
|
109
|
+
*/
|
|
98
110
|
id: string;
|
|
99
111
|
}
|
|
100
112
|
|
|
@@ -20,10 +20,9 @@ export {
|
|
|
20
20
|
type NotificationGetContent,
|
|
21
21
|
type NotificationLocalePutRequest,
|
|
22
22
|
type NotificationTemplateCreateRequest,
|
|
23
|
-
type NotificationTemplateGetResponse,
|
|
24
|
-
type NotificationTemplateMutationResponse,
|
|
25
23
|
type NotificationTemplatePayload,
|
|
26
24
|
type NotificationTemplatePublishRequest,
|
|
25
|
+
type NotificationTemplateResponse,
|
|
27
26
|
type NotificationTemplateState,
|
|
28
27
|
type NotificationTemplateSummary,
|
|
29
28
|
type NotificationTemplateUpdateRequest,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as NotificationsAPI from './notifications';
|
|
5
4
|
import * as Shared from '../shared';
|
|
6
5
|
import * as ChecksAPI from './checks';
|
|
7
6
|
import {
|
|
@@ -26,7 +25,7 @@ export class Notifications extends APIResource {
|
|
|
26
25
|
*
|
|
27
26
|
* @example
|
|
28
27
|
* ```ts
|
|
29
|
-
* const
|
|
28
|
+
* const notificationTemplateResponse =
|
|
30
29
|
* await client.notifications.create({
|
|
31
30
|
* notification: {
|
|
32
31
|
* name: 'Welcome Email',
|
|
@@ -43,10 +42,7 @@ export class Notifications extends APIResource {
|
|
|
43
42
|
* });
|
|
44
43
|
* ```
|
|
45
44
|
*/
|
|
46
|
-
create(
|
|
47
|
-
body: NotificationCreateParams,
|
|
48
|
-
options?: RequestOptions,
|
|
49
|
-
): APIPromise<NotificationTemplateMutationResponse> {
|
|
45
|
+
create(body: NotificationCreateParams, options?: RequestOptions): APIPromise<NotificationTemplateResponse> {
|
|
50
46
|
return this._client.post('/notifications', { body, ...options });
|
|
51
47
|
}
|
|
52
48
|
|
|
@@ -56,7 +52,7 @@ export class Notifications extends APIResource {
|
|
|
56
52
|
*
|
|
57
53
|
* @example
|
|
58
54
|
* ```ts
|
|
59
|
-
* const
|
|
55
|
+
* const notificationTemplateResponse =
|
|
60
56
|
* await client.notifications.retrieve('id');
|
|
61
57
|
* ```
|
|
62
58
|
*/
|
|
@@ -64,7 +60,7 @@ export class Notifications extends APIResource {
|
|
|
64
60
|
id: string,
|
|
65
61
|
query: NotificationRetrieveParams | null | undefined = {},
|
|
66
62
|
options?: RequestOptions,
|
|
67
|
-
): APIPromise<
|
|
63
|
+
): APIPromise<NotificationTemplateResponse> {
|
|
68
64
|
return this._client.get(path`/notifications/${id}`, { query, ...options });
|
|
69
65
|
}
|
|
70
66
|
|
|
@@ -217,7 +213,7 @@ export class Notifications extends APIResource {
|
|
|
217
213
|
*
|
|
218
214
|
* @example
|
|
219
215
|
* ```ts
|
|
220
|
-
* const
|
|
216
|
+
* const notificationTemplateResponse =
|
|
221
217
|
* await client.notifications.replace('id', {
|
|
222
218
|
* notification: {
|
|
223
219
|
* name: 'Updated Name',
|
|
@@ -238,7 +234,7 @@ export class Notifications extends APIResource {
|
|
|
238
234
|
id: string,
|
|
239
235
|
body: NotificationReplaceParams,
|
|
240
236
|
options?: RequestOptions,
|
|
241
|
-
): APIPromise<
|
|
237
|
+
): APIPromise<NotificationTemplateResponse> {
|
|
242
238
|
return this._client.put(path`/notifications/${id}`, { body, ...options });
|
|
243
239
|
}
|
|
244
240
|
|
|
@@ -513,8 +509,8 @@ export namespace NotificationLocalePutRequest {
|
|
|
513
509
|
*/
|
|
514
510
|
export interface NotificationTemplateCreateRequest {
|
|
515
511
|
/**
|
|
516
|
-
*
|
|
517
|
-
*
|
|
512
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
513
|
+
* `notification` key) and returned at the top level in responses.
|
|
518
514
|
*/
|
|
519
515
|
notification: NotificationTemplatePayload;
|
|
520
516
|
|
|
@@ -526,79 +522,8 @@ export interface NotificationTemplateCreateRequest {
|
|
|
526
522
|
}
|
|
527
523
|
|
|
528
524
|
/**
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
*/
|
|
532
|
-
export interface NotificationTemplateGetResponse {
|
|
533
|
-
/**
|
|
534
|
-
* Epoch milliseconds when the template was created.
|
|
535
|
-
*/
|
|
536
|
-
created: number;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* User ID of the creator.
|
|
540
|
-
*/
|
|
541
|
-
creator: string;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Full document shape used in POST and PUT request bodies, and returned inside the
|
|
545
|
-
* GET response envelope.
|
|
546
|
-
*/
|
|
547
|
-
notification: NotificationTemplateGetResponse.Notification;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* The template state. Always uppercase.
|
|
551
|
-
*/
|
|
552
|
-
state: 'DRAFT' | 'PUBLISHED';
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* Epoch milliseconds of last update.
|
|
556
|
-
*/
|
|
557
|
-
updated?: number;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* User ID of the last updater.
|
|
561
|
-
*/
|
|
562
|
-
updater?: string;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
export namespace NotificationTemplateGetResponse {
|
|
566
|
-
/**
|
|
567
|
-
* Full document shape used in POST and PUT request bodies, and returned inside the
|
|
568
|
-
* GET response envelope.
|
|
569
|
-
*/
|
|
570
|
-
export interface Notification extends NotificationsAPI.NotificationTemplatePayload {
|
|
571
|
-
/**
|
|
572
|
-
* The template ID.
|
|
573
|
-
*/
|
|
574
|
-
id: string;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Response returned by POST and PUT operations.
|
|
580
|
-
*/
|
|
581
|
-
export interface NotificationTemplateMutationResponse {
|
|
582
|
-
notification: NotificationTemplateMutationResponse.Notification;
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* The template state after the operation. Always uppercase.
|
|
586
|
-
*/
|
|
587
|
-
state: 'DRAFT' | 'PUBLISHED';
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
export namespace NotificationTemplateMutationResponse {
|
|
591
|
-
export interface Notification {
|
|
592
|
-
/**
|
|
593
|
-
* The ID of the created or updated template.
|
|
594
|
-
*/
|
|
595
|
-
id: string;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* Full document shape used in POST and PUT request bodies, and returned inside the
|
|
601
|
-
* GET response envelope.
|
|
525
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
526
|
+
* `notification` key) and returned at the top level in responses.
|
|
602
527
|
*/
|
|
603
528
|
export interface NotificationTemplatePayload {
|
|
604
529
|
/**
|
|
@@ -666,6 +591,42 @@ export interface NotificationTemplatePublishRequest {
|
|
|
666
591
|
version?: string;
|
|
667
592
|
}
|
|
668
593
|
|
|
594
|
+
/**
|
|
595
|
+
* Response for GET /notifications/{id}, POST /notifications, and PUT
|
|
596
|
+
* /notifications/{id}. Returns all template fields at the top level.
|
|
597
|
+
*/
|
|
598
|
+
export interface NotificationTemplateResponse extends NotificationTemplatePayload {
|
|
599
|
+
/**
|
|
600
|
+
* The template ID.
|
|
601
|
+
*/
|
|
602
|
+
id: string;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Epoch milliseconds when the template was created.
|
|
606
|
+
*/
|
|
607
|
+
created: number;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* User ID of the creator.
|
|
611
|
+
*/
|
|
612
|
+
creator: string;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* The template state. Always uppercase.
|
|
616
|
+
*/
|
|
617
|
+
state: 'DRAFT' | 'PUBLISHED';
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Epoch milliseconds of last update.
|
|
621
|
+
*/
|
|
622
|
+
updated?: number;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* User ID of the last updater.
|
|
626
|
+
*/
|
|
627
|
+
updater?: string;
|
|
628
|
+
}
|
|
629
|
+
|
|
669
630
|
/**
|
|
670
631
|
* Template state. Defaults to `DRAFT`.
|
|
671
632
|
*/
|
|
@@ -710,8 +671,8 @@ export interface NotificationTemplateSummary {
|
|
|
710
671
|
*/
|
|
711
672
|
export interface NotificationTemplateUpdateRequest {
|
|
712
673
|
/**
|
|
713
|
-
*
|
|
714
|
-
*
|
|
674
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
675
|
+
* `notification` key) and returned at the top level in responses.
|
|
715
676
|
*/
|
|
716
677
|
notification: NotificationTemplatePayload;
|
|
717
678
|
|
|
@@ -774,14 +735,14 @@ export namespace NotificationListResponse {
|
|
|
774
735
|
*/
|
|
775
736
|
event_ids: Array<string>;
|
|
776
737
|
|
|
777
|
-
note: string;
|
|
778
|
-
|
|
779
738
|
routing: Shared.MessageRouting;
|
|
780
739
|
|
|
781
740
|
topic_id: string;
|
|
782
741
|
|
|
783
742
|
updated_at: number;
|
|
784
743
|
|
|
744
|
+
note?: string;
|
|
745
|
+
|
|
785
746
|
tags?: Notification.Tags | null;
|
|
786
747
|
|
|
787
748
|
title?: string | null;
|
|
@@ -810,8 +771,8 @@ export type NotificationRetrieveContentResponse = NotificationContentGetResponse
|
|
|
810
771
|
|
|
811
772
|
export interface NotificationCreateParams {
|
|
812
773
|
/**
|
|
813
|
-
*
|
|
814
|
-
*
|
|
774
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
775
|
+
* `notification` key) and returned at the top level in responses.
|
|
815
776
|
*/
|
|
816
777
|
notification: NotificationTemplatePayload;
|
|
817
778
|
|
|
@@ -967,8 +928,8 @@ export namespace NotificationPutLocaleParams {
|
|
|
967
928
|
|
|
968
929
|
export interface NotificationReplaceParams {
|
|
969
930
|
/**
|
|
970
|
-
*
|
|
971
|
-
*
|
|
931
|
+
* Core template fields used in POST and PUT request bodies (nested under a
|
|
932
|
+
* `notification` key) and returned at the top level in responses.
|
|
972
933
|
*/
|
|
973
934
|
notification: NotificationTemplatePayload;
|
|
974
935
|
|
|
@@ -1001,10 +962,9 @@ export declare namespace Notifications {
|
|
|
1001
962
|
type NotificationGetContent as NotificationGetContent,
|
|
1002
963
|
type NotificationLocalePutRequest as NotificationLocalePutRequest,
|
|
1003
964
|
type NotificationTemplateCreateRequest as NotificationTemplateCreateRequest,
|
|
1004
|
-
type NotificationTemplateGetResponse as NotificationTemplateGetResponse,
|
|
1005
|
-
type NotificationTemplateMutationResponse as NotificationTemplateMutationResponse,
|
|
1006
965
|
type NotificationTemplatePayload as NotificationTemplatePayload,
|
|
1007
966
|
type NotificationTemplatePublishRequest as NotificationTemplatePublishRequest,
|
|
967
|
+
type NotificationTemplateResponse as NotificationTemplateResponse,
|
|
1008
968
|
type NotificationTemplateState as NotificationTemplateState,
|
|
1009
969
|
type NotificationTemplateSummary as NotificationTemplateSummary,
|
|
1010
970
|
type NotificationTemplateUpdateRequest as NotificationTemplateUpdateRequest,
|
|
@@ -28,12 +28,14 @@ export class Providers extends APIResource {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* Replace an existing provider configuration. The `provider` key is required and
|
|
32
|
+
* determines which provider-specific settings schema is applied. All other fields
|
|
33
|
+
* are optional — omitted fields are cleared from the stored configuration (this is
|
|
34
|
+
* a full replacement, not a partial merge). Changing the provider type for an
|
|
35
|
+
* existing configuration is not supported.
|
|
34
36
|
*/
|
|
35
37
|
update(id: string, body: ProviderUpdateParams, options?: RequestOptions): APIPromise<Provider> {
|
|
36
|
-
return this._client.
|
|
38
|
+
return this._client.put(path`/providers/${id}`, { body, ...options });
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/**
|
|
@@ -191,7 +193,8 @@ export interface ProviderCreateParams {
|
|
|
191
193
|
|
|
192
194
|
export interface ProviderUpdateParams {
|
|
193
195
|
/**
|
|
194
|
-
* The provider key identifying the type.
|
|
196
|
+
* The provider key identifying the type. Required on every request because it
|
|
197
|
+
* selects the provider-specific settings schema for validation.
|
|
195
198
|
*/
|
|
196
199
|
provider: string;
|
|
197
200
|
|
|
@@ -15,7 +15,7 @@ export class RoutingStrategies extends APIResource {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
|
-
* const
|
|
18
|
+
* const routingStrategyGetResponse =
|
|
19
19
|
* await client.routingStrategies.create({
|
|
20
20
|
* name: 'Email via SendGrid',
|
|
21
21
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -30,7 +30,7 @@ export class RoutingStrategies extends APIResource {
|
|
|
30
30
|
create(
|
|
31
31
|
body: RoutingStrategyCreateParams,
|
|
32
32
|
options?: RequestOptions,
|
|
33
|
-
): APIPromise<
|
|
33
|
+
): APIPromise<RoutingStrategyGetResponse> {
|
|
34
34
|
return this._client.post('/routing-strategies', { body, ...options });
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -106,7 +106,7 @@ export class RoutingStrategies extends APIResource {
|
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
108
|
* ```ts
|
|
109
|
-
* const
|
|
109
|
+
* const routingStrategyGetResponse =
|
|
110
110
|
* await client.routingStrategies.replace('id', {
|
|
111
111
|
* name: 'Email via SendGrid v2',
|
|
112
112
|
* routing: { method: 'single', channels: ['email'] },
|
|
@@ -121,7 +121,7 @@ export class RoutingStrategies extends APIResource {
|
|
|
121
121
|
id: string,
|
|
122
122
|
body: RoutingStrategyReplaceParams,
|
|
123
123
|
options?: RequestOptions,
|
|
124
|
-
): APIPromise<
|
|
124
|
+
): APIPromise<RoutingStrategyGetResponse> {
|
|
125
125
|
return this._client.put(path`/routing-strategies/${id}`, { body, ...options });
|
|
126
126
|
}
|
|
127
127
|
}
|
|
@@ -239,16 +239,6 @@ export interface RoutingStrategyListResponse {
|
|
|
239
239
|
results: Array<RoutingStrategySummary>;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
/**
|
|
243
|
-
* Response returned by create and replace operations.
|
|
244
|
-
*/
|
|
245
|
-
export interface RoutingStrategyMutationResponse {
|
|
246
|
-
/**
|
|
247
|
-
* The routing strategy ID (rs\_ prefix).
|
|
248
|
-
*/
|
|
249
|
-
id: string;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
242
|
/**
|
|
253
243
|
* Request body for replacing a routing strategy. Full document replacement;
|
|
254
244
|
* missing optional fields are cleared.
|
|
@@ -425,7 +415,6 @@ export declare namespace RoutingStrategies {
|
|
|
425
415
|
type RoutingStrategyCreateRequest as RoutingStrategyCreateRequest,
|
|
426
416
|
type RoutingStrategyGetResponse as RoutingStrategyGetResponse,
|
|
427
417
|
type RoutingStrategyListResponse as RoutingStrategyListResponse,
|
|
428
|
-
type RoutingStrategyMutationResponse as RoutingStrategyMutationResponse,
|
|
429
418
|
type RoutingStrategyReplaceRequest as RoutingStrategyReplaceRequest,
|
|
430
419
|
type RoutingStrategySummary as RoutingStrategySummary,
|
|
431
420
|
type RoutingStrategyCreateParams as RoutingStrategyCreateParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.10.
|
|
1
|
+
export const VERSION = '7.10.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.10.
|
|
1
|
+
export declare const VERSION = "7.10.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.10.
|
|
1
|
+
export declare const VERSION = "7.10.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '7.10.
|
|
1
|
+
export const VERSION = '7.10.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|