samva 0.20.0 → 0.21.0
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/dist/client/sdk.gen.d.ts +17 -3
- package/dist/client/sdk.gen.js +30 -2
- package/dist/client/types.gen.d.ts +97 -11
- package/dist/effect/api-keys.d.ts +7 -0
- package/dist/effect/campaigns.d.ts +31 -0
- package/dist/effect/generated/api-keys.d.ts +15 -0
- package/dist/effect/generated/api-keys.js +2 -0
- package/dist/effect/generated/campaigns.d.ts +63 -0
- package/dist/effect/generated/campaigns.js +4 -0
- package/dist/effect/generated/journeys.d.ts +18 -0
- package/dist/effect/generated/journeys.js +4 -0
- package/dist/effect/generated/shared.d.ts +4 -0
- package/dist/effect/generated/shared.js +3 -1
- package/dist/effect/generated/templates.d.ts +36 -0
- package/dist/effect/generated/templates.js +12 -6
- package/dist/effect/generated/webhooks.d.ts +120 -0
- package/dist/effect/generated/webhooks.js +27 -3
- package/dist/effect/generated-metadata.d.ts +5 -0
- package/dist/effect/generated-metadata.js +1 -0
- package/dist/effect/journeys.d.ts +8 -0
- package/dist/effect/templates.d.ts +16 -0
- package/dist/effect/webhooks.d.ts +7 -0
- package/dist/effect/webhooks.js +3 -1
- package/dist/package.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +5 -0
- package/dist/service-map.js +4 -0
- package/package.json +5 -3
|
@@ -21,10 +21,12 @@ export declare const VersionCursor: Schema.String;
|
|
|
21
21
|
export type BrandFooterBlock = {
|
|
22
22
|
readonly html: string;
|
|
23
23
|
readonly text: string;
|
|
24
|
+
readonly headCss?: string | null;
|
|
24
25
|
};
|
|
25
26
|
export declare const BrandFooterBlock: Schema.Struct<{
|
|
26
27
|
readonly html: Schema.String;
|
|
27
28
|
readonly text: Schema.String;
|
|
29
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
28
30
|
}>;
|
|
29
31
|
export type TemplatePublicationRender = {
|
|
30
32
|
readonly subject: string;
|
|
@@ -91,6 +93,7 @@ export type TemplateSummary = {
|
|
|
91
93
|
readonly channel: "email";
|
|
92
94
|
readonly projectId: TemplateProjectId;
|
|
93
95
|
readonly namespaceId: NamespaceId | null;
|
|
96
|
+
readonly shared: boolean;
|
|
94
97
|
readonly entryPath: string;
|
|
95
98
|
readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
|
|
96
99
|
readonly isActive: boolean;
|
|
@@ -109,6 +112,7 @@ export declare const TemplateSummary: Schema.Struct<{
|
|
|
109
112
|
readonly channel: Schema.Literal<"email">;
|
|
110
113
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
111
114
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
115
|
+
readonly shared: Schema.Boolean;
|
|
112
116
|
readonly entryPath: Schema.String;
|
|
113
117
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
114
118
|
readonly isActive: Schema.Boolean;
|
|
@@ -134,6 +138,7 @@ export type Template = {
|
|
|
134
138
|
readonly channel: "email";
|
|
135
139
|
readonly projectId: TemplateProjectId;
|
|
136
140
|
readonly namespaceId: NamespaceId | null;
|
|
141
|
+
readonly shared: boolean;
|
|
137
142
|
readonly entryPath: string;
|
|
138
143
|
readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
|
|
139
144
|
readonly isActive: boolean;
|
|
@@ -172,6 +177,7 @@ export declare const Template: Schema.Struct<{
|
|
|
172
177
|
readonly channel: Schema.Literal<"email">;
|
|
173
178
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
174
179
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
180
|
+
readonly shared: Schema.Boolean;
|
|
175
181
|
readonly entryPath: Schema.String;
|
|
176
182
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
177
183
|
readonly isActive: Schema.Boolean;
|
|
@@ -214,10 +220,12 @@ export declare const BrandRenderedFooter: Schema.Struct<{
|
|
|
214
220
|
readonly withUnsubscribe: Schema.Struct<{
|
|
215
221
|
readonly html: Schema.String;
|
|
216
222
|
readonly text: Schema.String;
|
|
223
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
217
224
|
}>;
|
|
218
225
|
readonly withoutUnsubscribe: Schema.Struct<{
|
|
219
226
|
readonly html: Schema.String;
|
|
220
227
|
readonly text: Schema.String;
|
|
228
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
221
229
|
}>;
|
|
222
230
|
}>;
|
|
223
231
|
export type TemplateFamily = {
|
|
@@ -255,6 +263,7 @@ export declare const TemplatePage: Schema.Struct<{
|
|
|
255
263
|
readonly channel: Schema.Literal<"email">;
|
|
256
264
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
257
265
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
266
|
+
readonly shared: Schema.Boolean;
|
|
258
267
|
readonly entryPath: Schema.String;
|
|
259
268
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
260
269
|
readonly isActive: Schema.Boolean;
|
|
@@ -307,6 +316,7 @@ export type TemplatesListQuery = {
|
|
|
307
316
|
readonly search?: string | null;
|
|
308
317
|
readonly projectId?: TemplateProjectId | null;
|
|
309
318
|
readonly namespaceId?: NamespaceId | null;
|
|
319
|
+
readonly shared?: "true" | "false" | null;
|
|
310
320
|
};
|
|
311
321
|
export declare const TemplatesListQuery: Schema.Struct<{
|
|
312
322
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -317,6 +327,7 @@ export declare const TemplatesListQuery: Schema.Struct<{
|
|
|
317
327
|
readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
318
328
|
readonly projectId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateProjectId">, Schema.Null]>>;
|
|
319
329
|
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
330
|
+
readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"true">, Schema.Literal<"false">]>, Schema.Null]>>;
|
|
320
331
|
}>;
|
|
321
332
|
export type TemplatesList200 = TemplatePage;
|
|
322
333
|
export declare const TemplatesList200: Schema.Struct<{
|
|
@@ -327,6 +338,7 @@ export declare const TemplatesList200: Schema.Struct<{
|
|
|
327
338
|
readonly channel: Schema.Literal<"email">;
|
|
328
339
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
329
340
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
341
|
+
readonly shared: Schema.Boolean;
|
|
330
342
|
readonly entryPath: Schema.String;
|
|
331
343
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
332
344
|
readonly isActive: Schema.Boolean;
|
|
@@ -367,6 +379,7 @@ export type TemplatesCreateRequestJson = {
|
|
|
367
379
|
readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
|
|
368
380
|
readonly isActive?: boolean | null;
|
|
369
381
|
readonly namespaceId?: NamespaceId | null;
|
|
382
|
+
readonly shared?: boolean | null;
|
|
370
383
|
readonly idempotencyKey: string;
|
|
371
384
|
};
|
|
372
385
|
export declare const TemplatesCreateRequestJson: Schema.Struct<{
|
|
@@ -379,6 +392,7 @@ export declare const TemplatesCreateRequestJson: Schema.Struct<{
|
|
|
379
392
|
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
|
|
380
393
|
readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
381
394
|
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
395
|
+
readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
382
396
|
readonly idempotencyKey: Schema.String;
|
|
383
397
|
}>;
|
|
384
398
|
export type TemplatesCreate201 = Template;
|
|
@@ -389,6 +403,7 @@ export declare const TemplatesCreate201: Schema.Struct<{
|
|
|
389
403
|
readonly channel: Schema.Literal<"email">;
|
|
390
404
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
391
405
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
406
|
+
readonly shared: Schema.Boolean;
|
|
392
407
|
readonly entryPath: Schema.String;
|
|
393
408
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
394
409
|
readonly isActive: Schema.Boolean;
|
|
@@ -451,6 +466,7 @@ export declare const TemplatesGetById200: Schema.Struct<{
|
|
|
451
466
|
readonly channel: Schema.Literal<"email">;
|
|
452
467
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
453
468
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
469
|
+
readonly shared: Schema.Boolean;
|
|
454
470
|
readonly entryPath: Schema.String;
|
|
455
471
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
456
472
|
readonly isActive: Schema.Boolean;
|
|
@@ -535,6 +551,7 @@ export type TemplatesUpdateRequestJson = {
|
|
|
535
551
|
readonly fromDefault?: TemplateFromDefault | null | null;
|
|
536
552
|
readonly replyToDefault?: ReadonlyArray<string> | null | null;
|
|
537
553
|
readonly isActive?: boolean | null;
|
|
554
|
+
readonly shared?: boolean | null;
|
|
538
555
|
};
|
|
539
556
|
};
|
|
540
557
|
export declare const TemplatesUpdateRequestJson: Schema.Struct<{
|
|
@@ -550,6 +567,7 @@ export declare const TemplatesUpdateRequestJson: Schema.Struct<{
|
|
|
550
567
|
}>, Schema.Null]>, Schema.Null]>>;
|
|
551
568
|
readonly replyToDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
|
|
552
569
|
readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
570
|
+
readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
553
571
|
}>;
|
|
554
572
|
}>;
|
|
555
573
|
export type TemplatesUpdate200 = Template;
|
|
@@ -560,6 +578,7 @@ export declare const TemplatesUpdate200: Schema.Struct<{
|
|
|
560
578
|
readonly channel: Schema.Literal<"email">;
|
|
561
579
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
562
580
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
581
|
+
readonly shared: Schema.Boolean;
|
|
563
582
|
readonly entryPath: Schema.String;
|
|
564
583
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
565
584
|
readonly isActive: Schema.Boolean;
|
|
@@ -885,10 +904,12 @@ export declare const TemplatesPublish201: Schema.Struct<{
|
|
|
885
904
|
readonly withUnsubscribe: Schema.Struct<{
|
|
886
905
|
readonly html: Schema.String;
|
|
887
906
|
readonly text: Schema.String;
|
|
907
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
888
908
|
}>;
|
|
889
909
|
readonly withoutUnsubscribe: Schema.Struct<{
|
|
890
910
|
readonly html: Schema.String;
|
|
891
911
|
readonly text: Schema.String;
|
|
912
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
892
913
|
}>;
|
|
893
914
|
}>;
|
|
894
915
|
readonly digest: Schema.String;
|
|
@@ -1158,10 +1179,12 @@ export declare const TemplatesGetPublication200: Schema.Struct<{
|
|
|
1158
1179
|
readonly withUnsubscribe: Schema.Struct<{
|
|
1159
1180
|
readonly html: Schema.String;
|
|
1160
1181
|
readonly text: Schema.String;
|
|
1182
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1161
1183
|
}>;
|
|
1162
1184
|
readonly withoutUnsubscribe: Schema.Struct<{
|
|
1163
1185
|
readonly html: Schema.String;
|
|
1164
1186
|
readonly text: Schema.String;
|
|
1187
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1165
1188
|
}>;
|
|
1166
1189
|
}>;
|
|
1167
1190
|
readonly digest: Schema.String;
|
|
@@ -3602,6 +3625,7 @@ export declare const TemplatesAddEntry201: Schema.Struct<{
|
|
|
3602
3625
|
readonly channel: Schema.Literal<"email">;
|
|
3603
3626
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
3604
3627
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
3628
|
+
readonly shared: Schema.Boolean;
|
|
3605
3629
|
readonly entryPath: Schema.String;
|
|
3606
3630
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
3607
3631
|
readonly isActive: Schema.Boolean;
|
|
@@ -3665,6 +3689,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
3665
3689
|
readonly channel: Schema.Literal<"email">;
|
|
3666
3690
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
3667
3691
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
3692
|
+
readonly shared: Schema.Boolean;
|
|
3668
3693
|
readonly entryPath: Schema.String;
|
|
3669
3694
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
3670
3695
|
readonly isActive: Schema.Boolean;
|
|
@@ -4277,6 +4302,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
4277
4302
|
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
|
|
4278
4303
|
readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
4279
4304
|
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
4305
|
+
readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
4280
4306
|
readonly idempotencyKey: Schema.String;
|
|
4281
4307
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
4282
4308
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
@@ -4285,6 +4311,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
4285
4311
|
readonly channel: Schema.Literal<"email">;
|
|
4286
4312
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
4287
4313
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
4314
|
+
readonly shared: Schema.Boolean;
|
|
4288
4315
|
readonly entryPath: Schema.String;
|
|
4289
4316
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
4290
4317
|
readonly isActive: Schema.Boolean;
|
|
@@ -4943,6 +4970,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
4943
4970
|
readonly channel: Schema.Literal<"email">;
|
|
4944
4971
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
4945
4972
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
4973
|
+
readonly shared: Schema.Boolean;
|
|
4946
4974
|
readonly entryPath: Schema.String;
|
|
4947
4975
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
4948
4976
|
readonly isActive: Schema.Boolean;
|
|
@@ -5418,10 +5446,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
5418
5446
|
readonly withUnsubscribe: Schema.Struct<{
|
|
5419
5447
|
readonly html: Schema.String;
|
|
5420
5448
|
readonly text: Schema.String;
|
|
5449
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5421
5450
|
}>;
|
|
5422
5451
|
readonly withoutUnsubscribe: Schema.Struct<{
|
|
5423
5452
|
readonly html: Schema.String;
|
|
5424
5453
|
readonly text: Schema.String;
|
|
5454
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5425
5455
|
}>;
|
|
5426
5456
|
}>;
|
|
5427
5457
|
readonly digest: Schema.String;
|
|
@@ -5688,6 +5718,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
5688
5718
|
readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
5689
5719
|
readonly projectId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateProjectId">, Schema.Null]>>;
|
|
5690
5720
|
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
5721
|
+
readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"true">, Schema.Literal<"false">]>, Schema.Null]>>;
|
|
5691
5722
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5692
5723
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
5693
5724
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
@@ -5696,6 +5727,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
5696
5727
|
readonly channel: Schema.Literal<"email">;
|
|
5697
5728
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
5698
5729
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
5730
|
+
readonly shared: Schema.Boolean;
|
|
5699
5731
|
readonly entryPath: Schema.String;
|
|
5700
5732
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
5701
5733
|
readonly isActive: Schema.Boolean;
|
|
@@ -6389,10 +6421,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
6389
6421
|
readonly withUnsubscribe: Schema.Struct<{
|
|
6390
6422
|
readonly html: Schema.String;
|
|
6391
6423
|
readonly text: Schema.String;
|
|
6424
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6392
6425
|
}>;
|
|
6393
6426
|
readonly withoutUnsubscribe: Schema.Struct<{
|
|
6394
6427
|
readonly html: Schema.String;
|
|
6395
6428
|
readonly text: Schema.String;
|
|
6429
|
+
readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6396
6430
|
}>;
|
|
6397
6431
|
}>;
|
|
6398
6432
|
readonly digest: Schema.String;
|
|
@@ -7955,6 +7989,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
7955
7989
|
}>, Schema.Null]>, Schema.Null]>>;
|
|
7956
7990
|
readonly replyToDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
|
|
7957
7991
|
readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
7992
|
+
readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
7958
7993
|
}>;
|
|
7959
7994
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
7960
7995
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
@@ -7963,6 +7998,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
|
|
|
7963
7998
|
readonly channel: Schema.Literal<"email">;
|
|
7964
7999
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
7965
8000
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
8001
|
+
readonly shared: Schema.Boolean;
|
|
7966
8002
|
readonly entryPath: Schema.String;
|
|
7967
8003
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
|
|
7968
8004
|
readonly isActive: Schema.Boolean;
|
|
@@ -18,7 +18,8 @@ const TemplateFamilyId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/*
|
|
|
18
18
|
const VersionCursor = /* @__PURE__ */ Schema.String.annotate({ identifier: "VersionCursor" });
|
|
19
19
|
const BrandFooterBlock = /* @__PURE__ */ Schema.Struct({
|
|
20
20
|
html: Schema.String,
|
|
21
|
-
text: Schema.String
|
|
21
|
+
text: Schema.String,
|
|
22
|
+
headCss: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
22
23
|
}).annotate({ identifier: "BrandFooterBlock" });
|
|
23
24
|
const TemplatePublicationRender = /* @__PURE__ */ Schema.Struct({
|
|
24
25
|
subject: Schema.String,
|
|
@@ -61,7 +62,8 @@ const TemplateSummary = /* @__PURE__ */ Schema.Struct({
|
|
|
61
62
|
name: Schema.String,
|
|
62
63
|
channel: Schema.Literal("email"),
|
|
63
64
|
projectId: TemplateProjectId,
|
|
64
|
-
namespaceId: Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the template's project belongs to; every entry in a project shares it. Null at organization level. A namespace-scoped key reaches only its own namespace's templates." }),
|
|
65
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the template's project belongs to; every entry in a project shares it. Null at organization level. A namespace-scoped key reaches only its own namespace's templates and shared ones." }),
|
|
66
|
+
shared: Schema.Boolean.annotate({ description: "Whether the template's project is shared with every namespace. Every entry in a project shares it. A namespace-scoped key reads and sends a shared template in its own namespace but cannot change it. Only an organization-level project is shared." }),
|
|
65
67
|
entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
|
|
66
68
|
status: Schema.Union([
|
|
67
69
|
Schema.Literal("draft"),
|
|
@@ -86,7 +88,8 @@ const Template = /* @__PURE__ */ Schema.Struct({
|
|
|
86
88
|
name: Schema.String,
|
|
87
89
|
channel: Schema.Literal("email"),
|
|
88
90
|
projectId: TemplateProjectId,
|
|
89
|
-
namespaceId: Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the template's project belongs to; every entry in a project shares it. Null at organization level. A namespace-scoped key reaches only its own namespace's templates." }),
|
|
91
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the template's project belongs to; every entry in a project shares it. Null at organization level. A namespace-scoped key reaches only its own namespace's templates and shared ones." }),
|
|
92
|
+
shared: Schema.Boolean.annotate({ description: "Whether the template's project is shared with every namespace. Every entry in a project shares it. A namespace-scoped key reads and sends a shared template in its own namespace but cannot change it. Only an organization-level project is shared." }),
|
|
90
93
|
entryPath: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
|
|
91
94
|
status: Schema.Union([
|
|
92
95
|
Schema.Literal("draft"),
|
|
@@ -171,7 +174,8 @@ const TemplatesListQuery = /* @__PURE__ */ Schema.Struct({
|
|
|
171
174
|
]), Schema.Null])),
|
|
172
175
|
search: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
173
176
|
projectId: Schema.optionalKey(Schema.Union([TemplateProjectId, Schema.Null])),
|
|
174
|
-
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Only templates
|
|
177
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Only the templates this namespace uses: its own and those shared with every namespace (add `shared=false` for its own only). A namespace-scoped key lists its own namespace's and shared templates." })),
|
|
178
|
+
shared: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("true"), Schema.Literal("false")]), Schema.Null]).annotate({ description: "Only templates whose project is shared with every namespace (true), or only unshared ones (false)." }))
|
|
175
179
|
});
|
|
176
180
|
const TemplatesList200 = TemplatePage;
|
|
177
181
|
const TemplatesList401 = UnauthorizedError;
|
|
@@ -197,6 +201,7 @@ const TemplatesCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
|
197
201
|
]), Schema.Null]), Schema.Null])),
|
|
198
202
|
isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
199
203
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the new template project belongs to; the project and every entry added to it share it. Omit for organization level. A namespace-scoped key always creates in its own namespace." })),
|
|
204
|
+
shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the new organization-level project with every namespace: namespace-scoped keys read and send its entries but cannot change them. Defaults to false. Not with `namespaceId`, and not from a namespace-scoped key." })),
|
|
200
205
|
idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
|
|
201
206
|
});
|
|
202
207
|
const TemplatesCreate201 = Template;
|
|
@@ -240,7 +245,8 @@ const TemplatesUpdateRequestJson = /* @__PURE__ */ Schema.Struct({ data: Schema.
|
|
|
240
245
|
]), Schema.Null]), Schema.Null])),
|
|
241
246
|
fromDefault: Schema.optionalKey(Schema.Union([Schema.Union([TemplateFromDefault, Schema.Null]), Schema.Null])),
|
|
242
247
|
replyToDefault: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null])),
|
|
243
|
-
isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
248
|
+
isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
249
|
+
shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared." }))
|
|
244
250
|
}) });
|
|
245
251
|
const TemplatesUpdate200 = Template;
|
|
246
252
|
const TemplatesUpdate401 = UnauthorizedError;
|
|
@@ -1905,7 +1911,7 @@ var TemplatesGroup = class extends HttpApiGroup.make("Templates").add(HttpApiEnd
|
|
|
1905
1911
|
TemplatesPublish500,
|
|
1906
1912
|
TemplatesPublish504.pipe(HttpApiSchema.status(504))
|
|
1907
1913
|
]
|
|
1908
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.publish").annotate(OpenApi.Summary, "Publish an exact template commit").annotate(OpenApi.Description, "Builds an exact Git commit and entry path, stores the immutable compiled IR and its assets, records the input contract it validates against, and makes that publication current."), HttpApiEndpoint.get("templatesGetPublication", "/v1/templates/:id/publications/:publicationId", {
|
|
1914
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templates.publish").annotate(OpenApi.Summary, "Publish an exact template commit").annotate(OpenApi.Description, "Builds an exact Git commit and entry path, stores the immutable compiled IR and its assets, records the input contract it validates against, and makes that publication current. A commit that compiles to the same build as an existing publication makes that publication current again instead of recording another."), HttpApiEndpoint.get("templatesGetPublication", "/v1/templates/:id/publications/:publicationId", {
|
|
1909
1915
|
params: TemplatesGetPublicationPathParams,
|
|
1910
1916
|
success: TemplatesGetPublication200,
|
|
1911
1917
|
error: [
|
|
@@ -36,6 +36,16 @@ export declare const WebhookDailyDeliveries: Schema.Struct<{
|
|
|
36
36
|
readonly exhausted: Schema.Finite;
|
|
37
37
|
readonly cancelled: Schema.Finite;
|
|
38
38
|
}>;
|
|
39
|
+
export type WebhookSigningSecret = {
|
|
40
|
+
readonly secret: __SamvaRuntimeSensitiveString;
|
|
41
|
+
readonly createdAt: string;
|
|
42
|
+
readonly previousExpiresAt: string | null;
|
|
43
|
+
};
|
|
44
|
+
export declare const WebhookSigningSecret: Schema.Struct<{
|
|
45
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
46
|
+
readonly createdAt: Schema.String;
|
|
47
|
+
readonly previousExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
48
|
+
}>;
|
|
39
49
|
export type WebhookEndpoint = {
|
|
40
50
|
readonly id: WebhookEndpointId;
|
|
41
51
|
readonly name: string;
|
|
@@ -558,6 +568,30 @@ export type WebhooksRegenerateSecret500 = InternalError;
|
|
|
558
568
|
export declare const WebhooksRegenerateSecret500: typeof InternalError;
|
|
559
569
|
export type WebhooksRegenerateSecret504 = GatewayTimeoutError;
|
|
560
570
|
export declare const WebhooksRegenerateSecret504: typeof GatewayTimeoutError;
|
|
571
|
+
export type WebhooksGetSecretPathParams = {
|
|
572
|
+
readonly id: WebhookEndpointId;
|
|
573
|
+
};
|
|
574
|
+
export declare const WebhooksGetSecretPathParams: Schema.Struct<{
|
|
575
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
576
|
+
}>;
|
|
577
|
+
export type WebhooksGetSecret200 = WebhookSigningSecret;
|
|
578
|
+
export declare const WebhooksGetSecret200: Schema.Struct<{
|
|
579
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
580
|
+
readonly createdAt: Schema.String;
|
|
581
|
+
readonly previousExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
582
|
+
}>;
|
|
583
|
+
export type WebhooksGetSecret401 = UnauthorizedError;
|
|
584
|
+
export declare const WebhooksGetSecret401: typeof UnauthorizedError;
|
|
585
|
+
export type WebhooksGetSecret403 = ForbiddenError;
|
|
586
|
+
export declare const WebhooksGetSecret403: typeof ForbiddenError;
|
|
587
|
+
export type WebhooksGetSecret404 = ResourceNotFoundError;
|
|
588
|
+
export declare const WebhooksGetSecret404: typeof ResourceNotFoundError;
|
|
589
|
+
export type WebhooksGetSecret422 = ValidationError;
|
|
590
|
+
export declare const WebhooksGetSecret422: typeof ValidationError;
|
|
591
|
+
export type WebhooksGetSecret500 = InternalError;
|
|
592
|
+
export declare const WebhooksGetSecret500: typeof InternalError;
|
|
593
|
+
export type WebhooksGetSecret504 = GatewayTimeoutError;
|
|
594
|
+
export declare const WebhooksGetSecret504: typeof GatewayTimeoutError;
|
|
561
595
|
export type WebhooksGetStatsPathParams = {
|
|
562
596
|
readonly id: WebhookEndpointId;
|
|
563
597
|
};
|
|
@@ -1007,6 +1041,92 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
|
|
|
1007
1041
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
1008
1042
|
readonly message: Schema.String;
|
|
1009
1043
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1044
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGetSecret", "GET", "/v1/webhooks/:id/secret", Schema.toCodecStringTree<Schema.Struct<{
|
|
1045
|
+
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1046
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1047
|
+
readonly secret: Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>;
|
|
1048
|
+
readonly createdAt: Schema.String;
|
|
1049
|
+
readonly previousExpiresAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1050
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1051
|
+
readonly _tag: "ForbiddenError";
|
|
1052
|
+
readonly message: string;
|
|
1053
|
+
}, readonly [Schema.Struct<{
|
|
1054
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1055
|
+
readonly message: Schema.String;
|
|
1056
|
+
}>], {
|
|
1057
|
+
readonly _tag: "ForbiddenError";
|
|
1058
|
+
readonly message: string;
|
|
1059
|
+
}>, Schema.Struct<{
|
|
1060
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1061
|
+
readonly message: Schema.String;
|
|
1062
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1063
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1064
|
+
readonly message: string;
|
|
1065
|
+
readonly retryAfterSeconds: number;
|
|
1066
|
+
}, readonly [Schema.Struct<{
|
|
1067
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1068
|
+
readonly message: Schema.String;
|
|
1069
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1070
|
+
}>], {
|
|
1071
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1072
|
+
readonly message: string;
|
|
1073
|
+
readonly retryAfterSeconds: number;
|
|
1074
|
+
}>, Schema.Struct<{
|
|
1075
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1076
|
+
readonly message: Schema.String;
|
|
1077
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1078
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1079
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1080
|
+
readonly resource: string;
|
|
1081
|
+
readonly id: string;
|
|
1082
|
+
readonly message: string;
|
|
1083
|
+
}, readonly [Schema.Struct<{
|
|
1084
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1085
|
+
readonly resource: Schema.String;
|
|
1086
|
+
readonly id: Schema.String;
|
|
1087
|
+
readonly message: Schema.String;
|
|
1088
|
+
}>], {
|
|
1089
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1090
|
+
readonly resource: string;
|
|
1091
|
+
readonly id: string;
|
|
1092
|
+
readonly message: string;
|
|
1093
|
+
}>, Schema.Struct<{
|
|
1094
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
1095
|
+
readonly resource: Schema.String;
|
|
1096
|
+
readonly id: Schema.String;
|
|
1097
|
+
readonly message: Schema.String;
|
|
1098
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1099
|
+
readonly _tag: "UnauthorizedError";
|
|
1100
|
+
readonly message: string;
|
|
1101
|
+
}, readonly [Schema.Struct<{
|
|
1102
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1103
|
+
readonly message: Schema.String;
|
|
1104
|
+
}>], {
|
|
1105
|
+
readonly _tag: "UnauthorizedError";
|
|
1106
|
+
readonly message: string;
|
|
1107
|
+
}>, Schema.Struct<{
|
|
1108
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1109
|
+
readonly message: Schema.String;
|
|
1110
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1111
|
+
readonly _tag: "ValidationError";
|
|
1112
|
+
readonly message: string;
|
|
1113
|
+
readonly fields?: {
|
|
1114
|
+
readonly [x: string]: readonly string[];
|
|
1115
|
+
} | null;
|
|
1116
|
+
}, readonly [Schema.Struct<{
|
|
1117
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1118
|
+
readonly message: Schema.String;
|
|
1119
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1120
|
+
}>], {
|
|
1121
|
+
readonly _tag: "ValidationError";
|
|
1122
|
+
readonly message: string;
|
|
1123
|
+
readonly fields?: {
|
|
1124
|
+
readonly [x: string]: readonly string[];
|
|
1125
|
+
} | null;
|
|
1126
|
+
}>, Schema.Struct<{
|
|
1127
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1128
|
+
readonly message: Schema.String;
|
|
1129
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1010
1130
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"webhooksGetStats", "GET", "/v1/webhooks/:id/stats", Schema.toCodecStringTree<Schema.Struct<{
|
|
1011
1131
|
readonly id: Schema.brand<Schema.String, "WebhookEndpointId">;
|
|
1012
1132
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
@@ -29,6 +29,11 @@ const WebhookDailyDeliveries = /* @__PURE__ */ Schema.Struct({
|
|
|
29
29
|
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
30
30
|
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
31
31
|
}).annotate({ identifier: "WebhookDailyDeliveries" });
|
|
32
|
+
const WebhookSigningSecret = /* @__PURE__ */ Schema.Struct({
|
|
33
|
+
secret: SensitiveString,
|
|
34
|
+
createdAt: Schema.String,
|
|
35
|
+
previousExpiresAt: Schema.Union([Schema.String, Schema.Null])
|
|
36
|
+
}).annotate({ identifier: "WebhookSigningSecret" });
|
|
32
37
|
const WebhookEndpoint = /* @__PURE__ */ Schema.Struct({
|
|
33
38
|
id: WebhookEndpointId,
|
|
34
39
|
name: Schema.String,
|
|
@@ -357,6 +362,14 @@ const WebhooksRegenerateSecret404 = ResourceNotFoundError;
|
|
|
357
362
|
const WebhooksRegenerateSecret422 = ValidationError;
|
|
358
363
|
const WebhooksRegenerateSecret500 = InternalError;
|
|
359
364
|
const WebhooksRegenerateSecret504 = GatewayTimeoutError;
|
|
365
|
+
const WebhooksGetSecretPathParams = /* @__PURE__ */ Schema.Struct({ id: WebhookEndpointId });
|
|
366
|
+
const WebhooksGetSecret200 = WebhookSigningSecret;
|
|
367
|
+
const WebhooksGetSecret401 = UnauthorizedError;
|
|
368
|
+
const WebhooksGetSecret403 = ForbiddenError;
|
|
369
|
+
const WebhooksGetSecret404 = ResourceNotFoundError;
|
|
370
|
+
const WebhooksGetSecret422 = ValidationError;
|
|
371
|
+
const WebhooksGetSecret500 = InternalError;
|
|
372
|
+
const WebhooksGetSecret504 = GatewayTimeoutError;
|
|
360
373
|
const WebhooksGetStatsPathParams = /* @__PURE__ */ Schema.Struct({ id: WebhookEndpointId });
|
|
361
374
|
const WebhooksGetStatsQuery = /* @__PURE__ */ Schema.Struct({
|
|
362
375
|
after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -406,7 +419,7 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
|
|
|
406
419
|
WebhooksCreate502.pipe(HttpApiSchema.status(502)),
|
|
407
420
|
WebhooksCreate504.pipe(HttpApiSchema.status(504))
|
|
408
421
|
]
|
|
409
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.create").annotate(OpenApi.Summary, "Create a webhook").annotate(OpenApi.Description, "Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response. `
|
|
422
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.create").annotate(OpenApi.Summary, "Create a webhook").annotate(OpenApi.Description, "Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response. `namespaceId` confines the endpoint to one namespace's events and `mailboxIds` to those mailboxes' events; when both are set, every mailbox must belong to the namespace."), HttpApiEndpoint.get("webhooksGet", "/v1/webhooks/:id", {
|
|
410
423
|
params: WebhooksGetPathParams,
|
|
411
424
|
success: WebhooksGet200,
|
|
412
425
|
error: [
|
|
@@ -477,7 +490,18 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
|
|
|
477
490
|
WebhooksRegenerateSecret500,
|
|
478
491
|
WebhooksRegenerateSecret504.pipe(HttpApiSchema.status(504))
|
|
479
492
|
]
|
|
480
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.regenerateSecret").annotate(OpenApi.Summary, "Rotate a webhook signing secret").annotate(OpenApi.Description, "Generates and returns a new signing secret. The previous secret remains valid for a 24-hour rotation overlap."), HttpApiEndpoint.get("
|
|
493
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.regenerateSecret").annotate(OpenApi.Summary, "Rotate a webhook signing secret").annotate(OpenApi.Description, "Generates and returns a new signing secret. The previous secret remains valid for a 24-hour rotation overlap."), HttpApiEndpoint.get("webhooksGetSecret", "/v1/webhooks/:id/secret", {
|
|
494
|
+
params: WebhooksGetSecretPathParams,
|
|
495
|
+
success: WebhooksGetSecret200,
|
|
496
|
+
error: [
|
|
497
|
+
WebhooksGetSecret401.pipe(HttpApiSchema.status(401)),
|
|
498
|
+
WebhooksGetSecret403.pipe(HttpApiSchema.status(403)),
|
|
499
|
+
WebhooksGetSecret404.pipe(HttpApiSchema.status(404)),
|
|
500
|
+
WebhooksGetSecret422.pipe(HttpApiSchema.status(422)),
|
|
501
|
+
WebhooksGetSecret500,
|
|
502
|
+
WebhooksGetSecret504.pipe(HttpApiSchema.status(504))
|
|
503
|
+
]
|
|
504
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.getSecret").annotate(OpenApi.Summary, "Get a webhook signing secret").annotate(OpenApi.Description, "Returns the endpoint's current signing secret and when a rotated-out secret stops verifying. It needs the same permission as rotating the secret."), HttpApiEndpoint.get("webhooksGetStats", "/v1/webhooks/:id/stats", {
|
|
481
505
|
params: WebhooksGetStatsPathParams,
|
|
482
506
|
query: WebhooksGetStatsQuery,
|
|
483
507
|
success: WebhooksGetStats200,
|
|
@@ -503,6 +527,6 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
|
|
|
503
527
|
]
|
|
504
528
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.test").annotate(OpenApi.Summary, "Send a test webhook delivery").annotate(OpenApi.Description, "Queues a signed webhook.test event through the normal delivery and retry lifecycle.")).annotate(OpenApi.Description, "Customer event webhook management, testing, and delivery logs") {};
|
|
505
529
|
//#endregion
|
|
506
|
-
export { WebhookAttemptId, WebhookDailyDeliveries, WebhookDeliveryCounts, WebhookDeliveryId, WebhookDeliveryPage, WebhookEndpoint, WebhookEndpointListItem, WebhookEndpointPage, WebhookEventId, WebhookStatsResponse, WebhooksCreate201, WebhooksCreate401, WebhooksCreate402, WebhooksCreate403, WebhooksCreate404, WebhooksCreate409, WebhooksCreate422, WebhooksCreate500, WebhooksCreate502, WebhooksCreate504, WebhooksCreateRequestJson, WebhooksGet200, WebhooksGet401, WebhooksGet403, WebhooksGet404, WebhooksGet422, WebhooksGet500, WebhooksGet504, WebhooksGetLogs200, WebhooksGetLogs401, WebhooksGetLogs403, WebhooksGetLogs404, WebhooksGetLogs422, WebhooksGetLogs500, WebhooksGetLogs504, WebhooksGetLogsPathParams, WebhooksGetLogsQuery, WebhooksGetPathParams, WebhooksGetStats200, WebhooksGetStats401, WebhooksGetStats403, WebhooksGetStats404, WebhooksGetStats422, WebhooksGetStats500, WebhooksGetStats504, WebhooksGetStatsPathParams, WebhooksGetStatsQuery, WebhooksGroup, WebhooksList200, WebhooksList401, WebhooksList403, WebhooksList422, WebhooksList500, WebhooksList504, WebhooksListQuery, WebhooksRegenerateSecret200, WebhooksRegenerateSecret401, WebhooksRegenerateSecret403, WebhooksRegenerateSecret404, WebhooksRegenerateSecret422, WebhooksRegenerateSecret500, WebhooksRegenerateSecret504, WebhooksRegenerateSecretPathParams, WebhooksRemove200, WebhooksRemove401, WebhooksRemove403, WebhooksRemove404, WebhooksRemove422, WebhooksRemove500, WebhooksRemove502, WebhooksRemove504, WebhooksRemovePathParams, WebhooksRetryDelivery200, WebhooksRetryDelivery401, WebhooksRetryDelivery403, WebhooksRetryDelivery404, WebhooksRetryDelivery422, WebhooksRetryDelivery429, WebhooksRetryDelivery500, WebhooksRetryDelivery504, WebhooksRetryDeliveryPathParams, WebhooksTest202, WebhooksTest401, WebhooksTest403, WebhooksTest404, WebhooksTest422, WebhooksTest500, WebhooksTest504, WebhooksTestPathParams, WebhooksTestRequestJson, WebhooksUpdate200, WebhooksUpdate401, WebhooksUpdate403, WebhooksUpdate404, WebhooksUpdate409, WebhooksUpdate422, WebhooksUpdate500, WebhooksUpdate504, WebhooksUpdatePathParams, WebhooksUpdateRequestJson };
|
|
530
|
+
export { WebhookAttemptId, WebhookDailyDeliveries, WebhookDeliveryCounts, WebhookDeliveryId, WebhookDeliveryPage, WebhookEndpoint, WebhookEndpointListItem, WebhookEndpointPage, WebhookEventId, WebhookSigningSecret, WebhookStatsResponse, WebhooksCreate201, WebhooksCreate401, WebhooksCreate402, WebhooksCreate403, WebhooksCreate404, WebhooksCreate409, WebhooksCreate422, WebhooksCreate500, WebhooksCreate502, WebhooksCreate504, WebhooksCreateRequestJson, WebhooksGet200, WebhooksGet401, WebhooksGet403, WebhooksGet404, WebhooksGet422, WebhooksGet500, WebhooksGet504, WebhooksGetLogs200, WebhooksGetLogs401, WebhooksGetLogs403, WebhooksGetLogs404, WebhooksGetLogs422, WebhooksGetLogs500, WebhooksGetLogs504, WebhooksGetLogsPathParams, WebhooksGetLogsQuery, WebhooksGetPathParams, WebhooksGetSecret200, WebhooksGetSecret401, WebhooksGetSecret403, WebhooksGetSecret404, WebhooksGetSecret422, WebhooksGetSecret500, WebhooksGetSecret504, WebhooksGetSecretPathParams, WebhooksGetStats200, WebhooksGetStats401, WebhooksGetStats403, WebhooksGetStats404, WebhooksGetStats422, WebhooksGetStats500, WebhooksGetStats504, WebhooksGetStatsPathParams, WebhooksGetStatsQuery, WebhooksGroup, WebhooksList200, WebhooksList401, WebhooksList403, WebhooksList422, WebhooksList500, WebhooksList504, WebhooksListQuery, WebhooksRegenerateSecret200, WebhooksRegenerateSecret401, WebhooksRegenerateSecret403, WebhooksRegenerateSecret404, WebhooksRegenerateSecret422, WebhooksRegenerateSecret500, WebhooksRegenerateSecret504, WebhooksRegenerateSecretPathParams, WebhooksRemove200, WebhooksRemove401, WebhooksRemove403, WebhooksRemove404, WebhooksRemove422, WebhooksRemove500, WebhooksRemove502, WebhooksRemove504, WebhooksRemovePathParams, WebhooksRetryDelivery200, WebhooksRetryDelivery401, WebhooksRetryDelivery403, WebhooksRetryDelivery404, WebhooksRetryDelivery422, WebhooksRetryDelivery429, WebhooksRetryDelivery500, WebhooksRetryDelivery504, WebhooksRetryDeliveryPathParams, WebhooksTest202, WebhooksTest401, WebhooksTest403, WebhooksTest404, WebhooksTest422, WebhooksTest500, WebhooksTest504, WebhooksTestPathParams, WebhooksTestRequestJson, WebhooksUpdate200, WebhooksUpdate401, WebhooksUpdate403, WebhooksUpdate404, WebhooksUpdate409, WebhooksUpdate422, WebhooksUpdate500, WebhooksUpdate504, WebhooksUpdatePathParams, WebhooksUpdateRequestJson };
|
|
507
531
|
|
|
508
532
|
//# sourceMappingURL=webhooks.js.map
|
|
@@ -1715,6 +1715,11 @@ export declare const SamvaOperations: {
|
|
|
1715
1715
|
readonly method: "POST";
|
|
1716
1716
|
readonly paginated: false;
|
|
1717
1717
|
};
|
|
1718
|
+
readonly webhooksGetSecret: {
|
|
1719
|
+
readonly group: "Webhooks";
|
|
1720
|
+
readonly method: "GET";
|
|
1721
|
+
readonly paginated: false;
|
|
1722
|
+
};
|
|
1718
1723
|
readonly webhooksGetStats: {
|
|
1719
1724
|
readonly group: "Webhooks";
|
|
1720
1725
|
readonly method: "GET";
|
|
@@ -910,6 +910,7 @@ const SamvaOperations = {
|
|
|
910
910
|
webhooksRetryDelivery: operationMetadata96,
|
|
911
911
|
webhooksGetLogs: operationMetadata95,
|
|
912
912
|
webhooksRegenerateSecret: operationMetadata96,
|
|
913
|
+
webhooksGetSecret: operationMetadata97,
|
|
913
914
|
webhooksGetStats: operationMetadata97,
|
|
914
915
|
webhooksTest: operationMetadata96,
|
|
915
916
|
whoamiGet: {
|
|
@@ -2053,6 +2053,8 @@ export declare const listRuns: ((input: {
|
|
|
2053
2053
|
readonly exitReason: "archived" | "completed" | "goal" | null;
|
|
2054
2054
|
readonly failureReason: string | null;
|
|
2055
2055
|
readonly currentNodeId: string | null;
|
|
2056
|
+
readonly holdReason: string | null;
|
|
2057
|
+
readonly holdUntil: string | null;
|
|
2056
2058
|
readonly trigger: {
|
|
2057
2059
|
readonly eventId: string;
|
|
2058
2060
|
readonly eventName: string;
|
|
@@ -2081,6 +2083,8 @@ export declare const listRuns: ((input: {
|
|
|
2081
2083
|
readonly exitReason: "archived" | "completed" | "goal" | null;
|
|
2082
2084
|
readonly failureReason: string | null;
|
|
2083
2085
|
readonly currentNodeId: string | null;
|
|
2086
|
+
readonly holdReason: string | null;
|
|
2087
|
+
readonly holdUntil: string | null;
|
|
2084
2088
|
readonly trigger: {
|
|
2085
2089
|
readonly eventId: string;
|
|
2086
2090
|
readonly eventName: string;
|
|
@@ -2108,6 +2112,8 @@ export declare const listRuns: ((input: {
|
|
|
2108
2112
|
readonly exitReason: "archived" | "completed" | "goal" | null;
|
|
2109
2113
|
readonly failureReason: string | null;
|
|
2110
2114
|
readonly currentNodeId: string | null;
|
|
2115
|
+
readonly holdReason: string | null;
|
|
2116
|
+
readonly holdUntil: string | null;
|
|
2111
2117
|
readonly trigger: {
|
|
2112
2118
|
readonly eventId: string;
|
|
2113
2119
|
readonly eventName: string;
|
|
@@ -2131,6 +2137,8 @@ export declare const getRun: (input: {
|
|
|
2131
2137
|
readonly exitReason: "archived" | "completed" | "goal" | null;
|
|
2132
2138
|
readonly failureReason: string | null;
|
|
2133
2139
|
readonly currentNodeId: string | null;
|
|
2140
|
+
readonly holdReason: string | null;
|
|
2141
|
+
readonly holdUntil: string | null;
|
|
2134
2142
|
readonly trigger: {
|
|
2135
2143
|
readonly eventId: string;
|
|
2136
2144
|
readonly eventName: string;
|