samva 0.33.0 → 0.35.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.
Files changed (117) hide show
  1. package/README.md +1 -1
  2. package/dist/client/sdk.gen.d.ts +225 -251
  3. package/dist/client/sdk.gen.js +85 -211
  4. package/dist/client/types.gen.d.ts +2897 -403
  5. package/dist/effect/agents.d.ts +28 -13
  6. package/dist/effect/agents.js +5 -1
  7. package/dist/effect/analytics.d.ts +15 -15
  8. package/dist/effect/api-keys.d.ts +27 -18
  9. package/dist/effect/campaigns.d.ts +721 -65
  10. package/dist/effect/categories.d.ts +3 -3
  11. package/dist/effect/contact-groups.d.ts +15 -15
  12. package/dist/effect/contacts.d.ts +56 -52
  13. package/dist/effect/conversations.d.ts +45 -45
  14. package/dist/effect/email.d.ts +82 -82
  15. package/dist/effect/errors.d.ts +1 -1
  16. package/dist/effect/errors.js +2 -2
  17. package/dist/effect/extension-installations.d.ts +11 -11
  18. package/dist/effect/extensions.d.ts +16 -16
  19. package/dist/effect/generated/agents.d.ts +1063 -33
  20. package/dist/effect/generated/agents.js +133 -11
  21. package/dist/effect/generated/analytics.d.ts +109 -136
  22. package/dist/effect/generated/analytics.js +65 -36
  23. package/dist/effect/generated/api-keys.d.ts +240 -19
  24. package/dist/effect/generated/api-keys.js +24 -8
  25. package/dist/effect/generated/attachments.d.ts +89 -1
  26. package/dist/effect/generated/attachments.js +10 -2
  27. package/dist/effect/generated/brands.d.ts +133 -1
  28. package/dist/effect/generated/brands.js +22 -10
  29. package/dist/effect/generated/campaigns.d.ts +1442 -140
  30. package/dist/effect/generated/campaigns.js +82 -20
  31. package/dist/effect/generated/contact-events.d.ts +26 -4
  32. package/dist/effect/generated/contact-events.js +5 -3
  33. package/dist/effect/generated/contact-groups.d.ts +233 -13
  34. package/dist/effect/generated/contact-groups.js +33 -17
  35. package/dist/effect/generated/contacts.d.ts +634 -96
  36. package/dist/effect/generated/contacts.js +82 -20
  37. package/dist/effect/generated/conversations.d.ts +398 -106
  38. package/dist/effect/generated/conversations.js +96 -22
  39. package/dist/effect/generated/custom-fields.d.ts +89 -1
  40. package/dist/effect/generated/custom-fields.js +11 -3
  41. package/dist/effect/generated/email.d.ts +1447 -83
  42. package/dist/effect/generated/email.js +167 -43
  43. package/dist/effect/generated/events.d.ts +51 -7
  44. package/dist/effect/generated/events.js +9 -5
  45. package/dist/effect/generated/extension-installations.d.ts +208 -10
  46. package/dist/effect/generated/extension-installations.js +26 -8
  47. package/dist/effect/generated/extensions.d.ts +123 -13
  48. package/dist/effect/generated/extensions.js +20 -10
  49. package/dist/effect/generated/feedback.d.ts +23 -1
  50. package/dist/effect/generated/feedback.js +6 -4
  51. package/dist/effect/generated/journeys.d.ts +684 -16
  52. package/dist/effect/generated/journeys.js +37 -9
  53. package/dist/effect/generated/mailboxes.d.ts +3085 -627
  54. package/dist/effect/generated/mailboxes.js +340 -141
  55. package/dist/effect/generated/media.d.ts +125 -15
  56. package/dist/effect/generated/media.js +15 -2
  57. package/dist/effect/generated/messages.d.ts +2036 -117
  58. package/dist/effect/generated/messages.js +286 -54
  59. package/dist/effect/generated/namespaces.d.ts +209 -25
  60. package/dist/effect/generated/namespaces.js +27 -9
  61. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  62. package/dist/effect/generated/newsletter-domains.js +20 -13
  63. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  64. package/dist/effect/generated/newsletter-issues.js +162 -98
  65. package/dist/effect/generated/newsletters.d.ts +123 -13
  66. package/dist/effect/generated/newsletters.js +19 -9
  67. package/dist/effect/generated/operations.d.ts +76 -10
  68. package/dist/effect/generated/operations.js +12 -6
  69. package/dist/effect/generated/organizations.d.ts +287 -7
  70. package/dist/effect/generated/organizations.js +33 -5
  71. package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
  72. package/dist/effect/generated/scheduled-messages.js +71 -12
  73. package/dist/effect/generated/shared.d.ts +2213 -190
  74. package/dist/effect/generated/shared.js +527 -76
  75. package/dist/effect/generated/subscriptions.d.ts +23 -1
  76. package/dist/effect/generated/subscriptions.js +6 -4
  77. package/dist/effect/generated/templates.d.ts +1718 -136
  78. package/dist/effect/generated/templates.js +421 -226
  79. package/dist/effect/generated/topic-forms.d.ts +111 -1
  80. package/dist/effect/generated/topic-forms.js +23 -13
  81. package/dist/effect/generated/topics.d.ts +353 -43
  82. package/dist/effect/generated/topics.js +67 -19
  83. package/dist/effect/generated/webhooks.d.ts +308 -46
  84. package/dist/effect/generated/webhooks.js +67 -19
  85. package/dist/effect/generated/whoami.d.ts +35 -1
  86. package/dist/effect/generated/whoami.js +4 -2
  87. package/dist/effect/generated-metadata.d.ts +20 -0
  88. package/dist/effect/generated-metadata.js +10 -0
  89. package/dist/effect/index.js +2 -2
  90. package/dist/effect/internal/client.js +1 -1
  91. package/dist/effect/internal/email-sender.d.ts +1 -1
  92. package/dist/effect/internal/send.d.ts +1 -1
  93. package/dist/effect/journeys.d.ts +105 -19
  94. package/dist/effect/mailboxes.d.ts +405 -174
  95. package/dist/effect/media.d.ts +1 -1
  96. package/dist/effect/messages.d.ts +40 -40
  97. package/dist/effect/namespaces.d.ts +15 -15
  98. package/dist/effect/newsletter-domains.d.ts +5 -5
  99. package/dist/effect/newsletters.d.ts +1 -1
  100. package/dist/effect/operations.d.ts +11 -11
  101. package/dist/effect/organizations.d.ts +2 -2
  102. package/dist/effect/scheduled-messages.d.ts +863 -8
  103. package/dist/effect/templates.d.ts +37 -37
  104. package/dist/effect/topics.d.ts +21 -21
  105. package/dist/effect/webhooks.d.ts +28 -26
  106. package/dist/index.js +2 -2
  107. package/dist/normalize.js +13 -1
  108. package/dist/package.js +1 -1
  109. package/dist/promises/client.d.ts +1 -1
  110. package/dist/promises/client.js +2 -2
  111. package/dist/promises/errors.gen.d.ts +22 -2
  112. package/dist/promises/errors.gen.js +60 -2
  113. package/dist/promises/index.js +2 -2
  114. package/dist/promises/types.gen.d.ts +1 -1
  115. package/dist/service-map.d.ts +9 -0
  116. package/dist/service-map.js +5 -0
  117. package/package.json +9 -8
