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,5 +1,5 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
|
-
import { HttpApiEndpoint
|
|
2
|
+
import { HttpApiEndpoint } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, NamespaceId, OrganizationId, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared.js";
|
|
5
5
|
export type ApprovalRequestId = string & EffectBrand.Brand<"ApprovalRequestId">;
|
|
@@ -236,9 +236,14 @@ export type ApprovalRequestsReject500 = InternalError;
|
|
|
236
236
|
export declare const ApprovalRequestsReject500: typeof InternalError;
|
|
237
237
|
export type ApprovalRequestsReject504 = GatewayTimeoutError;
|
|
238
238
|
export declare const ApprovalRequestsReject504: typeof GatewayTimeoutError;
|
|
239
|
-
declare const
|
|
240
|
-
readonly
|
|
241
|
-
|
|
239
|
+
export declare const ApprovalRequestsCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"approvalRequestsCreate", "POST", "/v1/approval-requests", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
240
|
+
readonly intent: Schema.String;
|
|
241
|
+
readonly calls: Schema.$Array<Schema.Struct<{
|
|
242
|
+
readonly toolName: Schema.String;
|
|
243
|
+
readonly arguments: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
|
|
244
|
+
}>>;
|
|
245
|
+
readonly idempotencyKey: Schema.String;
|
|
246
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
242
247
|
readonly id: Schema.brand<Schema.String, "ApprovalRequestId">;
|
|
243
248
|
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
244
249
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
@@ -326,26 +331,6 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
326
331
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
327
332
|
readonly message: Schema.String;
|
|
328
333
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
329
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
330
|
-
readonly _tag: "ResourceNotFoundError";
|
|
331
|
-
readonly resource: string;
|
|
332
|
-
readonly id: string;
|
|
333
|
-
readonly message: string;
|
|
334
|
-
}, readonly [Schema.Struct<{
|
|
335
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
336
|
-
readonly resource: Schema.String;
|
|
337
|
-
readonly id: Schema.String;
|
|
338
|
-
readonly message: Schema.String;
|
|
339
|
-
}>], {
|
|
340
|
-
readonly _tag: "ResourceNotFoundError";
|
|
341
|
-
readonly resource: string;
|
|
342
|
-
readonly id: string;
|
|
343
|
-
readonly message: string;
|
|
344
|
-
}>, Schema.Struct<{
|
|
345
|
-
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
346
|
-
readonly resource: Schema.String;
|
|
347
|
-
readonly id: Schema.String;
|
|
348
|
-
readonly message: Schema.String;
|
|
349
334
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
350
335
|
readonly _tag: "UnauthorizedError";
|
|
351
336
|
readonly message: string;
|
|
@@ -378,14 +363,10 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
378
363
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
379
364
|
readonly message: Schema.String;
|
|
380
365
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
381
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
382
|
-
|
|
383
|
-
readonly
|
|
384
|
-
|
|
385
|
-
readonly arguments: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
|
|
386
|
-
}>>;
|
|
387
|
-
readonly idempotencyKey: Schema.String;
|
|
388
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
366
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
367
|
+
export declare const ApprovalRequestsGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"approvalRequestsGet", "GET", "/v1/approval-requests/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
368
|
+
readonly id: Schema.brand<Schema.String, "ApprovalRequestId">;
|
|
369
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
389
370
|
readonly id: Schema.brand<Schema.String, "ApprovalRequestId">;
|
|
390
371
|
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
391
372
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
@@ -405,27 +386,7 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
405
386
|
readonly results: Schema.Union<readonly [Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>;
|
|
406
387
|
readonly error: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
407
388
|
readonly approvalUrl: Schema.String;
|
|
408
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
409
|
-
readonly _tag: "ConflictError";
|
|
410
|
-
readonly message: string;
|
|
411
|
-
readonly resource: string;
|
|
412
|
-
readonly id?: string | null;
|
|
413
|
-
}, readonly [Schema.Struct<{
|
|
414
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
415
|
-
readonly message: Schema.String;
|
|
416
|
-
readonly resource: Schema.String;
|
|
417
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
418
|
-
}>], {
|
|
419
|
-
readonly _tag: "ConflictError";
|
|
420
|
-
readonly message: string;
|
|
421
|
-
readonly resource: string;
|
|
422
|
-
readonly id?: string | null;
|
|
423
|
-
}>, Schema.Struct<{
|
|
424
|
-
readonly _tag: Schema.tag<"ConflictError">;
|
|
425
|
-
readonly message: Schema.String;
|
|
426
|
-
readonly resource: Schema.String;
|
|
427
|
-
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
428
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
389
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
429
390
|
readonly _tag: "ForbiddenError";
|
|
430
391
|
readonly message: string;
|
|
431
392
|
}, readonly [Schema.Struct<{
|
|
@@ -473,6 +434,26 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
473
434
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
474
435
|
readonly message: Schema.String;
|
|
475
436
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
437
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
438
|
+
readonly _tag: "ResourceNotFoundError";
|
|
439
|
+
readonly resource: string;
|
|
440
|
+
readonly id: string;
|
|
441
|
+
readonly message: string;
|
|
442
|
+
}, readonly [Schema.Struct<{
|
|
443
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
444
|
+
readonly resource: Schema.String;
|
|
445
|
+
readonly id: Schema.String;
|
|
446
|
+
readonly message: Schema.String;
|
|
447
|
+
}>], {
|
|
448
|
+
readonly _tag: "ResourceNotFoundError";
|
|
449
|
+
readonly resource: string;
|
|
450
|
+
readonly id: string;
|
|
451
|
+
readonly message: string;
|
|
452
|
+
}>, Schema.Struct<{
|
|
453
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
454
|
+
readonly resource: Schema.String;
|
|
455
|
+
readonly id: Schema.String;
|
|
456
|
+
readonly message: Schema.String;
|
|
476
457
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
477
458
|
readonly _tag: "UnauthorizedError";
|
|
478
459
|
readonly message: string;
|
|
@@ -505,7 +486,8 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
505
486
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
506
487
|
readonly message: Schema.String;
|
|
507
488
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
508
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
489
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
490
|
+
export declare const ApprovalRequestsApproveEndpoint: HttpApiEndpoint.HttpApiEndpoint<"approvalRequestsApprove", "POST", "/v1/approval-requests/:id/approve", Schema.toCodecStringTree<Schema.Struct<{
|
|
509
491
|
readonly id: Schema.brand<Schema.String, "ApprovalRequestId">;
|
|
510
492
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
511
493
|
readonly id: Schema.brand<Schema.String, "ApprovalRequestId">;
|
|
@@ -527,7 +509,27 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
527
509
|
readonly results: Schema.Union<readonly [Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>;
|
|
528
510
|
readonly error: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
529
511
|
readonly approvalUrl: Schema.String;
|
|
530
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
512
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
513
|
+
readonly _tag: "ConflictError";
|
|
514
|
+
readonly message: string;
|
|
515
|
+
readonly resource: string;
|
|
516
|
+
readonly id?: string | null;
|
|
517
|
+
}, readonly [Schema.Struct<{
|
|
518
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
519
|
+
readonly message: Schema.String;
|
|
520
|
+
readonly resource: Schema.String;
|
|
521
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
522
|
+
}>], {
|
|
523
|
+
readonly _tag: "ConflictError";
|
|
524
|
+
readonly message: string;
|
|
525
|
+
readonly resource: string;
|
|
526
|
+
readonly id?: string | null;
|
|
527
|
+
}>, Schema.Struct<{
|
|
528
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
529
|
+
readonly message: Schema.String;
|
|
530
|
+
readonly resource: Schema.String;
|
|
531
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
532
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
531
533
|
readonly _tag: "ForbiddenError";
|
|
532
534
|
readonly message: string;
|
|
533
535
|
}, readonly [Schema.Struct<{
|
|
@@ -627,7 +629,8 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
627
629
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
628
630
|
readonly message: Schema.String;
|
|
629
631
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
630
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
632
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
633
|
+
export declare const ApprovalRequestsRejectEndpoint: HttpApiEndpoint.HttpApiEndpoint<"approvalRequestsReject", "POST", "/v1/approval-requests/:id/reject", Schema.toCodecStringTree<Schema.Struct<{
|
|
631
634
|
readonly id: Schema.brand<Schema.String, "ApprovalRequestId">;
|
|
632
635
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
633
636
|
readonly reason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -771,7 +774,4 @@ declare const ApprovalRequestsGroup_base: HttpApiGroup.HttpApiGroup<"Approval re
|
|
|
771
774
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
772
775
|
readonly message: Schema.String;
|
|
773
776
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
774
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
775
|
-
export declare class ApprovalRequestsGroup extends ApprovalRequestsGroup_base {
|
|
776
|
-
}
|
|
777
|
-
export {};
|
|
777
|
+
}>, 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, JsonObject, MalformedRequestError, NamespaceId, OrganizationId, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/approval-requests.ts
|
|
@@ -78,7 +78,7 @@ const ApprovalRequestsReject409 = ConflictError;
|
|
|
78
78
|
const ApprovalRequestsReject422 = ValidationError;
|
|
79
79
|
const ApprovalRequestsReject500 = InternalError;
|
|
80
80
|
const ApprovalRequestsReject504 = GatewayTimeoutError;
|
|
81
|
-
|
|
81
|
+
const ApprovalRequestsCreateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("approvalRequestsCreate", "/v1/approval-requests", {
|
|
82
82
|
payload: ApprovalRequestsCreateRequestJson,
|
|
83
83
|
success: ApprovalRequestsCreate201.pipe(HttpApiSchema.status(201)),
|
|
84
84
|
error: [
|
|
@@ -90,7 +90,8 @@ var ApprovalRequestsGroup = class extends HttpApiGroup.make("Approval requests")
|
|
|
90
90
|
ApprovalRequestsCreate500,
|
|
91
91
|
ApprovalRequestsCreate504.pipe(HttpApiSchema.status(504))
|
|
92
92
|
]
|
|
93
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.create").annotate(OpenApi.Summary, "Request approval for an OAuth tool intent").annotate(OpenApi.Description, "Creates one immutable batch of up to 20 tool calls for one intent. Only an OAuth access token may create a request. The owner opens approvalUrl and decides in a signed-in owner session. Requests expire after 30 minutes; the original OAuth token must remain valid. Repeating idempotencyKey for the same caller returns the same request; different content conflicts. Credential-bearing arguments are refused.")
|
|
93
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.create").annotate(OpenApi.Summary, "Request approval for an OAuth tool intent").annotate(OpenApi.Description, "Creates one immutable batch of up to 20 tool calls for one intent. Only an OAuth access token may create a request. The owner opens approvalUrl and decides in a signed-in owner session. Requests expire after 30 minutes; the original OAuth token must remain valid. Repeating idempotencyKey for the same caller returns the same request; different content conflicts. Credential-bearing arguments are refused."))();
|
|
94
|
+
const ApprovalRequestsGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("approvalRequestsGet", "/v1/approval-requests/:id", {
|
|
94
95
|
params: ApprovalRequestsGetPathParams,
|
|
95
96
|
success: ApprovalRequestsGet200,
|
|
96
97
|
error: [
|
|
@@ -102,7 +103,8 @@ var ApprovalRequestsGroup = class extends HttpApiGroup.make("Approval requests")
|
|
|
102
103
|
ApprovalRequestsGet500,
|
|
103
104
|
ApprovalRequestsGet504.pipe(HttpApiSchema.status(504))
|
|
104
105
|
]
|
|
105
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.get").annotate(OpenApi.Summary, "Read an approval request").annotate(OpenApi.Description, "Returns the exact calls, requester, decision and execution receipt. The original OAuth caller may read its own requests; an organization owner may read them from a signed-in session. A pending request past its deadline reads expired.")
|
|
106
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.get").annotate(OpenApi.Summary, "Read an approval request").annotate(OpenApi.Description, "Returns the exact calls, requester, decision and execution receipt. The original OAuth caller may read its own requests; an organization owner may read them from a signed-in session. A pending request past its deadline reads expired."))();
|
|
107
|
+
const ApprovalRequestsApproveEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("approvalRequestsApprove", "/v1/approval-requests/:id/approve", {
|
|
106
108
|
params: ApprovalRequestsApprovePathParams,
|
|
107
109
|
success: ApprovalRequestsApprove200,
|
|
108
110
|
error: [
|
|
@@ -115,7 +117,8 @@ var ApprovalRequestsGroup = class extends HttpApiGroup.make("Approval requests")
|
|
|
115
117
|
ApprovalRequestsApprove500,
|
|
116
118
|
ApprovalRequestsApprove504.pipe(HttpApiSchema.status(504))
|
|
117
119
|
]
|
|
118
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.approve").annotate(OpenApi.Summary, "Approve and execute an OAuth tool intent").annotate(OpenApi.Description, "Only an organization owner in a signed-in session may approve. Claims a pending, unexpired request once, then executes its exact calls with the original OAuth authority. Repeating a decision returns the existing receipt. Execution is never retried automatically; a failed receipt can mean some actions completed, and must be reconciled before another request is created.")
|
|
120
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.approve").annotate(OpenApi.Summary, "Approve and execute an OAuth tool intent").annotate(OpenApi.Description, "Only an organization owner in a signed-in session may approve. Claims a pending, unexpired request once, then executes its exact calls with the original OAuth authority. Repeating a decision returns the existing receipt. Execution is never retried automatically; a failed receipt can mean some actions completed, and must be reconciled before another request is created."))();
|
|
121
|
+
const ApprovalRequestsRejectEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("approvalRequestsReject", "/v1/approval-requests/:id/reject", {
|
|
119
122
|
params: ApprovalRequestsRejectPathParams,
|
|
120
123
|
payload: ApprovalRequestsRejectRequestJson,
|
|
121
124
|
success: ApprovalRequestsReject200,
|
|
@@ -129,7 +132,5 @@ var ApprovalRequestsGroup = class extends HttpApiGroup.make("Approval requests")
|
|
|
129
132
|
ApprovalRequestsReject500,
|
|
130
133
|
ApprovalRequestsReject504.pipe(HttpApiSchema.status(504))
|
|
131
134
|
]
|
|
132
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.reject").annotate(OpenApi.Summary, "Reject an OAuth tool intent").annotate(OpenApi.Description, "Only an organization owner in a signed-in session may reject a pending request. Records the optional reason and destroys the retained execution credential. Repeated decisions return the existing receipt."))
|
|
133
|
-
export { ApprovalCall, ApprovalRequest, ApprovalRequestId, ApprovalRequestsApprove200, ApprovalRequestsApprove400, ApprovalRequestsApprove401, ApprovalRequestsApprove403, ApprovalRequestsApprove404, ApprovalRequestsApprove409, ApprovalRequestsApprove422, ApprovalRequestsApprove500, ApprovalRequestsApprove504, ApprovalRequestsApprovePathParams, ApprovalRequestsCreate201, ApprovalRequestsCreate400, ApprovalRequestsCreate401, ApprovalRequestsCreate403, ApprovalRequestsCreate409, ApprovalRequestsCreate422, ApprovalRequestsCreate500, ApprovalRequestsCreate504, ApprovalRequestsCreateRequestJson, ApprovalRequestsGet200, ApprovalRequestsGet400, ApprovalRequestsGet401, ApprovalRequestsGet403, ApprovalRequestsGet404, ApprovalRequestsGet422, ApprovalRequestsGet500, ApprovalRequestsGet504,
|
|
134
|
-
|
|
135
|
-
//# sourceMappingURL=approval-requests.js.map
|
|
135
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "approvalRequests.reject").annotate(OpenApi.Summary, "Reject an OAuth tool intent").annotate(OpenApi.Description, "Only an organization owner in a signed-in session may reject a pending request. Records the optional reason and destroys the retained execution credential. Repeated decisions return the existing receipt."))();
|
|
136
|
+
export { ApprovalCall, ApprovalRequest, ApprovalRequestId, ApprovalRequestsApprove200, ApprovalRequestsApprove400, ApprovalRequestsApprove401, ApprovalRequestsApprove403, ApprovalRequestsApprove404, ApprovalRequestsApprove409, ApprovalRequestsApprove422, ApprovalRequestsApprove500, ApprovalRequestsApprove504, ApprovalRequestsApproveEndpoint, ApprovalRequestsApprovePathParams, ApprovalRequestsCreate201, ApprovalRequestsCreate400, ApprovalRequestsCreate401, ApprovalRequestsCreate403, ApprovalRequestsCreate409, ApprovalRequestsCreate422, ApprovalRequestsCreate500, ApprovalRequestsCreate504, ApprovalRequestsCreateEndpoint, ApprovalRequestsCreateRequestJson, ApprovalRequestsGet200, ApprovalRequestsGet400, ApprovalRequestsGet401, ApprovalRequestsGet403, ApprovalRequestsGet404, ApprovalRequestsGet422, ApprovalRequestsGet500, ApprovalRequestsGet504, ApprovalRequestsGetEndpoint, ApprovalRequestsGetPathParams, ApprovalRequestsReject200, ApprovalRequestsReject400, ApprovalRequestsReject401, ApprovalRequestsReject403, ApprovalRequestsReject404, ApprovalRequestsReject409, ApprovalRequestsReject422, ApprovalRequestsReject500, ApprovalRequestsReject504, ApprovalRequestsRejectEndpoint, ApprovalRequestsRejectPathParams, ApprovalRequestsRejectRequestJson };
|
|
@@ -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, AttachmentId, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, MessageId, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
export type AttachmentList = {
|
|
@@ -187,14 +187,10 @@ export type AttachmentsDownloadUrl500 = InternalError;
|
|
|
187
187
|
export declare const AttachmentsDownloadUrl500: typeof InternalError;
|
|
188
188
|
export type AttachmentsDownloadUrl504 = GatewayTimeoutError;
|
|
189
189
|
export declare const AttachmentsDownloadUrl504: typeof GatewayTimeoutError;
|
|
190
|
-
declare const
|
|
191
|
-
readonly
|
|
192
|
-
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
193
|
-
readonly expiresIn: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
190
|
+
export declare const AttachmentsListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"attachmentsList", "GET", "/v1/attachments", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
191
|
+
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
194
192
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
195
|
-
readonly
|
|
196
|
-
readonly expiresAt: Schema.String;
|
|
197
|
-
readonly attachment: Schema.Struct<{
|
|
193
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
198
194
|
readonly id: Schema.brand<Schema.String, "AttachmentId">;
|
|
199
195
|
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
200
196
|
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
@@ -204,7 +200,7 @@ declare const AttachmentsGroup_base: HttpApiGroup.HttpApiGroup<"Attachments", Ht
|
|
|
204
200
|
readonly contentId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
205
201
|
readonly isInline: Schema.Boolean;
|
|
206
202
|
readonly createdAt: Schema.String;
|
|
207
|
-
}
|
|
203
|
+
}>>;
|
|
208
204
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
209
205
|
readonly _tag: "ForbiddenError";
|
|
210
206
|
readonly message: string;
|
|
@@ -305,7 +301,8 @@ declare const AttachmentsGroup_base: HttpApiGroup.HttpApiGroup<"Attachments", Ht
|
|
|
305
301
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
306
302
|
readonly message: Schema.String;
|
|
307
303
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
308
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
304
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
305
|
+
export declare const AttachmentsGetByIdEndpoint: HttpApiEndpoint.HttpApiEndpoint<"attachmentsGetById", "GET", "/v1/attachments/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
309
306
|
readonly id: Schema.brand<Schema.String, "AttachmentId">;
|
|
310
307
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
311
308
|
readonly id: Schema.brand<Schema.String, "AttachmentId">;
|
|
@@ -417,20 +414,12 @@ declare const AttachmentsGroup_base: HttpApiGroup.HttpApiGroup<"Attachments", Ht
|
|
|
417
414
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
418
415
|
readonly message: Schema.String;
|
|
419
416
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
420
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
427
|
-
readonly filename: Schema.String;
|
|
428
|
-
readonly contentType: Schema.String;
|
|
429
|
-
readonly size: Schema.Finite;
|
|
430
|
-
readonly contentId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
431
|
-
readonly isInline: Schema.Boolean;
|
|
432
|
-
readonly createdAt: Schema.String;
|
|
433
|
-
}>>;
|
|
417
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
418
|
+
export declare const AttachmentsRemoveEndpoint: HttpApiEndpoint.HttpApiEndpoint<"attachmentsRemove", "DELETE", "/v1/attachments/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
419
|
+
readonly id: Schema.brand<Schema.String, "AttachmentId">;
|
|
420
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
421
|
+
readonly success: Schema.Boolean;
|
|
422
|
+
readonly deletedId: Schema.brand<Schema.String, "AttachmentId">;
|
|
434
423
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
435
424
|
readonly _tag: "ForbiddenError";
|
|
436
425
|
readonly message: string;
|
|
@@ -531,11 +520,25 @@ declare const AttachmentsGroup_base: HttpApiGroup.HttpApiGroup<"Attachments", Ht
|
|
|
531
520
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
532
521
|
readonly message: Schema.String;
|
|
533
522
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
534
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
523
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
|
|
524
|
+
export declare const AttachmentsDownloadUrlEndpoint: HttpApiEndpoint.HttpApiEndpoint<"attachmentsDownloadUrl", "GET", "/v1/attachments/:id/download-url", Schema.toCodecStringTree<Schema.Struct<{
|
|
535
525
|
readonly id: Schema.brand<Schema.String, "AttachmentId">;
|
|
536
|
-
}>>,
|
|
537
|
-
readonly
|
|
538
|
-
|
|
526
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
527
|
+
readonly expiresIn: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
528
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
529
|
+
readonly url: Schema.String;
|
|
530
|
+
readonly expiresAt: Schema.String;
|
|
531
|
+
readonly attachment: Schema.Struct<{
|
|
532
|
+
readonly id: Schema.brand<Schema.String, "AttachmentId">;
|
|
533
|
+
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
534
|
+
readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
535
|
+
readonly filename: Schema.String;
|
|
536
|
+
readonly contentType: Schema.String;
|
|
537
|
+
readonly size: Schema.Finite;
|
|
538
|
+
readonly contentId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
539
|
+
readonly isInline: Schema.Boolean;
|
|
540
|
+
readonly createdAt: Schema.String;
|
|
541
|
+
}>;
|
|
539
542
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
540
543
|
readonly _tag: "ForbiddenError";
|
|
541
544
|
readonly message: string;
|
|
@@ -636,7 +639,4 @@ declare const AttachmentsGroup_base: HttpApiGroup.HttpApiGroup<"Attachments", Ht
|
|
|
636
639
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
637
640
|
readonly message: Schema.String;
|
|
638
641
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
639
|
-
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never
|
|
640
|
-
export declare class AttachmentsGroup extends AttachmentsGroup_base {
|
|
641
|
-
}
|
|
642
|
-
export {};
|
|
642
|
+
}>, 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, AttachmentId, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, MessageId, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/attachments.ts
|
|
@@ -77,7 +77,7 @@ const AttachmentsDownloadUrl404 = ResourceNotFoundError;
|
|
|
77
77
|
const AttachmentsDownloadUrl422 = ValidationError;
|
|
78
78
|
const AttachmentsDownloadUrl500 = InternalError;
|
|
79
79
|
const AttachmentsDownloadUrl504 = GatewayTimeoutError;
|
|
80
|
-
|
|
80
|
+
const AttachmentsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("attachmentsList", "/v1/attachments", {
|
|
81
81
|
query: AttachmentsListQuery,
|
|
82
82
|
success: AttachmentsList200,
|
|
83
83
|
error: [
|
|
@@ -89,7 +89,8 @@ var AttachmentsGroup = class extends HttpApiGroup.make("Attachments").add(HttpAp
|
|
|
89
89
|
AttachmentsList500,
|
|
90
90
|
AttachmentsList504.pipe(HttpApiSchema.status(504))
|
|
91
91
|
]
|
|
92
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.list").annotate(OpenApi.Summary, "List message attachments").annotate(OpenApi.Description, "Returns every attachment of the given message, newest first. A message's attachments all ride that one email, so the list is never paged.")
|
|
92
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.list").annotate(OpenApi.Summary, "List message attachments").annotate(OpenApi.Description, "Returns every attachment of the given message, newest first. A message's attachments all ride that one email, so the list is never paged."))();
|
|
93
|
+
const AttachmentsGetByIdEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("attachmentsGetById", "/v1/attachments/:id", {
|
|
93
94
|
params: AttachmentsGetByIdPathParams,
|
|
94
95
|
success: AttachmentsGetById200,
|
|
95
96
|
error: [
|
|
@@ -101,7 +102,8 @@ var AttachmentsGroup = class extends HttpApiGroup.make("Attachments").add(HttpAp
|
|
|
101
102
|
AttachmentsGetById500,
|
|
102
103
|
AttachmentsGetById504.pipe(HttpApiSchema.status(504))
|
|
103
104
|
]
|
|
104
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.getById").annotate(OpenApi.Summary, "Get an attachment").annotate(OpenApi.Description, "Returns metadata for a single attachment, including filename, content type, and size.")
|
|
105
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.getById").annotate(OpenApi.Summary, "Get an attachment").annotate(OpenApi.Description, "Returns metadata for a single attachment, including filename, content type, and size."))();
|
|
106
|
+
const AttachmentsRemoveEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("attachmentsRemove", "/v1/attachments/:id", {
|
|
105
107
|
params: AttachmentsRemovePathParams,
|
|
106
108
|
success: AttachmentsRemove200,
|
|
107
109
|
error: [
|
|
@@ -113,7 +115,8 @@ var AttachmentsGroup = class extends HttpApiGroup.make("Attachments").add(HttpAp
|
|
|
113
115
|
AttachmentsRemove500,
|
|
114
116
|
AttachmentsRemove504.pipe(HttpApiSchema.status(504))
|
|
115
117
|
]
|
|
116
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.remove").annotate(OpenApi.Summary, "Delete an attachment").annotate(OpenApi.Description, "Deletes an attachment and returns the deleted attachment's ID.")
|
|
118
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.remove").annotate(OpenApi.Summary, "Delete an attachment").annotate(OpenApi.Description, "Deletes an attachment and returns the deleted attachment's ID."))();
|
|
119
|
+
const AttachmentsDownloadUrlEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("attachmentsDownloadUrl", "/v1/attachments/:id/download-url", {
|
|
117
120
|
params: AttachmentsDownloadUrlPathParams,
|
|
118
121
|
query: AttachmentsDownloadUrlQuery,
|
|
119
122
|
success: AttachmentsDownloadUrl200,
|
|
@@ -126,7 +129,5 @@ var AttachmentsGroup = class extends HttpApiGroup.make("Attachments").add(HttpAp
|
|
|
126
129
|
AttachmentsDownloadUrl500,
|
|
127
130
|
AttachmentsDownloadUrl504.pipe(HttpApiSchema.status(504))
|
|
128
131
|
]
|
|
129
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.downloadUrl").annotate(OpenApi.Summary, "Get an attachment download URL").annotate(OpenApi.Description, "Generates a presigned, time-limited download URL for the attachment. Set `expiresIn` to configure expiry. Returns 404 (`ResourceNotFoundError`) for an inbound email attachment without a passing malware scan."))
|
|
130
|
-
export { AttachmentList, AttachmentsDownloadUrl200, AttachmentsDownloadUrl400, AttachmentsDownloadUrl401, AttachmentsDownloadUrl403, AttachmentsDownloadUrl404, AttachmentsDownloadUrl422, AttachmentsDownloadUrl500, AttachmentsDownloadUrl504, AttachmentsDownloadUrlPathParams, AttachmentsDownloadUrlQuery, AttachmentsGetById200, AttachmentsGetById400, AttachmentsGetById401, AttachmentsGetById403, AttachmentsGetById404, AttachmentsGetById422, AttachmentsGetById500, AttachmentsGetById504,
|
|
131
|
-
|
|
132
|
-
//# sourceMappingURL=attachments.js.map
|
|
132
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "attachments.downloadUrl").annotate(OpenApi.Summary, "Get an attachment download URL").annotate(OpenApi.Description, "Generates a presigned, time-limited download URL for the attachment. Set `expiresIn` to configure expiry. Returns 404 (`ResourceNotFoundError`) for an inbound email attachment without a passing malware scan."))();
|
|
133
|
+
export { AttachmentList, AttachmentsDownloadUrl200, AttachmentsDownloadUrl400, AttachmentsDownloadUrl401, AttachmentsDownloadUrl403, AttachmentsDownloadUrl404, AttachmentsDownloadUrl422, AttachmentsDownloadUrl500, AttachmentsDownloadUrl504, AttachmentsDownloadUrlEndpoint, AttachmentsDownloadUrlPathParams, AttachmentsDownloadUrlQuery, AttachmentsGetById200, AttachmentsGetById400, AttachmentsGetById401, AttachmentsGetById403, AttachmentsGetById404, AttachmentsGetById422, AttachmentsGetById500, AttachmentsGetById504, AttachmentsGetByIdEndpoint, AttachmentsGetByIdPathParams, AttachmentsList200, AttachmentsList400, AttachmentsList401, AttachmentsList403, AttachmentsList404, AttachmentsList422, AttachmentsList500, AttachmentsList504, AttachmentsListEndpoint, AttachmentsListQuery, AttachmentsRemove200, AttachmentsRemove400, AttachmentsRemove401, AttachmentsRemove403, AttachmentsRemove404, AttachmentsRemove422, AttachmentsRemove500, AttachmentsRemove504, AttachmentsRemoveEndpoint, AttachmentsRemovePathParams };
|