samva 0.2.0 → 0.3.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 (47) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +10 -3
  3. package/dist/client/sdk.gen.d.ts +232 -23
  4. package/dist/client/types.gen.d.ts +693 -352
  5. package/dist/{client-BqkU-sFv.js → client-BOghX8fr.js} +1530 -1532
  6. package/dist/effect/api-keys.d.ts +14 -14
  7. package/dist/effect/api-keys.js +1 -1
  8. package/dist/effect/campaigns.d.ts +134 -853
  9. package/dist/effect/campaigns.js +1 -1
  10. package/dist/effect/categories.d.ts +1 -1
  11. package/dist/effect/client.js +1 -1
  12. package/dist/effect/contacts.d.ts +123 -145
  13. package/dist/effect/contacts.js +1 -1
  14. package/dist/effect/conversations.d.ts +128 -260
  15. package/dist/effect/conversations.js +1 -1
  16. package/dist/effect/design.d.ts +11 -11
  17. package/dist/effect/design.js +1 -1
  18. package/dist/effect/email.d.ts +64 -108
  19. package/dist/effect/email.js +2 -2
  20. package/dist/effect/generated.d.ts +7346 -8748
  21. package/dist/effect/index.d.ts +1 -0
  22. package/dist/effect/index.js +3 -2
  23. package/dist/effect/internal/operation.d.ts +15 -113
  24. package/dist/effect/media.d.ts +80 -0
  25. package/dist/effect/media.js +19 -0
  26. package/dist/effect/messages.d.ts +41 -261
  27. package/dist/effect/messages.js +1 -1
  28. package/dist/effect/operations.d.ts +7 -7
  29. package/dist/effect/operations.js +1 -1
  30. package/dist/effect/organizations.d.ts +23 -41
  31. package/dist/effect/organizations.js +1 -1
  32. package/dist/effect/scheduled-messages.d.ts +43 -454
  33. package/dist/effect/scheduled-messages.js +1 -1
  34. package/dist/effect/templates.d.ts +175 -649
  35. package/dist/effect/templates.js +2 -2
  36. package/dist/effect/webhooks.d.ts +20 -21
  37. package/dist/effect/webhooks.js +2 -2
  38. package/dist/index.js +1 -1
  39. package/dist/{normalize-LkWl4HUF.js → normalize-BKFjbR9t.js} +5 -13
  40. package/dist/normalize.d.ts +3 -33
  41. package/dist/{operation-Ccqh_yxb.js → operation-C2Q4cFJL.js} +21 -3
  42. package/dist/promises/index.d.ts +4 -14
  43. package/dist/promises/index.js +1 -1
  44. package/dist/promises/types.gen.d.ts +1 -1
  45. package/dist/{promises-Dgv8UmCC.js → promises-oiy7mOyu.js} +386 -29
  46. package/dist/service-map.d.ts +26 -0
  47. package/package.json +17 -12
@@ -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-BOghX8fr.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 };
@@ -60,12 +60,6 @@ type ErgonomicMessageRecipient = MessageRecipient | ContactObjectRecipient | str
60
60
  type EmailPayload = Extract<MessagePayload, {
61
61
  readonly channel: "email";
62
62
  }>;
63
- type SmsPayload = Extract<MessagePayload, {
64
- readonly channel: "sms";
65
- }>;
66
- type WhatsAppPayload = Extract<MessagePayload, {
67
- readonly channel: "whatsapp";
68
- }>;
69
63
  type ErgonomicReplyTo = string | ReadonlyArray<string>;
70
64
  type ErgonomicEmailList = string | ReadonlyArray<string>;