@@ -1,6 +1,6 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
- import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared";
3
+ import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared";
4
4
  export type TopicForm = {
5
5
  readonly id: string;
6
6
  readonly publicKey: string;
@@ -54,6 +54,8 @@ export declare const TopicFormsList200: Schema.Struct<{
54
54
  readonly updatedAt: Schema.String;
55
55
  }>>;
56
56
  }>;
57
+ export type TopicFormsList400 = MalformedRequestError;
58
+ export declare const TopicFormsList400: typeof MalformedRequestError;
57
59
  export type TopicFormsList401 = UnauthorizedError;
58
60
  export declare const TopicFormsList401: typeof UnauthorizedError;
59
61
  export type TopicFormsList403 = ForbiddenError;
@@ -103,6 +105,8 @@ export declare const TopicFormsCreate201: Schema.Struct<{
103
105
  readonly createdAt: Schema.String;
104
106
  readonly updatedAt: Schema.String;
105
107
  }>;
108
+ export type TopicFormsCreate400 = MalformedRequestError;
109
+ export declare const TopicFormsCreate400: typeof MalformedRequestError;
106
110
  export type TopicFormsCreate401 = UnauthorizedError;
107
111
  export declare const TopicFormsCreate401: typeof UnauthorizedError;
108
112
  export type TopicFormsCreate403 = ForbiddenError;
@@ -138,6 +142,8 @@ export declare const TopicFormsGet200: Schema.Struct<{
138
142
  readonly createdAt: Schema.String;
139
143
  readonly updatedAt: Schema.String;
140
144
  }>;
