samva 0.2.0 → 0.4.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 (51) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +14 -3
  3. package/dist/client/sdk.gen.d.ts +321 -129
  4. package/dist/client/types.gen.d.ts +1818 -777
  5. package/dist/{client-BqkU-sFv.js → client-BmZK_uCt.js} +2699 -1839
  6. package/dist/client-attribution-BslSOa_8.js +9 -0
  7. package/dist/client-attribution.d.ts +2 -0
  8. package/dist/effect/api-keys.d.ts +51 -51
  9. package/dist/effect/api-keys.js +1 -1
  10. package/dist/effect/campaigns.d.ts +320 -1005
  11. package/dist/effect/campaigns.js +1 -1
  12. package/dist/effect/categories.d.ts +6 -6
  13. package/dist/effect/client.js +1 -1
  14. package/dist/effect/contacts.d.ts +292 -314
  15. package/dist/effect/contacts.js +1 -1
  16. package/dist/effect/conversations.d.ts +305 -437
  17. package/dist/effect/conversations.js +1 -1
  18. package/dist/effect/design.d.ts +74 -74
  19. package/dist/effect/design.js +1 -1
  20. package/dist/effect/email.d.ts +233 -265
  21. package/dist/effect/email.js +2 -2
  22. package/dist/effect/generated.d.ts +13410 -14526
  23. package/dist/effect/index.d.ts +1 -0
  24. package/dist/effect/index.js +3 -2
  25. package/dist/effect/internal/client.d.ts +1 -1
  26. package/dist/effect/internal/operation.d.ts +32 -129
  27. package/dist/effect/media.d.ts +80 -0
  28. package/dist/effect/media.js +19 -0
  29. package/dist/effect/messages.d.ts +90 -307
  30. package/dist/effect/messages.js +1 -1
  31. package/dist/effect/operations.d.ts +17 -17
  32. package/dist/effect/operations.js +1 -1
  33. package/dist/effect/organizations.d.ts +162 -180
  34. package/dist/effect/organizations.js +1 -1
  35. package/dist/effect/runtime.d.ts +0 -2
  36. package/dist/effect/scheduled-messages.d.ts +242 -639
  37. package/dist/effect/scheduled-messages.js +1 -1
  38. package/dist/effect/templates.d.ts +1376 -2033
  39. package/dist/effect/templates.js +40 -30
  40. package/dist/effect/webhooks.d.ts +53 -54
  41. package/dist/effect/webhooks.js +2 -2
  42. package/dist/index.js +1 -1
  43. package/dist/{normalize-LkWl4HUF.js → normalize-BiIJnycv.js} +6 -15
  44. package/dist/normalize.d.ts +3 -33
  45. package/dist/{operation-Ccqh_yxb.js → operation-B1knNlxk.js} +83 -38
  46. package/dist/promises/index.d.ts +13 -21
  47. package/dist/promises/index.js +1 -1
  48. package/dist/promises/types.gen.d.ts +1 -1
  49. package/dist/{promises-Dgv8UmCC.js → promises-n1opem5V.js} +572 -184
  50. package/dist/service-map.d.ts +96 -44
  51. package/package.json +23 -19
@@ -23,6 +23,7 @@ export * as Contacts from "./contacts";
23
23
  export * as Conversations from "./conversations";
24
24
  export * as Design from "./design";
25
25
  export * as Email from "./email";
26
+ export * as Media from "./media";
26
27
  export * as Messages from "./messages";
27
28
  export * as Operations from "./operations";
28
29
  export * as Organizations from "./organizations";
