samva 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +7 -0
- package/README.md +14 -7
- package/dist/client/sdk.gen.d.ts +322 -143
- package/dist/client/sdk.gen.js +1085 -332
- package/dist/client/types.gen.d.ts +1342 -479
- package/dist/effect/agents.d.ts +119 -0
- package/dist/effect/agents.js +29 -0
- package/dist/effect/analytics.d.ts +1 -1
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/api-keys.d.ts +6 -6
- package/dist/effect/attachments.d.ts +1 -1
- package/dist/effect/brands.d.ts +2 -0
- package/dist/effect/campaigns.d.ts +275 -25
- package/dist/effect/campaigns.js +7 -1
- package/dist/effect/contact-groups.d.ts +9 -9
- package/dist/effect/contacts.d.ts +74 -81
- package/dist/effect/contacts.js +7 -3
- package/dist/effect/conversations.d.ts +14 -6
- package/dist/effect/email.d.ts +34 -34
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +3 -3
- package/dist/effect/extensions.d.ts +6 -6
- package/dist/effect/generated/agents.d.ts +6 -28
- package/dist/effect/generated/agents.js +270 -0
- package/dist/effect/generated/analytics.d.ts +3 -3
- package/dist/effect/generated/analytics.js +1 -1
- package/dist/effect/generated/api-keys.d.ts +6 -6
- package/dist/effect/generated/api-keys.js +2 -2
- package/dist/effect/generated/attachments.d.ts +3 -3
- package/dist/effect/generated/attachments.js +1 -1
- package/dist/effect/generated/brands.d.ts +16 -0
- package/dist/effect/generated/campaigns.d.ts +1181 -302
- package/dist/effect/generated/campaigns.js +169 -36
- package/dist/effect/generated/contact-events.d.ts +3 -3
- package/dist/effect/generated/contact-events.js +1 -1
- package/dist/effect/generated/contact-groups.d.ts +9 -9
- package/dist/effect/generated/contact-groups.js +7 -7
- package/dist/effect/generated/contacts.d.ts +2063 -290
- package/dist/effect/generated/contacts.js +343 -75
- package/dist/effect/generated/conversations.d.ts +14 -6
- package/dist/effect/generated/conversations.js +6 -6
- package/dist/effect/generated/email.d.ts +55 -70
- package/dist/effect/generated/email.js +18 -21
- package/dist/effect/generated/extension-installations.d.ts +3 -3
- package/dist/effect/generated/extension-installations.js +1 -1
- package/dist/effect/generated/extensions.d.ts +6 -6
- package/dist/effect/generated/extensions.js +2 -2
- package/dist/effect/generated/index.d.ts +5 -3
- package/dist/effect/generated/journeys.d.ts +9 -9
- package/dist/effect/generated/journeys.js +3 -3
- package/dist/effect/generated/mailboxes.d.ts +466 -712
- package/dist/effect/generated/mailboxes.js +22 -14
- package/dist/effect/generated/messages.d.ts +53 -29
- package/dist/effect/generated/messages.js +9 -5
- package/dist/effect/generated/namespaces.d.ts +3 -3
- package/dist/effect/generated/namespaces.js +1 -1
- package/dist/effect/generated/operations.d.ts +3 -3
- package/dist/effect/generated/operations.js +1 -1
- package/dist/effect/generated/organizations.d.ts +0 -9
- package/dist/effect/generated/organizations.js +1 -4
- package/dist/effect/generated/scheduled-messages.d.ts +69 -20
- package/dist/effect/generated/scheduled-messages.js +22 -3
- package/dist/effect/generated/shared.d.ts +431 -177
- package/dist/effect/generated/shared.js +216 -108
- package/dist/effect/generated/subscriptions.d.ts +4 -7
- package/dist/effect/generated/subscriptions.js +3 -4
- package/dist/effect/generated/templates.d.ts +71 -407
- package/dist/effect/generated/templates.js +23 -23
- package/dist/effect/generated/topic-forms.d.ts +656 -0
- package/dist/effect/generated/topic-forms.js +145 -0
- package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
- package/dist/effect/generated/topics.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +6 -6
- package/dist/effect/generated/webhooks.js +2 -2
- package/dist/effect/generated-metadata.d.ts +78 -24
- package/dist/effect/generated-metadata.js +61 -27
- package/dist/effect/index.d.ts +3 -1
- package/dist/effect/index.js +5 -3
- package/dist/effect/internal/operation.js +4 -3
- package/dist/effect/internal/send.d.ts +4 -4
- package/dist/effect/journeys.d.ts +119 -119
- package/dist/effect/mailboxes.d.ts +137 -121
- package/dist/effect/messages.d.ts +19 -11
- package/dist/effect/namespaces.d.ts +3 -3
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/scheduled-messages.d.ts +6 -6
- package/dist/effect/subscriptions.d.ts +1 -2
- package/dist/effect/templates.d.ts +13 -13
- package/dist/effect/topic-forms.d.ts +30 -0
- package/dist/effect/topic-forms.js +21 -0
- package/dist/effect/topics.d.ts +94 -0
- package/dist/effect/topics.js +29 -0
- package/dist/effect/webhooks.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +65 -8
- package/dist/promises/errors.gen.js +139 -7
- package/dist/promises/index.d.ts +7 -3
- package/dist/promises/index.js +9 -5
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +117 -23
- package/dist/service-map.js +71 -10
- package/package.json +17 -9
- package/dist/effect/generated/unsubscribe-groups.js +0 -284
- package/dist/effect/unsubscribe-groups.d.ts +0 -74
- package/dist/effect/unsubscribe-groups.js +0 -29
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared.js";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
|
-
import * as Schema from "effect/Schema";
|
|
4
|
-
//#region src/effect/generated/unsubscribe-groups.ts
|
|
5
|
-
const UnsubscribeGroupMemberId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsubm_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
|
-
expected: "a string matching the RegExp ^unsubm_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
7
|
-
identifier: "UnsubscribeGroupMemberId"
|
|
8
|
-
})).pipe(Schema.brand("UnsubscribeGroupMemberId"));
|
|
9
|
-
const UnsubscribeGroupMemberByEmail = /* @__PURE__ */ Schema.Struct({ email: Schema.String }).annotate({ identifier: "UnsubscribeGroupMemberByEmail" });
|
|
10
|
-
const UnsubscribeGroupMemberByPhone = /* @__PURE__ */ Schema.Struct({ phone: Schema.String }).annotate({ identifier: "UnsubscribeGroupMemberByPhone" });
|
|
11
|
-
const UnsubscribeGroupList = /* @__PURE__ */ Schema.Struct({ items: Schema.Array(Schema.Struct({
|
|
12
|
-
id: UnsubscribeId,
|
|
13
|
-
organizationId: Schema.String,
|
|
14
|
-
name: Schema.String,
|
|
15
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
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" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
18
|
-
createdAt: Schema.String,
|
|
19
|
-
updatedAt: Schema.String
|
|
20
|
-
})).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })) }).annotate({ identifier: "UnsubscribeGroupList" });
|
|
21
|
-
const UnsubscribeGroupMemberByContact = /* @__PURE__ */ Schema.Struct({ contactId: ContactId }).annotate({ identifier: "UnsubscribeGroupMemberByContact" });
|
|
22
|
-
const UnsubscribeGroupMemberPage = /* @__PURE__ */ Schema.Struct({
|
|
23
|
-
items: Schema.Array(Schema.Struct({
|
|
24
|
-
id: UnsubscribeGroupMemberId,
|
|
25
|
-
contactId: ContactId,
|
|
26
|
-
source: Schema.Union([
|
|
27
|
-
Schema.Literal("link"),
|
|
28
|
-
Schema.Literal("api"),
|
|
29
|
-
Schema.Literal("manual"),
|
|
30
|
-
Schema.Literal("complaint")
|
|
31
|
-
]),
|
|
32
|
-
unsubscribedAt: Schema.String,
|
|
33
|
-
createdAt: Schema.String
|
|
34
|
-
})),
|
|
35
|
-
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
36
|
-
}).annotate({ identifier: "UnsubscribeGroupMemberPage" });
|
|
37
|
-
const UnsubscribeGroupMemberRef = /* @__PURE__ */ Schema.Union([
|
|
38
|
-
UnsubscribeGroupMemberByContact,
|
|
39
|
-
UnsubscribeGroupMemberByEmail,
|
|
40
|
-
UnsubscribeGroupMemberByPhone
|
|
41
|
-
]).annotate({ identifier: "UnsubscribeGroupMemberRef" });
|
|
42
|
-
const UnsubscribeList200 = UnsubscribeGroupList;
|
|
43
|
-
const UnsubscribeList401 = UnauthorizedError;
|
|
44
|
-
const UnsubscribeList403 = ForbiddenError;
|
|
45
|
-
const UnsubscribeList422 = ValidationError;
|
|
46
|
-
const UnsubscribeList500 = InternalError;
|
|
47
|
-
const UnsubscribeList504 = GatewayTimeoutError;
|
|
48
|
-
const UnsubscribeCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
49
|
-
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
50
|
-
description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
|
|
51
|
-
});
|
|
52
|
-
const UnsubscribeCreate201 = /* @__PURE__ */ Schema.Struct({
|
|
53
|
-
id: UnsubscribeId,
|
|
54
|
-
organizationId: Schema.String,
|
|
55
|
-
name: Schema.String,
|
|
56
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
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" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
59
|
-
createdAt: Schema.String,
|
|
60
|
-
updatedAt: Schema.String
|
|
61
|
-
});
|
|
62
|
-
const UnsubscribeCreate401 = UnauthorizedError;
|
|
63
|
-
const UnsubscribeCreate403 = ForbiddenError;
|
|
64
|
-
const UnsubscribeCreate409 = ConflictError;
|
|
65
|
-
const UnsubscribeCreate422 = ValidationError;
|
|
66
|
-
const UnsubscribeCreate500 = InternalError;
|
|
67
|
-
const UnsubscribeCreate504 = GatewayTimeoutError;
|
|
68
|
-
const UnsubscribeRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
69
|
-
const UnsubscribeRemove200 = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean });
|
|
70
|
-
const UnsubscribeRemove401 = UnauthorizedError;
|
|
71
|
-
const UnsubscribeRemove403 = ForbiddenError;
|
|
72
|
-
const UnsubscribeRemove404 = ResourceNotFoundError;
|
|
73
|
-
const UnsubscribeRemove409 = ConflictError;
|
|
74
|
-
const UnsubscribeRemove422 = ValidationError;
|
|
75
|
-
const UnsubscribeRemove500 = InternalError;
|
|
76
|
-
const UnsubscribeRemove504 = GatewayTimeoutError;
|
|
77
|
-
const UnsubscribeUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
78
|
-
const UnsubscribeUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
79
|
-
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
80
|
-
description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
|
|
81
|
-
});
|
|
82
|
-
const UnsubscribeUpdate200 = /* @__PURE__ */ Schema.Struct({
|
|
83
|
-
id: UnsubscribeId,
|
|
84
|
-
organizationId: Schema.String,
|
|
85
|
-
name: Schema.String,
|
|
86
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
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" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
89
|
-
createdAt: Schema.String,
|
|
90
|
-
updatedAt: Schema.String
|
|
91
|
-
});
|
|
92
|
-
const UnsubscribeUpdate401 = UnauthorizedError;
|
|
93
|
-
const UnsubscribeUpdate403 = ForbiddenError;
|
|
94
|
-
const UnsubscribeUpdate404 = ResourceNotFoundError;
|
|
95
|
-
const UnsubscribeUpdate422 = ValidationError;
|
|
96
|
-
const UnsubscribeUpdate500 = InternalError;
|
|
97
|
-
const UnsubscribeUpdate504 = GatewayTimeoutError;
|
|
98
|
-
const UnsubscribeSetDefaultPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
99
|
-
const UnsubscribeSetDefault200 = /* @__PURE__ */ Schema.Struct({
|
|
100
|
-
id: UnsubscribeId,
|
|
101
|
-
organizationId: Schema.String,
|
|
102
|
-
name: Schema.String,
|
|
103
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
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" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
106
|
-
createdAt: Schema.String,
|
|
107
|
-
updatedAt: Schema.String
|
|
108
|
-
});
|
|
109
|
-
const UnsubscribeSetDefault401 = UnauthorizedError;
|
|
110
|
-
const UnsubscribeSetDefault403 = ForbiddenError;
|
|
111
|
-
const UnsubscribeSetDefault404 = ResourceNotFoundError;
|
|
112
|
-
const UnsubscribeSetDefault422 = ValidationError;
|
|
113
|
-
const UnsubscribeSetDefault500 = InternalError;
|
|
114
|
-
const UnsubscribeSetDefault504 = GatewayTimeoutError;
|
|
115
|
-
const UnsubscribeListMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
116
|
-
const UnsubscribeListMembersQuery = /* @__PURE__ */ Schema.Struct({
|
|
117
|
-
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
118
|
-
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
|
|
119
|
-
});
|
|
120
|
-
const UnsubscribeListMembers200 = UnsubscribeGroupMemberPage;
|
|
121
|
-
const UnsubscribeListMembers401 = UnauthorizedError;
|
|
122
|
-
const UnsubscribeListMembers403 = ForbiddenError;
|
|
123
|
-
const UnsubscribeListMembers404 = ResourceNotFoundError;
|
|
124
|
-
const UnsubscribeListMembers422 = ValidationError;
|
|
125
|
-
const UnsubscribeListMembers500 = InternalError;
|
|
126
|
-
const UnsubscribeListMembers504 = GatewayTimeoutError;
|
|
127
|
-
const UnsubscribeAddMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
128
|
-
const UnsubscribeAddMembersRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
129
|
-
members: Schema.Array(UnsubscribeGroupMemberRef).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
130
|
-
source: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
131
|
-
Schema.Literal("link"),
|
|
132
|
-
Schema.Literal("api"),
|
|
133
|
-
Schema.Literal("manual"),
|
|
134
|
-
Schema.Literal("complaint")
|
|
135
|
-
]), Schema.Null]))
|
|
136
|
-
});
|
|
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" })).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
|
-
});
|
|
141
|
-
const UnsubscribeAddMembers401 = UnauthorizedError;
|
|
142
|
-
const UnsubscribeAddMembers402 = PaymentRequiredError;
|
|
143
|
-
const UnsubscribeAddMembers403 = ForbiddenError;
|
|
144
|
-
const UnsubscribeAddMembers404 = ResourceNotFoundError;
|
|
145
|
-
const UnsubscribeAddMembers422 = ValidationError;
|
|
146
|
-
const UnsubscribeAddMembers500 = InternalError;
|
|
147
|
-
const UnsubscribeAddMembers502 = BillingProviderError;
|
|
148
|
-
const UnsubscribeAddMembers504 = GatewayTimeoutError;
|
|
149
|
-
const UnsubscribeRemoveMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
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" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })) });
|
|
152
|
-
const UnsubscribeRemoveMembers401 = UnauthorizedError;
|
|
153
|
-
const UnsubscribeRemoveMembers403 = ForbiddenError;
|
|
154
|
-
const UnsubscribeRemoveMembers404 = ResourceNotFoundError;
|
|
155
|
-
const UnsubscribeRemoveMembers422 = ValidationError;
|
|
156
|
-
const UnsubscribeRemoveMembers500 = InternalError;
|
|
157
|
-
const UnsubscribeRemoveMembers504 = GatewayTimeoutError;
|
|
158
|
-
const UnsubscribeCheckSubscriptionQuery = /* @__PURE__ */ Schema.Struct({
|
|
159
|
-
contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
|
|
160
|
-
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
161
|
-
phone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
162
|
-
groupIds: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
163
|
-
});
|
|
164
|
-
const UnsubscribeCheckSubscription200 = /* @__PURE__ */ Schema.Struct({
|
|
165
|
-
contactId: Schema.Union([ContactId, Schema.Null]),
|
|
166
|
-
unsubscribedGroups: Schema.Array(Schema.Struct({
|
|
167
|
-
groupId: Schema.String,
|
|
168
|
-
groupName: Schema.String,
|
|
169
|
-
unsubscribedAt: Schema.String
|
|
170
|
-
}))
|
|
171
|
-
});
|
|
172
|
-
const UnsubscribeCheckSubscription401 = UnauthorizedError;
|
|
173
|
-
const UnsubscribeCheckSubscription403 = ForbiddenError;
|
|
174
|
-
const UnsubscribeCheckSubscription422 = ValidationError;
|
|
175
|
-
const UnsubscribeCheckSubscription500 = InternalError;
|
|
176
|
-
const UnsubscribeCheckSubscription504 = GatewayTimeoutError;
|
|
177
|
-
var UnsubscribeGroupsGroup = class extends HttpApiGroup.make("Unsubscribe Groups").add(HttpApiEndpoint.get("unsubscribeList", "/v1/unsubscribe-groups", {
|
|
178
|
-
success: UnsubscribeList200,
|
|
179
|
-
error: [
|
|
180
|
-
UnsubscribeList401.pipe(HttpApiSchema.status(401)),
|
|
181
|
-
UnsubscribeList403.pipe(HttpApiSchema.status(403)),
|
|
182
|
-
UnsubscribeList422.pipe(HttpApiSchema.status(422)),
|
|
183
|
-
UnsubscribeList500,
|
|
184
|
-
UnsubscribeList504.pipe(HttpApiSchema.status(504))
|
|
185
|
-
]
|
|
186
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.list").annotate(OpenApi.Summary, "List unsubscribe groups").annotate(OpenApi.Description, "Returns every unsubscribe group in the organization, the default group first, then by name. An organization holds at most 200, so the list is never paged."), HttpApiEndpoint.post("unsubscribeCreate", "/v1/unsubscribe-groups", {
|
|
187
|
-
payload: UnsubscribeCreateRequestJson,
|
|
188
|
-
success: UnsubscribeCreate201.pipe(HttpApiSchema.status(201)),
|
|
189
|
-
error: [
|
|
190
|
-
UnsubscribeCreate401.pipe(HttpApiSchema.status(401)),
|
|
191
|
-
UnsubscribeCreate403.pipe(HttpApiSchema.status(403)),
|
|
192
|
-
UnsubscribeCreate409.pipe(HttpApiSchema.status(409)),
|
|
193
|
-
UnsubscribeCreate422.pipe(HttpApiSchema.status(422)),
|
|
194
|
-
UnsubscribeCreate500,
|
|
195
|
-
UnsubscribeCreate504.pipe(HttpApiSchema.status(504))
|
|
196
|
-
]
|
|
197
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.create").annotate(OpenApi.Summary, "Create an unsubscribe group").annotate(OpenApi.Description, "Creates a new unsubscribe group and returns it with a 201 Created status. An organization holds at most 200 groups."), HttpApiEndpoint.delete("unsubscribeRemove", "/v1/unsubscribe-groups/:id", {
|
|
198
|
-
params: UnsubscribeRemovePathParams,
|
|
199
|
-
success: UnsubscribeRemove200,
|
|
200
|
-
error: [
|
|
201
|
-
UnsubscribeRemove401.pipe(HttpApiSchema.status(401)),
|
|
202
|
-
UnsubscribeRemove403.pipe(HttpApiSchema.status(403)),
|
|
203
|
-
UnsubscribeRemove404.pipe(HttpApiSchema.status(404)),
|
|
204
|
-
UnsubscribeRemove409.pipe(HttpApiSchema.status(409)),
|
|
205
|
-
UnsubscribeRemove422.pipe(HttpApiSchema.status(422)),
|
|
206
|
-
UnsubscribeRemove500,
|
|
207
|
-
UnsubscribeRemove504.pipe(HttpApiSchema.status(504))
|
|
208
|
-
]
|
|
209
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.remove").annotate(OpenApi.Summary, "Delete an unsubscribe group").annotate(OpenApi.Description, "Permanently deletes an unsubscribe group by its ID. The default group cannot be deleted; make another group the default first. A group a scheduled or running campaign uses cannot be deleted until that run finishes or is cancelled."), HttpApiEndpoint.patch("unsubscribeUpdate", "/v1/unsubscribe-groups/:id", {
|
|
210
|
-
params: UnsubscribeUpdatePathParams,
|
|
211
|
-
payload: UnsubscribeUpdateRequestJson,
|
|
212
|
-
success: UnsubscribeUpdate200,
|
|
213
|
-
error: [
|
|
214
|
-
UnsubscribeUpdate401.pipe(HttpApiSchema.status(401)),
|
|
215
|
-
UnsubscribeUpdate403.pipe(HttpApiSchema.status(403)),
|
|
216
|
-
UnsubscribeUpdate404.pipe(HttpApiSchema.status(404)),
|
|
217
|
-
UnsubscribeUpdate422.pipe(HttpApiSchema.status(422)),
|
|
218
|
-
UnsubscribeUpdate500,
|
|
219
|
-
UnsubscribeUpdate504.pipe(HttpApiSchema.status(504))
|
|
220
|
-
]
|
|
221
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.update").annotate(OpenApi.Summary, "Update an unsubscribe group").annotate(OpenApi.Description, "Updates the name or description of an unsubscribe group."), HttpApiEndpoint.post("unsubscribeSetDefault", "/v1/unsubscribe-groups/:id/default", {
|
|
222
|
-
params: UnsubscribeSetDefaultPathParams,
|
|
223
|
-
success: UnsubscribeSetDefault200,
|
|
224
|
-
error: [
|
|
225
|
-
UnsubscribeSetDefault401.pipe(HttpApiSchema.status(401)),
|
|
226
|
-
UnsubscribeSetDefault403.pipe(HttpApiSchema.status(403)),
|
|
227
|
-
UnsubscribeSetDefault404.pipe(HttpApiSchema.status(404)),
|
|
228
|
-
UnsubscribeSetDefault422.pipe(HttpApiSchema.status(422)),
|
|
229
|
-
UnsubscribeSetDefault500,
|
|
230
|
-
UnsubscribeSetDefault504.pipe(HttpApiSchema.status(504))
|
|
231
|
-
]
|
|
232
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.setDefault").annotate(OpenApi.Summary, "Make an unsubscribe group the default").annotate(OpenApi.Description, "Makes this group the organization's default: campaigns that name no group, and whose template and sending domain name none, unsubscribe recipients from it."), HttpApiEndpoint.get("unsubscribeListMembers", "/v1/unsubscribe-groups/:id/members", {
|
|
233
|
-
params: UnsubscribeListMembersPathParams,
|
|
234
|
-
query: UnsubscribeListMembersQuery,
|
|
235
|
-
success: UnsubscribeListMembers200,
|
|
236
|
-
error: [
|
|
237
|
-
UnsubscribeListMembers401.pipe(HttpApiSchema.status(401)),
|
|
238
|
-
UnsubscribeListMembers403.pipe(HttpApiSchema.status(403)),
|
|
239
|
-
UnsubscribeListMembers404.pipe(HttpApiSchema.status(404)),
|
|
240
|
-
UnsubscribeListMembers422.pipe(HttpApiSchema.status(422)),
|
|
241
|
-
UnsubscribeListMembers500,
|
|
242
|
-
UnsubscribeListMembers504.pipe(HttpApiSchema.status(504))
|
|
243
|
-
]
|
|
244
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.listMembers").annotate(OpenApi.Summary, "List unsubscribe group members").annotate(OpenApi.Description, "Returns the contacts that have left an unsubscribe group, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("unsubscribeAddMembers", "/v1/unsubscribe-groups/:id/members", {
|
|
245
|
-
params: UnsubscribeAddMembersPathParams,
|
|
246
|
-
payload: UnsubscribeAddMembersRequestJson,
|
|
247
|
-
success: UnsubscribeAddMembers200,
|
|
248
|
-
error: [
|
|
249
|
-
UnsubscribeAddMembers401.pipe(HttpApiSchema.status(401)),
|
|
250
|
-
UnsubscribeAddMembers402.pipe(HttpApiSchema.status(402)),
|
|
251
|
-
UnsubscribeAddMembers403.pipe(HttpApiSchema.status(403)),
|
|
252
|
-
UnsubscribeAddMembers404.pipe(HttpApiSchema.status(404)),
|
|
253
|
-
UnsubscribeAddMembers422.pipe(HttpApiSchema.status(422)),
|
|
254
|
-
UnsubscribeAddMembers500,
|
|
255
|
-
UnsubscribeAddMembers502.pipe(HttpApiSchema.status(502)),
|
|
256
|
-
UnsubscribeAddMembers504.pipe(HttpApiSchema.status(504))
|
|
257
|
-
]
|
|
258
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.addMembers").annotate(OpenApi.Summary, "Add contacts to an unsubscribe group").annotate(OpenApi.Description, "Moves contacts out of an unsubscribe group's audience and returns the number added and the number skipped. Leaving a group stops that group's sends to the contact on every channel. Each member is a contact ID, an email address, or a phone number; an address no contact holds gets a new contact, so an import from another email service needs no contacts first."), HttpApiEndpoint.delete("unsubscribeRemoveMembers", "/v1/unsubscribe-groups/:id/members", {
|
|
259
|
-
params: UnsubscribeRemoveMembersPathParams,
|
|
260
|
-
payload: UnsubscribeRemoveMembersRequestJson,
|
|
261
|
-
success: UnsubscribeRemoveMembers200,
|
|
262
|
-
error: [
|
|
263
|
-
UnsubscribeRemoveMembers401.pipe(HttpApiSchema.status(401)),
|
|
264
|
-
UnsubscribeRemoveMembers403.pipe(HttpApiSchema.status(403)),
|
|
265
|
-
UnsubscribeRemoveMembers404.pipe(HttpApiSchema.status(404)),
|
|
266
|
-
UnsubscribeRemoveMembers422.pipe(HttpApiSchema.status(422)),
|
|
267
|
-
UnsubscribeRemoveMembers500,
|
|
268
|
-
UnsubscribeRemoveMembers504.pipe(HttpApiSchema.status(504))
|
|
269
|
-
]
|
|
270
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.removeMembers").annotate(OpenApi.Summary, "Remove contacts from an unsubscribe group").annotate(OpenApi.Description, "Returns contacts to an unsubscribe group's audience and returns the number removed. Each member is a contact ID, an email address, or a phone number; an address no contact holds is skipped."), HttpApiEndpoint.get("unsubscribeCheckSubscription", "/v1/unsubscribe-groups/check", {
|
|
271
|
-
query: UnsubscribeCheckSubscriptionQuery,
|
|
272
|
-
success: UnsubscribeCheckSubscription200,
|
|
273
|
-
error: [
|
|
274
|
-
UnsubscribeCheckSubscription401.pipe(HttpApiSchema.status(401)),
|
|
275
|
-
UnsubscribeCheckSubscription403.pipe(HttpApiSchema.status(403)),
|
|
276
|
-
UnsubscribeCheckSubscription422.pipe(HttpApiSchema.status(422)),
|
|
277
|
-
UnsubscribeCheckSubscription500,
|
|
278
|
-
UnsubscribeCheckSubscription504.pipe(HttpApiSchema.status(504))
|
|
279
|
-
]
|
|
280
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.checkSubscription").annotate(OpenApi.Summary, "Check unsubscribe group membership").annotate(OpenApi.Description, "Returns the unsubscribe groups a contact has left, optionally limited to a specified set of groups. Name the contact by exactly one of `contactId`, `email`, or `phone`. Membership belongs to the contact, so the answer is the same whichever identifier names it; `contactId` is null, and no groups are returned, when no contact holds the email or phone.")).annotate(OpenApi.Description, "Manage unsubscribe groups and members") {};
|
|
281
|
-
//#endregion
|
|
282
|
-
export { UnsubscribeAddMembers200, UnsubscribeAddMembers401, UnsubscribeAddMembers402, UnsubscribeAddMembers403, UnsubscribeAddMembers404, UnsubscribeAddMembers422, UnsubscribeAddMembers500, UnsubscribeAddMembers502, UnsubscribeAddMembers504, UnsubscribeAddMembersPathParams, UnsubscribeAddMembersRequestJson, UnsubscribeCheckSubscription200, UnsubscribeCheckSubscription401, UnsubscribeCheckSubscription403, UnsubscribeCheckSubscription422, UnsubscribeCheckSubscription500, UnsubscribeCheckSubscription504, UnsubscribeCheckSubscriptionQuery, UnsubscribeCreate201, UnsubscribeCreate401, UnsubscribeCreate403, UnsubscribeCreate409, UnsubscribeCreate422, UnsubscribeCreate500, UnsubscribeCreate504, UnsubscribeCreateRequestJson, UnsubscribeGroupList, UnsubscribeGroupMemberByContact, UnsubscribeGroupMemberByEmail, UnsubscribeGroupMemberByPhone, UnsubscribeGroupMemberId, UnsubscribeGroupMemberPage, UnsubscribeGroupMemberRef, UnsubscribeGroupsGroup, UnsubscribeList200, UnsubscribeList401, UnsubscribeList403, UnsubscribeList422, UnsubscribeList500, UnsubscribeList504, UnsubscribeListMembers200, UnsubscribeListMembers401, UnsubscribeListMembers403, UnsubscribeListMembers404, UnsubscribeListMembers422, UnsubscribeListMembers500, UnsubscribeListMembers504, UnsubscribeListMembersPathParams, UnsubscribeListMembersQuery, UnsubscribeRemove200, UnsubscribeRemove401, UnsubscribeRemove403, UnsubscribeRemove404, UnsubscribeRemove409, UnsubscribeRemove422, UnsubscribeRemove500, UnsubscribeRemove504, UnsubscribeRemoveMembers200, UnsubscribeRemoveMembers401, UnsubscribeRemoveMembers403, UnsubscribeRemoveMembers404, UnsubscribeRemoveMembers422, UnsubscribeRemoveMembers500, UnsubscribeRemoveMembers504, UnsubscribeRemoveMembersPathParams, UnsubscribeRemoveMembersRequestJson, UnsubscribeRemovePathParams, UnsubscribeSetDefault200, UnsubscribeSetDefault401, UnsubscribeSetDefault403, UnsubscribeSetDefault404, UnsubscribeSetDefault422, UnsubscribeSetDefault500, UnsubscribeSetDefault504, UnsubscribeSetDefaultPathParams, UnsubscribeUpdate200, UnsubscribeUpdate401, UnsubscribeUpdate403, UnsubscribeUpdate404, UnsubscribeUpdate422, UnsubscribeUpdate500, UnsubscribeUpdate504, UnsubscribeUpdatePathParams, UnsubscribeUpdateRequestJson };
|
|
283
|
-
|
|
284
|
-
//# sourceMappingURL=unsubscribe-groups.js.map
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export declare const list: (_?: never) => import("./internal/operation").OperationResult<"unsubscribeList">;
|
|
2
|
-
export declare const create: (input: {
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly description?: string | null | undefined;
|
|
5
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeCreate">;
|
|
6
|
-
export declare const update: (input: {
|
|
7
|
-
readonly id: string;
|
|
8
|
-
readonly name?: string | null | undefined;
|
|
9
|
-
readonly description?: string | null | undefined;
|
|
10
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeUpdate">;
|
|
11
|
-
export declare const remove: (input: {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeRemove">;
|
|
14
|
-
export declare const setDefault: (input: {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeSetDefault">;
|
|
17
|
-
export declare const listMembers: ((input: {
|
|
18
|
-
readonly id: string;
|
|
19
|
-
readonly limit?: string | null | undefined;
|
|
20
|
-
readonly cursor?: string | null | undefined;
|
|
21
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeListMembers">) & {
|
|
22
|
-
readonly pages: (input: {
|
|
23
|
-
readonly id: string;
|
|
24
|
-
readonly limit?: string | null | undefined;
|
|
25
|
-
readonly cursor?: string | null | undefined;
|
|
26
|
-
}) => import("effect/Stream").Stream<{
|
|
27
|
-
readonly items: readonly {
|
|
28
|
-
readonly id: string & import("effect/Brand").Brand<"UnsubscribeGroupMemberId">;
|
|
29
|
-
readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
|
|
30
|
-
readonly source: "api" | "complaint" | "link" | "manual";
|
|
31
|
-
readonly unsubscribedAt: string;
|
|
32
|
-
readonly createdAt: string;
|
|
33
|
-
}[];
|
|
34
|
-
readonly nextCursor: string | null;
|
|
35
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
36
|
-
readonly items: (input: {
|
|
37
|
-
readonly id: string;
|
|
38
|
-
readonly limit?: string | null | undefined;
|
|
39
|
-
readonly cursor?: string | null | undefined;
|
|
40
|
-
}) => import("effect/Stream").Stream<{
|
|
41
|
-
readonly id: string & import("effect/Brand").Brand<"UnsubscribeGroupMemberId">;
|
|
42
|
-
readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
|
|
43
|
-
readonly source: "api" | "complaint" | "link" | "manual";
|
|
44
|
-
readonly unsubscribedAt: string;
|
|
45
|
-
readonly createdAt: string;
|
|
46
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
47
|
-
};
|
|
48
|
-
export declare const addMembers: (input: {
|
|
49
|
-
readonly id: string;
|
|
50
|
-
readonly members: readonly ({
|
|
51
|
-
readonly contactId: string;
|
|
52
|
-
} | {
|
|
53
|
-
readonly email: string;
|
|
54
|
-
} | {
|
|
55
|
-
readonly phone: string;
|
|
56
|
-
})[];
|
|
57
|
-
readonly source?: "api" | "complaint" | "link" | "manual" | null | undefined;
|
|
58
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeAddMembers">;
|
|
59
|
-
export declare const removeMembers: (input: {
|
|
60
|
-
readonly id: string;
|
|
61
|
-
readonly members: readonly ({
|
|
62
|
-
readonly contactId: string;
|
|
63
|
-
} | {
|
|
64
|
-
readonly email: string;
|
|
65
|
-
} | {
|
|
66
|
-
readonly phone: string;
|
|
67
|
-
})[];
|
|
68
|
-
}) => import("./internal/operation").OperationResult<"unsubscribeRemoveMembers">;
|
|
69
|
-
export declare const checkSubscription: (input?: {
|
|
70
|
-
readonly contactId?: string | null | undefined;
|
|
71
|
-
readonly email?: string | null | undefined;
|
|
72
|
-
readonly phone?: string | null | undefined;
|
|
73
|
-
readonly groupIds?: string | null | undefined;
|
|
74
|
-
} | undefined) => import("./internal/operation").OperationResult<"unsubscribeCheckSubscription">;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { forGroup } from "./internal/operation.js";
|
|
3
|
-
import { UnsubscribeGroupsGroup } from "./generated/unsubscribe-groups.js";
|
|
4
|
-
//#region src/effect/unsubscribe-groups.ts
|
|
5
|
-
var unsubscribe_groups_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
-
addMembers: () => addMembers,
|
|
7
|
-
checkSubscription: () => checkSubscription,
|
|
8
|
-
create: () => create,
|
|
9
|
-
list: () => list,
|
|
10
|
-
listMembers: () => listMembers,
|
|
11
|
-
remove: () => remove,
|
|
12
|
-
removeMembers: () => removeMembers,
|
|
13
|
-
setDefault: () => setDefault,
|
|
14
|
-
update: () => update
|
|
15
|
-
});
|
|
16
|
-
const make = /* @__PURE__ */ forGroup(UnsubscribeGroupsGroup);
|
|
17
|
-
const list = /* @__PURE__ */ make("unsubscribeList");
|
|
18
|
-
const create = /* @__PURE__ */ make("unsubscribeCreate");
|
|
19
|
-
const update = /* @__PURE__ */ make("unsubscribeUpdate");
|
|
20
|
-
const remove = /* @__PURE__ */ make("unsubscribeRemove");
|
|
21
|
-
const setDefault = /* @__PURE__ */ make("unsubscribeSetDefault");
|
|
22
|
-
const listMembers = /* @__PURE__ */ make("unsubscribeListMembers");
|
|
23
|
-
const addMembers = /* @__PURE__ */ make("unsubscribeAddMembers");
|
|
24
|
-
const removeMembers = /* @__PURE__ */ make("unsubscribeRemoveMembers");
|
|
25
|
-
const checkSubscription = /* @__PURE__ */ make("unsubscribeCheckSubscription");
|
|
26
|
-
//#endregion
|
|
27
|
-
export { addMembers, checkSubscription, create, list, listMembers, remove, removeMembers, setDefault, unsubscribe_groups_exports, update };
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=unsubscribe-groups.js.map
|