145
+ export type TopicFormsGet400 = MalformedRequestError;
146
+ export declare const TopicFormsGet400: typeof MalformedRequestError;
141
147
  export type TopicFormsGet401 = UnauthorizedError;
142
148
  export declare const TopicFormsGet401: typeof UnauthorizedError;
143
149
  export type TopicFormsGet403 = ForbiddenError;
@@ -164,6 +170,8 @@ export type TopicFormsRemove200 = {
164
170
  export declare const TopicFormsRemove200: Schema.Struct<{
165
171
  readonly success: Schema.Boolean;
166
172
  }>;
173
+ export type TopicFormsRemove400 = MalformedRequestError;
174
+ export declare const TopicFormsRemove400: typeof MalformedRequestError;
167
175
  export type TopicFormsRemove401 = UnauthorizedError;
168
176
  export declare const TopicFormsRemove401: typeof UnauthorizedError;
169
177
  export type TopicFormsRemove403 = ForbiddenError;
@@ -215,6 +223,8 @@ export declare const TopicFormsUpdate200: Schema.Struct<{
215
223
  readonly createdAt: Schema.String;
216
224
  readonly updatedAt: Schema.String;
217
225
  }>;
226
+ export type TopicFormsUpdate400 = MalformedRequestError;
227
+ export declare const TopicFormsUpdate400: typeof MalformedRequestError;
218
228
  export type TopicFormsUpdate401 = UnauthorizedError;
219
229
  export declare const TopicFormsUpdate401: typeof UnauthorizedError;
220
230
  export type TopicFormsUpdate403 = ForbiddenError;
@@ -277,6 +287,26 @@ declare const TopicFormsGroup_base: HttpApiGroup.HttpApiGroup<"Topic forms", Htt
277
287
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
278
288
  readonly message: Schema.String;
279
289
  readonly retryAfterSeconds: Schema.Finite;
290
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
291
+ readonly _tag: "MalformedRequestError";
292
+ readonly message: string;
293
+ readonly fields: {
294
+ readonly [x: string]: readonly string[];
295
+ };
296
+ }, readonly [Schema.Struct<{
297
+ readonly _tag: Schema.tag<"MalformedRequestError">;
298
+ readonly message: Schema.String;
299
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
300
+ }>], {
301
+ readonly _tag: "MalformedRequestError";
302
+ readonly message: string;
303
+ readonly fields: {
304
+ readonly [x: string]: readonly string[];
305
+ };
306
+ }>, Schema.Struct<{
307
+ readonly _tag: Schema.tag<"MalformedRequestError">;
308
+ readonly message: Schema.String;
309
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
280
310
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
281
311
  readonly _tag: "ResourceNotFoundError";
282
312
  readonly resource: string;
@@ -373,6 +403,26 @@ declare const TopicFormsGroup_base: HttpApiGroup.HttpApiGroup<"Topic forms", Htt
373
403
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
374
404
  readonly message: Schema.String;
375
405
  readonly retryAfterSeconds: Schema.Finite;
406
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
407
+ readonly _tag: "MalformedRequestError";
408
+ readonly message: string;
409
+ readonly fields: {
410
+ readonly [x: string]: readonly string[];
411
+ };
412
+ }, readonly [Schema.Struct<{
413
+ readonly _tag: Schema.tag<"MalformedRequestError">;
414
+ readonly message: Schema.String;
415
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
416
+ }>], {
417
+ readonly _tag: "MalformedRequestError";
418
+ readonly message: string;
419
+ readonly fields: {
420
+ readonly [x: string]: readonly string[];
421
+ };
422
+ }>, Schema.Struct<{
423
+ readonly _tag: Schema.tag<"MalformedRequestError">;
424
+ readonly message: Schema.String;
425
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
376
426
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
377
427
  readonly _tag: "ResourceNotFoundError";
378
428
  readonly resource: string;
@@ -470,6 +520,26 @@ declare const TopicFormsGroup_base: HttpApiGroup.HttpApiGroup<"Topic forms", Htt
470
520
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
471
521
  readonly message: Schema.String;
472
522
  readonly retryAfterSeconds: Schema.Finite;
523
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
524
+ readonly _tag: "MalformedRequestError";
525
+ readonly message: string;
526
+ readonly fields: {
527
+ readonly [x: string]: readonly string[];
528
+ };
529
+ }, readonly [Schema.Struct<{
530
+ readonly _tag: Schema.tag<"MalformedRequestError">;
531
+ readonly message: Schema.String;
532
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
533
+ }>], {
534
+ readonly _tag: "MalformedRequestError";
535
+ readonly message: string;
536
+ readonly fields: {
537
+ readonly [x: string]: readonly string[];
538
+ };
539
+ }>, Schema.Struct<{
540
+ readonly _tag: Schema.tag<"MalformedRequestError">;
541
+ readonly message: Schema.String;
542
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
473
543
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
474
544
  readonly _tag: "ResourceNotFoundError";
475
545
  readonly resource: string;
@@ -555,6 +625,26 @@ declare const TopicFormsGroup_base: HttpApiGroup.HttpApiGroup<"Topic forms", Htt
555
625
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
556
626
  readonly message: Schema.String;
557
627
  readonly retryAfterSeconds: Schema.Finite;
628
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
629
+ readonly _tag: "MalformedRequestError";
630
+ readonly message: string;
631
+ readonly fields: {
632
+ readonly [x: string]: readonly string[];
633
+ };
634
+ }, readonly [Schema.Struct<{
635
+ readonly _tag: Schema.tag<"MalformedRequestError">;
636
+ readonly message: Schema.String;
637
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
638
+ }>], {
639
+ readonly _tag: "MalformedRequestError";
640
+ readonly message: string;
641
+ readonly fields: {
642
+ readonly [x: string]: readonly string[];
643
+ };
644
+ }>, Schema.Struct<{
645
+ readonly _tag: Schema.tag<"MalformedRequestError">;
646
+ readonly message: Schema.String;
647
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
558
648
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
559
649
  readonly _tag: "ResourceNotFoundError";
560
650
  readonly resource: string;
@@ -658,6 +748,26 @@ declare const TopicFormsGroup_base: HttpApiGroup.HttpApiGroup<"Topic forms", Htt
658
748
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
659
749
  readonly message: Schema.String;
660
750
  readonly retryAfterSeconds: Schema.Finite;
751
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
752
+ readonly _tag: "MalformedRequestError";
753
+ readonly message: string;
754
+ readonly fields: {
755
+ readonly [x: string]: readonly string[];
756
+ };
757
+ }, readonly [Schema.Struct<{
758
+ readonly _tag: Schema.tag<"MalformedRequestError">;
759
+ readonly message: Schema.String;
760
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
761
+ }>], {
762
+ readonly _tag: "MalformedRequestError";
763
+ readonly message: string;
764
+ readonly fields: {
765
+ readonly [x: string]: readonly string[];
766
+ };
767
+ }>, Schema.Struct<{
768
+ readonly _tag: Schema.tag<"MalformedRequestError">;
769
+ readonly message: Schema.String;
770
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
661
771
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
662
772
  readonly _tag: "ResourceNotFoundError";
663
773
  readonly resource: string;
@@ -1,23 +1,24 @@
1
- import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
1
+ import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  // src/effect/generated/topic-forms.ts
5
5
  const TopicForm = /* @__PURE__ */ (() => Schema.Struct({
6
- id: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
7
- publicKey: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
6
+ id: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(new globalThis.RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
7
+ publicKey: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(new globalThis.RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
8
8
  topicId: TopicId,
9
- allowedOrigins: Schema.Array(Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
9
+ allowedOrigins: Schema.Array(Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
10
10
  confirmationTitle: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
11
11
  confirmationMessage: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })),
12
12
  successTitle: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
13
13
  successMessage: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })),
14
- redirectUrl: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]),
14
+ redirectUrl: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]),
15
15
  linkOrigin: Schema.String,