@@ -1,4 +1,4 @@
1
- import { C as ValidationError, a as BillingProviderError, b as UnauthorizedError, d as FlagDisabledError, f as ForbiddenError, g as ResourceNotFoundError, h as RateLimitedError, l as EmailChannelError, m as PaymentRequiredError, o as ConflictError, p as InternalError, u as ExternalServiceError, w as WebhookEnqueueError } from "../client-BqkU-sFv.js";
1
+ import { C as ValidationError, a as BillingProviderError, b as UnauthorizedError, d as FlagDisabledError, f as ForbiddenError, g as ResourceNotFoundError, h as RateLimitedError, l as EmailChannelError, m as PaymentRequiredError, o as ConflictError, p as InternalError, u as ExternalServiceError, w as WebhookEnqueueError } from "../client-BmZK_uCt.js";
2
2
  import { _ as isTransient, a as catchNotFoundError, c as catchValidationError, d as isAuthError, f as isBillingError, g as isThrottlingError, h as isRetryable, i as catchConflictError, l as categoriesOf, m as isNotFoundError, n as catchBillingError, o as catchThrottlingError, p as isConflictError, r as catchCategory, s as catchTransient, t as catchAuthError, u as hasCategory, v as isValidationError } from "../categories-CsUa8ojo.js";
3
3
  import { t as retry_exports } from "./retry.js";
4
4
  import { t as api_keys_exports } from "./api-keys.js";
@@ -8,10 +8,11 @@ import { t as contacts_exports } from "./contacts.js";
8
8
  import { t as conversations_exports } from "./conversations.js";
9
9
  import { t as design_exports } from "./design.js";
10
10
  import { t as email_exports } from "./email.js";
11
+ import { t as media_exports } from "./media.js";
11
12
  import { t as messages_exports } from "./messages.js";
12
13
  import { t as operations_exports } from "./operations.js";
13
14
  import { t as organizations_exports } from "./organizations.js";
14
15
  import { t as scheduled_messages_exports } from "./scheduled-messages.js";
15
16
  import { t as templates_exports } from "./templates.js";
16
17
  import { t as webhooks_exports } from "./webhooks.js";
