samva 0.56.0 → 0.56.2
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 +2 -2
- package/README.md +9 -8
- package/dist/agent/index.js +0 -2
- package/dist/agent/runtime.js +0 -2
- package/dist/agent/test.js +0 -2
- package/dist/client/client/client.gen.js +0 -2
- package/dist/client/client/utils.gen.js +0 -2
- package/dist/client/client.gen.js +0 -2
- package/dist/client/core/auth.gen.js +0 -2
- package/dist/client/core/bodySerializer.gen.js +0 -2
- package/dist/client/core/params.gen.js +0 -2
- package/dist/client/core/pathSerializer.gen.js +0 -2
- package/dist/client/core/serverSentEvents.gen.js +0 -2
- package/dist/client/core/utils.gen.js +0 -2
- package/dist/client/sdk.gen.js +0 -2
- package/dist/client-attribution.js +0 -2
- package/dist/effect/accounts.js +9 -12
- package/dist/effect/agents.js +16 -19
- package/dist/effect/analytics.js +9 -12
- package/dist/effect/api-keys.js +11 -14
- package/dist/effect/approval-requests.js +7 -10
- package/dist/effect/attachments.js +7 -10
- package/dist/effect/brands.js +9 -12
- package/dist/effect/campaigns.js +18 -21
- package/dist/effect/categories.js +0 -2
- package/dist/effect/client.js +0 -2
- package/dist/effect/contact-groups.js +13 -16
- package/dist/effect/contacts.js +29 -32
- package/dist/effect/conversations.js +16 -19
- package/dist/effect/custom-fields.js +7 -10
- package/dist/effect/descriptors/accounts.d.ts +50 -52
- package/dist/effect/descriptors/accounts.js +50 -54
- package/dist/effect/descriptors/agents.d.ts +113 -115
- package/dist/effect/descriptors/agents.js +120 -124
- package/dist/effect/descriptors/analytics.d.ts +47 -49
- package/dist/effect/descriptors/analytics.js +42 -46
- package/dist/effect/descriptors/api-keys.d.ts +69 -71
- package/dist/effect/descriptors/api-keys.js +73 -77
- package/dist/effect/descriptors/approval-requests.d.ts +34 -36
- package/dist/effect/descriptors/approval-requests.js +36 -40
- package/dist/effect/descriptors/attachments.d.ts +34 -36
- package/dist/effect/descriptors/attachments.js +36 -40
- package/dist/effect/descriptors/brands.d.ts +51 -53
- package/dist/effect/descriptors/brands.js +53 -57
- package/dist/effect/descriptors/campaigns.d.ts +130 -132
- package/dist/effect/descriptors/campaigns.js +137 -141
- package/dist/effect/descriptors/contact-groups.d.ts +86 -88
- package/dist/effect/descriptors/contact-groups.js +90 -94
- package/dist/effect/descriptors/contacts.d.ts +242 -244
- package/dist/effect/descriptors/contacts.js +227 -231
- package/dist/effect/descriptors/conversations.d.ts +114 -116
- package/dist/effect/descriptors/conversations.js +123 -127
- package/dist/effect/descriptors/custom-fields.d.ts +33 -35
- package/dist/effect/descriptors/custom-fields.js +33 -37
- package/dist/effect/descriptors/email.d.ts +623 -625
- package/dist/effect/descriptors/email.js +562 -580
- package/dist/effect/descriptors/events.d.ts +15 -17
- package/dist/effect/descriptors/events.js +14 -18
- package/dist/effect/descriptors/feedback.d.ts +7 -9
- package/dist/effect/descriptors/feedback.js +3 -5
- package/dist/effect/descriptors/integrations-catalog.d.ts +159 -161
- package/dist/effect/descriptors/integrations-catalog.js +142 -146
- package/dist/effect/descriptors/integrations.d.ts +60 -62
- package/dist/effect/descriptors/integrations.js +63 -67
- package/dist/effect/descriptors/journeys.d.ts +123 -125
- package/dist/effect/descriptors/journeys.js +133 -137
- package/dist/effect/descriptors/logs.d.ts +16 -18
- package/dist/effect/descriptors/logs.js +16 -20
- package/dist/effect/descriptors/mailboxes.d.ts +780 -782
- package/dist/effect/descriptors/mailboxes.js +795 -799
- package/dist/effect/descriptors/media.d.ts +43 -45
- package/dist/effect/descriptors/media.js +46 -50
- package/dist/effect/descriptors/messages.d.ts +86 -88
- package/dist/effect/descriptors/messages.js +83 -94
- package/dist/effect/descriptors/namespaces.d.ts +96 -98
- package/dist/effect/descriptors/namespaces.js +107 -111
- package/dist/effect/descriptors/newsletter-domains.d.ts +35 -37
- package/dist/effect/descriptors/newsletter-domains.js +39 -43
- package/dist/effect/descriptors/newsletter-issues.d.ts +98 -100
- package/dist/effect/descriptors/newsletter-issues.js +109 -113
- package/dist/effect/descriptors/newsletters.d.ts +43 -45
- package/dist/effect/descriptors/newsletters.js +46 -50
- package/dist/effect/descriptors/operations.d.ts +25 -27
- package/dist/effect/descriptors/operations.js +26 -30
- package/dist/effect/descriptors/organizations.d.ts +96 -98
- package/dist/effect/descriptors/organizations.js +86 -90
- package/dist/effect/descriptors/phone-numbers.d.ts +41 -43
- package/dist/effect/descriptors/phone-numbers.js +40 -44
- package/dist/effect/descriptors/policies.d.ts +26 -28
- package/dist/effect/descriptors/policies.js +29 -33
- package/dist/effect/descriptors/scheduled-messages.d.ts +42 -44
- package/dist/effect/descriptors/scheduled-messages.js +43 -47
- package/dist/effect/descriptors/subscriptions.d.ts +7 -9
- package/dist/effect/descriptors/subscriptions.js +3 -5
- package/dist/effect/descriptors/template-registrations.d.ts +26 -28
- package/dist/effect/descriptors/template-registrations.js +29 -33
- package/dist/effect/descriptors/template-share-links.d.ts +44 -46
- package/dist/effect/descriptors/template-share-links.js +49 -53
- package/dist/effect/descriptors/templates.d.ts +361 -363
- package/dist/effect/descriptors/templates.js +348 -352
- package/dist/effect/descriptors/topic-forms.d.ts +44 -46
- package/dist/effect/descriptors/topic-forms.js +49 -53
- package/dist/effect/descriptors/topics.d.ts +77 -79
- package/dist/effect/descriptors/topics.js +80 -84
- package/dist/effect/descriptors/webhooks.d.ts +96 -98
- package/dist/effect/descriptors/webhooks.js +103 -107
- package/dist/effect/descriptors/whats-app-flows.d.ts +86 -88
- package/dist/effect/descriptors/whats-app-flows.js +90 -94
- package/dist/effect/descriptors/whats-app-setup-links.d.ts +33 -35
- package/dist/effect/descriptors/whats-app-setup-links.js +33 -37
- package/dist/effect/descriptors/whats-app.d.ts +110 -112
- package/dist/effect/descriptors/whats-app.js +111 -115
- package/dist/effect/descriptors/whoami.d.ts +7 -9
- package/dist/effect/descriptors/whoami.js +3 -5
- package/dist/effect/email.js +66 -69
- package/dist/effect/events.js +5 -8
- package/dist/effect/feedback.js +4 -6
- package/dist/effect/generated/accounts.d.ts +144 -142
- package/dist/effect/generated/accounts.js +14 -11
- package/dist/effect/generated/agents.d.ts +1502 -1493
- package/dist/effect/generated/agents.js +28 -18
- package/dist/effect/generated/analytics.d.ts +55 -53
- package/dist/effect/generated/analytics.js +14 -11
- package/dist/effect/generated/api-keys.d.ts +216 -212
- package/dist/effect/generated/api-keys.js +18 -13
- package/dist/effect/generated/approval-requests.d.ts +60 -60
- package/dist/effect/generated/approval-requests.js +10 -9
- package/dist/effect/generated/attachments.d.ts +32 -32
- package/dist/effect/generated/attachments.js +10 -9
- package/dist/effect/generated/brands.d.ts +179 -177
- package/dist/effect/generated/brands.js +14 -11
- package/dist/effect/generated/campaigns.d.ts +1083 -1072
- package/dist/effect/generated/campaigns.js +32 -20
- package/dist/effect/generated/contact-events.d.ts +3 -6
- package/dist/effect/generated/contact-events.js +4 -6
- package/dist/effect/generated/contact-groups.d.ts +186 -180
- package/dist/effect/generated/contact-groups.js +22 -15
- package/dist/effect/generated/contacts.d.ts +1565 -1545
- package/dist/effect/generated/contacts.js +50 -29
- package/dist/effect/generated/conversations.d.ts +340 -331
- package/dist/effect/generated/conversations.js +28 -18
- package/dist/effect/generated/custom-fields.d.ts +63 -63
- package/dist/effect/generated/custom-fields.js +10 -9
- package/dist/effect/generated/email.d.ts +2731 -2671
- package/dist/effect/generated/email.js +130 -69
- package/dist/effect/generated/events.d.ts +160 -162
- package/dist/effect/generated/events.js +6 -7
- package/dist/effect/generated/feedback.d.ts +3 -6
- package/dist/effect/generated/feedback.js +4 -6
- package/dist/effect/generated/index.d.ts +174 -45
- package/dist/effect/generated/integrations-catalog.d.ts +459 -446
- package/dist/effect/generated/integrations-catalog.js +36 -22
- package/dist/effect/generated/integrations.d.ts +155 -152
- package/dist/effect/generated/integrations.js +16 -12
- package/dist/effect/generated/journeys.d.ts +864 -854
- package/dist/effect/generated/journeys.js +30 -19
- package/dist/effect/generated/logs.d.ts +147 -149
- package/dist/effect/generated/logs.js +6 -7
- package/dist/effect/generated/mailboxes.d.ts +7271 -7196
- package/dist/effect/generated/mailboxes.js +160 -84
- package/dist/effect/generated/media.d.ts +77 -76
- package/dist/effect/generated/media.js +12 -10
- package/dist/effect/generated/messages.d.ts +1092 -1086
- package/dist/effect/generated/messages.js +22 -15
- package/dist/effect/generated/namespaces.d.ts +184 -177
- package/dist/effect/generated/namespaces.js +24 -16
- package/dist/effect/generated/newsletter-domains.d.ts +57 -57
- package/dist/effect/generated/newsletter-domains.js +10 -9
- package/dist/effect/generated/newsletter-issues.d.ts +225 -218
- package/dist/effect/generated/newsletter-issues.js +24 -16
- package/dist/effect/generated/newsletters.d.ts +46 -45
- package/dist/effect/generated/newsletters.js +12 -10
- package/dist/effect/generated/operations.d.ts +79 -80
- package/dist/effect/generated/operations.js +8 -8
- package/dist/effect/generated/organizations.d.ts +438 -430
- package/dist/effect/generated/organizations.js +26 -17
- package/dist/effect/generated/phone-numbers.d.ts +87 -86
- package/dist/effect/generated/phone-numbers.js +12 -10
- package/dist/effect/generated/policies.d.ts +64 -65
- package/dist/effect/generated/policies.js +8 -8
- package/dist/effect/generated/scheduled-messages.d.ts +66 -65
- package/dist/effect/generated/scheduled-messages.js +12 -10
- package/dist/effect/generated/shared.d.ts +33 -33
- package/dist/effect/generated/shared.js +61 -63
- package/dist/effect/generated/subscriptions.d.ts +3 -6
- package/dist/effect/generated/subscriptions.js +4 -6
- package/dist/effect/generated/template-registrations.d.ts +135 -136
- package/dist/effect/generated/template-registrations.js +8 -8
- package/dist/effect/generated/template-share-links.d.ts +25 -24
- package/dist/effect/generated/template-share-links.js +12 -10
- package/dist/effect/generated/templates.d.ts +2678 -2645
- package/dist/effect/generated/templates.js +76 -42
- package/dist/effect/generated/topic-forms.d.ts +47 -46
- package/dist/effect/generated/topic-forms.js +12 -10
- package/dist/effect/generated/topics.d.ts +204 -199
- package/dist/effect/generated/topics.js +20 -14
- package/dist/effect/generated/webhooks.d.ts +268 -261
- package/dist/effect/generated/webhooks.js +24 -16
- package/dist/effect/generated/whats-app-flows.d.ts +250 -244
- package/dist/effect/generated/whats-app-flows.js +22 -15
- package/dist/effect/generated/whats-app-setup-links.d.ts +107 -107
- package/dist/effect/generated/whats-app-setup-links.js +10 -9
- package/dist/effect/generated/whats-app.d.ts +439 -430
- package/dist/effect/generated/whats-app.js +28 -18
- package/dist/effect/generated/whoami.d.ts +3 -6
- package/dist/effect/generated/whoami.js +4 -6
- package/dist/effect/generated-metadata.js +0 -2
- package/dist/effect/integrations-catalog.js +20 -23
- package/dist/effect/integrations.js +10 -13
- package/dist/effect/internal/client.d.ts +2 -1
- package/dist/effect/internal/client.js +3 -5
- package/dist/effect/internal/email-sender.js +5 -6
- package/dist/effect/internal/log-events.js +0 -2
- package/dist/effect/internal/mailbox-events.js +0 -2
- package/dist/effect/internal/operation.d.ts +11 -7
- package/dist/effect/internal/operation.js +17 -14
- package/dist/effect/internal/send.js +11 -10
- package/dist/effect/internal/timeout.js +0 -2
- package/dist/effect/journeys.js +17 -20
- package/dist/effect/logs.js +5 -8
- package/dist/effect/mailboxes.js +82 -85
- package/dist/effect/media.js +8 -11
- package/dist/effect/messages.js +12 -15
- package/dist/effect/namespaces.js +14 -17
- package/dist/effect/newsletter-domains.js +7 -10
- package/dist/effect/newsletter-issues.js +14 -17
- package/dist/effect/newsletters.js +8 -11
- package/dist/effect/operations.js +6 -9
- package/dist/effect/organizations.js +15 -18
- package/dist/effect/pagination.js +0 -2
- package/dist/effect/phone-numbers.js +8 -11
- package/dist/effect/policies.js +6 -9
- package/dist/effect/retry.js +0 -2
- package/dist/effect/runtime.js +3 -5
- package/dist/effect/scheduled-messages.js +8 -11
- package/dist/effect/subscriptions.js +4 -6
- package/dist/effect/template-registrations.js +6 -9
- package/dist/effect/template-share-links.js +8 -11
- package/dist/effect/templates.js +40 -43
- package/dist/effect/topic-forms.js +8 -11
- package/dist/effect/topics.js +12 -15
- package/dist/effect/webhooks.js +14 -17
- package/dist/effect/whatsapp-flows.js +13 -16
- package/dist/effect/whatsapp-setup-links.js +7 -10
- package/dist/effect/whatsapp.js +16 -19
- package/dist/effect/whoami.js +4 -6
- package/dist/inline-attachments.js +0 -2
- package/dist/mailbox-events.js +0 -2
- package/dist/normalize.js +0 -2
- package/dist/package.json.js +1 -3
- package/dist/promises/client.js +0 -2
- package/dist/promises/errors.gen.js +0 -2
- package/dist/promises/request.js +0 -2
- package/dist/request-id.js +0 -2
- package/dist/request-policy.js +0 -2
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint,
|
|
1
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, ExternalServiceError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MalformedRequestError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/subscriptions.ts
|
|
@@ -35,7 +35,7 @@ const SubscriptionsSubscribe500 = InternalError;
|
|
|
35
35
|
const SubscriptionsSubscribe502 = /* @__PURE__ */ (() => Schema.Union([BillingProviderError, ExternalServiceError]))();
|
|
36
36
|
const SubscriptionsSubscribe503 = /* @__PURE__ */ (() => Schema.Union([SenderNotReadyError, DeliveryUnavailableError]))();
|
|
37
37
|
const SubscriptionsSubscribe504 = GatewayTimeoutError;
|
|
38
|
-
|
|
38
|
+
const SubscriptionsSubscribeEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("subscriptionsSubscribe", "/v1/subscriptions", {
|
|
39
39
|
payload: SubscriptionsSubscribeRequestJson,
|
|
40
40
|
success: SubscriptionsSubscribe200,
|
|
41
41
|
error: [
|
|
@@ -52,7 +52,5 @@ var SubscriptionsGroup = class extends HttpApiGroup.make("Subscriptions").add(Ht
|
|
|
52
52
|
SubscriptionsSubscribe503.pipe(HttpApiSchema.status(503)),
|
|
53
53
|
SubscriptionsSubscribe504.pipe(HttpApiSchema.status(504))
|
|
54
54
|
]
|
|
55
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "subscriptions.subscribe").annotate(OpenApi.Summary, "Request subscription confirmation").annotate(OpenApi.Description, "Sends a confirmation email from your sender. Only the recipient's explicit confirmation creates their contact and subscribes them to the named topic. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the topic subscription change."))
|
|
56
|
-
export { SubscribeResult,
|
|
57
|
-
|
|
58
|
-
//# sourceMappingURL=subscriptions.js.map
|
|
55
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "subscriptions.subscribe").annotate(OpenApi.Summary, "Request subscription confirmation").annotate(OpenApi.Description, "Sends a confirmation email from your sender. Only the recipient's explicit confirmation creates their contact and subscribes them to the named topic. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the topic subscription change."))();
|
|
56
|
+
export { SubscribeResult, SubscriptionsSubscribe200, SubscriptionsSubscribe400, SubscriptionsSubscribe401, SubscriptionsSubscribe402, SubscriptionsSubscribe403, SubscriptionsSubscribe404, SubscriptionsSubscribe409, SubscriptionsSubscribe422, SubscriptionsSubscribe429, SubscriptionsSubscribe500, SubscriptionsSubscribe502, SubscriptionsSubscribe503, SubscriptionsSubscribe504, SubscriptionsSubscribeEndpoint, SubscriptionsSubscribeRequestJson };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint
|
|
1
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
4
4
|
export type WhatsAppRegistrationTarget = {
|
|
@@ -276,136 +276,7 @@ export type TemplateRegistrationsGet500 = InternalError;
|
|
|
276
276
|
export declare const TemplateRegistrationsGet500: typeof InternalError;
|
|
277
277
|
export type TemplateRegistrationsGet504 = GatewayTimeoutError;
|
|
278
278
|
export declare const TemplateRegistrationsGet504: typeof GatewayTimeoutError;
|
|
279
|
-
declare const
|
|
280
|
-
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
281
|
-
readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
282
|
-
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
283
|
-
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
284
|
-
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
285
|
-
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
286
|
-
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
287
|
-
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
288
|
-
readonly provider: Schema.Literal<"whatsapp">;
|
|
289
|
-
readonly wabaId: Schema.String;
|
|
290
|
-
}>, Schema.Struct<{
|
|
291
|
-
readonly provider: Schema.Literal<"dlt">;
|
|
292
|
-
readonly entityId: Schema.String;
|
|
293
|
-
readonly headerId: Schema.String;
|
|
294
|
-
}>]>;
|
|
295
|
-
readonly name: Schema.String;
|
|
296
|
-
readonly language: Schema.String;
|
|
297
|
-
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
298
|
-
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
299
|
-
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
300
|
-
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
301
|
-
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
302
|
-
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
303
|
-
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
304
|
-
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
305
|
-
readonly statusChangedAt: Schema.String;
|
|
306
|
-
readonly createdAt: Schema.String;
|
|
307
|
-
readonly updatedAt: Schema.String;
|
|
308
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
309
|
-
readonly _tag: "ForbiddenError";
|
|
310
|
-
readonly message: string;
|
|
311
|
-
}, readonly [Schema.Struct<{
|
|
312
|
-
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
313
|
-
readonly message: Schema.String;
|
|
314
|
-
}>], {
|
|
315
|
-
readonly _tag: "ForbiddenError";
|
|
316
|
-
readonly message: string;
|
|
317
|
-
}>, Schema.Struct<{
|
|
318
|
-
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
319
|
-
readonly message: Schema.String;
|
|
320
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
321
|
-
readonly _tag: "GatewayTimeoutError";
|
|
322
|
-
readonly message: string;
|
|
323
|
-
readonly retryAfterSeconds: number;
|
|
324
|
-
}, readonly [Schema.Struct<{
|
|
325
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
326
|
-
readonly message: Schema.String;
|
|
327
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
328
|
-
}>], {
|
|
329
|
-
readonly _tag: "GatewayTimeoutError";
|
|
330
|
-
readonly message: string;
|
|
331
|
-
readonly retryAfterSeconds: number;
|
|
332
|
-
}>, Schema.Struct<{
|
|
333
|
-
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
334
|
-
readonly message: Schema.String;
|
|
335
|
-
readonly retryAfterSeconds: Schema.Finite;
|
|
336
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
337
|
-
readonly _tag: "MalformedRequestError";
|
|
338
|
-
readonly message: string;
|
|
339
|
-
readonly fields: {
|
|
340
|
-
readonly [x: string]: readonly string[];
|
|
341
|
-
};
|
|
342
|
-
}, readonly [Schema.Struct<{
|
|
343
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
344
|
-
readonly message: Schema.String;
|
|
345
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
346
|
-
}>], {
|
|
347
|
-
readonly _tag: "MalformedRequestError";
|
|
348
|
-
readonly message: string;
|
|
349
|
-
readonly fields: {
|
|
350
|
-
readonly [x: string]: readonly string[];
|
|
351
|
-
};
|
|
352
|
-
}>, Schema.Struct<{
|
|
353
|
-
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
354
|
-
readonly message: Schema.String;
|
|
355
|
-
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
356
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
357
|
-
readonly _tag: "ResourceNotFoundError";
|
|
358
|
-
readonly resource: string;
|
|
359
|
-
readonly id: string;
|
|
360
|
-
readonly message: string;
|
|
361
|
-
}, readonly [Schema.Struct<{
|
|
362
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
363
|
-
readonly resource: Schema.String;
|
|
364
|
-
readonly id: Schema.String;
|
|
365
|
-
readonly message: Schema.String;
|
|
366
|
-
}>], {
|
|
367
|
-
readonly _tag: "ResourceNotFoundError";
|
|
368
|
-
readonly resource: string;
|
|
369
|
-
readonly id: string;
|
|
370
|
-
readonly message: string;
|
|
371
|
-
}>, Schema.Struct<{
|
|
372
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
373
|
-
readonly resource: Schema.String;
|
|
374
|
-
readonly id: Schema.String;
|
|
375
|
-
readonly message: Schema.String;
|
|
376
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
377
|
-
readonly _tag: "UnauthorizedError";
|
|
378
|
-
readonly message: string;
|
|
379
|
-
}, readonly [Schema.Struct<{
|
|
380
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
381
|
-
readonly message: Schema.String;
|
|
382
|
-
}>], {
|
|
383
|
-
readonly _tag: "UnauthorizedError";
|
|
384
|
-
readonly message: string;
|
|
385
|
-
}>, Schema.Struct<{
|
|
386
|
-
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
387
|
-
readonly message: Schema.String;
|
|
388
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
389
|
-
readonly _tag: "ValidationError";
|
|
390
|
-
readonly message: string;
|
|
391
|
-
readonly fields?: {
|
|
392
|
-
readonly [x: string]: readonly string[];
|
|
393
|
-
} | null;
|
|
394
|
-
}, readonly [Schema.Struct<{
|
|
395
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
396
|
-
readonly message: Schema.String;
|
|
397
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
398
|
-
}>], {
|
|
399
|
-
readonly _tag: "ValidationError";
|
|
400
|
-
readonly message: string;
|
|
401
|
-
readonly fields?: {
|
|
402
|
-
readonly [x: string]: readonly string[];
|
|
403
|
-
} | null;
|
|
404
|
-
}>, Schema.Struct<{
|
|
405
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
406
|
-
readonly message: Schema.String;
|
|
407
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
408
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsList", "GET", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
|
|
279
|
+
export declare const TemplateRegistrationsListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsList", "GET", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
|
|
409
280
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
410
281
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
411
282
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
@@ -535,7 +406,8 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
535
406
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
536
407
|
readonly message: Schema.String;
|
|
537
408
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
538
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
409
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
410
|
+
export declare const TemplateRegistrationsSubmitEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsSubmit", "POST", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
|
|
539
411
|
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
540
412
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
541
413
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
@@ -736,7 +608,134 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
736
608
|
readonly provider: Schema.String;
|
|
737
609
|
readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
738
610
|
readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
739
|
-
}>, never, never>>, ApiKeySecurityMiddleware, never
|
|
740
|
-
export declare
|
|
741
|
-
|
|
742
|
-
|
|
611
|
+
}>, never, never>>, ApiKeySecurityMiddleware, never>;
|
|
612
|
+
export declare const TemplateRegistrationsGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsGet", "GET", "/v1/templates/:id/registrations/:registrationId", Schema.toCodecStringTree<Schema.Struct<{
|
|
613
|
+
readonly id: Schema.brand<Schema.String, "TemplateId">;
|
|
614
|
+
readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
615
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
616
|
+
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
617
|
+
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
618
|
+
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
619
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
620
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
621
|
+
readonly provider: Schema.Literal<"whatsapp">;
|
|
622
|
+
readonly wabaId: Schema.String;
|
|
623
|
+
}>, Schema.Struct<{
|
|
624
|
+
readonly provider: Schema.Literal<"dlt">;
|
|
625
|
+
readonly entityId: Schema.String;
|
|
626
|
+
readonly headerId: Schema.String;
|
|
627
|
+
}>]>;
|
|
628
|
+
readonly name: Schema.String;
|
|
629
|
+
readonly language: Schema.String;
|
|
630
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
631
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
632
|
+
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
633
|
+
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
634
|
+
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
635
|
+
readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
636
|
+
readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
|
|
637
|
+
readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
638
|
+
readonly statusChangedAt: Schema.String;
|
|
639
|
+
readonly createdAt: Schema.String;
|
|
640
|
+
readonly updatedAt: Schema.String;
|
|
641
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
642
|
+
readonly _tag: "ForbiddenError";
|
|
643
|
+
readonly message: string;
|
|
644
|
+
}, readonly [Schema.Struct<{
|
|
645
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
646
|
+
readonly message: Schema.String;
|
|
647
|
+
}>], {
|
|
648
|
+
readonly _tag: "ForbiddenError";
|
|
649
|
+
readonly message: string;
|
|
650
|
+
}>, Schema.Struct<{
|
|
651
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
652
|
+
readonly message: Schema.String;
|
|
653
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
654
|
+
readonly _tag: "GatewayTimeoutError";
|
|
655
|
+
readonly message: string;
|
|
656
|
+
readonly retryAfterSeconds: number;
|
|
657
|
+
}, readonly [Schema.Struct<{
|
|
658
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
659
|
+
readonly message: Schema.String;
|
|
660
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
661
|
+
}>], {
|
|
662
|
+
readonly _tag: "GatewayTimeoutError";
|
|
663
|
+
readonly message: string;
|
|
664
|
+
readonly retryAfterSeconds: number;
|
|
665
|
+
}>, Schema.Struct<{
|
|
666
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
667
|
+
readonly message: Schema.String;
|
|
668
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
669
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
670
|
+
readonly _tag: "MalformedRequestError";
|
|
671
|
+
readonly message: string;
|
|
672
|
+
readonly fields: {
|
|
673
|
+
readonly [x: string]: readonly string[];
|
|
674
|
+
};
|
|
675
|
+
}, readonly [Schema.Struct<{
|
|
676
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
677
|
+
readonly message: Schema.String;
|
|
678
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
679
|
+
}>], {
|
|
680
|
+
readonly _tag: "MalformedRequestError";
|
|
681
|
+
readonly message: string;
|
|
682
|
+
readonly fields: {
|
|
683
|
+
readonly [x: string]: readonly string[];
|
|
684
|
+
};
|
|
685
|
+
}>, Schema.Struct<{
|
|
686
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
687
|
+
readonly message: Schema.String;
|
|
688
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
689
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
690
|
+
readonly _tag: "ResourceNotFoundError";
|
|
691
|
+
readonly resource: string;
|
|
692
|
+
readonly id: string;
|
|
693
|
+
readonly message: string;
|
|
694
|
+
}, readonly [Schema.Struct<{
|
|
695
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
696
|
+
readonly resource: Schema.String;
|
|
697
|
+
readonly id: Schema.String;
|
|
698
|
+
readonly message: Schema.String;
|
|
699
|
+
}>], {
|
|
700
|
+
readonly _tag: "ResourceNotFoundError";
|
|
701
|
+
readonly resource: string;
|
|
702
|
+
readonly id: string;
|
|
703
|
+
readonly message: string;
|
|
704
|
+
}>, Schema.Struct<{
|
|
705
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
706
|
+
readonly resource: Schema.String;
|
|
707
|
+
readonly id: Schema.String;
|
|
708
|
+
readonly message: Schema.String;
|
|
709
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
710
|
+
readonly _tag: "UnauthorizedError";
|
|
711
|
+
readonly message: string;
|
|
712
|
+
}, readonly [Schema.Struct<{
|
|
713
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
714
|
+
readonly message: Schema.String;
|
|
715
|
+
}>], {
|
|
716
|
+
readonly _tag: "UnauthorizedError";
|
|
717
|
+
readonly message: string;
|
|
718
|
+
}>, Schema.Struct<{
|
|
719
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
720
|
+
readonly message: Schema.String;
|
|
721
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
722
|
+
readonly _tag: "ValidationError";
|
|
723
|
+
readonly message: string;
|
|
724
|
+
readonly fields?: {
|
|
725
|
+
readonly [x: string]: readonly string[];
|
|
726
|
+
} | null;
|
|
727
|
+
}, readonly [Schema.Struct<{
|
|
728
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
729
|
+
readonly message: Schema.String;
|
|
730
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
731
|
+
}>], {
|
|
732
|
+
readonly _tag: "ValidationError";
|
|
733
|
+
readonly message: string;
|
|
734
|
+
readonly fields?: {
|
|
735
|
+
readonly [x: string]: readonly string[];
|
|
736
|
+
} | null;
|
|
737
|
+
}>, Schema.Struct<{
|
|
738
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
739
|
+
readonly message: Schema.String;
|
|
740
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
741
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint,
|
|
1
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/template-registrations.ts
|
|
@@ -97,7 +97,7 @@ const TemplateRegistrationsGet404 = ResourceNotFoundError;
|
|
|
97
97
|
const TemplateRegistrationsGet422 = ValidationError;
|
|
98
98
|
const TemplateRegistrationsGet500 = InternalError;
|
|
99
99
|
const TemplateRegistrationsGet504 = GatewayTimeoutError;
|
|
100
|
-
|
|
100
|
+
const TemplateRegistrationsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateRegistrationsList", "/v1/templates/:id/registrations", {
|
|
101
101
|
params: TemplateRegistrationsListPathParams,
|
|
102
102
|
success: TemplateRegistrationsList200,
|
|
103
103
|
error: [
|
|
@@ -109,7 +109,8 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
109
109
|
TemplateRegistrationsList500,
|
|
110
110
|
TemplateRegistrationsList504.pipe(HttpApiSchema.status(504))
|
|
111
111
|
]
|
|
112
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.list").annotate(OpenApi.Summary, "List a template's registrations").annotate(OpenApi.Description, "Returns every provider registration of the template, newest first, with its review status and the publication it last submitted.")
|
|
112
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.list").annotate(OpenApi.Summary, "List a template's registrations").annotate(OpenApi.Description, "Returns every provider registration of the template, newest first, with its review status and the publication it last submitted."))();
|
|
113
|
+
const TemplateRegistrationsSubmitEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("templateRegistrationsSubmit", "/v1/templates/:id/registrations", {
|
|
113
114
|
params: TemplateRegistrationsSubmitPathParams,
|
|
114
115
|
payload: TemplateRegistrationsSubmitRequestJson,
|
|
115
116
|
success: TemplateRegistrationsSubmit201.pipe(HttpApiSchema.status(201)),
|
|
@@ -125,7 +126,8 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
125
126
|
TemplateRegistrationsSubmit503.pipe(HttpApiSchema.status(503)),
|
|
126
127
|
TemplateRegistrationsSubmit504.pipe(HttpApiSchema.status(504))
|
|
127
128
|
]
|
|
128
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A submission updates the existing provider template while it exists. When Meta confirms a deletion, you can submit the same handle again once Meta frees its name.")
|
|
129
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A submission updates the existing provider template while it exists. When Meta confirms a deletion, you can submit the same handle again once Meta frees its name."))();
|
|
130
|
+
const TemplateRegistrationsGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateRegistrationsGet", "/v1/templates/:id/registrations/:registrationId", {
|
|
129
131
|
params: TemplateRegistrationsGetPathParams,
|
|
130
132
|
success: TemplateRegistrationsGet200,
|
|
131
133
|
error: [
|
|
@@ -137,7 +139,5 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
|
|
|
137
139
|
TemplateRegistrationsGet500,
|
|
138
140
|
TemplateRegistrationsGet504.pipe(HttpApiSchema.status(504))
|
|
139
141
|
]
|
|
140
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it."))
|
|
141
|
-
export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504,
|
|
142
|
-
|
|
143
|
-
//# sourceMappingURL=template-registrations.js.map
|
|
142
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it."))();
|
|
143
|
+
export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504, TemplateRegistrationsGetEndpoint, TemplateRegistrationsGetPathParams, TemplateRegistrationsList200, TemplateRegistrationsList400, TemplateRegistrationsList401, TemplateRegistrationsList403, TemplateRegistrationsList404, TemplateRegistrationsList422, TemplateRegistrationsList500, TemplateRegistrationsList504, TemplateRegistrationsListEndpoint, TemplateRegistrationsListPathParams, TemplateRegistrationsSubmit201, TemplateRegistrationsSubmit400, TemplateRegistrationsSubmit401, TemplateRegistrationsSubmit403, TemplateRegistrationsSubmit404, TemplateRegistrationsSubmit409, TemplateRegistrationsSubmit422, TemplateRegistrationsSubmit500, TemplateRegistrationsSubmit502, TemplateRegistrationsSubmit503, TemplateRegistrationsSubmit504, TemplateRegistrationsSubmitEndpoint, TemplateRegistrationsSubmitPathParams, TemplateRegistrationsSubmitRequestJson, WhatsAppRegistrationTarget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint
|
|
1
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, SlugTaken, TemplateProjectId, TemplateSourceError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
export type TemplateShareLinksGetPathParams = {
|
|
@@ -203,18 +203,16 @@ export type TemplateShareLinksUpdate503 = ServiceUnavailableError;
|
|
|
203
203
|
export declare const TemplateShareLinksUpdate503: typeof ServiceUnavailableError;
|
|
204
204
|
export type TemplateShareLinksUpdate504 = GatewayTimeoutError;
|
|
205
205
|
export declare const TemplateShareLinksUpdate504: typeof GatewayTimeoutError;
|
|
206
|
-
declare const
|
|
206
|
+
export declare const TemplateShareLinksGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksGet", "GET", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
207
207
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
208
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
209
|
-
readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
210
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
208
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
211
209
|
readonly slug: Schema.String;
|
|
212
210
|
readonly url: Schema.String;
|
|
213
211
|
readonly canonicalPath: Schema.String;
|
|
214
212
|
readonly views: Schema.Finite;
|
|
215
213
|
readonly opens: Schema.Finite;
|
|
216
214
|
readonly updatedAt: Schema.String;
|
|
217
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
215
|
+
}>, Schema.Null]>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
218
216
|
readonly _tag: "ForbiddenError";
|
|
219
217
|
readonly message: string;
|
|
220
218
|
}, readonly [Schema.Struct<{
|
|
@@ -310,10 +308,18 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
310
308
|
}>, Schema.Struct<{
|
|
311
309
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
312
310
|
readonly message: Schema.String;
|
|
313
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
311
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
312
|
+
export declare const TemplateShareLinksCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksCreate", "POST", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
314
313
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
315
|
-
}>>, never,
|
|
316
|
-
readonly
|
|
314
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
315
|
+
readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
316
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
317
|
+
readonly slug: Schema.String;
|
|
318
|
+
readonly url: Schema.String;
|
|
319
|
+
readonly canonicalPath: Schema.String;
|
|
320
|
+
readonly views: Schema.Finite;
|
|
321
|
+
readonly opens: Schema.Finite;
|
|
322
|
+
readonly updatedAt: Schema.String;
|
|
317
323
|
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
318
324
|
readonly _tag: "ForbiddenError";
|
|
319
325
|
readonly message: string;
|
|
@@ -410,16 +416,12 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
410
416
|
}>, Schema.Struct<{
|
|
411
417
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
412
418
|
readonly message: Schema.String;
|
|
413
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
419
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
420
|
+
export declare const TemplateShareLinksDeleteEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksDelete", "DELETE", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
414
421
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
415
|
-
}>>, never, never, never, Schema.toCodecJson<Schema.
|
|
416
|
-
readonly
|
|
417
|
-
|
|
418
|
-
readonly canonicalPath: Schema.String;
|
|
419
|
-
readonly views: Schema.Finite;
|
|
420
|
-
readonly opens: Schema.Finite;
|
|
421
|
-
readonly updatedAt: Schema.String;
|
|
422
|
-
}>, Schema.Null]>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
422
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
423
|
+
readonly deleted: Schema.Boolean;
|
|
424
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
423
425
|
readonly _tag: "ForbiddenError";
|
|
424
426
|
readonly message: string;
|
|
425
427
|
}, readonly [Schema.Struct<{
|
|
@@ -515,7 +517,8 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
515
517
|
}>, Schema.Struct<{
|
|
516
518
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
517
519
|
readonly message: Schema.String;
|
|
518
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
520
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
521
|
+
export declare const TemplateShareLinksRenameEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksRename", "PATCH", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
|
|
519
522
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
520
523
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
521
524
|
readonly slug: Schema.String;
|
|
@@ -622,7 +625,8 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
622
625
|
}>, Schema.Struct<{
|
|
623
626
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
624
627
|
readonly message: Schema.String;
|
|
625
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
628
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
629
|
+
export declare const TemplateShareLinksUpdateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksUpdate", "POST", "/v1/template-projects/:projectId/share-link/update", Schema.toCodecStringTree<Schema.Struct<{
|
|
626
630
|
readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
|
|
627
631
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
628
632
|
readonly slug: Schema.String;
|
|
@@ -727,7 +731,4 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
|
|
|
727
731
|
}>, Schema.Struct<{
|
|
728
732
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
729
733
|
readonly message: Schema.String;
|
|
730
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
731
|
-
export declare class TemplateShareLinksGroup extends TemplateShareLinksGroup_base {
|
|
732
|
-
}
|
|
733
|
-
export {};
|
|
734
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint,
|
|
1
|
+
import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, SlugTaken, TemplateProjectId, TemplateSourceError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/template-share-links.ts
|
|
@@ -87,7 +87,7 @@ const TemplateShareLinksUpdate422 = /* @__PURE__ */ (() => Schema.Union([Validat
|
|
|
87
87
|
const TemplateShareLinksUpdate500 = InternalError;
|
|
88
88
|
const TemplateShareLinksUpdate503 = ServiceUnavailableError;
|
|
89
89
|
const TemplateShareLinksUpdate504 = GatewayTimeoutError;
|
|
90
|
-
|
|
90
|
+
const TemplateShareLinksGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateShareLinksGet", "/v1/template-projects/:projectId/share-link", {
|
|
91
91
|
params: TemplateShareLinksGetPathParams,
|
|
92
92
|
success: TemplateShareLinksGet200,
|
|
93
93
|
error: [
|
|
@@ -101,7 +101,8 @@ var TemplateShareLinksGroup = class extends HttpApiGroup.make("Template share li
|
|
|
101
101
|
TemplateShareLinksGet503.pipe(HttpApiSchema.status(503)),
|
|
102
102
|
TemplateShareLinksGet504.pipe(HttpApiSchema.status(504))
|
|
103
103
|
]
|
|
104
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.get").annotate(OpenApi.Summary, "Get a project's share link").annotate(OpenApi.Description, "Returns the share link and counts, or null when the project has no share link.")
|
|
104
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.get").annotate(OpenApi.Summary, "Get a project's share link").annotate(OpenApi.Description, "Returns the share link and counts, or null when the project has no share link."))();
|
|
105
|
+
const TemplateShareLinksCreateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("templateShareLinksCreate", "/v1/template-projects/:projectId/share-link", {
|
|
105
106
|
params: TemplateShareLinksCreatePathParams,
|
|
106
107
|
payload: TemplateShareLinksCreateRequestJson,
|
|
107
108
|
success: TemplateShareLinksCreate200,
|
|
@@ -116,7 +117,8 @@ var TemplateShareLinksGroup = class extends HttpApiGroup.make("Template share li
|
|
|
116
117
|
TemplateShareLinksCreate503.pipe(HttpApiSchema.status(503)),
|
|
117
118
|
TemplateShareLinksCreate504.pipe(HttpApiSchema.status(504))
|
|
118
119
|
]
|
|
119
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.create").annotate(OpenApi.Summary, "Create a share link").annotate(OpenApi.Description, "Exports the project's latest Save as a share link. Omit slug to use the slugified project name.")
|
|
120
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.create").annotate(OpenApi.Summary, "Create a share link").annotate(OpenApi.Description, "Exports the project's latest Save as a share link. Omit slug to use the slugified project name."))();
|
|
121
|
+
const TemplateShareLinksDeleteEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("templateShareLinksDelete", "/v1/template-projects/:projectId/share-link", {
|
|
120
122
|
params: TemplateShareLinksDeletePathParams,
|
|
121
123
|
success: TemplateShareLinksDelete200,
|
|
122
124
|
error: [
|
|
@@ -130,7 +132,8 @@ var TemplateShareLinksGroup = class extends HttpApiGroup.make("Template share li
|
|
|
130
132
|
TemplateShareLinksDelete503.pipe(HttpApiSchema.status(503)),
|
|
131
133
|
TemplateShareLinksDelete504.pipe(HttpApiSchema.status(504))
|
|
132
134
|
]
|
|
133
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.delete").annotate(OpenApi.Summary, "Delete a share link").annotate(OpenApi.Description, "Disables the public link. Copies already opened remain with their owners.")
|
|
135
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.delete").annotate(OpenApi.Summary, "Delete a share link").annotate(OpenApi.Description, "Disables the public link. Copies already opened remain with their owners."))();
|
|
136
|
+
const TemplateShareLinksRenameEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.patch("templateShareLinksRename", "/v1/template-projects/:projectId/share-link", {
|
|
134
137
|
params: TemplateShareLinksRenamePathParams,
|
|
135
138
|
payload: TemplateShareLinksRenameRequestJson,
|
|
136
139
|
success: TemplateShareLinksRename200,
|
|
@@ -145,7 +148,8 @@ var TemplateShareLinksGroup = class extends HttpApiGroup.make("Template share li
|
|
|
145
148
|
TemplateShareLinksRename503.pipe(HttpApiSchema.status(503)),
|
|
146
149
|
TemplateShareLinksRename504.pipe(HttpApiSchema.status(504))
|
|
147
150
|
]
|
|
148
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.rename").annotate(OpenApi.Summary, "Rename a share link").annotate(OpenApi.Description, "Changes the slug. The old link immediately stops working, with no redirect.")
|
|
151
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.rename").annotate(OpenApi.Summary, "Rename a share link").annotate(OpenApi.Description, "Changes the slug. The old link immediately stops working, with no redirect."))();
|
|
152
|
+
const TemplateShareLinksUpdateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("templateShareLinksUpdate", "/v1/template-projects/:projectId/share-link/update", {
|
|
149
153
|
params: TemplateShareLinksUpdatePathParams,
|
|
150
154
|
success: TemplateShareLinksUpdate200,
|
|
151
155
|
error: [
|
|
@@ -159,7 +163,5 @@ var TemplateShareLinksGroup = class extends HttpApiGroup.make("Template share li
|
|
|
159
163
|
TemplateShareLinksUpdate503.pipe(HttpApiSchema.status(503)),
|
|
160
164
|
TemplateShareLinksUpdate504.pipe(HttpApiSchema.status(504))
|
|
161
165
|
]
|
|
162
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.update").annotate(OpenApi.Summary, "Update a share link").annotate(OpenApi.Description, "Replaces the share link snapshot from the latest Save, keeping its link and counts."))
|
|
163
|
-
export { TemplateShareLinksCreate200, TemplateShareLinksCreate400, TemplateShareLinksCreate401, TemplateShareLinksCreate403, TemplateShareLinksCreate404, TemplateShareLinksCreate409, TemplateShareLinksCreate422, TemplateShareLinksCreate500, TemplateShareLinksCreate503, TemplateShareLinksCreate504, TemplateShareLinksCreatePathParams, TemplateShareLinksCreateRequestJson, TemplateShareLinksDelete200, TemplateShareLinksDelete400, TemplateShareLinksDelete401, TemplateShareLinksDelete403, TemplateShareLinksDelete404, TemplateShareLinksDelete409, TemplateShareLinksDelete422, TemplateShareLinksDelete500, TemplateShareLinksDelete503, TemplateShareLinksDelete504, TemplateShareLinksDeletePathParams, TemplateShareLinksGet200, TemplateShareLinksGet400, TemplateShareLinksGet401, TemplateShareLinksGet403, TemplateShareLinksGet404, TemplateShareLinksGet409, TemplateShareLinksGet422, TemplateShareLinksGet500, TemplateShareLinksGet503, TemplateShareLinksGet504,
|
|
164
|
-
|
|
165
|
-
//# sourceMappingURL=template-share-links.js.map
|
|
166
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateShareLinks.update").annotate(OpenApi.Summary, "Update a share link").annotate(OpenApi.Description, "Replaces the share link snapshot from the latest Save, keeping its link and counts."))();
|
|
167
|
+
export { TemplateShareLinksCreate200, TemplateShareLinksCreate400, TemplateShareLinksCreate401, TemplateShareLinksCreate403, TemplateShareLinksCreate404, TemplateShareLinksCreate409, TemplateShareLinksCreate422, TemplateShareLinksCreate500, TemplateShareLinksCreate503, TemplateShareLinksCreate504, TemplateShareLinksCreateEndpoint, TemplateShareLinksCreatePathParams, TemplateShareLinksCreateRequestJson, TemplateShareLinksDelete200, TemplateShareLinksDelete400, TemplateShareLinksDelete401, TemplateShareLinksDelete403, TemplateShareLinksDelete404, TemplateShareLinksDelete409, TemplateShareLinksDelete422, TemplateShareLinksDelete500, TemplateShareLinksDelete503, TemplateShareLinksDelete504, TemplateShareLinksDeleteEndpoint, TemplateShareLinksDeletePathParams, TemplateShareLinksGet200, TemplateShareLinksGet400, TemplateShareLinksGet401, TemplateShareLinksGet403, TemplateShareLinksGet404, TemplateShareLinksGet409, TemplateShareLinksGet422, TemplateShareLinksGet500, TemplateShareLinksGet503, TemplateShareLinksGet504, TemplateShareLinksGetEndpoint, TemplateShareLinksGetPathParams, TemplateShareLinksRename200, TemplateShareLinksRename400, TemplateShareLinksRename401, TemplateShareLinksRename403, TemplateShareLinksRename404, TemplateShareLinksRename409, TemplateShareLinksRename422, TemplateShareLinksRename500, TemplateShareLinksRename503, TemplateShareLinksRename504, TemplateShareLinksRenameEndpoint, TemplateShareLinksRenamePathParams, TemplateShareLinksRenameRequestJson, TemplateShareLinksUpdate200, TemplateShareLinksUpdate400, TemplateShareLinksUpdate401, TemplateShareLinksUpdate403, TemplateShareLinksUpdate404, TemplateShareLinksUpdate409, TemplateShareLinksUpdate422, TemplateShareLinksUpdate500, TemplateShareLinksUpdate503, TemplateShareLinksUpdate504, TemplateShareLinksUpdateEndpoint, TemplateShareLinksUpdatePathParams };
|