16
16
  createdAt: Schema.String,
17
17
  updatedAt: Schema.String
18
18
  }).annotate({ identifier: "TopicForm" }))();
19
19
  const TopicFormsListPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TopicId }))();
20
20
  const TopicFormsList200 = /* @__PURE__ */ (() => Schema.Struct({ items: Schema.Array(TopicForm) }))();
21
+ const TopicFormsList400 = MalformedRequestError;
21
22
  const TopicFormsList401 = UnauthorizedError;
22
23
  const TopicFormsList403 = ForbiddenError;
23
24
  const TopicFormsList404 = ResourceNotFoundError;
@@ -26,14 +27,15 @@ const TopicFormsList500 = InternalError;
26
27
  const TopicFormsList504 = GatewayTimeoutError;
27
28
  const TopicFormsCreatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TopicId }))();
28
29
  const TopicFormsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
29
- allowedOrigins: Schema.Array(Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
30
+ allowedOrigins: Schema.Array(Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
30
31
  confirmationTitle: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
31
32
  confirmationMessage: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })),
32
33
  successTitle: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
33
34
  successMessage: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })),
34
- redirectUrl: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])
35
+ redirectUrl: Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])
35
36
  }))();
36
37
  const TopicFormsCreate201 = TopicForm;
38
+ const TopicFormsCreate400 = MalformedRequestError;
37
39
  const TopicFormsCreate401 = UnauthorizedError;
