samva 0.0.1 → 0.2.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 (79) hide show
  1. package/AGENTS.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +392 -5
  4. package/dist/categories-CsUa8ojo.js +143 -0
  5. package/dist/client/client/client.gen.d.ts +2 -0
  6. package/dist/client/client/index.d.ts +10 -0
  7. package/dist/client/client/types.gen.d.ts +120 -0
  8. package/dist/client/client/utils.gen.d.ts +37 -0
  9. package/dist/client/client.gen.d.ts +12 -0
  10. package/dist/client/core/auth.gen.d.ts +25 -0
  11. package/dist/client/core/bodySerializer.gen.d.ts +25 -0
  12. package/dist/client/core/params.gen.d.ts +43 -0
  13. package/dist/client/core/pathSerializer.gen.d.ts +33 -0
  14. package/dist/client/core/queryKeySerializer.gen.d.ts +18 -0
  15. package/dist/client/core/serverSentEvents.gen.d.ts +71 -0
  16. package/dist/client/core/types.gen.d.ts +83 -0
  17. package/dist/client/core/utils.gen.d.ts +19 -0
  18. package/dist/client/sdk.gen.d.ts +1558 -0
  19. package/dist/client/types.gen.d.ts +7917 -0
  20. package/dist/client-BqkU-sFv.js +6049 -0
  21. package/dist/effect/api-keys.d.ts +190 -0
  22. package/dist/effect/api-keys.js +27 -0
  23. package/dist/effect/campaigns.d.ts +2055 -0
  24. package/dist/effect/campaigns.js +33 -0
  25. package/dist/effect/categories.d.ts +65 -0
  26. package/dist/effect/categories.js +2 -0
  27. package/dist/effect/client.d.ts +9 -0
  28. package/dist/effect/client.js +13 -0
  29. package/dist/effect/contacts.d.ts +1278 -0
  30. package/dist/effect/contacts.js +39 -0
  31. package/dist/effect/conversations.d.ts +1604 -0
  32. package/dist/effect/conversations.js +23 -0
  33. package/dist/effect/design.d.ts +209 -0
  34. package/dist/effect/design.js +13 -0
  35. package/dist/effect/email.d.ts +1022 -0
  36. package/dist/effect/email.js +111 -0
  37. package/dist/effect/generated-metadata.d.ts +54 -0
  38. package/dist/effect/generated.d.ts +32156 -0
  39. package/dist/effect/index.d.ts +36 -0
  40. package/dist/effect/index.js +17 -0
  41. package/dist/effect/internal/client.d.ts +35 -0
  42. package/dist/effect/internal/operation.d.ts +466 -0
  43. package/dist/effect/messages.d.ts +1047 -0
  44. package/dist/effect/messages.js +23 -0
  45. package/dist/effect/operations.d.ts +97 -0
  46. package/dist/effect/operations.js +15 -0
  47. package/dist/effect/organizations.d.ts +559 -0
  48. package/dist/effect/organizations.js +21 -0
  49. package/dist/effect/pagination.d.ts +37 -0
  50. package/dist/effect/retry.d.ts +60 -0
  51. package/dist/effect/retry.js +112 -0
  52. package/dist/effect/runtime.d.ts +7 -0
  53. package/dist/effect/scheduled-messages.d.ts +1009 -0
  54. package/dist/effect/scheduled-messages.js +17 -0
  55. package/dist/effect/templates.d.ts +2591 -0
  56. package/dist/effect/templates.js +66 -0
  57. package/dist/effect/webhooks.d.ts +228 -0
  58. package/dist/effect/webhooks.js +33 -0
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.js +2 -0
  61. package/dist/normalize-LkWl4HUF.js +82 -0
  62. package/dist/normalize.d.ts +87 -0
  63. package/dist/operation-Ccqh_yxb.js +596 -0
  64. package/dist/promises/errors.gen.d.ts +179 -0
  65. package/dist/promises/index.d.ts +153 -0
  66. package/dist/promises/index.js +2 -0
  67. package/dist/promises/types.gen.d.ts +1 -0
  68. package/dist/promises-Dgv8UmCC.js +5911 -0
  69. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  70. package/dist/service-map.d.ts +732 -0
  71. package/dist/webhooks/effect.d.ts +1 -0
  72. package/dist/webhooks/effect.js +1 -0
  73. package/dist/webhooks/promise.d.ts +1 -0
  74. package/dist/webhooks/promise.js +1 -0
  75. package/package.json +151 -4
  76. package/CLAUDE.md +0 -111
  77. package/bun.lock +0 -29
  78. package/index.ts +0 -1
  79. package/tsconfig.json +0 -29