17
- export { api_keys_exports as ApiKeys, BillingProviderError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contacts_exports as Contacts, conversations_exports as Conversations, design_exports as Design, email_exports as Email, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, InternalError, messages_exports as Messages, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, templates_exports as Templates, UnauthorizedError, ValidationError, WebhookEnqueueError, webhooks_exports as Webhooks, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
18
+ export { api_keys_exports as ApiKeys, BillingProviderError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contacts_exports as Contacts, conversations_exports as Conversations, design_exports as Design, email_exports as Email, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, InternalError, media_exports as Media, messages_exports as Messages, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, templates_exports as Templates, UnauthorizedError, ValidationError, WebhookEnqueueError, webhooks_exports as Webhooks, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
@@ -4,7 +4,7 @@ import { HttpApiClient } from "effect/unstable/httpapi";
4
4
  import { SamvaApi } from "../generated";
5
5
  export interface ConfigBase {
6
6
  readonly baseUrl?: string;
7
- readonly headers?: Readonly<Record<string, string>>;
7
+ readonly headers?: Readonly<Record<string, string | undefined>>;
8
8
  }
9
9
  export type Config = (ConfigBase & {
10
10
  readonly apiKey: string;
@@ -15,7 +15,7 @@ type FlattenRequest<Request> = (Request extends {
15
15
  readonly payload: infer Payload;
16
16
  } ? Payload : unknown);
17
17
  type RequestArg<Method> = Method extends (request: infer Request, ...rest: ReadonlyArray<unknown>) => unknown ? Request : never;
18
- export type Input<Name extends SdkOperation> = Wire<FlattenRequest<NonNullable<RequestArg<FlatRaw[Name]>>>>;
18
+ type Input<Name extends SdkOperation> = Wire<FlattenRequest<NonNullable<RequestArg<FlatRaw[Name]>>>>;
19
19
  type IdempotencyKeyField<Request> = Request extends {
20
20
  readonly headers: {
21
21
  readonly "idempotency-key": infer Key;
@@ -49,7 +49,6 @@ type PaginationCompanions<Parameters, A, E, R> = {} extends Parameters ? {
49
49
  readonly items: (input: Parameters) => Stream.Stream<EnvelopeItem<A>, E, R>;
50
50
  };
51
51
  type WithPagination<Method> = Method extends (input: infer Parameters) => Effect.Effect<infer A, infer E, infer R> ? IsPaginated<A> extends true ? Method & PaginationCompanions<Parameters, A, E, R> : Method : Method;
52
- export declare const stripUndefined: <Value>(input: Value) => Value;
53
52
  export declare const make: <Name extends SdkOperation>(operationName: Name) => WithPagination<OperationFunction<Name>>;
54
53
  type MessagePayload = typeof SendMessagePayload.Encoded;
55
54
  type MessageRecipient = MessagePayload["to"][number];
@@ -60,12 +59,6 @@ type ErgonomicMessageRecipient = MessageRecipient | ContactObjectRecipient | str
60
59
  type EmailPayload = Extract<MessagePayload, {
61
60
  readonly channel: "email";
62
61
  }>;
63
- type SmsPayload = Extract<MessagePayload, {
64
- readonly channel: "sms";
65
- }>;
66
- type WhatsAppPayload = Extract<MessagePayload, {
67
- readonly channel: "whatsapp";
68
- }>;
69
62
  type ErgonomicReplyTo = string | ReadonlyArray<string>;
70
63
  type ErgonomicEmailList = string | ReadonlyArray<string>;
71
64
  type ErgonomicEmailContent = Omit<EmailPayload["email"], "replyTo"> & {
@@ -74,16 +67,12 @@ type ErgonomicEmailContent = Omit<EmailPayload["email"], "replyTo"> & {
74
67
  export interface SendOptions {
75
68
  readonly idempotencyKey?: string;
76
69
  }
77
- export type MessageSendInput = (Omit<EmailPayload, "to" | "cc" | "bcc" | "email"> & {
70
+ export type MessageSendInput = Omit<EmailPayload, "to" | "cc" | "bcc" | "email"> & {
78
71
  readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
79
72
  readonly cc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient> | null;
80
73
  readonly bcc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient> | null;
81
74
  readonly email: ErgonomicEmailContent;
82
- }) | (Omit<SmsPayload, "to"> & {
83
- readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
84
- }) | (Omit<WhatsAppPayload, "to"> & {
85
- readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
86
- });
75
+ };
87
76
  export type EmailSendInput = Omit<EmailPayload, "channel" | "email" | "to" | "cc" | "bcc"> & ErgonomicEmailContent & {
88
77
  readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
89
78
  readonly cc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
@@ -98,13 +87,13 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
98
87
  readonly actorMetadata: {
99
88
  readonly [x: string]: import("../generated").JsonValue;
100
89
  } | null;
101
- readonly channel: "sms" | "whatsapp" | "email";
102
- readonly direction: "outbound" | "inbound";
90
+ readonly channel: "email";
91
+ readonly direction: "inbound" | "outbound";
103
92
  readonly content: import("../generated").JsonValue;
104
93
  readonly metadata: {
105
94
  readonly [x: string]: import("../generated").JsonValue;
106
95
  } | null;
107
- readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
96
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
108
97
  readonly scheduledAt: string | null;
109
98
  readonly tags: readonly string[];
110
99
  readonly categories: readonly string[];
@@ -126,7 +115,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
126
115
  readonly displayName: string | null;
127
116
  readonly type: string;
128
117
  readonly identities: readonly {
129
- readonly channel: "sms" | "whatsapp" | "email";
118
+ readonly channel: "email";
130
119
  readonly identifier: string;
131
120
  readonly verified: boolean;
132
121
  }[];
@@ -137,7 +126,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
137
126
  readonly displayName: string | null;
138
127
  readonly type: string;
139
128
  readonly identities: readonly {
140
- readonly channel: "sms" | "whatsapp" | "email";
129
+ readonly channel: "email";
141
130
  readonly identifier: string;
142
131
  readonly verified: boolean;
143
132
  }[];
@@ -148,9 +137,9 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
148
137
  readonly actorId: string | null;
149
138
  readonly contactId: string | null;
150
139
  readonly identityId: string | null;
151
- readonly kind: "to" | "cc" | "bcc";
140
+ readonly kind: "bcc" | "cc" | "to";
152
141
  readonly address: string;
153
- readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
142
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
154
143
  readonly createdAt: string;
155
144
  readonly updatedAt: string;
156
145
  readonly contact: {
@@ -159,7 +148,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
159
148
  readonly displayName: string | null;
160
149
  readonly type: string;
161
150
  readonly identities: readonly {
162
- readonly channel: "sms" | "whatsapp" | "email";
151
+ readonly channel: "email";
163
152
  readonly identifier: string;
164
153
  readonly verified: boolean;
165
154
  }[];
@@ -169,8 +158,8 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
169
158
  readonly id: string;
170
159
  readonly messageId: string;
171
160
  readonly recipientId: string | null;
172
- readonly channel: "sms" | "whatsapp" | "email";
173
- readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
161
+ readonly channel: "email";
162
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
174
163
  readonly attemptCount: number;
175
164
  readonly maxAttempts: number;
176
165
  readonly queuedAt: string | null;
@@ -217,7 +206,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
217
206
  readonly spfVerdict: string | null;
218
207
  readonly dmarcVerdict: string | null;
219
208
  readonly isAutoReply: boolean;
220
- readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
209
+ readonly autoReplyReason: "auto-response" | "delivery-status" | "out-of-office" | "read-receipt" | null;
221
210
  readonly priority: string | null;
222
211
  readonly parsingErrors: readonly string[] | null;
223
212
  readonly parsingDuration: number | null;
@@ -226,51 +215,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
226
215
  readonly createdAt: string;
227
216
  readonly updatedAt: string;
228
217
  }[];
229
- readonly smsDeliveryDetails: readonly {
230
- readonly deliveryId: string;
231
- readonly fromNumber: string;
232
- readonly toNumber: string;
233
- readonly segmentCount: number;
234
- readonly encoding: string;
235
- readonly dltTemplateId: string | null;
236
- readonly dltEntityId: string | null;
237
- readonly dltContentId: string | null;
238
- readonly carrier: string | null;
239
- readonly numSegmentsReported: number | null;
240
- readonly createdAt: string;
241
- readonly updatedAt: string;
242
- }[];
243
- readonly whatsappDeliveryDetails: readonly {
244
- readonly deliveryId: string;
245
- readonly fromNumber: string;
246
- readonly toNumber: string;
247
- readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
248
- readonly templateName: string | null;
249
- readonly templateLanguage: string | null;
250
- readonly templateCategory: string | null;
251
- readonly templateParams: {
252
- readonly [x: string]: import("../generated").JsonValue;
253
- } | null;
254
- readonly mediaUrl: string | null;
255
- readonly mediaType: string | null;
256
- readonly mediaS3Key: string | null;
257
- readonly interactiveType: string | null;
258
- readonly contextMessageId: string | null;
259
- readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
260
- readonly serviceWindowId: string | null;
261
- readonly freeEntryPointId: string | null;
262
- readonly isBillable: boolean;
263
- readonly pricing: {
264
- readonly messageCost: string;
265
- readonly reason: string;
266
- readonly sentInServiceWindow: boolean;
267
- readonly sentInFreeEntryPoint: boolean;
268
- } | null;
269
- readonly recipientId: string | null;
270
- readonly createdAt: string;
271
- readonly updatedAt: string;
272
- }[];
273
- }, import("effect/SchemaError").SchemaError | import("..").BillingProviderError | import("..").ConflictError | import("..").ExternalServiceError | import("..").FlagDisabledError | import("..").ForbiddenError | import("..").InternalError | import("..").PaymentRequiredError | import("..").RateLimitedError | import("..").ResourceNotFoundError | import("..").UnauthorizedError | import("..").ValidationError | import("..").WebhookEnqueueError | import("effect/unstable/http/HttpClientError").HttpClientError, Service>;
218
+ }, import("..").BillingProviderError | import("..").ConflictError | import("..").ExternalServiceError | import("..").FlagDisabledError | import("..").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").PaymentRequiredError | import("..").RateLimitedError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError | import("..").WebhookEnqueueError, Service>;
274
219
  export declare const sendEmail: (input: EmailSendInput, options?: SendOptions | undefined) => Effect.Effect<{
275
220
  readonly id: string;
276
221
  readonly organizationId: string;
@@ -280,13 +225,13 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
280
225
  readonly actorMetadata: {
281
226
  readonly [x: string]: import("../generated").JsonValue;
282
227
  } | null;
283
- readonly channel: "sms" | "whatsapp" | "email";
284
- readonly direction: "outbound" | "inbound";
228
+ readonly channel: "email";
229
+ readonly direction: "inbound" | "outbound";
285
230
  readonly content: import("../generated").JsonValue;
286
231
  readonly metadata: {
287
232
  readonly [x: string]: import("../generated").JsonValue;
288
233
  } | null;
289
- readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
234
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
290
235
  readonly scheduledAt: string | null;
291
236
  readonly tags: readonly string[];
292
237
  readonly categories: readonly string[];
@@ -308,7 +253,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
308
253
  readonly displayName: string | null;
309
254
  readonly type: string;
310
255
  readonly identities: readonly {
311
- readonly channel: "sms" | "whatsapp" | "email";
256
+ readonly channel: "email";
312
257
  readonly identifier: string;
313
258
  readonly verified: boolean;
314
259
  }[];
@@ -319,7 +264,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
319
264
  readonly displayName: string | null;
320
265
  readonly type: string;
321
266
  readonly identities: readonly {
322
- readonly channel: "sms" | "whatsapp" | "email";
267
+ readonly channel: "email";
323
268
  readonly identifier: string;
324
269
  readonly verified: boolean;
325
270
  }[];
@@ -330,9 +275,9 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
330
275
  readonly actorId: string | null;
331
276
  readonly contactId: string | null;
332
277
  readonly identityId: string | null;
333
- readonly kind: "to" | "cc" | "bcc";
278
+ readonly kind: "bcc" | "cc" | "to";
334
279
  readonly address: string;
335
- readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
280
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
336
281
  readonly createdAt: string;
337
282
  readonly updatedAt: string;
338
283
  readonly contact: {
@@ -341,7 +286,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
341
286
  readonly displayName: string | null;
342
287
  readonly type: string;
343
288
  readonly identities: readonly {
344
- readonly channel: "sms" | "whatsapp" | "email";
289
+ readonly channel: "email";
345
290
  readonly identifier: string;
346
291
  readonly verified: boolean;
347
292
  }[];
@@ -351,8 +296,8 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
351
296
  readonly id: string;
352
297
  readonly messageId: string;
353
298
  readonly recipientId: string | null;
354
- readonly channel: "sms" | "whatsapp" | "email";
355
- readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
299
+ readonly channel: "email";
300
+ readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
356
301
  readonly attemptCount: number;
357
302
  readonly maxAttempts: number;
358
303
  readonly queuedAt: string | null;
@@ -399,7 +344,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
399
344
  readonly spfVerdict: string | null;
400
345
  readonly dmarcVerdict: string | null;
401
346
  readonly isAutoReply: boolean;
402
- readonly autoReplyReason: "out-of-office" | "auto-response" | "delivery-status" | "read-receipt" | null;
347
+ readonly autoReplyReason: "auto-response" | "delivery-status" | "out-of-office" | "read-receipt" | null;
403
348
  readonly priority: string | null;
404
349
  readonly parsingErrors: readonly string[] | null;
405
350
  readonly parsingDuration: number | null;
@@ -408,59 +353,17 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
408
353
  readonly createdAt: string;
409
354
  readonly updatedAt: string;
410
355
  }[];
411
- readonly smsDeliveryDetails: readonly {
412
- readonly deliveryId: string;
413
- readonly fromNumber: string;
414
- readonly toNumber: string;
415
- readonly segmentCount: number;
416
- readonly encoding: string;
417
- readonly dltTemplateId: string | null;
418
- readonly dltEntityId: string | null;
419
- readonly dltContentId: string | null;
420
- readonly carrier: string | null;
421
- readonly numSegmentsReported: number | null;
422
- readonly createdAt: string;
423
- readonly updatedAt: string;
424
- }[];
425
- readonly whatsappDeliveryDetails: readonly {
426
- readonly deliveryId: string;
427
- readonly fromNumber: string;
428
- readonly toNumber: string;
429
- readonly messageType: "text" | "image" | "video" | "audio" | "document" | "location" | "contacts" | "template" | "interactive" | "sticker" | "reaction" | "order" | "button" | "system" | "unsupported";
430
- readonly templateName: string | null;
431
- readonly templateLanguage: string | null;
432
- readonly templateCategory: string | null;
433
- readonly templateParams: {
434
- readonly [x: string]: import("../generated").JsonValue;
435
- } | null;
436
- readonly mediaUrl: string | null;
437
- readonly mediaType: string | null;
438
- readonly mediaS3Key: string | null;
439
- readonly interactiveType: string | null;
440
- readonly contextMessageId: string | null;
441
- readonly conversationType: "marketing" | "utility" | "authentication" | "service" | null;
442
- readonly serviceWindowId: string | null;
443
- readonly freeEntryPointId: string | null;
444
- readonly isBillable: boolean;
445
- readonly pricing: {
446
- readonly messageCost: string;
447
- readonly reason: string;
448
- readonly sentInServiceWindow: boolean;
449
- readonly sentInFreeEntryPoint: boolean;
450
- } | null;
451
- readonly recipientId: string | null;
452
- readonly createdAt: string;
453
- readonly updatedAt: string;
454
- }[];
455
- }, import("effect/SchemaError").SchemaError | import("..").BillingProviderError | import("..").ConflictError | import("..").ExternalServiceError | import("..").FlagDisabledError | import("..").ForbiddenError | import("..").InternalError | import("..").PaymentRequiredError | import("..").RateLimitedError | import("..").ResourceNotFoundError | import("..").UnauthorizedError | import("..").ValidationError | import("..").WebhookEnqueueError | import("effect/unstable/http/HttpClientError").HttpClientError, Service>;
356
+ }, import("..").BillingProviderError | import("..").ConflictError | import("..").ExternalServiceError | import("..").FlagDisabledError | import("..").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").PaymentRequiredError | import("..").RateLimitedError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError | import("..").WebhookEnqueueError, Service>;
456
357
  type AddSenderRequest = NonNullable<RequestArg<FlatRaw["emailAddSender"]>>;
457
358
  export type EmailAddSenderInput = Omit<AddSenderRequest["payload"], "replyToEmails"> & {
458
359
  readonly replyToEmails?: ErgonomicEmailList | null | undefined;
459
360
  };
460
- export declare const addEmailSender: (input: EmailAddSenderInput) => Effect.Effect<{
361
+ export declare const addEmailSender: (input: EmailAddSenderInput, options?: SendOptions | undefined) => Effect.Effect<{
461
362
  readonly id: string & import("effect/Brand").Brand<"EmailSenderId">;
462
363
  readonly email: string;
463
- readonly status: "pending" | "failed" | "verified";
364
+ readonly status: "failed" | "pending" | "verified";
365
+ readonly providerLifecycle: "active" | "deleting" | "failed" | "provisioning";
366
+ readonly providerFailureCode: string | null;
464
367
  readonly createdAt: string;
465
- }, import("effect/SchemaError").SchemaError | import("..").ConflictError | import("..").ExternalServiceError | import("..").ForbiddenError | import("..").InternalError | import("..").ResourceNotFoundError | import("..").UnauthorizedError | import("..").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError, Service>;
368
+ }, import("..").ConflictError | import("..").ExternalServiceError | import("..").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError, Service>;
466
369
  export {};
@@ -0,0 +1,80 @@
1
+ export declare const create: (input: {
2
+ readonly filename: string;
3
+ readonly contentType: string;
4
+ readonly sizeBytes: number;
5
+ readonly purpose: string;
6
+ readonly checksumSha256?: string | null | undefined;
7
+ }) => import("effect/Effect").Effect<{
8
+ readonly id: string & import("effect/Brand").Brand<"MediaId">;
9
+ readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
10
+ readonly status: "deleted" | "failed" | "pending" | "processing" | "ready" | "uploading";
11
+ readonly filename: string;
12
+ readonly contentType: string;
13
+ readonly sizeBytes: number;
14
+ readonly width: number | null;
15
+ readonly height: number | null;
16
+ readonly durationMs: number | null;
17
+ readonly purpose: "attachment" | "avatar";
18
+ readonly checksumSha256: string | null;
19
+ readonly expiresAt: string | null;
20
+ readonly createdAt: string;
21
+ readonly confirmedAt: string | null;
22
+ readonly upload: {
23
+ readonly url: string;
24
+ readonly method: "PUT";
25
+ readonly headers: {
26
+ readonly [x: string]: string;
27
+ };
28
+ readonly expiresAt: string;
29
+ };
30
+ }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
31
+ export declare const getById: (input: {
32
+ readonly mediaId: string;
33
+ }) => import("effect/Effect").Effect<{
34
+ readonly id: string & import("effect/Brand").Brand<"MediaId">;
35
+ readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
36
+ readonly status: "deleted" | "failed" | "pending" | "processing" | "ready" | "uploading";
37
+ readonly filename: string;
38
+ readonly contentType: string;
39
+ readonly sizeBytes: number;
40
+ readonly width: number | null;
41
+ readonly height: number | null;
42
+ readonly durationMs: number | null;
43
+ readonly purpose: "attachment" | "avatar";
44
+ readonly checksumSha256: string | null;
45
+ readonly expiresAt: string | null;
46
+ readonly createdAt: string;
47
+ readonly confirmedAt: string | null;
48
+ }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
49
+ export declare const remove: (input: {
50
+ readonly mediaId: string;
51
+ }) => import("effect/Effect").Effect<{
52
+ readonly success: boolean;
53
+ }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
54
+ export declare const complete: (input: {
55
+ readonly mediaId: string;
56
+ }) => import("effect/Effect").Effect<{
57
+ readonly media: {
58
+ readonly id: string & import("effect/Brand").Brand<"MediaId">;
59
+ readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
60
+ readonly status: "deleted" | "failed" | "pending" | "processing" | "ready" | "uploading";
61
+ readonly filename: string;
62
+ readonly contentType: string;
63
+ readonly sizeBytes: number;
64
+ readonly width: number | null;
65
+ readonly height: number | null;
66
+ readonly durationMs: number | null;
67
+ readonly purpose: "attachment" | "avatar";
68
+ readonly checksumSha256: string | null;
69
+ readonly expiresAt: string | null;
70
+ readonly createdAt: string;
71
+ readonly confirmedAt: string | null;
72
+ };
73
+ readonly downloadUrl: string;
74
+ }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
75
+ export declare const downloadUrl: (input: {
76
+ readonly mediaId: string;
77
+ }) => import("effect/Effect").Effect<{
78
+ readonly url: string;
79
+ readonly expiresAt: string;
80
+ }, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
@@ -0,0 +1,19 @@
1
+ import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
+ import { n as make } from "../operation-B1knNlxk.js";
3
+ //#region src/effect/media.ts
4
+ var media_exports = /* @__PURE__ */ __exportAll({
5
+ complete: () => complete,
6
+ create: () => create,
7
+ downloadUrl: () => downloadUrl,
8
+ getById: () => getById,
9
+ remove: () => remove
10
+ });
11
+ const create = make("mediaCreate");
12
+ const getById = make("mediaGetById");
13
+ const remove = make("mediaRemove");
14
+ const complete = make("mediaComplete");
15
+ const downloadUrl = make("mediaDownloadUrl");
16
+ //#endregion
17
+ export { complete, create, downloadUrl, getById, remove, media_exports as t };
18
+
19
+ //# sourceMappingURL=media.js.map