38
40
  const TopicFormsCreate403 = ForbiddenError;
39
41
  const TopicFormsCreate404 = ResourceNotFoundError;
@@ -42,9 +44,10 @@ const TopicFormsCreate500 = InternalError;
42
44
  const TopicFormsCreate504 = GatewayTimeoutError;
43
45
  const TopicFormsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({
44
46
  id: TopicId,
45
- formId: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" }))
47
+ formId: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(new globalThis.RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" }))
46
48
  }))();
47
49
  const TopicFormsGet200 = TopicForm;
50
+ const TopicFormsGet400 = MalformedRequestError;
48
51
  const TopicFormsGet401 = UnauthorizedError;
49
52
  const TopicFormsGet403 = ForbiddenError;
50
53
  const TopicFormsGet404 = ResourceNotFoundError;
@@ -53,9 +56,10 @@ const TopicFormsGet500 = InternalError;
53
56
  const TopicFormsGet504 = GatewayTimeoutError;
54
57
  const TopicFormsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({
55
58
  id: TopicId,
56
- formId: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" }))
59
+ formId: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(new globalThis.RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" }))
57
60
  }))();
58
61
  const TopicFormsRemove200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }))();
62
+ const TopicFormsRemove400 = MalformedRequestError;
59
63
  const TopicFormsRemove401 = UnauthorizedError;
60
64
  const TopicFormsRemove403 = ForbiddenError;
61
65
  const TopicFormsRemove404 = ResourceNotFoundError;
@@ -64,17 +68,18 @@ const TopicFormsRemove500 = InternalError;
64
68
  const TopicFormsRemove504 = GatewayTimeoutError;
65
69
  const TopicFormsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({
66
70
  id: TopicId,
67
- formId: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" }))
71
+ formId: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(new globalThis.RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" }))
68
72
  }))();
69
73
  const TopicFormsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
70
- allowedOrigins: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })), Schema.Null])),
74
+ allowedOrigins: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })), Schema.Null])),
71
75
  confirmationTitle: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
72
76
  confirmationMessage: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })), Schema.Null])),
73
77
  successTitle: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
74
78
  successMessage: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })), Schema.Null])),
75
- redirectUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
79
+ redirectUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
76
80
  }))();
77
81
  const TopicFormsUpdate200 = TopicForm;
82
+ const TopicFormsUpdate400 = MalformedRequestError;
78
83
  const TopicFormsUpdate401 = UnauthorizedError;
79
84
  const TopicFormsUpdate403 = ForbiddenError;
80
85
  const TopicFormsUpdate404 = ResourceNotFoundError;
@@ -85,6 +90,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
85
90
  params: TopicFormsListPathParams,
86
91
  success: TopicFormsList200,