71
65
  type ErgonomicEmailContent = Omit<EmailPayload["email"], "replyTo"> & {
@@ -74,16 +68,12 @@ type ErgonomicEmailContent = Omit<EmailPayload["email"], "replyTo"> & {
74
68
  export interface SendOptions {
75
69
  readonly idempotencyKey?: string;
76
70
  }
77
- export type MessageSendInput = (Omit<EmailPayload, "to" | "cc" | "bcc" | "email"> & {
71
+ export type MessageSendInput = Omit<EmailPayload, "to" | "cc" | "bcc" | "email"> & {
78
72
  readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
79
73
  readonly cc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient> | null;
80
74
  readonly bcc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient> | null;
81
75
  readonly email: ErgonomicEmailContent;
82
- }) | (Omit<SmsPayload, "to"> & {
83
- readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
84
- }) | (Omit<WhatsAppPayload, "to"> & {
85
- readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
86
- });
76
+ };
87
77
  export type EmailSendInput = Omit<EmailPayload, "channel" | "email" | "to" | "cc" | "bcc"> & ErgonomicEmailContent & {
88
78
  readonly to: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
89
79
  readonly cc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
@@ -98,7 +88,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
98
88
  readonly actorMetadata: {
99
89
  readonly [x: string]: import("../generated").JsonValue;
100
90
  } | null;
101
- readonly channel: "sms" | "whatsapp" | "email";
91
+ readonly channel: "email";
102
92
  readonly direction: "outbound" | "inbound";
103
93
  readonly content: import("../generated").JsonValue;
104
94
  readonly metadata: {
@@ -126,7 +116,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
126
116
  readonly displayName: string | null;
127
117
  readonly type: string;
128
118
  readonly identities: readonly {
129
- readonly channel: "sms" | "whatsapp" | "email";
119
+ readonly channel: "email";
130
120
  readonly identifier: string;
131
121
  readonly verified: boolean;
132
122
  }[];
@@ -137,7 +127,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
137
127
  readonly displayName: string | null;
138
128
  readonly type: string;
139
129
  readonly identities: readonly {
140
- readonly channel: "sms" | "whatsapp" | "email";
130
+ readonly channel: "email";
141
131
  readonly identifier: string;
142
132
  readonly verified: boolean;
143
133
  }[];
@@ -159,7 +149,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
159
149
  readonly displayName: string | null;
160
150
  readonly type: string;
161
151
  readonly identities: readonly {
162
- readonly channel: "sms" | "whatsapp" | "email";
152
+ readonly channel: "email";
163
153
  readonly identifier: string;
164
154
  readonly verified: boolean;
165
155
  }[];
@@ -169,7 +159,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
169
159
  readonly id: string;
170
160
  readonly messageId: string;
171
161
  readonly recipientId: string | null;
172
- readonly channel: "sms" | "whatsapp" | "email";
162
+ readonly channel: "email";
173
163
  readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
174
164
  readonly attemptCount: number;
175
165
  readonly maxAttempts: number;
@@ -226,51 +216,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
226
216
  readonly createdAt: string;
227
217
  readonly updatedAt: string;
228
218
  }[];
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>;
219
+ }, import("..").UnauthorizedError | import("..").ForbiddenError | import("..").InternalError | import("..").PaymentRequiredError | import("..").ResourceNotFoundError | import("..").ValidationError | import("..").BillingProviderError | import("..").FlagDisabledError | import("..").ConflictError | import("..").ExternalServiceError | import("..").RateLimitedError | import("..").WebhookEnqueueError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, Service>;
274
220
  export declare const sendEmail: (input: EmailSendInput, options?: SendOptions | undefined) => Effect.Effect<{
275
221
  readonly id: string;
276
222
  readonly organizationId: string;
@@ -280,7 +226,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
280
226
  readonly actorMetadata: {
281
227
  readonly [x: string]: import("../generated").JsonValue;
282
228
  } | null;
283
- readonly channel: "sms" | "whatsapp" | "email";
229
+ readonly channel: "email";
284
230
  readonly direction: "outbound" | "inbound";
285
231
  readonly content: import("../generated").JsonValue;
286
232
  readonly metadata: {
@@ -308,7 +254,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
308
254
  readonly displayName: string | null;
309
255
  readonly type: string;
310
256
  readonly identities: readonly {
311
- readonly channel: "sms" | "whatsapp" | "email";
257
+ readonly channel: "email";
312
258
  readonly identifier: string;
313
259
  readonly verified: boolean;
314
260
  }[];
@@ -319,7 +265,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
319
265
  readonly displayName: string | null;
320
266
  readonly type: string;
321
267
  readonly identities: readonly {
322
- readonly channel: "sms" | "whatsapp" | "email";
268
+ readonly channel: "email";
323
269
  readonly identifier: string;
324
270
  readonly verified: boolean;
325
271
  }[];
@@ -341,7 +287,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
341
287
  readonly displayName: string | null;
342
288
  readonly type: string;
343
289
  readonly identities: readonly {
344
- readonly channel: "sms" | "whatsapp" | "email";
290
+ readonly channel: "email";
345
291
  readonly identifier: string;
346
292
  readonly verified: boolean;
347
293
  }[];
@@ -351,7 +297,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
351
297
  readonly id: string;
352
298
  readonly messageId: string;
353
299
  readonly recipientId: string | null;
354
- readonly channel: "sms" | "whatsapp" | "email";
300
+ readonly channel: "email";
355
301
  readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
356
302
  readonly attemptCount: number;
357
303
  readonly maxAttempts: number;
@@ -408,51 +354,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
408
354
  readonly createdAt: string;
409
355
  readonly updatedAt: string;
410
356
  }[];
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>;
357
+ }, import("..").UnauthorizedError | import("..").ForbiddenError | import("..").InternalError | import("..").PaymentRequiredError | import("..").ResourceNotFoundError | import("..").ValidationError | import("..").BillingProviderError | import("..").FlagDisabledError | import("..").ConflictError | import("..").ExternalServiceError | import("..").RateLimitedError | import("..").WebhookEnqueueError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, Service>;
456
358
  type AddSenderRequest = NonNullable<RequestArg<FlatRaw["emailAddSender"]>>;
457
359
  export type EmailAddSenderInput = Omit<AddSenderRequest["payload"], "replyToEmails"> & {
458
360
  readonly replyToEmails?: ErgonomicEmailList | null | undefined;
@@ -462,5 +364,5 @@ export declare const addEmailSender: (input: EmailAddSenderInput) => Effect.Effe
462
364
  readonly email: string;
463
365
  readonly status: "pending" | "failed" | "verified";
464
366
  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>;
367
+ }, import("..").UnauthorizedError | import("..").ForbiddenError | import("..").InternalError | import("..").ResourceNotFoundError | import("..").ValidationError | import("..").ConflictError | import("..").ExternalServiceError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, Service>;
466
368
  export {};
@@ -0,0 +1,80 @@
1
+ export declare const create: (input: {
2
+ readonly purpose: string;
3
+ readonly filename: string;
4
+ readonly contentType: string;
5
+ readonly sizeBytes: number;
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: "pending" | "processing" | "failed" | "ready" | "uploading" | "deleted";
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").UnauthorizedError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, 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: "pending" | "processing" | "failed" | "ready" | "uploading" | "deleted";
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").UnauthorizedError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, 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").UnauthorizedError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, 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: "pending" | "processing" | "failed" | "ready" | "uploading" | "deleted";
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").UnauthorizedError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, 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").UnauthorizedError | import("./generated").ForbiddenError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("./generated").ValidationError | import("effect/unstable/http/HttpClientError").HttpClientError | import("effect/Schema").SchemaError, 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-C2Q4cFJL.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