samva 0.16.0 → 0.18.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 +9 -1
- package/README.md +57 -1
- package/dist/{rolldown-runtime-D7D4PA-g.js → _virtual/_rolldown/runtime.js} +1 -1
- package/dist/client/client/client.gen.js +174 -0
- package/dist/client/client/utils.gen.js +177 -0
- package/dist/client/client.gen.js +8 -0
- package/dist/client/core/auth.gen.js +12 -0
- package/dist/client/core/bodySerializer.gen.js +6 -0
- package/dist/client/core/params.gen.js +77 -0
- package/dist/client/core/pathSerializer.gen.js +82 -0
- package/dist/client/core/serverSentEvents.gen.js +96 -0
- package/dist/client/core/utils.gen.js +78 -0
- package/dist/client/sdk.gen.d.ts +174 -3
- package/dist/{promises-KrA2nSLg.js → client/sdk.gen.js} +464 -2289
- package/dist/client/types.gen.d.ts +1126 -11
- package/dist/client-attribution.js +9 -0
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/analytics.js +11 -9
- package/dist/effect/api-keys.d.ts +13 -13
- package/dist/effect/api-keys.js +13 -12
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/attachments.js +9 -7
- package/dist/effect/brands.d.ts +7 -7
- package/dist/effect/brands.js +12 -10
- package/dist/effect/campaigns.d.ts +18 -18
- package/dist/effect/campaigns.js +17 -15
- package/dist/effect/categories.d.ts +2 -2
- package/dist/effect/categories.js +95 -1
- package/dist/effect/client.d.ts +1 -1
- package/dist/effect/client.js +4 -5
- package/dist/effect/contact-groups.d.ts +14 -14
- package/dist/effect/contact-groups.js +15 -13
- package/dist/effect/contacts.d.ts +77 -25
- package/dist/effect/contacts.js +27 -22
- package/dist/effect/conversations.d.ts +17 -17
- package/dist/effect/conversations.js +18 -16
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/custom-fields.js +9 -7
- package/dist/effect/email.d.ts +78 -77
- package/dist/effect/email.js +68 -65
- package/dist/effect/errors.d.ts +2 -0
- package/dist/effect/errors.js +3 -0
- package/dist/effect/events.d.ts +121 -0
- package/dist/effect/events.js +17 -0
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extension-installations.js +14 -12
- package/dist/effect/extensions.d.ts +9 -9
- package/dist/effect/extensions.js +10 -8
- package/dist/effect/feedback.d.ts +2 -2
- package/dist/effect/feedback.js +6 -5
- package/dist/effect/generated/analytics.d.ts +715 -0
- package/dist/effect/generated/analytics.js +188 -0
- package/dist/effect/generated/api-keys.d.ts +1627 -0
- package/dist/effect/generated/api-keys.js +249 -0
- package/dist/effect/generated/attachments.d.ts +554 -0
- package/dist/effect/generated/attachments.js +125 -0
- package/dist/effect/generated/brands.d.ts +1118 -0
- package/dist/effect/generated/brands.js +155 -0
- package/dist/effect/generated/campaigns.d.ts +3783 -0
- package/dist/effect/generated/campaigns.js +491 -0
- package/dist/effect/generated/contact-events.d.ts +158 -0
- package/dist/effect/generated/contact-events.js +37 -0
- package/dist/effect/generated/contact-groups.d.ts +1445 -0
- package/dist/effect/generated/contact-groups.js +419 -0
- package/dist/effect/generated/contacts.d.ts +3789 -0
- package/dist/effect/generated/contacts.js +709 -0
- package/dist/effect/generated/conversations.d.ts +2870 -0
- package/dist/effect/generated/conversations.js +461 -0
- package/dist/effect/generated/custom-fields.d.ts +562 -0
- package/dist/effect/generated/custom-fields.js +162 -0
- package/dist/effect/generated/email.d.ts +10622 -0
- package/dist/effect/generated/email.js +2347 -0
- package/dist/effect/generated/events.d.ts +463 -0
- package/dist/effect/generated/events.js +70 -0
- package/dist/effect/generated/extension-installations.d.ts +1786 -0
- package/dist/effect/generated/extension-installations.js +382 -0
- package/dist/effect/generated/extensions.d.ts +927 -0
- package/dist/effect/generated/extensions.js +203 -0
- package/dist/effect/generated/feedback.d.ts +116 -0
- package/dist/effect/generated/feedback.js +43 -0
- package/dist/effect/generated/index.d.ts +61 -0
- package/dist/effect/generated/journeys.d.ts +6135 -0
- package/dist/effect/generated/journeys.js +464 -0
- package/dist/effect/generated/mailboxes.d.ts +13641 -0
- package/dist/effect/generated/mailboxes.js +2312 -0
- package/dist/effect/generated/media.d.ts +741 -0
- package/dist/effect/generated/media.js +181 -0
- package/dist/effect/generated/messages.d.ts +2355 -0
- package/dist/effect/generated/messages.js +671 -0
- package/dist/effect/generated/namespaces.d.ts +654 -0
- package/dist/effect/generated/namespaces.js +135 -0
- package/dist/effect/generated/operations.d.ts +514 -0
- package/dist/effect/generated/operations.js +80 -0
- package/dist/effect/generated/organizations.d.ts +1111 -0
- package/dist/effect/generated/organizations.js +231 -0
- package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
- package/dist/effect/generated/scheduled-messages.js +190 -0
- package/dist/effect/generated/shared.d.ts +3250 -0
- package/dist/effect/generated/shared.js +1053 -0
- package/dist/effect/generated/subscriptions.d.ts +188 -0
- package/dist/effect/generated/subscriptions.js +61 -0
- package/dist/effect/generated/templates.d.ts +8177 -0
- package/dist/effect/generated/templates.js +2214 -0
- package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
- package/dist/effect/generated/unsubscribe-groups.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +1697 -0
- package/dist/effect/generated/webhooks.js +500 -0
- package/dist/effect/generated/whoami.d.ts +291 -0
- package/dist/effect/generated/whoami.js +54 -0
- package/dist/effect/generated-metadata.d.ts +1627 -0
- package/dist/effect/generated-metadata.js +919 -0
- package/dist/effect/index.d.ts +3 -2
- package/dist/effect/index.js +33 -31
- package/dist/effect/internal/client.d.ts +10 -7
- package/dist/effect/internal/client.js +69 -0
- package/dist/effect/internal/email-sender.d.ts +17 -0
- package/dist/effect/internal/email-sender.js +21 -0
- package/dist/effect/internal/mailbox-events.js +33 -0
- package/dist/effect/internal/operation.d.ts +12 -72
- package/dist/effect/internal/operation.js +116 -0
- package/dist/effect/internal/send.d.ts +60 -0
- package/dist/effect/internal/send.js +56 -0
- package/dist/effect/journeys.d.ts +2153 -0
- package/dist/effect/journeys.js +39 -0
- package/dist/effect/mailboxes.d.ts +80 -80
- package/dist/effect/mailboxes.js +135 -3
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +10 -8
- package/dist/effect/messages.d.ts +16 -16
- package/dist/effect/messages.js +15 -12
- package/dist/effect/namespaces.d.ts +7 -7
- package/dist/effect/namespaces.js +10 -8
- package/dist/effect/operations.d.ts +5 -5
- package/dist/effect/operations.js +8 -6
- package/dist/effect/organizations.d.ts +7 -7
- package/dist/effect/organizations.js +12 -10
- package/dist/effect/pagination.js +39 -0
- package/dist/effect/retry.js +3 -3
- package/dist/effect/runtime.js +25 -0
- package/dist/effect/scheduled-messages.d.ts +7 -7
- package/dist/effect/scheduled-messages.js +10 -8
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/subscriptions.js +5 -4
- package/dist/effect/templates.d.ts +40 -40
- package/dist/effect/templates.js +39 -37
- package/dist/effect/unsubscribe-groups.d.ts +11 -11
- package/dist/effect/unsubscribe-groups.js +14 -12
- package/dist/effect/webhooks.d.ts +23 -23
- package/dist/effect/webhooks.js +16 -14
- package/dist/effect/whoami.d.ts +1 -1
- package/dist/effect/whoami.js +5 -4
- package/dist/index.js +4 -3
- package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments.js} +13 -7
- package/dist/{mailbox-events-VKR4f3qq.js → mailbox-events.js} +2 -2
- package/dist/{normalize-B79uJIeb.js → normalize.js} +2 -2
- package/dist/package.js +6 -0
- package/dist/promises/errors.gen.js +1340 -0
- package/dist/promises/index.d.ts +7 -3
- package/dist/promises/index.js +288 -3
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +85 -0
- package/dist/{operation-BTXjPrwf.js → service-map.js} +58 -219
- package/package.json +17 -3
- package/dist/categories-DV51kr2H.js +0 -187
- package/dist/client-BMUew5Wp.js +0 -13794
- package/dist/effect/generated.d.ts +0 -64004
- package/dist/mailboxes-Thp5z0oX.js +0 -161
package/dist/effect/campaigns.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { forGroup } from "./internal/operation.js";
|
|
3
|
+
import { CampaignsGroup } from "./generated/campaigns.js";
|
|
3
4
|
//#region src/effect/campaigns.ts
|
|
4
5
|
var campaigns_exports = /* @__PURE__ */ __exportAll({
|
|
5
6
|
archive: () => archive,
|
|
@@ -15,19 +16,20 @@ var campaigns_exports = /* @__PURE__ */ __exportAll({
|
|
|
15
16
|
scheduleRun: () => scheduleRun,
|
|
16
17
|
update: () => update
|
|
17
18
|
});
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
19
|
+
const make = /* @__PURE__ */ forGroup(CampaignsGroup);
|
|
20
|
+
const list = /* @__PURE__ */ make("campaignsList");
|
|
21
|
+
const create = /* @__PURE__ */ make("campaignsCreate");
|
|
22
|
+
const get = /* @__PURE__ */ make("campaignsGet");
|
|
23
|
+
const archive = /* @__PURE__ */ make("campaignsArchive");
|
|
24
|
+
const update = /* @__PURE__ */ make("campaignsUpdate");
|
|
25
|
+
const listRuns = /* @__PURE__ */ make("campaignsListRuns");
|
|
26
|
+
const scheduleRun = /* @__PURE__ */ make("campaignsScheduleRun");
|
|
27
|
+
const getRun = /* @__PURE__ */ make("campaignsGetRun");
|
|
28
|
+
const pauseRun = /* @__PURE__ */ make("campaignsPauseRun");
|
|
29
|
+
const resumeRun = /* @__PURE__ */ make("campaignsResumeRun");
|
|
30
|
+
const cancelRun = /* @__PURE__ */ make("campaignsCancelRun");
|
|
31
|
+
const listRecipients = /* @__PURE__ */ make("campaignsListRecipients");
|
|
30
32
|
//#endregion
|
|
31
|
-
export { archive, cancelRun, create, get, getRun, list, listRecipients, listRuns, pauseRun, resumeRun, scheduleRun,
|
|
33
|
+
export { archive, campaigns_exports, cancelRun, create, get, getRun, list, listRecipients, listRuns, pauseRun, resumeRun, scheduleRun, update };
|
|
32
34
|
|
|
33
35
|
//# sourceMappingURL=campaigns.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Semantic error-category helpers for the Effect SDK.
|
|
3
3
|
*
|
|
4
4
|
* Every operation's error channel carries the server's real tagged errors
|
|
5
|
-
* ({@link import("./
|
|
5
|
+
* ({@link import("./errors").ConflictError} …). These helpers let callers catch
|
|
6
6
|
* or test by *category* — auth, validation, throttling, transient … — without
|
|
7
7
|
* enumerating tags, and cover the raw transport/decode errors too. The category
|
|
8
8
|
* assignments are generated from the OpenAPI category extensions.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
import { Effect } from "effect";
|
|
21
|
-
import type { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, UnauthorizedError, ValidationError, DeliveryUnavailableError } from "./
|
|
21
|
+
import type { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, UnauthorizedError, ValidationError, DeliveryUnavailableError } from "./errors";
|
|
22
22
|
export type ErrorCategory = "auth" | "validation" | "notFound" | "conflict" | "throttling" | "billing" | "transient";
|
|
23
23
|
export declare const categoriesOf: (error: unknown) => ReadonlyArray<ErrorCategory>;
|
|
24
24
|
export declare const hasCategory: (error: unknown, category: ErrorCategory) => boolean;
|
|
@@ -1,2 +1,96 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SamvaErrorMetadata } from "./generated-metadata.js";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import * as Predicate$1 from "effect/Predicate";
|
|
4
|
+
//#region src/effect/categories.ts
|
|
5
|
+
/**
|
|
6
|
+
* Semantic error-category helpers for the Effect SDK.
|
|
7
|
+
*
|
|
8
|
+
* Every operation's error channel carries the server's real tagged errors
|
|
9
|
+
* ({@link import("./errors").ConflictError} …). These helpers let callers catch
|
|
10
|
+
* or test by *category* — auth, validation, throttling, transient … — without
|
|
11
|
+
* enumerating tags, and cover the raw transport/decode errors too. The category
|
|
12
|
+
* assignments are generated from the OpenAPI category extensions.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { catchAuthError, isRetryable } from "samva/effect";
|
|
17
|
+
*
|
|
18
|
+
* samva.messages.send(input).pipe(
|
|
19
|
+
* catchAuthError((error) => Effect.logError(`auth failed: ${error.message}`)),
|
|
20
|
+
* Effect.retry({ while: isRetryable }),
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
const emailChannelCategories = (reason) => {
|
|
25
|
+
switch (reason) {
|
|
26
|
+
case "auth": return ["auth"];
|
|
27
|
+
case "rejected": return ["validation"];
|
|
28
|
+
case "rate_limited": return ["throttling", "transient"];
|
|
29
|
+
case "transport": return ["transient"];
|
|
30
|
+
default: return [];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const categoriesOf = (error) => {
|
|
34
|
+
if (!Predicate$1.isObject(error) || typeof error._tag !== "string") return [];
|
|
35
|
+
if (error._tag === "EmailChannelError") return emailChannelCategories(error.reason);
|
|
36
|
+
return SamvaErrorMetadata[error._tag]?.categories ?? [];
|
|
37
|
+
};
|
|
38
|
+
const hasCategory = (error, category) => categoriesOf(error).includes(category);
|
|
39
|
+
const isRetryableError = (error) => {
|
|
40
|
+
if (!Predicate$1.isObject(error) || typeof error._tag !== "string") return false;
|
|
41
|
+
if (error._tag === "EmailChannelError") return categoriesOf(error).includes("transient");
|
|
42
|
+
return SamvaErrorMetadata[error._tag]?.retryable ?? false;
|
|
43
|
+
};
|
|
44
|
+
const categoryGuard = (category) => (error) => hasCategory(error, category);
|
|
45
|
+
const isAuthError = categoryGuard("auth");
|
|
46
|
+
const isValidationError = categoryGuard("validation");
|
|
47
|
+
const isNotFoundError = categoryGuard("notFound");
|
|
48
|
+
const isConflictError = categoryGuard("conflict");
|
|
49
|
+
const isThrottlingError = categoryGuard("throttling");
|
|
50
|
+
const isBillingError = categoryGuard("billing");
|
|
51
|
+
/**
|
|
52
|
+
* Network-level request failure (no HTTP response). Only `TransportError` is
|
|
53
|
+
* transient/retryable: `EncodeError` and `InvalidUrlError` are deterministic
|
|
54
|
+
* programmer errors (bad input, bad URL) that would fail identically on every
|
|
55
|
+
* attempt — retrying them would loop forever.
|
|
56
|
+
*/
|
|
57
|
+
const isRequestTransportError = (error) => {
|
|
58
|
+
if (!Predicate$1.isTagged(error, "HttpClientError")) return false;
|
|
59
|
+
const reason = error.reason;
|
|
60
|
+
return Predicate$1.isObject(reason) && Predicate$1.isTagged(reason, "TransportError");
|
|
61
|
+
};
|
|
62
|
+
/** True for transient failures, including raw request-transport errors. */
|
|
63
|
+
const isTransient = (error) => hasCategory(error, "transient") || isRequestTransportError(error);
|
|
64
|
+
/** True when an error is declared safe to retry (throttling / transient / transport). */
|
|
65
|
+
const isRetryable = (error) => isRetryableError(error) || isRequestTransportError(error);
|
|
66
|
+
/**
|
|
67
|
+
* Catch every error in `category`. The handler receives the category's error
|
|
68
|
+
* union — including `EmailChannelError` where its `reason` can place it in the
|
|
69
|
+
* category — while only total-membership classes are narrowed out of the error
|
|
70
|
+
* channel (`EmailChannelError` stays: instances with other reasons pass through).
|
|
71
|
+
*/
|
|
72
|
+
const catchCategory = (category, handler) => (effect) => {
|
|
73
|
+
const inCategory = (error) => hasCategory(error, category);
|
|
74
|
+
const outsideCategory = (error) => !hasCategory(error, category);
|
|
75
|
+
return Effect.catch(effect, (error) => {
|
|
76
|
+
if (inCategory(error)) return handler(error);
|
|
77
|
+
if (outsideCategory(error)) return Effect.fail(error);
|
|
78
|
+
return Effect.die(error);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const catchAuthError = (handler) => catchCategory("auth", handler);
|
|
82
|
+
const catchValidationError = (handler) => catchCategory("validation", handler);
|
|
83
|
+
const catchNotFoundError = (handler) => catchCategory("notFound", handler);
|
|
84
|
+
const catchConflictError = (handler) => catchCategory("conflict", handler);
|
|
85
|
+
const catchThrottlingError = (handler) => catchCategory("throttling", handler);
|
|
86
|
+
const catchBillingError = (handler) => catchCategory("billing", handler);
|
|
87
|
+
/**
|
|
88
|
+
* Catch transient failures — including raw request-transport errors — for
|
|
89
|
+
* fallback/degrade paths. The declared error channel is left intact because
|
|
90
|
+
* transient covers untyped transport errors as well.
|
|
91
|
+
*/
|
|
92
|
+
const catchTransient = (handler) => (effect) => Effect.catchIf(effect, isTransient, handler);
|
|
93
|
+
//#endregion
|
|
2
94
|
export { catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=categories.js.map
|
package/dist/effect/client.d.ts
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* the generated OpenAPI client through {@link Service}; callers do not need to
|
|
7
7
|
* construct or thread a client object through their programs.
|
|
8
8
|
*/
|
|
9
|
-
export { type Config, type ConfigBase, type Interface,
|
|
9
|
+
export { type Config, type ConfigBase, type Interface, Service, layer, layerFetch, } from "./internal/client";
|
package/dist/effect/client.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Service, layer, layerFetch } from "./internal/client.js";
|
|
3
3
|
//#region src/effect/client.ts
|
|
4
4
|
var client_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
Service: () => Service,
|
|
6
6
|
layer: () => layer,
|
|
7
|
-
layerFetch: () => layerFetch
|
|
8
|
-
raw: () => raw
|
|
7
|
+
layerFetch: () => layerFetch
|
|
9
8
|
});
|
|
10
9
|
//#endregion
|
|
11
|
-
export { Service, layer, layerFetch
|
|
10
|
+
export { Service, client_exports, layer, layerFetch };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=client.js.map
|
|
@@ -23,7 +23,7 @@ export declare const list: ((input?: {
|
|
|
23
23
|
readonly updatedAt: string;
|
|
24
24
|
}[];
|
|
25
25
|
readonly nextCursor: string | null;
|
|
26
|
-
}, import("./
|
|
26
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>) & {
|
|
27
27
|
readonly pages: (input?: {
|
|
28
28
|
readonly limit?: string | null | undefined;
|
|
29
29
|
readonly cursor?: string | null | undefined;
|
|
@@ -49,7 +49,7 @@ export declare const list: ((input?: {
|
|
|
49
49
|
readonly updatedAt: string;
|
|
50
50
|
}[];
|
|
51
51
|
readonly nextCursor: string | null;
|
|
52
|
-
}, import("./
|
|
52
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
53
53
|
readonly items: (input?: {
|
|
54
54
|
readonly limit?: string | null | undefined;
|
|
55
55
|
readonly cursor?: string | null | undefined;
|
|
@@ -72,7 +72,7 @@ export declare const list: ((input?: {
|
|
|
72
72
|
readonly isActive: boolean;
|
|
73
73
|
readonly createdAt: string;
|
|
74
74
|
readonly updatedAt: string;
|
|
75
|
-
}, import("./
|
|
75
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
76
76
|
};
|
|
77
77
|
export declare const create: (input: {
|
|
78
78
|
readonly name: string;
|
|
@@ -126,7 +126,7 @@ export declare const create: (input: {
|
|
|
126
126
|
readonly isActive: boolean;
|
|
127
127
|
readonly createdAt: string;
|
|
128
128
|
readonly updatedAt: string;
|
|
129
|
-
}, import("./
|
|
129
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
130
130
|
export declare const getById: (input: {
|
|
131
131
|
readonly id: string;
|
|
132
132
|
}) => import("effect/Effect").Effect<{
|
|
@@ -146,7 +146,7 @@ export declare const getById: (input: {
|
|
|
146
146
|
readonly isActive: boolean;
|
|
147
147
|
readonly createdAt: string;
|
|
148
148
|
readonly updatedAt: string;
|
|
149
|
-
}, import("./
|
|
149
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
150
150
|
export declare const update: (input: {
|
|
151
151
|
readonly id: string;
|
|
152
152
|
readonly name?: string | null | undefined;
|
|
@@ -200,12 +200,12 @@ export declare const update: (input: {
|
|
|
200
200
|
readonly isActive: boolean;
|
|
201
201
|
readonly createdAt: string;
|
|
202
202
|
readonly updatedAt: string;
|
|
203
|
-
}, import("./
|
|
203
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
204
204
|
export declare const remove: (input: {
|
|
205
205
|
readonly id: string;
|
|
206
206
|
}) => import("effect/Effect").Effect<{
|
|
207
207
|
readonly success: boolean;
|
|
208
|
-
}, import("./
|
|
208
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
209
209
|
export declare const preview: (input: {
|
|
210
210
|
readonly criteria: {
|
|
211
211
|
readonly tags?: readonly string[] | null | undefined;
|
|
@@ -246,14 +246,14 @@ export declare const preview: (input: {
|
|
|
246
246
|
readonly name: string;
|
|
247
247
|
readonly status: string;
|
|
248
248
|
}[];
|
|
249
|
-
}, import("./
|
|
249
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
250
250
|
export declare const evaluateDynamic: (input: {
|
|
251
251
|
readonly id: string;
|
|
252
252
|
}) => import("effect/Effect").Effect<{
|
|
253
253
|
readonly added: number;
|
|
254
254
|
readonly removed: number;
|
|
255
255
|
readonly total: number;
|
|
256
|
-
}, import("./
|
|
256
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
257
257
|
export declare const getMembers: ((input: {
|
|
258
258
|
readonly id: string;
|
|
259
259
|
readonly limit?: string | null | undefined;
|
|
@@ -282,7 +282,7 @@ export declare const getMembers: ((input: {
|
|
|
282
282
|
} | null;
|
|
283
283
|
}[];
|
|
284
284
|
readonly nextCursor: string | null;
|
|
285
|
-
}, import("./
|
|
285
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>) & {
|
|
286
286
|
readonly pages: (input: {
|
|
287
287
|
readonly id: string;
|
|
288
288
|
readonly limit?: string | null | undefined;
|
|
@@ -311,7 +311,7 @@ export declare const getMembers: ((input: {
|
|
|
311
311
|
} | null;
|
|
312
312
|
}[];
|
|
313
313
|
readonly nextCursor: string | null;
|
|
314
|
-
}, import("./
|
|
314
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
315
315
|
readonly items: (input: {
|
|
316
316
|
readonly id: string;
|
|
317
317
|
readonly limit?: string | null | undefined;
|
|
@@ -337,7 +337,7 @@ export declare const getMembers: ((input: {
|
|
|
337
337
|
readonly verified: boolean;
|
|
338
338
|
}[] | null;
|
|
339
339
|
} | null;
|
|
340
|
-
}, import("./
|
|
340
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
341
341
|
};
|
|
342
342
|
export declare const addMembers: (input: {
|
|
343
343
|
readonly id: string;
|
|
@@ -346,10 +346,10 @@ export declare const addMembers: (input: {
|
|
|
346
346
|
}) => import("effect/Effect").Effect<{
|
|
347
347
|
readonly added: number;
|
|
348
348
|
readonly skipped: number;
|
|
349
|
-
}, import("./
|
|
349
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
350
350
|
export declare const removeMembers: (input: {
|
|
351
351
|
readonly id: string;
|
|
352
352
|
readonly contactIds: readonly string[];
|
|
353
353
|
}) => import("effect/Effect").Effect<{
|
|
354
354
|
readonly removed: number;
|
|
355
|
-
}, import("./
|
|
355
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { forGroup } from "./internal/operation.js";
|
|
3
|
+
import { ContactGroupsGroup } from "./generated/contact-groups.js";
|
|
3
4
|
//#region src/effect/contact-groups.ts
|
|
4
5
|
var contact_groups_exports = /* @__PURE__ */ __exportAll({
|
|
5
6
|
addMembers: () => addMembers,
|
|
@@ -13,17 +14,18 @@ var contact_groups_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
14
|
removeMembers: () => removeMembers,
|
|
14
15
|
update: () => update
|
|
15
16
|
});
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
17
|
+
const make = /* @__PURE__ */ forGroup(ContactGroupsGroup);
|
|
18
|
+
const list = /* @__PURE__ */ make("contactGroupsList");
|
|
19
|
+
const create = /* @__PURE__ */ make("contactGroupsCreate");
|
|
20
|
+
const getById = /* @__PURE__ */ make("contactGroupsGetById");
|
|
21
|
+
const update = /* @__PURE__ */ make("contactGroupsUpdate");
|
|
22
|
+
const remove = /* @__PURE__ */ make("contactGroupsRemove");
|
|
23
|
+
const preview = /* @__PURE__ */ make("contactGroupsPreview");
|
|
24
|
+
const evaluateDynamic = /* @__PURE__ */ make("contactGroupsEvaluateDynamic");
|
|
25
|
+
const getMembers = /* @__PURE__ */ make("contactGroupsGetMembers");
|
|
26
|
+
const addMembers = /* @__PURE__ */ make("contactGroupsAddMembers");
|
|
27
|
+
const removeMembers = /* @__PURE__ */ make("contactGroupsRemoveMembers");
|
|
26
28
|
//#endregion
|
|
27
|
-
export { addMembers, create, evaluateDynamic, getById, getMembers, list, preview, remove, removeMembers,
|
|
29
|
+
export { addMembers, contact_groups_exports, create, evaluateDynamic, getById, getMembers, list, preview, remove, removeMembers, update };
|
|
28
30
|
|
|
29
31
|
//# sourceMappingURL=contact-groups.js.map
|