87
92
  error: [
93
+ TopicFormsList400.pipe(HttpApiSchema.status(400)),
88
94
  TopicFormsList401.pipe(HttpApiSchema.status(401)),
89
95
  TopicFormsList403.pipe(HttpApiSchema.status(403)),
90
96
  TopicFormsList404.pipe(HttpApiSchema.status(404)),
@@ -97,6 +103,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
97
103
  payload: TopicFormsCreateRequestJson,
98
104
  success: TopicFormsCreate201.pipe(HttpApiSchema.status(201)),
99
105
  error: [
106
+ TopicFormsCreate400.pipe(HttpApiSchema.status(400)),
100
107
  TopicFormsCreate401.pipe(HttpApiSchema.status(401)),
101
108
  TopicFormsCreate403.pipe(HttpApiSchema.status(403)),
102
109
  TopicFormsCreate404.pipe(HttpApiSchema.status(404)),
@@ -108,6 +115,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
108
115
  params: TopicFormsGetPathParams,
109
116
  success: TopicFormsGet200,
110
117
  error: [
118
+ TopicFormsGet400.pipe(HttpApiSchema.status(400)),
111
119
  TopicFormsGet401.pipe(HttpApiSchema.status(401)),
112
120
  TopicFormsGet403.pipe(HttpApiSchema.status(403)),
113
121
  TopicFormsGet404.pipe(HttpApiSchema.status(404)),
@@ -119,6 +127,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
119
127
  params: TopicFormsRemovePathParams,
120
128
  success: TopicFormsRemove200,
121
129
  error: [
130
+ TopicFormsRemove400.pipe(HttpApiSchema.status(400)),
122
131
  TopicFormsRemove401.pipe(HttpApiSchema.status(401)),
123
132
  TopicFormsRemove403.pipe(HttpApiSchema.status(403)),
124
133
  TopicFormsRemove404.pipe(HttpApiSchema.status(404)),
@@ -131,6 +140,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
131
140
  payload: TopicFormsUpdateRequestJson,
132
141
  success: TopicFormsUpdate200,
133
142
  error: [
143
+ TopicFormsUpdate400.pipe(HttpApiSchema.status(400)),
134
144
  TopicFormsUpdate401.pipe(HttpApiSchema.status(401)),
135
145
  TopicFormsUpdate403.pipe(HttpApiSchema.status(403)),
136
146
  TopicFormsUpdate404.pipe(HttpApiSchema.status(404)),
@@ -139,6 +149,6 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
139
149
  TopicFormsUpdate504.pipe(HttpApiSchema.status(504))
140
150
  ]
141
151
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.update").annotate(OpenApi.Summary, "Update a topic form").annotate(OpenApi.Description, "Updates only the supplied form fields. allowedOrigins replaces the complete exact-origin allowlist; redirectUrl null clears the success redirect. The public key remains stable.")).annotate(OpenApi.Description, "Hosted and embedded double opt-in signup forms for topics") {};
142
- export { TopicForm, TopicFormsCreate201, TopicFormsCreate401, TopicFormsCreate403, TopicFormsCreate404, TopicFormsCreate422, TopicFormsCreate500, TopicFormsCreate504, TopicFormsCreatePathParams, TopicFormsCreateRequestJson, TopicFormsGet200, TopicFormsGet401, TopicFormsGet403, TopicFormsGet404, TopicFormsGet422, TopicFormsGet500, TopicFormsGet504, TopicFormsGetPathParams, TopicFormsGroup, TopicFormsList200, TopicFormsList401, TopicFormsList403, TopicFormsList404, TopicFormsList422, TopicFormsList500, TopicFormsList504, TopicFormsListPathParams, TopicFormsRemove200, TopicFormsRemove401, TopicFormsRemove403, TopicFormsRemove404, TopicFormsRemove422, TopicFormsRemove500, TopicFormsRemove504, TopicFormsRemovePathParams, TopicFormsUpdate200, TopicFormsUpdate401, TopicFormsUpdate403, TopicFormsUpdate404, TopicFormsUpdate422, TopicFormsUpdate500, TopicFormsUpdate504, TopicFormsUpdatePathParams, TopicFormsUpdateRequestJson };
152
+ export { TopicForm, TopicFormsCreate201, TopicFormsCreate400, TopicFormsCreate401, TopicFormsCreate403, TopicFormsCreate404, TopicFormsCreate422, TopicFormsCreate500, TopicFormsCreate504, TopicFormsCreatePathParams, TopicFormsCreateRequestJson, TopicFormsGet200, TopicFormsGet400, TopicFormsGet401, TopicFormsGet403, TopicFormsGet404, TopicFormsGet422, TopicFormsGet500, TopicFormsGet504, TopicFormsGetPathParams, TopicFormsGroup, TopicFormsList200, TopicFormsList400, TopicFormsList401, TopicFormsList403, TopicFormsList404, TopicFormsList422, TopicFormsList500, TopicFormsList504, TopicFormsListPathParams, TopicFormsRemove200, TopicFormsRemove400, TopicFormsRemove401, TopicFormsRemove403, TopicFormsRemove404, TopicFormsRemove422, TopicFormsRemove500, TopicFormsRemove504, TopicFormsRemovePathParams, TopicFormsUpdate200, TopicFormsUpdate400, TopicFormsUpdate401, TopicFormsUpdate403, TopicFormsUpdate404, TopicFormsUpdate422, TopicFormsUpdate500, TopicFormsUpdate504, TopicFormsUpdatePathParams, TopicFormsUpdateRequestJson };
143
153
 
144
154
  //# sourceMappingURL=topic-forms.js.map