@@ -0,0 +1,559 @@
1
+ export declare const bootstrap: (input: {
2
+ readonly name: string;
3
+ }) => import("effect/Effect").Effect<{
4
+ readonly id: string;
5
+ readonly billingAccountId: string;
6
+ readonly name: string;
7
+ readonly slug: string;
8
+ readonly defaultCurrency: string;
9
+ readonly countryCode: string;
10
+ readonly timezone: string;
11
+ readonly billingEmail: string | null;
12
+ readonly plan: string;
13
+ readonly isActive: boolean;
14
+ readonly createdAt: string;
15
+ readonly updatedAt: string;
16
+ readonly metadata: {
17
+ readonly [x: string]: import("./generated").JsonValue;
18
+ } | null;
19
+ readonly design: {
20
+ readonly footer?: {
21
+ readonly address?: {
22
+ readonly region: string;
23
+ readonly street1: string;
24
+ readonly city: string;
25
+ readonly postalCode: string;
26
+ readonly country: string;
27
+ readonly street2?: string | null;
28
+ } | null;
29
+ readonly companyName?: string | null;
30
+ readonly socialLinks?: readonly {
31
+ readonly label: string;
32
+ readonly url: string;
33
+ }[] | null;
34
+ readonly customHtml?: string | null;
35
+ } | null;
36
+ readonly theme?: {
37
+ readonly text?: {
38
+ readonly [x: string]: {
39
+ readonly sizePx: number;
40
+ readonly lineHeightPx: number;
41
+ };
42
+ } | null;
43
+ readonly tracking?: {
44
+ readonly [x: string]: number;
45
+ } | null;
46
+ readonly colors?: {
47
+ readonly [x: string]: string;
48
+ } | null;
49
+ readonly colorsDark?: {
50
+ readonly [x: string]: string;
51
+ } | null;
52
+ readonly radiusPx?: {
53
+ readonly [x: string]: number;
54
+ } | null;
55
+ readonly fontFamilies?: {
56
+ readonly [x: string]: {
57
+ readonly family: string;
58
+ readonly source: "system" | "google" | "custom";
59
+ readonly fallback: string;
60
+ readonly faces?: readonly {
61
+ readonly style: "normal" | "italic";
62
+ readonly weight: number;
63
+ readonly src: string;
64
+ readonly unicodeRange?: string | null;
65
+ }[] | null;
66
+ };
67
+ } | null;
68
+ readonly fontWeights?: {
69
+ readonly [x: string]: number;
70
+ } | null;
71
+ readonly leading?: {
72
+ readonly [x: string]: number;
73
+ } | null;
74
+ readonly spacingPx?: number | null;
75
+ readonly containerPx?: {
76
+ readonly [x: string]: number;
77
+ } | null;
78
+ } | null;
79
+ readonly assets?: {
80
+ readonly logoUrl?: string | null;
81
+ readonly logoDarkUrl?: string | null;
82
+ readonly iconUrl?: string | null;
83
+ } | null;
84
+ } | null;
85
+ readonly replyToDefault: readonly string[] | null;
86
+ readonly defaultUnsubscribeGroupId: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
87
+ readonly emailFooterEnabledDefault: boolean | null;
88
+ readonly messagesUsed: number;
89
+ readonly messagesUsedThisMonth: number;
90
+ readonly smsUsed: number;
91
+ readonly smsUsedThisMonth: number;
92
+ readonly whatsappUsed: number;
93
+ readonly whatsappUsedThisMonth: number;
94
+ readonly emailUsed: number;
95
+ readonly emailUsedThisMonth: number;
96
+ readonly contactsUsed: number;
97
+ readonly conversationsUsed: number;
98
+ readonly teamMembersUsed: number;
99
+ readonly messagesResetAt: string | null;
100
+ }, import("effect/SchemaError").SchemaError | import("./generated").BillingProviderError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
101
+ export declare const create: (input: {
102
+ readonly name: string;
103
+ }) => import("effect/Effect").Effect<{
104
+ readonly id: string;
105
+ readonly billingAccountId: string;
106
+ readonly name: string;
107
+ readonly slug: string;
108
+ readonly defaultCurrency: string;
109
+ readonly countryCode: string;
110
+ readonly timezone: string;
111
+ readonly billingEmail: string | null;
112
+ readonly plan: string;
113
+ readonly isActive: boolean;
114
+ readonly createdAt: string;
115
+ readonly updatedAt: string;
116
+ readonly metadata: {
117
+ readonly [x: string]: import("./generated").JsonValue;
118
+ } | null;
119
+ readonly design: {
120
+ readonly footer?: {
121
+ readonly address?: {
122
+ readonly region: string;
123
+ readonly street1: string;
124
+ readonly city: string;
125
+ readonly postalCode: string;
126
+ readonly country: string;
127
+ readonly street2?: string | null;
128
+ } | null;
129
+ readonly companyName?: string | null;
130
+ readonly socialLinks?: readonly {
131
+ readonly label: string;
132
+ readonly url: string;
133
+ }[] | null;
134
+ readonly customHtml?: string | null;
135
+ } | null;
136
+ readonly theme?: {
137
+ readonly text?: {
138
+ readonly [x: string]: {
139
+ readonly sizePx: number;
140
+ readonly lineHeightPx: number;
141
+ };
142
+ } | null;
143
+ readonly tracking?: {
144
+ readonly [x: string]: number;
145
+ } | null;
146
+ readonly colors?: {
147
+ readonly [x: string]: string;
148
+ } | null;
149
+ readonly colorsDark?: {
150
+ readonly [x: string]: string;
151
+ } | null;
152
+ readonly radiusPx?: {
153
+ readonly [x: string]: number;
154
+ } | null;
155
+ readonly fontFamilies?: {
156
+ readonly [x: string]: {
157
+ readonly family: string;
158
+ readonly source: "system" | "google" | "custom";
159
+ readonly fallback: string;
160
+ readonly faces?: readonly {
161
+ readonly style: "normal" | "italic";
162
+ readonly weight: number;
163
+ readonly src: string;
164
+ readonly unicodeRange?: string | null;
165
+ }[] | null;
166
+ };
167
+ } | null;
168
+ readonly fontWeights?: {
169
+ readonly [x: string]: number;
170
+ } | null;
171
+ readonly leading?: {
172
+ readonly [x: string]: number;
173
+ } | null;
174
+ readonly spacingPx?: number | null;
175
+ readonly containerPx?: {
176
+ readonly [x: string]: number;
177
+ } | null;
178
+ } | null;
179
+ readonly assets?: {
180
+ readonly logoUrl?: string | null;
181
+ readonly logoDarkUrl?: string | null;
182
+ readonly iconUrl?: string | null;
183
+ } | null;
184
+ } | null;
185
+ readonly replyToDefault: readonly string[] | null;
186
+ readonly defaultUnsubscribeGroupId: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
187
+ readonly emailFooterEnabledDefault: boolean | null;
188
+ readonly messagesUsed: number;
189
+ readonly messagesUsedThisMonth: number;
190
+ readonly smsUsed: number;
191
+ readonly smsUsedThisMonth: number;
192
+ readonly whatsappUsed: number;
193
+ readonly whatsappUsedThisMonth: number;
194
+ readonly emailUsed: number;
195
+ readonly emailUsedThisMonth: number;
196
+ readonly contactsUsed: number;
197
+ readonly conversationsUsed: number;
198
+ readonly teamMembersUsed: number;
199
+ readonly messagesResetAt: string | null;
200
+ }, import("effect/SchemaError").SchemaError | import("./generated").BillingProviderError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
201
+ export declare const get: (_?: never) => import("effect/Effect").Effect<{
202
+ readonly id: string;
203
+ readonly billingAccountId: string;
204
+ readonly name: string;
205
+ readonly slug: string;
206
+ readonly defaultCurrency: string;
207
+ readonly countryCode: string;
208
+ readonly timezone: string;
209
+ readonly billingEmail: string | null;
210
+ readonly plan: string;
211
+ readonly isActive: boolean;
212
+ readonly createdAt: string;
213
+ readonly updatedAt: string;
214
+ readonly metadata: {
215
+ readonly [x: string]: import("./generated").JsonValue;
216
+ } | null;
217
+ readonly design: {
218
+ readonly footer?: {
219
+ readonly address?: {
220
+ readonly region: string;
221
+ readonly street1: string;
222
+ readonly city: string;
223
+ readonly postalCode: string;
224
+ readonly country: string;
225
+ readonly street2?: string | null;
226
+ } | null;
227
+ readonly companyName?: string | null;
228
+ readonly socialLinks?: readonly {
229
+ readonly label: string;
230
+ readonly url: string;
231
+ }[] | null;
232
+ readonly customHtml?: string | null;
233
+ } | null;
234
+ readonly theme?: {
235
+ readonly text?: {
236
+ readonly [x: string]: {
237
+ readonly sizePx: number;
238
+ readonly lineHeightPx: number;
239
+ };
240
+ } | null;
241
+ readonly tracking?: {
242
+ readonly [x: string]: number;
243
+ } | null;
244
+ readonly colors?: {
245
+ readonly [x: string]: string;
246
+ } | null;
247
+ readonly colorsDark?: {
248
+ readonly [x: string]: string;
249
+ } | null;
250
+ readonly radiusPx?: {
251
+ readonly [x: string]: number;
252
+ } | null;
253
+ readonly fontFamilies?: {
254
+ readonly [x: string]: {
255
+ readonly family: string;
256
+ readonly source: "system" | "google" | "custom";
257
+ readonly fallback: string;
258
+ readonly faces?: readonly {
259
+ readonly style: "normal" | "italic";
260
+ readonly weight: number;
261
+ readonly src: string;
262
+ readonly unicodeRange?: string | null;
263
+ }[] | null;
264
+ };
265
+ } | null;
266
+ readonly fontWeights?: {
267
+ readonly [x: string]: number;
268
+ } | null;
269
+ readonly leading?: {
270
+ readonly [x: string]: number;
271
+ } | null;
272
+ readonly spacingPx?: number | null;
273
+ readonly containerPx?: {
274
+ readonly [x: string]: number;
275
+ } | null;
276
+ } | null;
277
+ readonly assets?: {
278
+ readonly logoUrl?: string | null;
279
+ readonly logoDarkUrl?: string | null;
280
+ readonly iconUrl?: string | null;
281
+ } | null;
282
+ } | null;
283
+ readonly replyToDefault: readonly string[] | null;
284
+ readonly defaultUnsubscribeGroupId: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
285
+ readonly emailFooterEnabledDefault: boolean | null;
286
+ readonly messagesUsed: number;
287
+ readonly messagesUsedThisMonth: number;
288
+ readonly smsUsed: number;
289
+ readonly smsUsedThisMonth: number;
290
+ readonly whatsappUsed: number;
291
+ readonly whatsappUsedThisMonth: number;
292
+ readonly emailUsed: number;
293
+ readonly emailUsedThisMonth: number;
294
+ readonly contactsUsed: number;
295
+ readonly conversationsUsed: number;
296
+ readonly teamMembersUsed: number;
297
+ readonly messagesResetAt: string | null;
298
+ }, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
299
+ export declare const update: (input?: {
300
+ readonly currency?: string | null | undefined;
301
+ readonly name?: string | null | undefined;
302
+ readonly metadata?: {
303
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
304
+ readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
305
+ } | null)[] | {
306
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
307
+ } | null)[] | {
308
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
309
+ } | null)[] | {
310
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
311
+ } | null)[] | {
312
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
313
+ } | null)[] | {
314
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
315
+ } | null)[] | {
316
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
317
+ } | null)[] | {
318
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
319
+ } | null)[] | {
320
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
321
+ } | null)[] | {
322
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
323
+ } | null)[] | {
324
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
325
+ } | null)[] | {
326
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
327
+ } | null | undefined;
328
+ } | null | undefined;
329
+ readonly timezone?: string | null | undefined;
330
+ readonly isActive?: boolean | null | undefined;
331
+ readonly slug?: string | null | undefined;
332
+ readonly design?: {
333
+ readonly footer?: {
334
+ readonly address?: {
335
+ readonly region: string;
336
+ readonly street1: string;
337
+ readonly city: string;
338
+ readonly postalCode: string;
339
+ readonly country: string;
340
+ readonly street2?: string | null | undefined;
341
+ } | null | undefined;
342
+ readonly companyName?: string | null | undefined;
343
+ readonly socialLinks?: readonly {
344
+ readonly label: string;
345
+ readonly url: string;
346
+ }[] | null | undefined;
347
+ readonly customHtml?: string | null | undefined;
348
+ } | null | undefined;
349
+ readonly theme?: {
350
+ readonly text?: {
351
+ readonly [x: string]: {
352
+ readonly sizePx: number;
353
+ readonly lineHeightPx: number;
354
+ } | undefined;
355
+ } | null | undefined;
356
+ readonly tracking?: {
357
+ readonly [x: string]: number | undefined;
358
+ } | null | undefined;
359
+ readonly colors?: {
360
+ readonly [x: string]: string | undefined;
361
+ } | null | undefined;
362
+ readonly colorsDark?: {
363
+ readonly [x: string]: string | undefined;
364
+ } | null | undefined;
365
+ readonly radiusPx?: {
366
+ readonly [x: string]: number | undefined;
367
+ } | null | undefined;
368
+ readonly fontFamilies?: {
369
+ readonly [x: string]: {
370
+ readonly family: string;
371
+ readonly source: string;
372
+ readonly fallback: string;
373
+ readonly faces?: readonly {
374
+ readonly style: string;
375
+ readonly weight: number;
376
+ readonly src: string;
377
+ readonly unicodeRange?: string | null | undefined;
378
+ }[] | null | undefined;
379
+ } | undefined;
380
+ } | null | undefined;
381
+ readonly fontWeights?: {
382
+ readonly [x: string]: number | undefined;
383
+ } | null | undefined;
384
+ readonly leading?: {
385
+ readonly [x: string]: number | undefined;
386
+ } | null | undefined;
387
+ readonly spacingPx?: number | null | undefined;
388
+ readonly containerPx?: {
389
+ readonly [x: string]: number | undefined;
390
+ } | null | undefined;
391
+ } | null | undefined;
392
+ readonly assets?: {
393
+ readonly logoUrl?: string | null | undefined;
394
+ readonly logoDarkUrl?: string | null | undefined;
395
+ readonly iconUrl?: string | null | undefined;
396
+ } | null | undefined;
397
+ } | null | undefined;
398
+ readonly billingEmail?: string | null | undefined;
399
+ readonly replyToDefault?: readonly string[] | null | undefined;
400
+ readonly defaultUnsubscribeGroupId?: string | null | undefined;
401
+ readonly emailFooterEnabledDefault?: boolean | null | undefined;
402
+ readonly countryCode?: string | null | undefined;
403
+ } | undefined) => import("effect/Effect").Effect<{
404
+ readonly id: string;
405
+ readonly billingAccountId: string;
406
+ readonly name: string;
407
+ readonly slug: string;
408
+ readonly defaultCurrency: string;
409
+ readonly countryCode: string;
410
+ readonly timezone: string;
411
+ readonly billingEmail: string | null;
412
+ readonly plan: string;
413
+ readonly isActive: boolean;
414
+ readonly createdAt: string;
415
+ readonly updatedAt: string;
416
+ readonly metadata: {
417
+ readonly [x: string]: import("./generated").JsonValue;
418
+ } | null;
419
+ readonly design: {
420
+ readonly footer?: {
421
+ readonly address?: {
422
+ readonly region: string;
423
+ readonly street1: string;
424
+ readonly city: string;
425
+ readonly postalCode: string;
426
+ readonly country: string;
427
+ readonly street2?: string | null;
428
+ } | null;
429
+ readonly companyName?: string | null;
430
+ readonly socialLinks?: readonly {
431
+ readonly label: string;
432
+ readonly url: string;
433
+ }[] | null;
434
+ readonly customHtml?: string | null;
435
+ } | null;
436
+ readonly theme?: {
437
+ readonly text?: {
438
+ readonly [x: string]: {
439
+ readonly sizePx: number;
440
+ readonly lineHeightPx: number;
441
+ };
442
+ } | null;
443
+ readonly tracking?: {
444
+ readonly [x: string]: number;
445
+ } | null;
446
+ readonly colors?: {
447
+ readonly [x: string]: string;
448
+ } | null;
449
+ readonly colorsDark?: {
450
+ readonly [x: string]: string;
451
+ } | null;
452
+ readonly radiusPx?: {
453
+ readonly [x: string]: number;
454
+ } | null;
455
+ readonly fontFamilies?: {
456
+ readonly [x: string]: {
457
+ readonly family: string;
458
+ readonly source: "system" | "google" | "custom";
459
+ readonly fallback: string;
460
+ readonly faces?: readonly {
461
+ readonly style: "normal" | "italic";
462
+ readonly weight: number;
463
+ readonly src: string;
464
+ readonly unicodeRange?: string | null;
465
+ }[] | null;
466
+ };
467
+ } | null;
468
+ readonly fontWeights?: {
469
+ readonly [x: string]: number;
470
+ } | null;
471
+ readonly leading?: {
472
+ readonly [x: string]: number;
473
+ } | null;
474
+ readonly spacingPx?: number | null;
475
+ readonly containerPx?: {
476
+ readonly [x: string]: number;
477
+ } | null;
478
+ } | null;
479
+ readonly assets?: {
480
+ readonly logoUrl?: string | null;
481
+ readonly logoDarkUrl?: string | null;
482
+ readonly iconUrl?: string | null;
483
+ } | null;
484
+ } | null;
485
+ readonly replyToDefault: readonly string[] | null;
486
+ readonly defaultUnsubscribeGroupId: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
487
+ readonly emailFooterEnabledDefault: boolean | null;
488
+ readonly messagesUsed: number;
489
+ readonly messagesUsedThisMonth: number;
490
+ readonly smsUsed: number;
491
+ readonly smsUsedThisMonth: number;
492
+ readonly whatsappUsed: number;
493
+ readonly whatsappUsedThisMonth: number;
494
+ readonly emailUsed: number;
495
+ readonly emailUsedThisMonth: number;
496
+ readonly contactsUsed: number;
497
+ readonly conversationsUsed: number;
498
+ readonly teamMembersUsed: number;
499
+ readonly messagesResetAt: string | null;
500
+ }, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
501
+ export declare const getUsage: (input?: {
502
+ readonly period?: string | null | undefined;
503
+ } | undefined) => import("effect/Effect").Effect<{
504
+ readonly usage: {
505
+ readonly periodStart: string;
506
+ readonly periodEnd: string;
507
+ readonly smsCount: number;
508
+ readonly emailCount: number;
509
+ readonly whatsappCount: number;
510
+ readonly totalMessages: number;
511
+ };
512
+ readonly billing: {
513
+ readonly currency: string;
514
+ readonly includedEmails: number | null;
515
+ readonly usedEmails: number | null;
516
+ readonly overageEmails: number | null;
517
+ readonly overageCost: number | null;
518
+ };
519
+ }, import("effect/SchemaError").SchemaError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").UnauthorizedError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
520
+ declare const deleteOrganization: (input: {
521
+ readonly confirmationName: string;
522
+ } & {
523
+ readonly idempotencyKey: string;
524
+ }) => import("effect/Effect").Effect<{
525
+ readonly operation: {
526
+ readonly id: string & import("effect/Brand").Brand<"OperationId">;
527
+ readonly organizationId: string;
528
+ readonly kind: "email-domain-provisioning" | "organization-deletion";
529
+ readonly subject: {
530
+ readonly type: string;
531
+ readonly id: string;
532
+ };
533
+ readonly actor: {
534
+ readonly type: "system" | "user" | "api-key";
535
+ readonly id: string;
536
+ };
537
+ readonly status: "pending" | "failed" | "running" | "succeeded";
538
+ readonly phase: "accepted" | "dispatching" | "provisioning" | "deleting" | "finalizing" | "completed";
539
+ readonly error: {
540
+ readonly code: "validation-failed" | "conflict" | "capacity-unavailable" | "provider-rejected" | "provider-unavailable" | "timed-out" | "internal";
541
+ readonly message: string;
542
+ } | null;
543
+ readonly createdAt: string;
544
+ readonly updatedAt: string;
545
+ readonly startedAt: string | null;
546
+ readonly completedAt: string | null;
547
+ };
548
+ readonly links: {
549
+ readonly self: string;
550
+ readonly resource: {
551
+ readonly resource: {
552
+ readonly type: string;
553
+ readonly id: string;
554
+ };
555
+ readonly href: string;
556
+ };
557
+ };
558
+ }, import("effect/SchemaError").SchemaError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").UnauthorizedError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError, import("./client").Service>;
559
+ export { deleteOrganization as delete };
@@ -0,0 +1,21 @@
1
+ import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
+ import { n as make } from "../operation-Ccqh_yxb.js";
3
+ //#region src/effect/organizations.ts
4
+ var organizations_exports = /* @__PURE__ */ __exportAll({
5
+ bootstrap: () => bootstrap,
6
+ create: () => create,
7
+ delete: () => deleteOrganization,
8
+ get: () => get,
9
+ getUsage: () => getUsage,
10
+ update: () => update
11
+ });
12
+ const bootstrap = make("organizationsBootstrap");
13
+ const create = make("organizationsCreate");
14
+ const get = make("organizationsGet");
15
+ const update = make("organizationsUpdate");
16
+ const getUsage = make("organizationsGetUsage");
17
+ const deleteOrganization = make("organizationsDelete");
18
+ //#endregion
19
+ export { bootstrap, create, deleteOrganization as delete, get, getUsage, organizations_exports as t, update };
20
+
21
+ //# sourceMappingURL=organizations.js.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Stream pagination for the Effect SDK.
3
+ *
4
+ * Every list operation whose success value is the uniform page envelope —
5
+ * `{ items, pagination: { page, limit, total, totalPages } }` — gains `.pages()`
6
+ * and `.items()` companions on its domain operation. `.pages()`
7
+ * streams the raw envelopes; `.items()` flattens them into a stream of items.
8
+ *
9
+ * The traversal is **lazy**: built on `Stream.paginate` (a pull-based source),
10
+ * so each page is fetched only as the stream is consumed — `Stream.take(n)`
11
+ * stops requesting further pages. Caller params (start `page`, `limit`, filters)
12
+ * are respected; only `page` is advanced per step, and the walk stops once the
13
+ * server-echoed `page` reaches `totalPages`.
14
+ *
15
+ * Retry is **not** re-applied here: the underlying domain operation is already
16
+ * wrapped in the ambient {@link import("./retry").Service} policy (reads are
17
+ * retry-safe), so each page fetch retries on its own and pagination composes
18
+ * with retry instead of nesting retries.
19
+ */
20
+ import { Effect, Stream } from "effect";
21
+ /** The uniform page envelope every paginated list operation returns. */
22
+ export interface PageEnvelope<Item> {
23
+ readonly items: ReadonlyArray<Item>;
24
+ readonly pagination: {
25
+ readonly page: number;
26
+ readonly limit: number;
27
+ readonly total: number;
28
+ readonly totalPages: number;
29
+ };
30
+ }
31
+ /** A module list operation: direct-param input to one decoded page envelope. */
32
+ type ListOperation<Input, Item, E, R> = (input: Input) => Effect.Effect<PageEnvelope<Item>, E, R>;
33
+ /** Stream the raw page envelopes, one per request, from the caller's start page. */
34
+ export declare const streamPages: <Input, Item, E, R>(operation: ListOperation<Input, Item, E, R>, input: Input) => Stream.Stream<PageEnvelope<Item>, E, R>;
35
+ /** Stream individual items across pages, fetching the next page only when pulled. */
36
+ export declare const streamItems: <Input, Item, E, R>(operation: ListOperation<Input, Item, E, R>, input: Input) => Stream.Stream<Item, E, R>;
37
+ export {};