samva 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/sdk.gen.d.ts +10 -3
- package/dist/client/sdk.gen.js +21 -2
- package/dist/client/types.gen.d.ts +69 -12
- package/dist/effect/analytics.d.ts +6 -41
- package/dist/effect/api-keys.d.ts +8 -236
- package/dist/effect/attachments.d.ts +4 -43
- package/dist/effect/brands.d.ts +6 -155
- package/dist/effect/campaigns.d.ts +12 -868
- package/dist/effect/contact-groups.d.ts +10 -135
- package/dist/effect/contacts.d.ts +21 -727
- package/dist/effect/conversations.d.ts +13 -681
- package/dist/effect/custom-fields.d.ts +4 -44
- package/dist/effect/email.d.ts +61 -1299
- package/dist/effect/events.d.ts +2 -32
- package/dist/effect/extension-installations.d.ts +9 -213
- package/dist/effect/extensions.d.ts +5 -95
- package/dist/effect/feedback.d.ts +1 -4
- package/dist/effect/generated/analytics.js +8 -8
- package/dist/effect/generated/api-keys.js +4 -4
- package/dist/effect/generated/attachments.js +3 -3
- package/dist/effect/generated/contact-groups.js +11 -11
- package/dist/effect/generated/contacts.js +16 -16
- package/dist/effect/generated/conversations.js +6 -6
- package/dist/effect/generated/custom-fields.js +5 -5
- package/dist/effect/generated/email.js +32 -32
- package/dist/effect/generated/events.js +4 -4
- package/dist/effect/generated/extension-installations.js +4 -4
- package/dist/effect/generated/extensions.js +1 -1
- package/dist/effect/generated/journeys.js +12 -12
- package/dist/effect/generated/mailboxes.js +10 -10
- package/dist/effect/generated/messages.js +4 -4
- package/dist/effect/generated/organizations.d.ts +116 -9
- package/dist/effect/generated/organizations.js +31 -6
- package/dist/effect/generated/shared.js +1 -1
- package/dist/effect/generated/templates.d.ts +37 -72
- package/dist/effect/generated/templates.js +121 -122
- package/dist/effect/generated/unsubscribe-groups.js +7 -7
- package/dist/effect/generated/webhooks.js +17 -17
- package/dist/effect/generated-metadata.d.ts +5 -0
- package/dist/effect/generated-metadata.js +1 -0
- package/dist/effect/internal/client.d.ts +5 -1
- package/dist/effect/internal/operation.d.ts +3 -3
- package/dist/effect/internal/send.d.ts +3 -3
- package/dist/effect/journeys.d.ts +167 -1836
- package/dist/effect/mailboxes.d.ts +60 -2362
- package/dist/effect/media.d.ts +5 -66
- package/dist/effect/messages.d.ts +9 -264
- package/dist/effect/namespaces.d.ts +8 -55
- package/dist/effect/operations.d.ts +3 -84
- package/dist/effect/organizations.d.ts +9 -161
- package/dist/effect/organizations.js +3 -1
- package/dist/effect/scheduled-messages.d.ts +5 -401
- package/dist/effect/subscriptions.d.ts +1 -4
- package/dist/effect/templates.d.ts +34 -1506
- package/dist/effect/unsubscribe-groups.d.ts +9 -70
- package/dist/effect/webhooks.d.ts +11 -141
- package/dist/effect/whoami.d.ts +1 -46
- package/dist/package.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +4 -0
- package/dist/service-map.js +1 -0
- package/package.json +7 -7
|
@@ -14,7 +14,7 @@ const UnsubscribeGroupList = /* @__PURE__ */ Schema.Struct({ items: Schema.Array
|
|
|
14
14
|
name: Schema.String,
|
|
15
15
|
description: Schema.Union([Schema.String, Schema.Null]),
|
|
16
16
|
isDefault: Schema.Boolean,
|
|
17
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
17
|
+
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
18
18
|
createdAt: Schema.String,
|
|
19
19
|
updatedAt: Schema.String
|
|
20
20
|
})).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })) }).annotate({ identifier: "UnsubscribeGroupList" });
|
|
@@ -55,7 +55,7 @@ const UnsubscribeCreate201 = /* @__PURE__ */ Schema.Struct({
|
|
|
55
55
|
name: Schema.String,
|
|
56
56
|
description: Schema.Union([Schema.String, Schema.Null]),
|
|
57
57
|
isDefault: Schema.Boolean,
|
|
58
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
58
|
+
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
59
59
|
createdAt: Schema.String,
|
|
60
60
|
updatedAt: Schema.String
|
|
61
61
|
});
|
|
@@ -85,7 +85,7 @@ const UnsubscribeUpdate200 = /* @__PURE__ */ Schema.Struct({
|
|
|
85
85
|
name: Schema.String,
|
|
86
86
|
description: Schema.Union([Schema.String, Schema.Null]),
|
|
87
87
|
isDefault: Schema.Boolean,
|
|
88
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
88
|
+
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
89
89
|
createdAt: Schema.String,
|
|
90
90
|
updatedAt: Schema.String
|
|
91
91
|
});
|
|
@@ -102,7 +102,7 @@ const UnsubscribeSetDefault200 = /* @__PURE__ */ Schema.Struct({
|
|
|
102
102
|
name: Schema.String,
|
|
103
103
|
description: Schema.Union([Schema.String, Schema.Null]),
|
|
104
104
|
isDefault: Schema.Boolean,
|
|
105
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
105
|
+
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
106
106
|
createdAt: Schema.String,
|
|
107
107
|
updatedAt: Schema.String
|
|
108
108
|
});
|
|
@@ -135,8 +135,8 @@ const UnsubscribeAddMembersRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
|
135
135
|
]), Schema.Null]))
|
|
136
136
|
});
|
|
137
137
|
const UnsubscribeAddMembers200 = /* @__PURE__ */ Schema.Struct({
|
|
138
|
-
added: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
139
|
-
skipped: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
138
|
+
added: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
139
|
+
skipped: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
140
140
|
});
|
|
141
141
|
const UnsubscribeAddMembers401 = UnauthorizedError;
|
|
142
142
|
const UnsubscribeAddMembers402 = PaymentRequiredError;
|
|
@@ -148,7 +148,7 @@ const UnsubscribeAddMembers502 = BillingProviderError;
|
|
|
148
148
|
const UnsubscribeAddMembers504 = GatewayTimeoutError;
|
|
149
149
|
const UnsubscribeRemoveMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
150
150
|
const UnsubscribeRemoveMembersRequestJson = /* @__PURE__ */ Schema.Struct({ members: Schema.Array(UnsubscribeGroupMemberRef).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
|
|
151
|
-
const UnsubscribeRemoveMembers200 = /* @__PURE__ */ Schema.Struct({ removed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })) });
|
|
151
|
+
const UnsubscribeRemoveMembers200 = /* @__PURE__ */ Schema.Struct({ removed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })) });
|
|
152
152
|
const UnsubscribeRemoveMembers401 = UnauthorizedError;
|
|
153
153
|
const UnsubscribeRemoveMembers403 = ForbiddenError;
|
|
154
154
|
const UnsubscribeRemoveMembers404 = ResourceNotFoundError;
|
|
@@ -4,11 +4,11 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/ht
|
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
//#region src/effect/generated/webhooks.ts
|
|
6
6
|
const WebhookDeliveryCounts = /* @__PURE__ */ Schema.Struct({
|
|
7
|
-
total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
8
|
-
pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
9
|
-
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
10
|
-
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
11
|
-
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
7
|
+
total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
8
|
+
pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
9
|
+
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
10
|
+
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
11
|
+
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
12
12
|
}).annotate({ identifier: "WebhookDeliveryCounts" });
|
|
13
13
|
const WebhookDeliveryId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^whdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
14
14
|
expected: "a string matching the RegExp ^whdel_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
@@ -24,10 +24,10 @@ const WebhookEventId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @
|
|
|
24
24
|
})).pipe(Schema.brand("WebhookEventId"));
|
|
25
25
|
const WebhookDailyDeliveries = /* @__PURE__ */ Schema.Struct({
|
|
26
26
|
date: Schema.String,
|
|
27
|
-
pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
28
|
-
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
29
|
-
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
30
|
-
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
27
|
+
pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
28
|
+
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
29
|
+
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
30
|
+
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
31
31
|
}).annotate({ identifier: "WebhookDailyDeliveries" });
|
|
32
32
|
const WebhookSigningSecret = /* @__PURE__ */ Schema.Struct({
|
|
33
33
|
secret: SensitiveString,
|
|
@@ -152,7 +152,7 @@ const WebhookDeliveryPage = /* @__PURE__ */ Schema.Struct({
|
|
|
152
152
|
Schema.Literal("exhausted"),
|
|
153
153
|
Schema.Literal("cancelled")
|
|
154
154
|
]),
|
|
155
|
-
automaticAttempts: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
155
|
+
automaticAttempts: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
156
156
|
nextAttemptAt: Schema.Union([Schema.String, Schema.Null]),
|
|
157
157
|
completedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
158
158
|
createdAt: Schema.String,
|
|
@@ -161,7 +161,7 @@ const WebhookDeliveryPage = /* @__PURE__ */ Schema.Struct({
|
|
|
161
161
|
id: WebhookAttemptId,
|
|
162
162
|
deliveryId: WebhookDeliveryId,
|
|
163
163
|
kind: Schema.Union([Schema.Literal("automatic"), Schema.Literal("manual")]),
|
|
164
|
-
attemptNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
|
|
164
|
+
attemptNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
|
|
165
165
|
classification: Schema.Union([
|
|
166
166
|
Schema.Literal("success"),
|
|
167
167
|
Schema.Literal("http-error"),
|
|
@@ -170,7 +170,7 @@ const WebhookDeliveryPage = /* @__PURE__ */ Schema.Struct({
|
|
|
170
170
|
Schema.Literal("cancelled")
|
|
171
171
|
]),
|
|
172
172
|
attemptedAt: Schema.String,
|
|
173
|
-
responseStatus: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })), Schema.Null]),
|
|
173
|
+
responseStatus: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
|
|
174
174
|
responseHeaders: Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
|
|
175
175
|
durationMs: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })), Schema.Null]),
|
|
176
176
|
errorCode: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -181,11 +181,11 @@ const WebhookDeliveryPage = /* @__PURE__ */ Schema.Struct({
|
|
|
181
181
|
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
182
182
|
}).annotate({ identifier: "WebhookDeliveryPage" });
|
|
183
183
|
const WebhookStatsResponse = /* @__PURE__ */ Schema.Struct({
|
|
184
|
-
total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
185
|
-
pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
186
|
-
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
187
|
-
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
188
|
-
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
184
|
+
total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
185
|
+
pending: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
186
|
+
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
187
|
+
exhausted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
188
|
+
cancelled: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
189
189
|
daily: Schema.Array(WebhookDailyDeliveries)
|
|
190
190
|
}).annotate({ identifier: "WebhookStatsResponse" });
|
|
191
191
|
const WebhookEndpointPage = /* @__PURE__ */ Schema.Struct({
|
|
@@ -1440,6 +1440,11 @@ export declare const SamvaOperations: {
|
|
|
1440
1440
|
readonly method: "PATCH";
|
|
1441
1441
|
readonly paginated: false;
|
|
1442
1442
|
};
|
|
1443
|
+
readonly organizationsCreateAvatarUpload: {
|
|
1444
|
+
readonly group: "Organizations";
|
|
1445
|
+
readonly method: "POST";
|
|
1446
|
+
readonly paginated: false;
|
|
1447
|
+
};
|
|
1443
1448
|
readonly organizationsGetProfile: {
|
|
1444
1449
|
readonly group: "Organizations";
|
|
1445
1450
|
readonly method: "GET";
|
|
@@ -847,6 +847,7 @@ const SamvaOperations = {
|
|
|
847
847
|
organizationsCreate: operationMetadata80,
|
|
848
848
|
organizationsGet: operationMetadata81,
|
|
849
849
|
organizationsUpdate: operationMetadata82,
|
|
850
|
+
organizationsCreateAvatarUpload: operationMetadata80,
|
|
850
851
|
organizationsGetProfile: operationMetadata81,
|
|
851
852
|
organizationsDelete: operationMetadata80,
|
|
852
853
|
organizationsGetTrustTier: operationMetadata81,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Redacted } from "effect";
|
|
2
|
-
import { HttpApiClient, type HttpApiGroup } from "effect/http-api";
|
|
2
|
+
import { HttpApiClient, type HttpApiEndpoint, type HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as HttpClient from "effect/http/HttpClient";
|
|
4
4
|
import { MediaUploadError } from "../../inline-attachments";
|
|
5
5
|
import type { MailboxEventStreamConnection } from "../../mailbox-events";
|
|
@@ -24,6 +24,10 @@ type FlattenGroups<Client> = {
|
|
|
24
24
|
}[keyof Client];
|
|
25
25
|
export type FlatRaw = UnionToIntersection<FlattenGroups<Api>>;
|
|
26
26
|
export type Operation = keyof FlatRaw & string;
|
|
27
|
+
type ApiEndpoints = HttpApiGroup.Endpoints<(typeof SamvaApi)["groups"][keyof (typeof SamvaApi)["groups"]]>;
|
|
28
|
+
export type OperationSuccess<Name extends Operation> = HttpApiClient.SuccessType<HttpApiEndpoint.Success<Extract<ApiEndpoints, {
|
|
29
|
+
readonly identifier: Name;
|
|
30
|
+
}>>>;
|
|
27
31
|
export type RawCall = (request?: unknown) => Effect.Effect<unknown, unknown>;
|
|
28
32
|
export interface Interface {
|
|
29
33
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Brand, Effect, Redacted, Stream } from "effect";
|
|
2
2
|
import type { HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { SDK_OPERATION_CALLS } from "../../service-map";
|
|
4
|
-
import { type FlatRaw, type Operation, Service } from "./client";
|
|
4
|
+
import { type FlatRaw, type Operation, type OperationSuccess, Service } from "./client";
|
|
5
5
|
export type SdkOperation = keyof typeof SDK_OPERATION_CALLS & Operation;
|
|
6
|
-
|
|
6
|
+
type MethodReturn<Method> = Method extends (...args: infer _Args) => infer Return ? Return : never;
|
|
7
7
|
type Wire<Value> = Value extends string ? Value extends Brand.Brand<string> ? string : Value : Value extends Redacted.Redacted<infer Raw> ? Raw | Value : Value extends number | boolean | bigint | symbol | null | undefined ? Value : Value extends Date ? Value : Value extends ReadonlyArray<infer Item> ? ReadonlyArray<Wire<Item>> : Value extends object ? {
|
|
8
8
|
readonly [Key in keyof Value]: Wire<Value[Key]> | ({} extends Pick<Value, Key> ? undefined : never);
|
|
9
9
|
} : Value;
|
|
@@ -23,7 +23,7 @@ type IdempotencyKeyField<Request> = Request extends {
|
|
|
23
23
|
} ? {
|
|
24
24
|
readonly idempotencyKey: Wire<Key>;
|
|
25
25
|
} : unknown;
|
|
26
|
-
type OperationResult<Name extends SdkOperation> = Effect.Effect<
|
|
26
|
+
export type OperationResult<Name extends SdkOperation> = Effect.Effect<OperationSuccess<Name>, Effect.Error<MethodReturn<FlatRaw[Name]>>, Service>;
|
|
27
27
|
type DirectOperation<Name extends SdkOperation> = {} extends Input<Name> ? (input?: Input<Name>) => OperationResult<Name> : (input: Input<Name>) => OperationResult<Name>;
|
|
28
28
|
type OperationFunction<Name extends SdkOperation> = (typeof SDK_OPERATION_CALLS)[Name] extends {
|
|
29
29
|
readonly kind: "none";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { type MediaUploadError } from "../../inline-attachments";
|
|
3
3
|
import type { SendMessagePayload } from "../generated/scheduled-messages";
|
|
4
|
-
import {
|
|
5
|
-
import { type
|
|
4
|
+
import { Service } from "./client";
|
|
5
|
+
import { type OperationResult } from "./operation";
|
|
6
6
|
type MessagePayload = typeof SendMessagePayload.Encoded;
|
|
7
7
|
export type MessageRecipient = MessagePayload["to"][number];
|
|
8
8
|
type ContactObjectRecipient = {
|
|
@@ -31,7 +31,7 @@ export type EmailSendInput = Omit<EmailPayload, "channel" | "email" | "to" | "cc
|
|
|
31
31
|
readonly cc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
|
|
32
32
|
readonly bcc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
|
|
33
33
|
};
|
|
34
|
-
type SendResult =
|
|
34
|
+
type SendResult = OperationResult<"messagesSend">;
|
|
35
35
|
type UploadFailure = MediaUploadError | Effect.Error<SendResult>;
|
|
36
36
|
export declare const sendMessage: (input: MessageSendInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
37
37
|
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|