samva 0.3.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.
- package/AGENTS.md +1 -1
- package/README.md +5 -1
- package/dist/client/sdk.gen.d.ts +167 -184
- package/dist/client/types.gen.d.ts +1362 -662
- package/dist/{client-BOghX8fr.js → client-BmZK_uCt.js} +1797 -935
- package/dist/client-attribution-BslSOa_8.js +9 -0
- package/dist/client-attribution.d.ts +2 -0
- package/dist/effect/api-keys.d.ts +51 -51
- package/dist/effect/api-keys.js +1 -1
- package/dist/effect/campaigns.d.ts +253 -219
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/categories.d.ts +6 -6
- package/dist/effect/client.js +1 -1
- package/dist/effect/contacts.d.ts +225 -225
- package/dist/effect/contacts.js +1 -1
- package/dist/effect/conversations.d.ts +293 -293
- package/dist/effect/conversations.js +1 -1
- package/dist/effect/design.d.ts +76 -76
- package/dist/effect/design.js +1 -1
- package/dist/effect/email.d.ts +225 -213
- package/dist/effect/email.js +2 -2
- package/dist/effect/generated.d.ts +12174 -11888
- package/dist/effect/index.js +1 -1
- package/dist/effect/internal/client.d.ts +1 -1
- package/dist/effect/internal/operation.d.ts +20 -19
- package/dist/effect/media.d.ts +9 -9
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.d.ts +64 -61
- package/dist/effect/messages.js +1 -1
- package/dist/effect/operations.d.ts +17 -17
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.d.ts +162 -162
- package/dist/effect/organizations.js +1 -1
- package/dist/effect/runtime.d.ts +0 -2
- package/dist/effect/scheduled-messages.d.ts +290 -276
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/templates.d.ts +1371 -1554
- package/dist/effect/templates.js +40 -30
- package/dist/effect/webhooks.d.ts +47 -47
- package/dist/effect/webhooks.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{normalize-BKFjbR9t.js → normalize-BiIJnycv.js} +2 -3
- package/dist/{operation-C2Q4cFJL.js → operation-B1knNlxk.js} +65 -38
- package/dist/promises/index.d.ts +10 -8
- package/dist/promises/index.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-oiy7mOyu.js → promises-n1opem5V.js} +293 -262
- package/dist/service-map.d.ts +70 -44
- package/package.json +13 -14
package/dist/effect/index.js
CHANGED
|
@@ -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-
|
|
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";
|
|
@@ -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
|
-
|
|
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];
|
|
@@ -89,12 +88,12 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
|
|
|
89
88
|
readonly [x: string]: import("../generated").JsonValue;
|
|
90
89
|
} | null;
|
|
91
90
|
readonly channel: "email";
|
|
92
|
-
readonly direction: "
|
|
91
|
+
readonly direction: "inbound" | "outbound";
|
|
93
92
|
readonly content: import("../generated").JsonValue;
|
|
94
93
|
readonly metadata: {
|
|
95
94
|
readonly [x: string]: import("../generated").JsonValue;
|
|
96
95
|
} | null;
|
|
97
|
-
readonly status: "
|
|
96
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
98
97
|
readonly scheduledAt: string | null;
|
|
99
98
|
readonly tags: readonly string[];
|
|
100
99
|
readonly categories: readonly string[];
|
|
@@ -138,9 +137,9 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
|
|
|
138
137
|
readonly actorId: string | null;
|
|
139
138
|
readonly contactId: string | null;
|
|
140
139
|
readonly identityId: string | null;
|
|
141
|
-
readonly kind: "
|
|
140
|
+
readonly kind: "bcc" | "cc" | "to";
|
|
142
141
|
readonly address: string;
|
|
143
|
-
readonly status: "
|
|
142
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
144
143
|
readonly createdAt: string;
|
|
145
144
|
readonly updatedAt: string;
|
|
146
145
|
readonly contact: {
|
|
@@ -160,7 +159,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
|
|
|
160
159
|
readonly messageId: string;
|
|
161
160
|
readonly recipientId: string | null;
|
|
162
161
|
readonly channel: "email";
|
|
163
|
-
readonly status: "
|
|
162
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
164
163
|
readonly attemptCount: number;
|
|
165
164
|
readonly maxAttempts: number;
|
|
166
165
|
readonly queuedAt: string | null;
|
|
@@ -207,7 +206,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
|
|
|
207
206
|
readonly spfVerdict: string | null;
|
|
208
207
|
readonly dmarcVerdict: string | null;
|
|
209
208
|
readonly isAutoReply: boolean;
|
|
210
|
-
readonly autoReplyReason: "
|
|
209
|
+
readonly autoReplyReason: "auto-response" | "delivery-status" | "out-of-office" | "read-receipt" | null;
|
|
211
210
|
readonly priority: string | null;
|
|
212
211
|
readonly parsingErrors: readonly string[] | null;
|
|
213
212
|
readonly parsingDuration: number | null;
|
|
@@ -216,7 +215,7 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
|
|
|
216
215
|
readonly createdAt: string;
|
|
217
216
|
readonly updatedAt: string;
|
|
218
217
|
}[];
|
|
219
|
-
}, import("..").
|
|
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>;
|
|
220
219
|
export declare const sendEmail: (input: EmailSendInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
221
220
|
readonly id: string;
|
|
222
221
|
readonly organizationId: string;
|
|
@@ -227,12 +226,12 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
|
|
|
227
226
|
readonly [x: string]: import("../generated").JsonValue;
|
|
228
227
|
} | null;
|
|
229
228
|
readonly channel: "email";
|
|
230
|
-
readonly direction: "
|
|
229
|
+
readonly direction: "inbound" | "outbound";
|
|
231
230
|
readonly content: import("../generated").JsonValue;
|
|
232
231
|
readonly metadata: {
|
|
233
232
|
readonly [x: string]: import("../generated").JsonValue;
|
|
234
233
|
} | null;
|
|
235
|
-
readonly status: "
|
|
234
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
236
235
|
readonly scheduledAt: string | null;
|
|
237
236
|
readonly tags: readonly string[];
|
|
238
237
|
readonly categories: readonly string[];
|
|
@@ -276,9 +275,9 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
|
|
|
276
275
|
readonly actorId: string | null;
|
|
277
276
|
readonly contactId: string | null;
|
|
278
277
|
readonly identityId: string | null;
|
|
279
|
-
readonly kind: "
|
|
278
|
+
readonly kind: "bcc" | "cc" | "to";
|
|
280
279
|
readonly address: string;
|
|
281
|
-
readonly status: "
|
|
280
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
282
281
|
readonly createdAt: string;
|
|
283
282
|
readonly updatedAt: string;
|
|
284
283
|
readonly contact: {
|
|
@@ -298,7 +297,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
|
|
|
298
297
|
readonly messageId: string;
|
|
299
298
|
readonly recipientId: string | null;
|
|
300
299
|
readonly channel: "email";
|
|
301
|
-
readonly status: "
|
|
300
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
302
301
|
readonly attemptCount: number;
|
|
303
302
|
readonly maxAttempts: number;
|
|
304
303
|
readonly queuedAt: string | null;
|
|
@@ -345,7 +344,7 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
|
|
|
345
344
|
readonly spfVerdict: string | null;
|
|
346
345
|
readonly dmarcVerdict: string | null;
|
|
347
346
|
readonly isAutoReply: boolean;
|
|
348
|
-
readonly autoReplyReason: "
|
|
347
|
+
readonly autoReplyReason: "auto-response" | "delivery-status" | "out-of-office" | "read-receipt" | null;
|
|
349
348
|
readonly priority: string | null;
|
|
350
349
|
readonly parsingErrors: readonly string[] | null;
|
|
351
350
|
readonly parsingDuration: number | null;
|
|
@@ -354,15 +353,17 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
|
|
|
354
353
|
readonly createdAt: string;
|
|
355
354
|
readonly updatedAt: string;
|
|
356
355
|
}[];
|
|
357
|
-
}, import("..").
|
|
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>;
|
|
358
357
|
type AddSenderRequest = NonNullable<RequestArg<FlatRaw["emailAddSender"]>>;
|
|
359
358
|
export type EmailAddSenderInput = Omit<AddSenderRequest["payload"], "replyToEmails"> & {
|
|
360
359
|
readonly replyToEmails?: ErgonomicEmailList | null | undefined;
|
|
361
360
|
};
|
|
362
|
-
export declare const addEmailSender: (input: EmailAddSenderInput) => Effect.Effect<{
|
|
361
|
+
export declare const addEmailSender: (input: EmailAddSenderInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
363
362
|
readonly id: string & import("effect/Brand").Brand<"EmailSenderId">;
|
|
364
363
|
readonly email: string;
|
|
365
|
-
readonly status: "
|
|
364
|
+
readonly status: "failed" | "pending" | "verified";
|
|
365
|
+
readonly providerLifecycle: "active" | "deleting" | "failed" | "provisioning";
|
|
366
|
+
readonly providerFailureCode: string | null;
|
|
366
367
|
readonly createdAt: string;
|
|
367
|
-
}, import("..").
|
|
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>;
|
|
368
369
|
export {};
|
package/dist/effect/media.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const create: (input: {
|
|
2
|
-
readonly purpose: string;
|
|
3
2
|
readonly filename: string;
|
|
4
3
|
readonly contentType: string;
|
|
5
4
|
readonly sizeBytes: number;
|
|
5
|
+
readonly purpose: string;
|
|
6
6
|
readonly checksumSha256?: string | null | undefined;
|
|
7
7
|
}) => import("effect/Effect").Effect<{
|
|
8
8
|
readonly id: string & import("effect/Brand").Brand<"MediaId">;
|
|
9
9
|
readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
|
|
10
|
-
readonly status: "
|
|
10
|
+
readonly status: "deleted" | "failed" | "pending" | "processing" | "ready" | "uploading";
|
|
11
11
|
readonly filename: string;
|
|
12
12
|
readonly contentType: string;
|
|
13
13
|
readonly sizeBytes: number;
|
|
@@ -27,13 +27,13 @@ export declare const create: (input: {
|
|
|
27
27
|
};
|
|
28
28
|
readonly expiresAt: string;
|
|
29
29
|
};
|
|
30
|
-
}, import("./generated").
|
|
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
31
|
export declare const getById: (input: {
|
|
32
32
|
readonly mediaId: string;
|
|
33
33
|
}) => import("effect/Effect").Effect<{
|
|
34
34
|
readonly id: string & import("effect/Brand").Brand<"MediaId">;
|
|
35
35
|
readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
|
|
36
|
-
readonly status: "
|
|
36
|
+
readonly status: "deleted" | "failed" | "pending" | "processing" | "ready" | "uploading";
|
|
37
37
|
readonly filename: string;
|
|
38
38
|
readonly contentType: string;
|
|
39
39
|
readonly sizeBytes: number;
|
|
@@ -45,19 +45,19 @@ export declare const getById: (input: {
|
|
|
45
45
|
readonly expiresAt: string | null;
|
|
46
46
|
readonly createdAt: string;
|
|
47
47
|
readonly confirmedAt: string | null;
|
|
48
|
-
}, import("./generated").
|
|
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
49
|
export declare const remove: (input: {
|
|
50
50
|
readonly mediaId: string;
|
|
51
51
|
}) => import("effect/Effect").Effect<{
|
|
52
52
|
readonly success: boolean;
|
|
53
|
-
}, import("./generated").
|
|
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
54
|
export declare const complete: (input: {
|
|
55
55
|
readonly mediaId: string;
|
|
56
56
|
}) => import("effect/Effect").Effect<{
|
|
57
57
|
readonly media: {
|
|
58
58
|
readonly id: string & import("effect/Brand").Brand<"MediaId">;
|
|
59
59
|
readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
|
|
60
|
-
readonly status: "
|
|
60
|
+
readonly status: "deleted" | "failed" | "pending" | "processing" | "ready" | "uploading";
|
|
61
61
|
readonly filename: string;
|
|
62
62
|
readonly contentType: string;
|
|
63
63
|
readonly sizeBytes: number;
|
|
@@ -71,10 +71,10 @@ export declare const complete: (input: {
|
|
|
71
71
|
readonly confirmedAt: string | null;
|
|
72
72
|
};
|
|
73
73
|
readonly downloadUrl: string;
|
|
74
|
-
}, import("./generated").
|
|
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
75
|
export declare const downloadUrl: (input: {
|
|
76
76
|
readonly mediaId: string;
|
|
77
77
|
}) => import("effect/Effect").Effect<{
|
|
78
78
|
readonly url: string;
|
|
79
79
|
readonly expiresAt: string;
|
|
80
|
-
}, import("./generated").
|
|
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>;
|
package/dist/effect/media.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
2
|
+
import { n as make } from "../operation-B1knNlxk.js";
|
|
3
3
|
//#region src/effect/media.ts
|
|
4
4
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
complete: () => complete,
|