samva 0.50.0 → 0.52.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 +49 -5
- package/README.md +137 -7
- package/dist/client/sdk.gen.d.ts +78 -38
- package/dist/client/sdk.gen.js +1554 -967
- package/dist/client/types.gen.d.ts +541 -291
- package/dist/effect/agents.d.ts +4 -4
- package/dist/effect/api-keys.d.ts +4 -6
- package/dist/effect/campaigns.d.ts +222 -230
- package/dist/effect/categories.d.ts +2 -2
- package/dist/effect/categories.js +6 -4
- package/dist/effect/contact-groups.d.ts +4 -4
- package/dist/effect/contacts.d.ts +8 -8
- package/dist/effect/conversations.d.ts +4 -4
- package/dist/effect/descriptors/integrations-catalog.d.ts +1 -1
- package/dist/effect/descriptors/integrations-catalog.js +1 -1
- package/dist/effect/descriptors/integrations.d.ts +1 -1
- package/dist/effect/descriptors/integrations.js +1 -1
- package/dist/effect/descriptors/logs.d.ts +21 -0
- package/dist/effect/descriptors/logs.js +23 -0
- package/dist/effect/descriptors/whats-app.d.ts +1 -1
- package/dist/effect/descriptors/whats-app.js +1 -1
- package/dist/effect/email.d.ts +17 -16
- package/dist/effect/errors.d.ts +1 -0
- package/dist/effect/errors.js +2 -1
- package/dist/effect/generated/agents.js +4 -4
- package/dist/effect/generated/api-keys.d.ts +0 -15
- package/dist/effect/generated/api-keys.js +1 -2
- package/dist/effect/generated/campaigns.d.ts +18 -68
- package/dist/effect/generated/campaigns.js +5 -15
- package/dist/effect/generated/email.d.ts +10 -3
- package/dist/effect/generated/email.js +6 -5
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/integrations-catalog.d.ts +93 -49
- package/dist/effect/generated/integrations-catalog.js +17 -28
- package/dist/effect/generated/integrations.d.ts +20 -40
- package/dist/effect/generated/integrations.js +9 -13
- package/dist/effect/generated/journeys.d.ts +61 -13
- package/dist/effect/generated/journeys.js +5 -5
- package/dist/effect/generated/logs.d.ts +2311 -0
- package/dist/effect/generated/logs.js +312 -0
- package/dist/effect/generated/mailboxes.d.ts +30 -24
- package/dist/effect/generated/mailboxes.js +25 -25
- package/dist/effect/generated/messages.d.ts +1 -882
- package/dist/effect/generated/messages.js +4 -243
- package/dist/effect/generated/namespaces.js +1 -1
- package/dist/effect/generated/newsletter-domains.d.ts +61 -13
- package/dist/effect/generated/newsletter-domains.js +5 -5
- package/dist/effect/generated/newsletter-issues.d.ts +166 -34
- package/dist/effect/generated/newsletter-issues.js +12 -12
- package/dist/effect/generated/newsletters.d.ts +76 -16
- package/dist/effect/generated/newsletters.js +6 -6
- package/dist/effect/generated/organizations.js +1 -1
- package/dist/effect/generated/policies.js +2 -2
- package/dist/effect/generated/scheduled-messages.d.ts +0 -26
- package/dist/effect/generated/scheduled-messages.js +2 -4
- package/dist/effect/generated/shared.d.ts +1139 -257
- package/dist/effect/generated/shared.js +323 -83
- package/dist/effect/generated/subscriptions.d.ts +4 -4
- package/dist/effect/generated/subscriptions.js +2 -6
- package/dist/effect/generated/template-registrations.d.ts +46 -10
- package/dist/effect/generated/template-registrations.js +4 -4
- package/dist/effect/generated/templates.js +2 -2
- package/dist/effect/generated/whats-app-flows.d.ts +151 -31
- package/dist/effect/generated/whats-app-flows.js +11 -11
- package/dist/effect/generated/whats-app-setup-links.d.ts +61 -13
- package/dist/effect/generated/whats-app-setup-links.js +5 -5
- package/dist/effect/generated/whats-app.d.ts +187 -65
- package/dist/effect/generated/whats-app.js +18 -24
- package/dist/effect/generated-metadata.d.ts +15 -3
- package/dist/effect/generated-metadata.js +375 -349
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +3 -1
- package/dist/effect/integrations-catalog.d.ts +92 -4
- package/dist/effect/integrations.d.ts +42 -10
- package/dist/effect/internal/client.d.ts +19 -2
- package/dist/effect/internal/client.js +35 -5
- package/dist/effect/internal/email-sender.d.ts +4 -4
- package/dist/effect/internal/email-sender.js +5 -3
- package/dist/effect/internal/log-events.d.ts +19 -0
- package/dist/effect/internal/log-events.js +53 -0
- package/dist/effect/internal/mailbox-events.d.ts +6 -2
- package/dist/effect/internal/mailbox-events.js +4 -3
- package/dist/effect/internal/operation.d.ts +11 -0
- package/dist/effect/internal/operation.js +10 -6
- package/dist/effect/internal/send.d.ts +4 -0
- package/dist/effect/internal/send.js +11 -8
- package/dist/effect/internal/timeout.d.ts +16 -0
- package/dist/effect/internal/timeout.js +20 -0
- package/dist/effect/journeys.d.ts +4 -4
- package/dist/effect/logs.d.ts +149 -0
- package/dist/effect/logs.js +18 -0
- package/dist/effect/mailboxes.d.ts +184 -178
- package/dist/effect/mailboxes.js +1 -1
- package/dist/effect/messages.d.ts +5 -5
- package/dist/effect/namespaces.d.ts +4 -4
- package/dist/effect/newsletter-domains.d.ts +2 -2
- package/dist/effect/operations.d.ts +2 -2
- package/dist/effect/scheduled-messages.d.ts +2 -6
- package/dist/effect/templates.d.ts +6 -6
- package/dist/effect/topics.d.ts +4 -4
- package/dist/effect/webhooks.d.ts +4 -4
- package/dist/effect/whatsapp-setup-links.d.ts +2 -2
- package/dist/effect/whatsapp.d.ts +73 -3
- package/dist/index.js +2 -2
- package/dist/mailbox-events.d.ts +50 -3
- package/dist/mailbox-events.js +38 -19
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +8 -1
- package/dist/promises/client.js +15 -9
- package/dist/promises/errors.gen.d.ts +14 -1
- package/dist/promises/errors.gen.js +158 -36
- package/dist/promises/index.js +2 -2
- package/dist/promises/request.d.ts +31 -2
- package/dist/promises/request.js +42 -7
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/request-id.d.ts +3 -0
- package/dist/request-id.js +7 -0
- package/dist/request-policy.d.ts +9 -0
- package/dist/request-policy.js +16 -1
- package/dist/service-map.d.ts +14 -3
- package/package.json +6 -2
package/dist/effect/mailboxes.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { MailboxEventStreamError } from "../mailbox-events.js";
|
|
3
3
|
import { forGroup } from "./internal/operation.js";
|
|
4
|
+
import { events } from "./internal/mailbox-events.js";
|
|
4
5
|
import { mailboxesOperations } from "./descriptors/mailboxes.js";
|
|
5
6
|
import { MailboxesGroup } from "./generated/mailboxes.js";
|
|
6
|
-
import { events } from "./internal/mailbox-events.js";
|
|
7
7
|
// src/effect/mailboxes.ts
|
|
8
8
|
var mailboxes_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
MailboxEventStreamError: () => MailboxEventStreamError,
|
|
@@ -42,7 +42,7 @@ export declare const list: ((input?: {
|
|
|
42
42
|
readonly createdAt: string;
|
|
43
43
|
}[];
|
|
44
44
|
readonly nextCursor: string | null;
|
|
45
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
45
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
46
46
|
readonly items: (input?: {
|
|
47
47
|
readonly limit?: number | null | undefined;
|
|
48
48
|
readonly cursor?: string | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const list: ((input?: {
|
|
|
69
69
|
readonly subject: string | null;
|
|
70
70
|
readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "screening-unavailable" | "sending-paused" | "upstream-unavailable" | null;
|
|
71
71
|
readonly createdAt: string;
|
|
72
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
72
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
73
73
|
};
|
|
74
74
|
export declare const send: (input: MessageSendInput, options?: SendOptions | undefined) => import("effect/Effect").Effect<{
|
|
75
75
|
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
@@ -82,7 +82,7 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
|
|
|
82
82
|
readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
|
|
83
83
|
}[];
|
|
84
84
|
readonly createdAt: string;
|
|
85
|
-
}, import("./errors.js").BillingProviderError | import("./errors.js").ConflictError | import("./errors.js").DeliveryUnavailableError | import("./errors.js").ExternalServiceError | import("./errors.js").FlagDisabledError | import("./errors.js").ForbiddenError | import("./errors.js").FromAddressRequiredError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("../index.js").MediaUploadError | import("./errors.js").OnboardingReviewRequiredError | import("./errors.js").PaymentRequiredError | import("./errors.js").RateLimitedError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").SenderNotReadyError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
85
|
+
}, import("./errors.js").BillingProviderError | import("./errors.js").ConflictError | import("./errors.js").DeliveryUnavailableError | import("./errors.js").ExternalServiceError | import("./errors.js").FlagDisabledError | import("./errors.js").ForbiddenError | import("./errors.js").FromAddressRequiredError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("../index.js").MediaUploadError | import("./errors.js").OnboardingReviewRequiredError | import("./errors.js").PaymentRequiredError | import("./errors.js").RateLimitedError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").SenderNotReadyError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
86
86
|
export declare const get: (input: {
|
|
87
87
|
readonly id: string;
|
|
88
88
|
}, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"messagesGet">;
|
|
@@ -238,7 +238,7 @@ export declare const getEvents: ((input: {
|
|
|
238
238
|
} | null;
|
|
239
239
|
}[];
|
|
240
240
|
readonly nextCursor: string | null;
|
|
241
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
241
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
242
242
|
readonly items: (input: {
|
|
243
243
|
readonly id: string;
|
|
244
244
|
readonly limit?: number | null | undefined;
|
|
@@ -252,5 +252,5 @@ export declare const getEvents: ((input: {
|
|
|
252
252
|
readonly metadata?: {
|
|
253
253
|
readonly [x: string]: import("./generated/index.js").JsonValue;
|
|
254
254
|
} | null;
|
|
255
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
255
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
256
256
|
};
|
|
@@ -16,7 +16,7 @@ export declare const list: ((input?: {
|
|
|
16
16
|
readonly createdAt: string;
|
|
17
17
|
}[];
|
|
18
18
|
readonly nextCursor: string | null;
|
|
19
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
19
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
20
20
|
readonly items: (input?: {
|
|
21
21
|
readonly limit?: number | null | undefined;
|
|
22
22
|
readonly cursor?: string | undefined;
|
|
@@ -26,7 +26,7 @@ export declare const list: ((input?: {
|
|
|
26
26
|
readonly id: string & import("effect/Brand").Brand<"NamespaceId">;
|
|
27
27
|
readonly name: string;
|
|
28
28
|
readonly createdAt: string;
|
|
29
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
29
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
30
30
|
};
|
|
31
31
|
export declare const create: (input: {
|
|
32
32
|
readonly name: string;
|
|
@@ -89,7 +89,7 @@ export declare const listPortalLinks: ((input: {
|
|
|
89
89
|
readonly createdAt: string;
|
|
90
90
|
}[];
|
|
91
91
|
readonly nextCursor: string | null;
|
|
92
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
92
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
93
93
|
readonly items: (input: {
|
|
94
94
|
readonly id: string;
|
|
95
95
|
readonly limit?: number | null | undefined;
|
|
@@ -106,7 +106,7 @@ export declare const listPortalLinks: ((input: {
|
|
|
106
106
|
readonly [x: string]: string;
|
|
107
107
|
};
|
|
108
108
|
readonly createdAt: string;
|
|
109
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
109
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
110
110
|
};
|
|
111
111
|
export declare const revokePortalLink: (input: {
|
|
112
112
|
readonly id: string;
|
|
@@ -30,7 +30,7 @@ export declare const list: ((input: {
|
|
|
30
30
|
readonly verificationErrors: readonly string[];
|
|
31
31
|
}[];
|
|
32
32
|
readonly nextCursor: string | null;
|
|
33
|
-
}, import("./errors.js").ConflictError | import("./errors.js").
|
|
33
|
+
}, import("./errors.js").ConflictError | import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
34
34
|
readonly items: (input: {
|
|
35
35
|
readonly id: string;
|
|
36
36
|
readonly limit?: number | null | undefined;
|
|
@@ -55,7 +55,7 @@ export declare const list: ((input: {
|
|
|
55
55
|
readonly value: string;
|
|
56
56
|
}[];
|
|
57
57
|
readonly verificationErrors: readonly string[];
|
|
58
|
-
}, import("./errors.js").ConflictError | import("./errors.js").
|
|
58
|
+
}, import("./errors.js").ConflictError | import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
59
59
|
};
|
|
60
60
|
export declare const add: (input: {
|
|
61
61
|
readonly id: string;
|
|
@@ -34,7 +34,7 @@ export declare const list: ((input?: {
|
|
|
34
34
|
readonly completedAt: string | null;
|
|
35
35
|
}[];
|
|
36
36
|
readonly nextCursor: string | null;
|
|
37
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
37
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
38
38
|
readonly items: (input?: {
|
|
39
39
|
readonly limit?: number | null | undefined;
|
|
40
40
|
readonly cursor?: string | undefined;
|
|
@@ -62,7 +62,7 @@ export declare const list: ((input?: {
|
|
|
62
62
|
readonly updatedAt: string;
|
|
63
63
|
readonly startedAt: string | null;
|
|
64
64
|
readonly completedAt: string | null;
|
|
65
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
65
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
66
66
|
};
|
|
67
67
|
export declare const get: (input: {
|
|
68
68
|
readonly id: string;
|
|
@@ -826,13 +826,11 @@ export declare const list: ((input?: {
|
|
|
826
826
|
readonly failureReason: string | null;
|
|
827
827
|
readonly attempts: number;
|
|
828
828
|
readonly createdBy: string | null;
|
|
829
|
-
readonly actorEmail: string;
|
|
830
|
-
readonly memberRole: string;
|
|
831
829
|
readonly createdAt: string;
|
|
832
830
|
readonly updatedAt: string;
|
|
833
831
|
}[];
|
|
834
832
|
readonly nextCursor: string | null;
|
|
835
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
833
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
836
834
|
readonly items: (input?: {
|
|
837
835
|
readonly limit?: number | null | undefined;
|
|
838
836
|
readonly cursor?: string | undefined;
|
|
@@ -1153,11 +1151,9 @@ export declare const list: ((input?: {
|
|
|
1153
1151
|
readonly failureReason: string | null;
|
|
1154
1152
|
readonly attempts: number;
|
|
1155
1153
|
readonly createdBy: string | null;
|
|
1156
|
-
readonly actorEmail: string;
|
|
1157
|
-
readonly memberRole: string;
|
|
1158
1154
|
readonly createdAt: string;
|
|
1159
1155
|
readonly updatedAt: string;
|
|
1160
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
1156
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
1161
1157
|
};
|
|
1162
1158
|
export declare const get: (input: {
|
|
1163
1159
|
readonly id: string;
|
|
@@ -47,7 +47,7 @@ export declare const list: ((input?: {
|
|
|
47
47
|
readonly updatedAt: string;
|
|
48
48
|
}[];
|
|
49
49
|
readonly nextCursor: string | null;
|
|
50
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
50
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
51
51
|
readonly items: (input?: {
|
|
52
52
|
readonly limit?: number | null | undefined;
|
|
53
53
|
readonly cursor?: string | undefined;
|
|
@@ -82,7 +82,7 @@ export declare const list: ((input?: {
|
|
|
82
82
|
readonly lastUsedAt: string | null;
|
|
83
83
|
readonly createdAt: string;
|
|
84
84
|
readonly updatedAt: string;
|
|
85
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
85
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
86
86
|
};
|
|
87
87
|
export declare const create: (input?: {
|
|
88
88
|
readonly name?: string | null | undefined;
|
|
@@ -123,7 +123,7 @@ export declare const listFamilies: ((input?: {
|
|
|
123
123
|
readonly updatedAt: string;
|
|
124
124
|
}[];
|
|
125
125
|
readonly nextCursor: string | null;
|
|
126
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
126
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
127
127
|
readonly items: (input?: {
|
|
128
128
|
readonly limit?: number | null | undefined;
|
|
129
129
|
readonly cursor?: string | undefined;
|
|
@@ -143,7 +143,7 @@ export declare const listFamilies: ((input?: {
|
|
|
143
143
|
}[];
|
|
144
144
|
readonly createdAt: string;
|
|
145
145
|
readonly updatedAt: string;
|
|
146
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
146
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
147
147
|
};
|
|
148
148
|
export declare const createFamily: (input: {
|
|
149
149
|
readonly name: string;
|
|
@@ -348,7 +348,7 @@ export declare const listInputContracts: ((input: {
|
|
|
348
348
|
readonly createdAt: string;
|
|
349
349
|
}[];
|
|
350
350
|
readonly nextCursor: string | null;
|
|
351
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
351
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
352
352
|
readonly items: (input: {
|
|
353
353
|
readonly id: string;
|
|
354
354
|
readonly limit?: number | null | undefined;
|
|
@@ -363,7 +363,7 @@ export declare const listInputContracts: ((input: {
|
|
|
363
363
|
readonly [x: string]: import("./generated/index.js").JsonValue;
|
|
364
364
|
};
|
|
365
365
|
readonly createdAt: string;
|
|
366
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
366
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
367
367
|
};
|
|
368
368
|
export declare const getInputContract: (input: {
|
|
369
369
|
readonly id: string;
|
package/dist/effect/topics.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const listSubscriptions: ((input: {
|
|
|
61
61
|
readonly updatedAt: string;
|
|
62
62
|
}[];
|
|
63
63
|
readonly nextCursor: string | null;
|
|
64
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
64
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
65
65
|
readonly items: (input: {
|
|
66
66
|
readonly id: string;
|
|
67
67
|
readonly limit?: number | null | undefined;
|
|
@@ -77,16 +77,16 @@ export declare const listSubscriptions: ((input: {
|
|
|
77
77
|
readonly unsubscribedAt: string | null;
|
|
78
78
|
readonly createdAt: string;
|
|
79
79
|
readonly updatedAt: string;
|
|
80
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
80
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
81
81
|
};
|
|
82
82
|
export declare const setSubscriptions: (input: {
|
|
83
83
|
readonly id: string;
|
|
84
84
|
readonly contacts: readonly ({
|
|
85
|
+
readonly contactId: string;
|
|
86
|
+
} | {
|
|
85
87
|
readonly email: string;
|
|
86
88
|
} | {
|
|
87
89
|
readonly phone: string;
|
|
88
|
-
} | {
|
|
89
|
-
readonly contactId: string;
|
|
90
90
|
})[];
|
|
91
91
|
readonly channel: "email" | "sms" | "whatsapp";
|
|
92
92
|
readonly status: "subscribed" | "unsubscribed";
|
|
@@ -48,7 +48,7 @@ export declare const list: ((input?: {
|
|
|
48
48
|
};
|
|
49
49
|
}[];
|
|
50
50
|
readonly nextCursor: string | null;
|
|
51
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
51
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
52
52
|
readonly items: (input?: {
|
|
53
53
|
readonly limit?: number | null | undefined;
|
|
54
54
|
readonly cursor?: string | undefined;
|
|
@@ -76,7 +76,7 @@ export declare const list: ((input?: {
|
|
|
76
76
|
readonly exhausted: number;
|
|
77
77
|
readonly cancelled: number;
|
|
78
78
|
};
|
|
79
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
79
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
80
80
|
};
|
|
81
81
|
export declare const get: (input: {
|
|
82
82
|
readonly id: string;
|
|
@@ -168,7 +168,7 @@ export declare const getLogs: ((input: {
|
|
|
168
168
|
}[];
|
|
169
169
|
}[];
|
|
170
170
|
readonly nextCursor: string | null;
|
|
171
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
171
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
172
172
|
readonly items: (input: {
|
|
173
173
|
readonly id: string;
|
|
174
174
|
readonly limit?: number | null | undefined;
|
|
@@ -202,7 +202,7 @@ export declare const getLogs: ((input: {
|
|
|
202
202
|
readonly errorMessage: string | null;
|
|
203
203
|
readonly createdAt: string;
|
|
204
204
|
}[];
|
|
205
|
-
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
205
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
206
206
|
};
|
|
207
207
|
export declare const getStats: (input: {
|
|
208
208
|
readonly id: string;
|
|
@@ -35,7 +35,7 @@ export declare const list: ((input?: {
|
|
|
35
35
|
readonly updatedAt: string;
|
|
36
36
|
}[];
|
|
37
37
|
readonly nextCursor: string | null;
|
|
38
|
-
}, import("./errors.js").
|
|
38
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
39
39
|
readonly items: (input?: {
|
|
40
40
|
readonly limit?: number | null | undefined;
|
|
41
41
|
readonly cursor?: string | undefined;
|
|
@@ -56,7 +56,7 @@ export declare const list: ((input?: {
|
|
|
56
56
|
readonly revokedAt: string | null;
|
|
57
57
|
readonly createdAt: string;
|
|
58
58
|
readonly updatedAt: string;
|
|
59
|
-
}, import("./errors.js").
|
|
59
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
60
60
|
};
|
|
61
61
|
export declare const get: (input: {
|
|
62
62
|
readonly linkId: string;
|
|
@@ -19,13 +19,83 @@ export declare const getServiceWindowBilling: (input: {
|
|
|
19
19
|
export declare const getMediaDownloadUrl: (input: {
|
|
20
20
|
readonly deliveryId: string;
|
|
21
21
|
}, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"whatsappGetMediaDownloadUrl">;
|
|
22
|
-
export declare const listBusinessAccounts: (input?: {
|
|
23
|
-
readonly page?: number | null | undefined;
|
|
22
|
+
export declare const listBusinessAccounts: ((input?: {
|
|
24
23
|
readonly limit?: number | null | undefined;
|
|
24
|
+
readonly cursor?: string | undefined;
|
|
25
25
|
readonly isActive?: boolean | null | undefined;
|
|
26
26
|
readonly verificationStatus?: "failed" | "pending" | "suspended" | "verified" | undefined;
|
|
27
27
|
readonly namespaceId?: string | undefined;
|
|
28
|
-
} | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"whatsappListBusinessAccounts"
|
|
28
|
+
} | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"whatsappListBusinessAccounts">) & {
|
|
29
|
+
readonly pages: (input?: {
|
|
30
|
+
readonly limit?: number | null | undefined;
|
|
31
|
+
readonly cursor?: string | undefined;
|
|
32
|
+
readonly isActive?: boolean | null | undefined;
|
|
33
|
+
readonly verificationStatus?: "failed" | "pending" | "suspended" | "verified" | undefined;
|
|
34
|
+
readonly namespaceId?: string | undefined;
|
|
35
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
36
|
+
readonly items: readonly {
|
|
37
|
+
readonly id: string & import("effect/Brand").Brand<"WhatsAppBusinessAccountId">;
|
|
38
|
+
readonly organizationId: string;
|
|
39
|
+
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
40
|
+
readonly phoneNumber: string;
|
|
41
|
+
readonly phoneNumberId: string;
|
|
42
|
+
readonly displayName: string;
|
|
43
|
+
readonly whatsappBusinessAccountId: string;
|
|
44
|
+
readonly verificationStatus: "failed" | "pending" | "suspended" | "verified";
|
|
45
|
+
readonly credentialStatus: "active" | "reconnect_required";
|
|
46
|
+
readonly tokenExpiresAt: string | null;
|
|
47
|
+
readonly isDefault: boolean;
|
|
48
|
+
readonly webhookUrl: string | null;
|
|
49
|
+
readonly qualityRating: "green" | "red" | "unknown" | "yellow";
|
|
50
|
+
readonly messagingLimit: string | null;
|
|
51
|
+
readonly currentLimit: number;
|
|
52
|
+
readonly businessPortfolioId: string | null;
|
|
53
|
+
readonly businessAppConnectedAt: string | null;
|
|
54
|
+
readonly businessAppDisconnectedAt: string | null;
|
|
55
|
+
readonly businessAppDisconnectReason: "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "offboarded" | "partnerRemoved" | "primaryInactivity" | "userReRegistered" | null;
|
|
56
|
+
readonly contactsSyncRequestedAt: string | null;
|
|
57
|
+
readonly historySyncStatus: "completed" | "declined" | "importing" | "requested" | null;
|
|
58
|
+
readonly historySyncProgress: number | null;
|
|
59
|
+
readonly isActive: boolean;
|
|
60
|
+
readonly createdAt: string;
|
|
61
|
+
readonly updatedAt: string;
|
|
62
|
+
}[];
|
|
63
|
+
readonly nextCursor: string | null;
|
|
64
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
65
|
+
readonly items: (input?: {
|
|
66
|
+
readonly limit?: number | null | undefined;
|
|
67
|
+
readonly cursor?: string | undefined;
|
|
68
|
+
readonly isActive?: boolean | null | undefined;
|
|
69
|
+
readonly verificationStatus?: "failed" | "pending" | "suspended" | "verified" | undefined;
|
|
70
|
+
readonly namespaceId?: string | undefined;
|
|
71
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
72
|
+
readonly id: string & import("effect/Brand").Brand<"WhatsAppBusinessAccountId">;
|
|
73
|
+
readonly organizationId: string;
|
|
74
|
+
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
75
|
+
readonly phoneNumber: string;
|
|
76
|
+
readonly phoneNumberId: string;
|
|
77
|
+
readonly displayName: string;
|
|
78
|
+
readonly whatsappBusinessAccountId: string;
|
|
79
|
+
readonly verificationStatus: "failed" | "pending" | "suspended" | "verified";
|
|
80
|
+
readonly credentialStatus: "active" | "reconnect_required";
|
|
81
|
+
readonly tokenExpiresAt: string | null;
|
|
82
|
+
readonly isDefault: boolean;
|
|
83
|
+
readonly webhookUrl: string | null;
|
|
84
|
+
readonly qualityRating: "green" | "red" | "unknown" | "yellow";
|
|
85
|
+
readonly messagingLimit: string | null;
|
|
86
|
+
readonly currentLimit: number;
|
|
87
|
+
readonly businessPortfolioId: string | null;
|
|
88
|
+
readonly businessAppConnectedAt: string | null;
|
|
89
|
+
readonly businessAppDisconnectedAt: string | null;
|
|
90
|
+
readonly businessAppDisconnectReason: "accountDisconnected" | "businessDowngrade" | "changeNumber" | "companionInactivity" | "offboarded" | "partnerRemoved" | "primaryInactivity" | "userReRegistered" | null;
|
|
91
|
+
readonly contactsSyncRequestedAt: string | null;
|
|
92
|
+
readonly historySyncStatus: "completed" | "declined" | "importing" | "requested" | null;
|
|
93
|
+
readonly historySyncProgress: number | null;
|
|
94
|
+
readonly isActive: boolean;
|
|
95
|
+
readonly createdAt: string;
|
|
96
|
+
readonly updatedAt: string;
|
|
97
|
+
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
98
|
+
};
|
|
29
99
|
export declare const connectBusinessAccount: (input: {
|
|
30
100
|
readonly code: string | import("effect/Redacted").Redacted<string>;
|
|
31
101
|
readonly wabaId: string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./promises/errors.gen.js";
|
|
1
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTimeoutError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, fromApiError } from "./promises/errors.gen.js";
|
|
2
2
|
import { MediaUploadError } from "./inline-attachments.js";
|
|
3
3
|
import { MailboxEventStream, MailboxEventStreamError } from "./mailbox-events.js";
|
|
4
4
|
import { createClient } from "./promises/client.js";
|
|
5
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, createClient, fromApiError };
|
|
5
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, CredentialsError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MalformedRequestError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTimeoutError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, ShareLinkUnavailable, SlugTaken, TemplateInUseError, TemplateSourceError, UnauthorizedError, ValidationError, WhatsAppChannelError, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkUnavailableError, createClient, fromApiError };
|
package/dist/mailbox-events.d.ts
CHANGED
|
@@ -173,15 +173,56 @@ export declare const MAILBOX_EVENT_STREAM_PING_MILLIS = 30000;
|
|
|
173
173
|
* indistinguishable from a quiet mailbox.
|
|
174
174
|
*/
|
|
175
175
|
export declare const MAILBOX_EVENT_STREAM_IDLE_MILLIS: number;
|
|
176
|
+
export type EventStreamFrame = {
|
|
177
|
+
readonly kind: "event";
|
|
178
|
+
readonly cursor: string;
|
|
179
|
+
readonly id: string;
|
|
180
|
+
readonly event: {
|
|
181
|
+
readonly type: string;
|
|
182
|
+
readonly timestamp: string;
|
|
183
|
+
readonly data: unknown;
|
|
184
|
+
readonly match: unknown;
|
|
185
|
+
};
|
|
186
|
+
} | {
|
|
187
|
+
readonly kind: "live" | "progress";
|
|
188
|
+
readonly cursor: string;
|
|
189
|
+
} | {
|
|
190
|
+
readonly kind: "pong";
|
|
191
|
+
};
|
|
176
192
|
/** The events URL for an API origin: `https://api.samva.dev` → `wss://events.samva.dev/v1/…`. */
|
|
193
|
+
export declare const eventStreamUrl: (connection: Pick<MailboxEventStreamConnection, "baseUrl">, options: Pick<MailboxEventStreamOptions, "eventsUrl" | "cursor" | "mailboxIds">, path?: string) => URL;
|
|
177
194
|
export declare const mailboxEventsUrl: (connection: Pick<MailboxEventStreamConnection, "baseUrl">, options: Pick<MailboxEventStreamOptions, "eventsUrl" | "cursor" | "mailboxIds">) => URL;
|
|
195
|
+
/** A failure and whether the stream may try again after it. */
|
|
196
|
+
interface Outcome {
|
|
197
|
+
readonly error: MailboxEventStreamError;
|
|
198
|
+
readonly retry: boolean;
|
|
199
|
+
readonly retryAfterMillis?: number | undefined;
|
|
200
|
+
}
|
|
201
|
+
/** A refused upgrade, as the plain GET that follows it read it. */
|
|
202
|
+
interface Refusal {
|
|
203
|
+
readonly status: number;
|
|
204
|
+
readonly body: unknown;
|
|
205
|
+
readonly retryAfterSeconds: number | undefined;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* What a refusal means for the stream. Every 4xx except `408` and `429` ends it: the host will
|
|
209
|
+
* keep refusing the same request. `5xx`, `408`, and `429` retry, after the delay the host asked
|
|
210
|
+
* for when it asked for one.
|
|
211
|
+
*/
|
|
212
|
+
export declare const refusalOutcome: (refusal: Refusal) => Outcome;
|
|
178
213
|
/**
|
|
179
214
|
* A resumable stream of mailbox events. Iterate it with `for await`; break out of the loop or call
|
|
180
215
|
* {@link close} to end it.
|
|
181
216
|
*/
|
|
182
|
-
export declare class
|
|
217
|
+
export declare class EventStream<Event extends {
|
|
218
|
+
readonly cursor: string;
|
|
219
|
+
}> implements AsyncIterable<Event> {
|
|
183
220
|
#private;
|
|
184
|
-
|
|
221
|
+
private readonly path;
|
|
222
|
+
private readonly readEvent;
|
|
223
|
+
constructor(connection: MailboxEventStreamConnection, options: MailboxEventStreamOptions, path: string, readEvent: (frame: Extract<EventStreamFrame, {
|
|
224
|
+
kind: "event";
|
|
225
|
+
}>) => Event | undefined);
|
|
185
226
|
/**
|
|
186
227
|
* The position to resume from: the last handled event's cursor, or a later position the
|
|
187
228
|
* server confirmed with nothing in between for this stream. Undefined until there is one.
|
|
@@ -197,5 +238,11 @@ export declare class MailboxEventStream implements AsyncIterable<MailboxEvent> {
|
|
|
197
238
|
* {@link markHandled} was called, so a resume repeats it. A pending iteration finishes.
|
|
198
239
|
*/
|
|
199
240
|
close(): void;
|
|
200
|
-
[Symbol.asyncIterator](): AsyncIterator<
|
|
241
|
+
[Symbol.asyncIterator](): AsyncIterator<Event>;
|
|
242
|
+
}
|
|
243
|
+
/** The refusal's JSON body, or undefined when it is not JSON; reads at most {@link REFUSAL_BODY_LIMIT}. */
|
|
244
|
+
export declare const readRefusalBody: (response: Response) => Promise<unknown>;
|
|
245
|
+
export declare class MailboxEventStream extends EventStream<MailboxEvent> {
|
|
246
|
+
constructor(connection: MailboxEventStreamConnection, options?: MailboxEventStreamOptions);
|
|
201
247
|
}
|
|
248
|
+
export {};
|