samva 0.26.0 → 0.28.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 (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -1,11 +1,11 @@
1
1
  export declare const list: ((input?: {
2
- readonly limit?: string | null | undefined;
2
+ readonly limit?: number | null | undefined;
3
3
  readonly cursor?: string | null | undefined;
4
4
  readonly after?: string | null | undefined;
5
5
  readonly before?: string | null | undefined;
6
6
  } | undefined) => import("./internal/operation").OperationResult<"namespacesList">) & {
7
7
  readonly pages: (input?: {
8
- readonly limit?: string | null | undefined;
8
+ readonly limit?: number | null | undefined;
9
9
  readonly cursor?: string | null | undefined;
10
10
  readonly after?: string | null | undefined;
11
11
  readonly before?: string | null | undefined;
@@ -18,7 +18,7 @@ export declare const list: ((input?: {
18
18
  readonly nextCursor: string | null;
19
19
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
20
20
  readonly items: (input?: {
21
- readonly limit?: string | null | undefined;
21
+ readonly limit?: number | null | undefined;
22
22
  readonly cursor?: string | null | undefined;
23
23
  readonly after?: string | null | undefined;
24
24
  readonly before?: string | null | undefined;
@@ -1,11 +1,11 @@
1
1
  export declare const list: ((input?: {
2
- readonly limit?: string | null | undefined;
2
+ readonly limit?: number | null | undefined;
3
3
  readonly cursor?: string | null | undefined;
4
4
  readonly kind?: "email-domain-provisioning" | "organization-deletion" | null | undefined;
5
5
  readonly status?: "failed" | "pending" | "running" | "succeeded" | null | undefined;
6
6
  } | undefined) => import("./internal/operation").OperationResult<"operationsList">) & {
7
7
  readonly pages: (input?: {
8
- readonly limit?: string | null | undefined;
8
+ readonly limit?: number | null | undefined;
9
9
  readonly cursor?: string | null | undefined;
10
10
  readonly kind?: "email-domain-provisioning" | "organization-deletion" | null | undefined;
11
11
  readonly status?: "failed" | "pending" | "running" | "succeeded" | null | undefined;
@@ -36,7 +36,7 @@ export declare const list: ((input?: {
36
36
  readonly nextCursor: string | null;
37
37
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
38
38
  readonly items: (input?: {
39
- readonly limit?: string | null | undefined;
39
+ readonly limit?: number | null | undefined;
40
40
  readonly cursor?: string | null | undefined;
41
41
  readonly kind?: "email-domain-provisioning" | "organization-deletion" | null | undefined;
42
42
  readonly status?: "failed" | "pending" | "running" | "succeeded" | null | undefined;
@@ -1,10 +1,10 @@
1
1
  export declare const list: ((input?: {
2
- readonly limit?: string | null | undefined;
2
+ readonly limit?: number | null | undefined;
3
3
  readonly cursor?: string | null | undefined;
4
4
  readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | null | undefined;
5
5
  } | undefined) => import("./internal/operation").OperationResult<"scheduledMessagesList">) & {
6
6
  readonly pages: (input?: {
7
- readonly limit?: string | null | undefined;
7
+ readonly limit?: number | null | undefined;
8
8
  readonly cursor?: string | null | undefined;
9
9
  readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | null | undefined;
10
10
  } | undefined) => import("effect/Stream").Stream<{
@@ -66,7 +66,7 @@ export declare const list: ((input?: {
66
66
  readonly timeZone?: string;
67
67
  readonly inReplyToMessageId?: (string & import("effect/Brand").Brand<"MessageId">) | null;
68
68
  readonly replyTo?: readonly string[] | null;
69
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
69
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
70
70
  readonly tracking?: {
71
71
  readonly opens?: boolean;
72
72
  readonly clicks?: boolean;
@@ -93,7 +93,7 @@ export declare const list: ((input?: {
93
93
  readonly nextCursor: string | null;
94
94
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
95
95
  readonly items: (input?: {
96
- readonly limit?: string | null | undefined;
96
+ readonly limit?: number | null | undefined;
97
97
  readonly cursor?: string | null | undefined;
98
98
  readonly status?: "cancelled" | "dispatched" | "dispatching" | "failed" | "paused" | "pending" | null | undefined;
99
99
  } | undefined) => import("effect/Stream").Stream<{
@@ -154,7 +154,7 @@ export declare const list: ((input?: {
154
154
  readonly timeZone?: string;
155
155
  readonly inReplyToMessageId?: (string & import("effect/Brand").Brand<"MessageId">) | null;
156
156
  readonly replyTo?: readonly string[] | null;
157
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
157
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
158
158
  readonly tracking?: {
159
159
  readonly opens?: boolean;
160
160
  readonly clicks?: boolean;
@@ -281,7 +281,7 @@ export declare const create: (input: {
281
281
  readonly timeZone?: string | undefined;
282
282
  readonly inReplyToMessageId?: string | null | undefined;
283
283
  readonly replyTo?: readonly string[] | null | undefined;
284
- readonly unsubscribeGroupId?: string | null | undefined;
284
+ readonly topicId?: string | null | undefined;
285
285
  readonly tracking?: {
286
286
  readonly opens?: boolean | undefined;
287
287
  readonly clicks?: boolean | undefined;
@@ -1,11 +1,10 @@
1
1
  export declare const subscribe: (input: {
2
2
  readonly email: string;
3
- readonly contactGroupId: string;
3
+ readonly topicId: string;
4
4
  readonly from: {
5
5
  readonly email: string;
6
6
  readonly name?: string | null | undefined;
7
7
  };
8
- readonly unsubscribeGroupId?: string | null | undefined;
9
8
  readonly templateSlug?: string | null | undefined;
10
9
  readonly consentIp?: string | null | undefined;
11
10
  readonly consentSource?: string | null | undefined;
@@ -1,6 +1,6 @@
1
1
  export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload, } from "./generated/shared";
2
2
  export declare const list: ((input?: {
3
- readonly limit?: string | null | undefined;
3
+ readonly limit?: number | null | undefined;
4
4
  readonly cursor?: string | null | undefined;
5
5
  readonly category?: "alert" | "marketing" | "notification" | "reminder" | "support" | "transactional" | "verification" | null | undefined;
6
6
  readonly channel?: "email" | null | undefined;
@@ -8,10 +8,10 @@ export declare const list: ((input?: {
8
8
  readonly search?: string | null | undefined;
9
9
  readonly projectId?: string | null | undefined;
10
10
  readonly namespaceId?: string | null | undefined;
11
- readonly shared?: "false" | "true" | null | undefined;
11
+ readonly shared?: boolean | null | undefined;
12
12
  } | undefined) => import("./internal/operation").OperationResult<"templatesList">) & {
13
13
  readonly pages: (input?: {
14
- readonly limit?: string | null | undefined;
14
+ readonly limit?: number | null | undefined;
15
15
  readonly cursor?: string | null | undefined;
16
16
  readonly category?: "alert" | "marketing" | "notification" | "reminder" | "support" | "transactional" | "verification" | null | undefined;
17
17
  readonly channel?: "email" | null | undefined;
@@ -19,7 +19,7 @@ export declare const list: ((input?: {
19
19
  readonly search?: string | null | undefined;
20
20
  readonly projectId?: string | null | undefined;
21
21
  readonly namespaceId?: string | null | undefined;
22
- readonly shared?: "false" | "true" | null | undefined;
22
+ readonly shared?: boolean | null | undefined;
23
23
  } | undefined) => import("effect/Stream").Stream<{
24
24
  readonly items: readonly {
25
25
  readonly id: string & import("effect/Brand").Brand<"TemplateId">;
@@ -50,7 +50,7 @@ export declare const list: ((input?: {
50
50
  readonly nextCursor: string | null;
51
51
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
52
52
  readonly items: (input?: {
53
- readonly limit?: string | null | undefined;
53
+ readonly limit?: number | null | undefined;
54
54
  readonly cursor?: string | null | undefined;
55
55
  readonly category?: "alert" | "marketing" | "notification" | "reminder" | "support" | "transactional" | "verification" | null | undefined;
56
56
  readonly channel?: "email" | null | undefined;
@@ -58,7 +58,7 @@ export declare const list: ((input?: {
58
58
  readonly search?: string | null | undefined;
59
59
  readonly projectId?: string | null | undefined;
60
60
  readonly namespaceId?: string | null | undefined;
61
- readonly shared?: "false" | "true" | null | undefined;
61
+ readonly shared?: boolean | null | undefined;
62
62
  } | undefined) => import("effect/Stream").Stream<{
63
63
  readonly id: string & import("effect/Brand").Brand<"TemplateId">;
64
64
  readonly slug: string;
@@ -114,11 +114,11 @@ export declare const addEntry: (input: {
114
114
  readonly category?: "alert" | "marketing" | "notification" | "reminder" | "support" | "transactional" | "verification" | null | undefined;
115
115
  }) => import("./internal/operation").OperationResult<"templatesAddEntry">;
116
116
  export declare const listFamilies: ((input?: {
117
- readonly limit?: string | null | undefined;
117
+ readonly limit?: number | null | undefined;
118
118
  readonly cursor?: string | null | undefined;
119
119
  } | undefined) => import("./internal/operation").OperationResult<"templatesListFamilies">) & {
120
120
  readonly pages: (input?: {
121
- readonly limit?: string | null | undefined;
121
+ readonly limit?: number | null | undefined;
122
122
  readonly cursor?: string | null | undefined;
123
123
  } | undefined) => import("effect/Stream").Stream<{
124
124
  readonly items: readonly {
@@ -140,7 +140,7 @@ export declare const listFamilies: ((input?: {
140
140
  readonly nextCursor: string | null;
141
141
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
142
142
  readonly items: (input?: {
143
- readonly limit?: string | null | undefined;
143
+ readonly limit?: number | null | undefined;
144
144
  readonly cursor?: string | null | undefined;
145
145
  } | undefined) => import("effect/Stream").Stream<{
146
146
  readonly id: string & import("effect/Brand").Brand<"TemplateFamilyId">;
@@ -336,12 +336,12 @@ export declare const renderPublication: (input: {
336
336
  }) => import("./internal/operation").OperationResult<"templatesRenderPublication">;
337
337
  export declare const listInputContracts: ((input: {
338
338
  readonly id: string;
339
- readonly limit?: string | null | undefined;
339
+ readonly limit?: number | null | undefined;
340
340
  readonly cursor?: string | null | undefined;
341
341
  }) => import("./internal/operation").OperationResult<"templatesListInputContracts">) & {
342
342
  readonly pages: (input: {
343
343
  readonly id: string;
344
- readonly limit?: string | null | undefined;
344
+ readonly limit?: number | null | undefined;
345
345
  readonly cursor?: string | null | undefined;
346
346
  }) => import("effect/Stream").Stream<{
347
347
  readonly items: readonly {
@@ -359,7 +359,7 @@ export declare const listInputContracts: ((input: {
359
359
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
360
360
  readonly items: (input: {
361
361
  readonly id: string;
362
- readonly limit?: string | null | undefined;
362
+ readonly limit?: number | null | undefined;
363
363
  readonly cursor?: string | null | undefined;
364
364
  }) => import("effect/Stream").Stream<{
365
365
  readonly id: string & import("effect/Brand").Brand<"TemplateInputContractId">;
@@ -383,5 +383,5 @@ export declare const diffWorkspace: (input: {
383
383
  }) => import("./internal/operation").OperationResult<"templatesDiffWorkspace">;
384
384
  export declare const workspaceHistory: (input: {
385
385
  readonly id: string;
386
- readonly limit?: string | null | undefined;
386
+ readonly limit?: number | null | undefined;
387
387
  }) => import("./internal/operation").OperationResult<"templatesWorkspaceHistory">;
@@ -0,0 +1,30 @@
1
+ export declare const list: (input: {
2
+ readonly id: string;
3
+ }) => import("./internal/operation").OperationResult<"topicFormsList">;
4
+ export declare const get: (input: {
5
+ readonly id: string;
6
+ readonly formId: string;
7
+ }) => import("./internal/operation").OperationResult<"topicFormsGet">;
8
+ export declare const create: (input: {
9
+ readonly id: string;
10
+ readonly allowedOrigins: readonly string[];
11
+ readonly confirmationTitle: string;
12
+ readonly confirmationMessage: string;
13
+ readonly successTitle: string;
14
+ readonly successMessage: string;
15
+ readonly redirectUrl: string | null;
16
+ }) => import("./internal/operation").OperationResult<"topicFormsCreate">;
17
+ export declare const update: (input: {
18
+ readonly id: string;
19
+ readonly formId: string;
20
+ readonly allowedOrigins?: readonly string[] | null | undefined;
21
+ readonly confirmationTitle?: string | null | undefined;
22
+ readonly confirmationMessage?: string | null | undefined;
23
+ readonly successTitle?: string | null | undefined;
24
+ readonly successMessage?: string | null | undefined;
25
+ readonly redirectUrl?: string | null | undefined;
26
+ }) => import("./internal/operation").OperationResult<"topicFormsUpdate">;
27
+ export declare const remove: (input: {
28
+ readonly id: string;
29
+ readonly formId: string;
30
+ }) => import("./internal/operation").OperationResult<"topicFormsRemove">;
@@ -0,0 +1,21 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { forGroup } from "./internal/operation.js";
3
+ import { TopicFormsGroup } from "./generated/topic-forms.js";
4
+ //#region src/effect/topic-forms.ts
5
+ var topic_forms_exports = /* @__PURE__ */ __exportAll({
6
+ create: () => create,
7
+ get: () => get,
8
+ list: () => list,
9
+ remove: () => remove,
10
+ update: () => update
11
+ });
12
+ const make = /* @__PURE__ */ forGroup(TopicFormsGroup);
13
+ const list = /* @__PURE__ */ make("topicFormsList");
14
+ const get = /* @__PURE__ */ make("topicFormsGet");
15
+ const create = /* @__PURE__ */ make("topicFormsCreate");
16
+ const update = /* @__PURE__ */ make("topicFormsUpdate");
17
+ const remove = /* @__PURE__ */ make("topicFormsRemove");
18
+ //#endregion
19
+ export { create, get, list, remove, topic_forms_exports, update };
20
+
21
+ //# sourceMappingURL=topic-forms.js.map
@@ -0,0 +1,94 @@
1
+ export declare const list: (input?: {
2
+ readonly namespaceId?: string | null | undefined;
3
+ } | undefined) => import("./internal/operation").OperationResult<"topicsList">;
4
+ export declare const get: (input: {
5
+ readonly id: string;
6
+ }) => import("./internal/operation").OperationResult<"topicsGet">;
7
+ export declare const create: (input: {
8
+ readonly name: string;
9
+ readonly description?: string | null | undefined;
10
+ readonly namespaceId?: string | null | undefined;
11
+ readonly default?: "opt_in" | "opt_out" | null | undefined;
12
+ readonly defaultSenderId?: string | null | undefined;
13
+ readonly replyMailboxId?: string | null | undefined;
14
+ readonly templateId?: string | null | undefined;
15
+ }) => import("./internal/operation").OperationResult<"topicsCreate">;
16
+ export declare const update: (input: {
17
+ readonly id: string;
18
+ readonly name?: string | null | undefined;
19
+ readonly description?: string | null | undefined;
20
+ readonly default?: "opt_in" | "opt_out" | null | undefined;
21
+ readonly defaultSenderId?: string | null | undefined;
22
+ readonly replyMailboxId?: string | null | undefined;
23
+ readonly templateId?: string | null | undefined;
24
+ }) => import("./internal/operation").OperationResult<"topicsUpdate">;
25
+ export declare const remove: (input: {
26
+ readonly id: string;
27
+ }) => import("./internal/operation").OperationResult<"topicsRemove">;
28
+ export declare const setDefault: (input: {
29
+ readonly id: string;
30
+ }) => import("./internal/operation").OperationResult<"topicsSetDefault">;
31
+ export declare const listSubscriptions: ((input: {
32
+ readonly id: string;
33
+ readonly limit?: number | null | undefined;
34
+ readonly cursor?: string | null | undefined;
35
+ readonly channel?: "email" | null | undefined;
36
+ readonly status?: "subscribed" | "unsubscribed" | null | undefined;
37
+ }) => import("./internal/operation").OperationResult<"topicsListSubscriptions">) & {
38
+ readonly pages: (input: {
39
+ readonly id: string;
40
+ readonly limit?: number | null | undefined;
41
+ readonly cursor?: string | null | undefined;
42
+ readonly channel?: "email" | null | undefined;
43
+ readonly status?: "subscribed" | "unsubscribed" | null | undefined;
44
+ }) => import("effect/Stream").Stream<{
45
+ readonly items: readonly {
46
+ readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
47
+ readonly channel: "email";
48
+ readonly status: "subscribed" | "unsubscribed";
49
+ readonly source: string;
50
+ readonly subscribedAt: string | null;
51
+ readonly unsubscribedAt: string | null;
52
+ readonly createdAt: string;
53
+ readonly updatedAt: string;
54
+ }[];
55
+ readonly nextCursor: string | null;
56
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
57
+ readonly items: (input: {
58
+ readonly id: string;
59
+ readonly limit?: number | null | undefined;
60
+ readonly cursor?: string | null | undefined;
61
+ readonly channel?: "email" | null | undefined;
62
+ readonly status?: "subscribed" | "unsubscribed" | null | undefined;
63
+ }) => import("effect/Stream").Stream<{
64
+ readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
65
+ readonly channel: "email";
66
+ readonly status: "subscribed" | "unsubscribed";
67
+ readonly source: string;
68
+ readonly subscribedAt: string | null;
69
+ readonly unsubscribedAt: string | null;
70
+ readonly createdAt: string;
71
+ readonly updatedAt: string;
72
+ }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
73
+ };
74
+ export declare const setSubscriptions: (input: {
75
+ readonly id: string;
76
+ readonly contacts: readonly ({
77
+ readonly contactId: string;
78
+ } | {
79
+ readonly email: string;
80
+ } | {
81
+ readonly phone: string;
82
+ })[];
83
+ readonly channel: "email";
84
+ readonly status: "subscribed" | "unsubscribed";
85
+ readonly source?: string | null | undefined;
86
+ }) => import("./internal/operation").OperationResult<"topicsSetSubscriptions">;
87
+ export declare const checkSubscription: (input: {
88
+ readonly contactId?: string | null | undefined;
89
+ readonly email?: string | null | undefined;
90
+ readonly phone?: string | null | undefined;
91
+ readonly namespaceId?: string | null | undefined;
92
+ readonly channel: "email";
93
+ readonly topicIds?: string | null | undefined;
94
+ }) => import("./internal/operation").OperationResult<"topicsCheckSubscription">;
@@ -0,0 +1,29 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { forGroup } from "./internal/operation.js";
3
+ import { TopicsGroup } from "./generated/topics.js";
4
+ //#region src/effect/topics.ts
5
+ var topics_exports = /* @__PURE__ */ __exportAll({
6
+ checkSubscription: () => checkSubscription,
7
+ create: () => create,
8
+ get: () => get,
9
+ list: () => list,
10
+ listSubscriptions: () => listSubscriptions,
11
+ remove: () => remove,
12
+ setDefault: () => setDefault,
13
+ setSubscriptions: () => setSubscriptions,
14
+ update: () => update
15
+ });
16
+ const make = /* @__PURE__ */ forGroup(TopicsGroup);
17
+ const list = /* @__PURE__ */ make("topicsList");
18
+ const get = /* @__PURE__ */ make("topicsGet");
19
+ const create = /* @__PURE__ */ make("topicsCreate");
20
+ const update = /* @__PURE__ */ make("topicsUpdate");
21
+ const remove = /* @__PURE__ */ make("topicsRemove");
22
+ const setDefault = /* @__PURE__ */ make("topicsSetDefault");
23
+ const listSubscriptions = /* @__PURE__ */ make("topicsListSubscriptions");
24
+ const setSubscriptions = /* @__PURE__ */ make("topicsSetSubscriptions");
25
+ const checkSubscription = /* @__PURE__ */ make("topicsCheckSubscription");
26
+ //#endregion
27
+ export { checkSubscription, create, get, list, listSubscriptions, remove, setDefault, setSubscriptions, topics_exports, update };
28
+
29
+ //# sourceMappingURL=topics.js.map
@@ -1,12 +1,12 @@
1
1
  export { CreateWebhookPayload as CreatePayload, TestWebhookPayload as TestPayload, UpdateWebhookPayload as UpdatePayload, } from "./generated/shared";
2
2
  export declare const list: ((input?: {
3
- readonly limit?: string | null | undefined;
3
+ readonly limit?: number | null | undefined;
4
4
  readonly cursor?: string | null | undefined;
5
5
  readonly search?: string | null | undefined;
6
6
  readonly status?: "active" | "disabled" | null | undefined;
7
7
  } | undefined) => import("./internal/operation").OperationResult<"webhooksList">) & {
8
8
  readonly pages: (input?: {
9
- readonly limit?: string | null | undefined;
9
+ readonly limit?: number | null | undefined;
10
10
  readonly cursor?: string | null | undefined;
11
11
  readonly search?: string | null | undefined;
12
12
  readonly status?: "active" | "disabled" | null | undefined;
@@ -36,7 +36,7 @@ export declare const list: ((input?: {
36
36
  readonly nextCursor: string | null;
37
37
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
38
38
  readonly items: (input?: {
39
- readonly limit?: string | null | undefined;
39
+ readonly limit?: number | null | undefined;
40
40
  readonly cursor?: string | null | undefined;
41
41
  readonly search?: string | null | undefined;
42
42
  readonly status?: "active" | "disabled" | null | undefined;
@@ -129,12 +129,12 @@ export declare const test: (input: {
129
129
  }) => import("./internal/operation").OperationResult<"webhooksTest">;
130
130
  export declare const getLogs: ((input: {
131
131
  readonly id: string;
132
- readonly limit?: string | null | undefined;
132
+ readonly limit?: number | null | undefined;
133
133
  readonly cursor?: string | null | undefined;
134
134
  }) => import("./internal/operation").OperationResult<"webhooksGetLogs">) & {
135
135
  readonly pages: (input: {
136
136
  readonly id: string;
137
- readonly limit?: string | null | undefined;
137
+ readonly limit?: number | null | undefined;
138
138
  readonly cursor?: string | null | undefined;
139
139
  }) => import("effect/Stream").Stream<{
140
140
  readonly items: readonly {
@@ -170,7 +170,7 @@ export declare const getLogs: ((input: {
170
170
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
171
171
  readonly items: (input: {
172
172
  readonly id: string;
173
- readonly limit?: string | null | undefined;
173
+ readonly limit?: number | null | undefined;
174
174
  readonly cursor?: string | null | undefined;
175
175
  }) => import("effect/Stream").Stream<{
176
176
  readonly id: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MediaUploadError } from "./inline-attachments.js";
2
2
  import { MailboxEventStream, MailboxEventStreamError } from "./mailbox-events.js";
3
- import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError } from "./promises/errors.gen.js";
3
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./promises/errors.gen.js";
4
4
  import { createClient } from "./promises/index.js";
5
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
5
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, createClient, fromApiError };
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.26.0";
2
+ var version = "0.28.0";
3
3
  //#endregion
4
4
  export { version };
5
5
 
@@ -1,4 +1,5 @@
1
- export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "UnauthorizedError" | "ValidationError";
1
+ import type * as Wire from "../client/types.gen";
2
+ export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "TemplateSourceError" | "UnauthorizedError" | "ValidationError";
2
3
  export interface SamvaApiErrorContext {
3
4
  readonly request?: Request | undefined;
4
5
  readonly response?: Response | undefined;
@@ -144,26 +145,26 @@ export declare class InternalError extends SamvaApiError<"InternalError"> {
144
145
  }
145
146
  type MailboxSendConflictErrorPayload = {
146
147
  readonly _tag: "MailboxSendConflictError";
147
- readonly id: string;
148
+ readonly id: Wire.MailboxActionId;
148
149
  readonly message: string;
149
- readonly receipt: Record<string, unknown>;
150
+ readonly receipt: Wire.MailboxSendReceipt;
150
151
  readonly resource: string;
151
152
  };
152
153
  export declare class MailboxSendConflictError extends SamvaApiError<"MailboxSendConflictError"> {
153
154
  readonly _tag: "MailboxSendConflictError";
154
- readonly "id": string;
155
- readonly "receipt": Record<string, unknown>;
155
+ readonly "id": Wire.MailboxActionId;
156
+ readonly "receipt": Wire.MailboxSendReceipt;
156
157
  readonly "resource": string;
157
158
  constructor(payload: Omit<MailboxSendConflictErrorPayload, "_tag">, context?: SamvaApiErrorContext);
158
159
  }
159
160
  type MailboxSendRefusedErrorPayload = {
160
161
  readonly _tag: "MailboxSendRefusedError";
161
162
  readonly message: string;
162
- readonly receipt: Record<string, unknown>;
163
+ readonly receipt: Wire.MailboxSendReceipt;
163
164
  };
164
165
  export declare class MailboxSendRefusedError extends SamvaApiError<"MailboxSendRefusedError"> {
165
166
  readonly _tag: "MailboxSendRefusedError";
166
- readonly "receipt": Record<string, unknown>;
167
+ readonly "receipt": Wire.MailboxSendReceipt;
167
168
  constructor(payload: Omit<MailboxSendRefusedErrorPayload, "_tag">, context?: SamvaApiErrorContext);
168
169
  }
169
170
  type OnboardingReviewRequiredErrorPayload = {
@@ -232,6 +233,62 @@ export declare class SenderNotReadyError extends SamvaApiError<"SenderNotReadyEr
232
233
  readonly "sender": string;
233
234
  constructor(payload: Omit<SenderNotReadyErrorPayload, "_tag">, context?: SamvaApiErrorContext);
234
235
  }
236
+ type TemplateSourceErrorPayload = {
237
+ readonly _tag: "TemplateSourceError";
238
+ readonly diagnostics: Array<{
239
+ readonly code: string;
240
+ readonly severity: "error" | "warning" | "info";
241
+ readonly message: string;
242
+ readonly origins: Array<{
243
+ readonly fileName: string;
244
+ readonly lineNumber: number;
245
+ readonly columnNumber: number;
246
+ }>;
247
+ readonly clients?: Array<string> | null;
248
+ readonly notes?: string | null;
249
+ readonly provenance?: string | null;
250
+ readonly fixtures?: Array<string> | null;
251
+ readonly occurrences?: Array<Array<{
252
+ readonly fileName: string;
253
+ readonly lineNumber: number;
254
+ readonly columnNumber: number;
255
+ }>> | null;
256
+ readonly compatibility?: {
257
+ readonly assessment: "risk" | "degradation" | "unverified" | "not-applicable";
258
+ readonly title: string;
259
+ } | null;
260
+ }>;
261
+ readonly message: string;
262
+ readonly revision?: string | null;
263
+ };
264
+ export declare class TemplateSourceError extends SamvaApiError<"TemplateSourceError"> {
265
+ readonly _tag: "TemplateSourceError";
266
+ readonly "diagnostics": Array<{
267
+ readonly code: string;
268
+ readonly severity: "error" | "warning" | "info";
269
+ readonly message: string;
270
+ readonly origins: Array<{
271
+ readonly fileName: string;
272
+ readonly lineNumber: number;
273
+ readonly columnNumber: number;
274
+ }>;
275
+ readonly clients?: Array<string> | null;
276
+ readonly notes?: string | null;
277
+ readonly provenance?: string | null;
278
+ readonly fixtures?: Array<string> | null;
279
+ readonly occurrences?: Array<Array<{
280
+ readonly fileName: string;
281
+ readonly lineNumber: number;
282
+ readonly columnNumber: number;
283
+ }>> | null;
284
+ readonly compatibility?: {
285
+ readonly assessment: "risk" | "degradation" | "unverified" | "not-applicable";
286
+ readonly title: string;
287
+ } | null;
288
+ }>;
289
+ readonly "revision"?: string | null;
290
+ constructor(payload: Omit<TemplateSourceErrorPayload, "_tag">, context?: SamvaApiErrorContext);
291
+ }
235
292
  type UnauthorizedErrorPayload = {
236
293
  readonly _tag: "UnauthorizedError";
237
294
  readonly message: string;
@@ -250,7 +307,7 @@ export declare class ValidationError extends SamvaApiError<"ValidationError"> {
250
307
  readonly "fields"?: Record<string, Array<string>> | null;
251
308
  constructor(payload: Omit<ValidationErrorPayload, "_tag">, context?: SamvaApiErrorContext);
252
309
  }
253
- export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | FromAddressRequiredError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | UnauthorizedError | ValidationError;
310
+ export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | FromAddressRequiredError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | TemplateSourceError | UnauthorizedError | ValidationError;
254
311
  /** Convert a decoded error payload into its generated JavaScript error class. */
255
312
  export declare function fromApiError(error: unknown, context?: SamvaApiErrorContext): AnySamvaApiError | SamvaTransportError;
256
313
  export {};