samva 0.16.0 → 0.18.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 +9 -1
- package/README.md +57 -1
- package/dist/{rolldown-runtime-D7D4PA-g.js → _virtual/_rolldown/runtime.js} +1 -1
- package/dist/client/client/client.gen.js +174 -0
- package/dist/client/client/utils.gen.js +177 -0
- package/dist/client/client.gen.js +8 -0
- package/dist/client/core/auth.gen.js +12 -0
- package/dist/client/core/bodySerializer.gen.js +6 -0
- package/dist/client/core/params.gen.js +77 -0
- package/dist/client/core/pathSerializer.gen.js +82 -0
- package/dist/client/core/serverSentEvents.gen.js +96 -0
- package/dist/client/core/utils.gen.js +78 -0
- package/dist/client/sdk.gen.d.ts +174 -3
- package/dist/{promises-KrA2nSLg.js → client/sdk.gen.js} +464 -2289
- package/dist/client/types.gen.d.ts +1126 -11
- package/dist/client-attribution.js +9 -0
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/analytics.js +11 -9
- package/dist/effect/api-keys.d.ts +13 -13
- package/dist/effect/api-keys.js +13 -12
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/attachments.js +9 -7
- package/dist/effect/brands.d.ts +7 -7
- package/dist/effect/brands.js +12 -10
- package/dist/effect/campaigns.d.ts +18 -18
- package/dist/effect/campaigns.js +17 -15
- package/dist/effect/categories.d.ts +2 -2
- package/dist/effect/categories.js +95 -1
- package/dist/effect/client.d.ts +1 -1
- package/dist/effect/client.js +4 -5
- package/dist/effect/contact-groups.d.ts +14 -14
- package/dist/effect/contact-groups.js +15 -13
- package/dist/effect/contacts.d.ts +77 -25
- package/dist/effect/contacts.js +27 -22
- package/dist/effect/conversations.d.ts +17 -17
- package/dist/effect/conversations.js +18 -16
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/custom-fields.js +9 -7
- package/dist/effect/email.d.ts +78 -77
- package/dist/effect/email.js +68 -65
- package/dist/effect/errors.d.ts +2 -0
- package/dist/effect/errors.js +3 -0
- package/dist/effect/events.d.ts +121 -0
- package/dist/effect/events.js +17 -0
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extension-installations.js +14 -12
- package/dist/effect/extensions.d.ts +9 -9
- package/dist/effect/extensions.js +10 -8
- package/dist/effect/feedback.d.ts +2 -2
- package/dist/effect/feedback.js +6 -5
- package/dist/effect/generated/analytics.d.ts +715 -0
- package/dist/effect/generated/analytics.js +188 -0
- package/dist/effect/generated/api-keys.d.ts +1627 -0
- package/dist/effect/generated/api-keys.js +249 -0
- package/dist/effect/generated/attachments.d.ts +554 -0
- package/dist/effect/generated/attachments.js +125 -0
- package/dist/effect/generated/brands.d.ts +1118 -0
- package/dist/effect/generated/brands.js +155 -0
- package/dist/effect/generated/campaigns.d.ts +3783 -0
- package/dist/effect/generated/campaigns.js +491 -0
- package/dist/effect/generated/contact-events.d.ts +158 -0
- package/dist/effect/generated/contact-events.js +37 -0
- package/dist/effect/generated/contact-groups.d.ts +1445 -0
- package/dist/effect/generated/contact-groups.js +419 -0
- package/dist/effect/generated/contacts.d.ts +3789 -0
- package/dist/effect/generated/contacts.js +709 -0
- package/dist/effect/generated/conversations.d.ts +2870 -0
- package/dist/effect/generated/conversations.js +461 -0
- package/dist/effect/generated/custom-fields.d.ts +562 -0
- package/dist/effect/generated/custom-fields.js +162 -0
- package/dist/effect/generated/email.d.ts +10622 -0
- package/dist/effect/generated/email.js +2347 -0
- package/dist/effect/generated/events.d.ts +463 -0
- package/dist/effect/generated/events.js +70 -0
- package/dist/effect/generated/extension-installations.d.ts +1786 -0
- package/dist/effect/generated/extension-installations.js +382 -0
- package/dist/effect/generated/extensions.d.ts +927 -0
- package/dist/effect/generated/extensions.js +203 -0
- package/dist/effect/generated/feedback.d.ts +116 -0
- package/dist/effect/generated/feedback.js +43 -0
- package/dist/effect/generated/index.d.ts +61 -0
- package/dist/effect/generated/journeys.d.ts +6135 -0
- package/dist/effect/generated/journeys.js +464 -0
- package/dist/effect/generated/mailboxes.d.ts +13641 -0
- package/dist/effect/generated/mailboxes.js +2312 -0
- package/dist/effect/generated/media.d.ts +741 -0
- package/dist/effect/generated/media.js +181 -0
- package/dist/effect/generated/messages.d.ts +2355 -0
- package/dist/effect/generated/messages.js +671 -0
- package/dist/effect/generated/namespaces.d.ts +654 -0
- package/dist/effect/generated/namespaces.js +135 -0
- package/dist/effect/generated/operations.d.ts +514 -0
- package/dist/effect/generated/operations.js +80 -0
- package/dist/effect/generated/organizations.d.ts +1111 -0
- package/dist/effect/generated/organizations.js +231 -0
- package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
- package/dist/effect/generated/scheduled-messages.js +190 -0
- package/dist/effect/generated/shared.d.ts +3250 -0
- package/dist/effect/generated/shared.js +1053 -0
- package/dist/effect/generated/subscriptions.d.ts +188 -0
- package/dist/effect/generated/subscriptions.js +61 -0
- package/dist/effect/generated/templates.d.ts +8177 -0
- package/dist/effect/generated/templates.js +2214 -0
- package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
- package/dist/effect/generated/unsubscribe-groups.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +1697 -0
- package/dist/effect/generated/webhooks.js +500 -0
- package/dist/effect/generated/whoami.d.ts +291 -0
- package/dist/effect/generated/whoami.js +54 -0
- package/dist/effect/generated-metadata.d.ts +1627 -0
- package/dist/effect/generated-metadata.js +919 -0
- package/dist/effect/index.d.ts +3 -2
- package/dist/effect/index.js +33 -31
- package/dist/effect/internal/client.d.ts +10 -7
- package/dist/effect/internal/client.js +69 -0
- package/dist/effect/internal/email-sender.d.ts +17 -0
- package/dist/effect/internal/email-sender.js +21 -0
- package/dist/effect/internal/mailbox-events.js +33 -0
- package/dist/effect/internal/operation.d.ts +12 -72
- package/dist/effect/internal/operation.js +116 -0
- package/dist/effect/internal/send.d.ts +60 -0
- package/dist/effect/internal/send.js +56 -0
- package/dist/effect/journeys.d.ts +2153 -0
- package/dist/effect/journeys.js +39 -0
- package/dist/effect/mailboxes.d.ts +80 -80
- package/dist/effect/mailboxes.js +135 -3
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +10 -8
- package/dist/effect/messages.d.ts +16 -16
- package/dist/effect/messages.js +15 -12
- package/dist/effect/namespaces.d.ts +7 -7
- package/dist/effect/namespaces.js +10 -8
- package/dist/effect/operations.d.ts +5 -5
- package/dist/effect/operations.js +8 -6
- package/dist/effect/organizations.d.ts +7 -7
- package/dist/effect/organizations.js +12 -10
- package/dist/effect/pagination.js +39 -0
- package/dist/effect/retry.js +3 -3
- package/dist/effect/runtime.js +25 -0
- package/dist/effect/scheduled-messages.d.ts +7 -7
- package/dist/effect/scheduled-messages.js +10 -8
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/subscriptions.js +5 -4
- package/dist/effect/templates.d.ts +40 -40
- package/dist/effect/templates.js +39 -37
- package/dist/effect/unsubscribe-groups.d.ts +11 -11
- package/dist/effect/unsubscribe-groups.js +14 -12
- package/dist/effect/webhooks.d.ts +23 -23
- package/dist/effect/webhooks.js +16 -14
- package/dist/effect/whoami.d.ts +1 -1
- package/dist/effect/whoami.js +5 -4
- package/dist/index.js +4 -3
- package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments.js} +13 -7
- package/dist/{mailbox-events-VKR4f3qq.js → mailbox-events.js} +2 -2
- package/dist/{normalize-B79uJIeb.js → normalize.js} +2 -2
- package/dist/package.js +6 -0
- package/dist/promises/errors.gen.js +1340 -0
- package/dist/promises/index.d.ts +7 -3
- package/dist/promises/index.js +288 -3
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +85 -0
- package/dist/{operation-BTXjPrwf.js → service-map.js} +58 -219
- package/package.json +17 -3
- package/dist/categories-DV51kr2H.js +0 -187
- package/dist/client-BMUew5Wp.js +0 -13794
- package/dist/effect/generated.d.ts +0 -64004
- package/dist/mailboxes-Thp5z0oX.js +0 -161
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactGroupId, ContactId, ContactIdentity, ContactIdentityId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MessageId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, 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/contacts.ts
|
|
5
|
+
const ContactCustomFields = /* @__PURE__ */ Schema.Record(Schema.String, Schema.Union([
|
|
6
|
+
Schema.String,
|
|
7
|
+
Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
8
|
+
Schema.Boolean,
|
|
9
|
+
Schema.Null
|
|
10
|
+
])).annotate({ identifier: "ContactCustomFields" });
|
|
11
|
+
const ContactIdentityInput = /* @__PURE__ */ Schema.Struct({
|
|
12
|
+
channel: Schema.Literal("email"),
|
|
13
|
+
identifier: Schema.String,
|
|
14
|
+
verified: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
15
|
+
}).annotate({ identifier: "ContactIdentityInput" });
|
|
16
|
+
const ContactLocation = /* @__PURE__ */ Schema.Struct({
|
|
17
|
+
country: Schema.String,
|
|
18
|
+
state: Schema.String,
|
|
19
|
+
city: Schema.String,
|
|
20
|
+
timezone: Schema.String
|
|
21
|
+
}).annotate({ identifier: "ContactLocation" });
|
|
22
|
+
const ContactPreferences = /* @__PURE__ */ Schema.Struct({
|
|
23
|
+
preferredChannels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")), Schema.Null])),
|
|
24
|
+
language: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
25
|
+
timezone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
26
|
+
notifications: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
27
|
+
email: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
28
|
+
quiet_hours: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
29
|
+
start: Schema.String,
|
|
30
|
+
end: Schema.String
|
|
31
|
+
}), Schema.Null]))
|
|
32
|
+
}), Schema.Null]))
|
|
33
|
+
}).annotate({ identifier: "ContactPreferences" });
|
|
34
|
+
const BulkUpdateResult = /* @__PURE__ */ Schema.Struct({
|
|
35
|
+
updated: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
36
|
+
failed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
37
|
+
}).annotate({ identifier: "BulkUpdateResult" });
|
|
38
|
+
const ContactLookup = /* @__PURE__ */ Schema.Union([
|
|
39
|
+
Schema.Struct({
|
|
40
|
+
type: Schema.Literal("email"),
|
|
41
|
+
value: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
42
|
+
}),
|
|
43
|
+
Schema.Struct({
|
|
44
|
+
type: Schema.Literal("phone"),
|
|
45
|
+
value: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
46
|
+
}),
|
|
47
|
+
Schema.Struct({
|
|
48
|
+
type: Schema.Literal("externalId"),
|
|
49
|
+
value: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
50
|
+
})
|
|
51
|
+
]).annotate({ identifier: "ContactLookup" });
|
|
52
|
+
const ContactActivityPage = /* @__PURE__ */ Schema.Struct({
|
|
53
|
+
items: Schema.Array(Schema.Struct({
|
|
54
|
+
id: MessageId,
|
|
55
|
+
channel: Schema.String,
|
|
56
|
+
direction: Schema.String,
|
|
57
|
+
status: Schema.String,
|
|
58
|
+
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
59
|
+
snippet: Schema.Union([Schema.String, Schema.Null]),
|
|
60
|
+
createdAt: Schema.String,
|
|
61
|
+
conversationId: Schema.Union([ConversationId, Schema.Null])
|
|
62
|
+
})),
|
|
63
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
64
|
+
}).annotate({ identifier: "ContactActivityPage" });
|
|
65
|
+
const ContactListMembership = /* @__PURE__ */ Schema.Struct({
|
|
66
|
+
id: ContactGroupId,
|
|
67
|
+
name: Schema.String,
|
|
68
|
+
color: Schema.Union([Schema.Union([
|
|
69
|
+
Schema.Literal("clay"),
|
|
70
|
+
Schema.Literal("sand"),
|
|
71
|
+
Schema.Literal("moss"),
|
|
72
|
+
Schema.Literal("sky"),
|
|
73
|
+
Schema.Literal("plum"),
|
|
74
|
+
Schema.Literal("rose")
|
|
75
|
+
]), Schema.Null])
|
|
76
|
+
}).annotate({ identifier: "ContactListMembership" });
|
|
77
|
+
const ContactGroupMembershipPage = /* @__PURE__ */ Schema.Struct({
|
|
78
|
+
items: Schema.Array(Schema.Struct({
|
|
79
|
+
id: ContactGroupId,
|
|
80
|
+
name: Schema.String,
|
|
81
|
+
type: Schema.String,
|
|
82
|
+
color: Schema.Union([Schema.Union([
|
|
83
|
+
Schema.Literal("clay"),
|
|
84
|
+
Schema.Literal("sand"),
|
|
85
|
+
Schema.Literal("moss"),
|
|
86
|
+
Schema.Literal("sky"),
|
|
87
|
+
Schema.Literal("plum"),
|
|
88
|
+
Schema.Literal("rose")
|
|
89
|
+
]), Schema.Null]),
|
|
90
|
+
role: Schema.String,
|
|
91
|
+
joinedAt: Schema.String
|
|
92
|
+
})),
|
|
93
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
94
|
+
}).annotate({ identifier: "ContactGroupMembershipPage" });
|
|
95
|
+
const ContactProfile = /* @__PURE__ */ Schema.Struct({
|
|
96
|
+
firstName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
97
|
+
lastName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
98
|
+
company: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
99
|
+
jobTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
100
|
+
location: Schema.optionalKey(Schema.Union([ContactLocation, Schema.Null])),
|
|
101
|
+
customFields: Schema.optionalKey(Schema.Union([ContactCustomFields, Schema.Null])),
|
|
102
|
+
source: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
103
|
+
Schema.Literal("api"),
|
|
104
|
+
Schema.Literal("import"),
|
|
105
|
+
Schema.Literal("manual"),
|
|
106
|
+
Schema.Literal("form")
|
|
107
|
+
]), Schema.Null]))
|
|
108
|
+
}).annotate({ identifier: "ContactProfile" });
|
|
109
|
+
const ContactProfileUpdate = /* @__PURE__ */ Schema.Struct({
|
|
110
|
+
firstName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
111
|
+
lastName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
112
|
+
company: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
113
|
+
jobTitle: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
114
|
+
location: Schema.optionalKey(Schema.Union([Schema.Union([ContactLocation, Schema.Null]), Schema.Null])),
|
|
115
|
+
customFields: Schema.optionalKey(Schema.Union([ContactCustomFields, Schema.Null]))
|
|
116
|
+
}).annotate({ identifier: "ContactProfileUpdate" });
|
|
117
|
+
const ContactSummary = /* @__PURE__ */ Schema.Struct({
|
|
118
|
+
id: ContactId,
|
|
119
|
+
name: Schema.String,
|
|
120
|
+
displayName: Schema.Union([Schema.String, Schema.Null]),
|
|
121
|
+
status: Schema.Union([
|
|
122
|
+
Schema.Literal("active"),
|
|
123
|
+
Schema.Literal("paused"),
|
|
124
|
+
Schema.Literal("blocked"),
|
|
125
|
+
Schema.Literal("archived")
|
|
126
|
+
]),
|
|
127
|
+
email: Schema.Union([Schema.String, Schema.Null]),
|
|
128
|
+
channels: Schema.Array(Schema.Literal("email")),
|
|
129
|
+
tags: Schema.Array(Schema.String),
|
|
130
|
+
lists: Schema.Array(ContactListMembership),
|
|
131
|
+
customFields: Schema.optionalKey(Schema.Union([ContactCustomFields, Schema.Null])),
|
|
132
|
+
lastActiveAt: Schema.Union([Schema.String, Schema.Null]),
|
|
133
|
+
createdAt: Schema.String
|
|
134
|
+
}).annotate({ identifier: "ContactSummary" });
|
|
135
|
+
const Contact = /* @__PURE__ */ Schema.Struct({
|
|
136
|
+
id: ContactId,
|
|
137
|
+
name: Schema.String,
|
|
138
|
+
displayName: Schema.Union([Schema.String, Schema.Null]),
|
|
139
|
+
avatar: Schema.Union([Schema.String, Schema.Null]),
|
|
140
|
+
status: Schema.Union([
|
|
141
|
+
Schema.Literal("active"),
|
|
142
|
+
Schema.Literal("paused"),
|
|
143
|
+
Schema.Literal("blocked"),
|
|
144
|
+
Schema.Literal("archived")
|
|
145
|
+
]),
|
|
146
|
+
statusReason: Schema.Union([Schema.String, Schema.Null]),
|
|
147
|
+
externalId: Schema.Union([Schema.String, Schema.Null]),
|
|
148
|
+
identities: Schema.Array(ContactIdentity),
|
|
149
|
+
profile: Schema.Union([ContactProfile, Schema.Null]),
|
|
150
|
+
preferences: Schema.Union([ContactPreferences, Schema.Null]),
|
|
151
|
+
tags: Schema.Array(Schema.String),
|
|
152
|
+
metadata: Schema.Union([JsonObject, Schema.Null]),
|
|
153
|
+
createdAt: Schema.String,
|
|
154
|
+
updatedAt: Schema.String
|
|
155
|
+
}).annotate({ identifier: "Contact" });
|
|
156
|
+
const ContactPage = /* @__PURE__ */ Schema.Struct({
|
|
157
|
+
items: Schema.Array(ContactSummary),
|
|
158
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
159
|
+
}).annotate({ identifier: "ContactPage" });
|
|
160
|
+
const ContactsListQuery = /* @__PURE__ */ Schema.Struct({
|
|
161
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
162
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
|
|
163
|
+
search: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
164
|
+
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
165
|
+
Schema.Literal("active"),
|
|
166
|
+
Schema.Literal("paused"),
|
|
167
|
+
Schema.Literal("blocked"),
|
|
168
|
+
Schema.Literal("archived")
|
|
169
|
+
]), Schema.Null])),
|
|
170
|
+
fields: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
171
|
+
customField: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
172
|
+
customFieldValue: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
173
|
+
after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
174
|
+
before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
175
|
+
});
|
|
176
|
+
const ContactsList200 = ContactPage;
|
|
177
|
+
const ContactsList401 = UnauthorizedError;
|
|
178
|
+
const ContactsList403 = ForbiddenError;
|
|
179
|
+
const ContactsList422 = ValidationError;
|
|
180
|
+
const ContactsList500 = InternalError;
|
|
181
|
+
const ContactsList504 = GatewayTimeoutError;
|
|
182
|
+
const ContactsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
183
|
+
name: Schema.String,
|
|
184
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
185
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
186
|
+
identities: Schema.optionalKey(Schema.Union([Schema.Array(ContactIdentityInput), Schema.Null])),
|
|
187
|
+
profile: Schema.optionalKey(Schema.Union([Schema.Union([ContactProfile, Schema.Null]), Schema.Null])),
|
|
188
|
+
preferences: Schema.optionalKey(Schema.Union([Schema.Union([ContactPreferences, Schema.Null]), Schema.Null])),
|
|
189
|
+
tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
190
|
+
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
191
|
+
Schema.Literal("active"),
|
|
192
|
+
Schema.Literal("paused"),
|
|
193
|
+
Schema.Literal("blocked"),
|
|
194
|
+
Schema.Literal("archived")
|
|
195
|
+
]), Schema.Null])),
|
|
196
|
+
statusReason: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
197
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
198
|
+
metadata: Schema.optionalKey(Schema.Union([Schema.Union([JsonObject, Schema.Null]), Schema.Null]))
|
|
199
|
+
});
|
|
200
|
+
const ContactsCreate201 = Contact;
|
|
201
|
+
const ContactsCreate401 = UnauthorizedError;
|
|
202
|
+
const ContactsCreate402 = PaymentRequiredError;
|
|
203
|
+
const ContactsCreate403 = ForbiddenError;
|
|
204
|
+
const ContactsCreate409 = ConflictError;
|
|
205
|
+
const ContactsCreate422 = ValidationError;
|
|
206
|
+
const ContactsCreate500 = InternalError;
|
|
207
|
+
const ContactsCreate502 = BillingProviderError;
|
|
208
|
+
const ContactsCreate504 = GatewayTimeoutError;
|
|
209
|
+
const ContactsGetPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
210
|
+
const ContactsGet200 = Contact;
|
|
211
|
+
const ContactsGet401 = UnauthorizedError;
|
|
212
|
+
const ContactsGet403 = ForbiddenError;
|
|
213
|
+
const ContactsGet404 = ResourceNotFoundError;
|
|
214
|
+
const ContactsGet422 = ValidationError;
|
|
215
|
+
const ContactsGet500 = InternalError;
|
|
216
|
+
const ContactsGet504 = GatewayTimeoutError;
|
|
217
|
+
const ContactsRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
218
|
+
const ContactsRemove200 = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean });
|
|
219
|
+
const ContactsRemove401 = UnauthorizedError;
|
|
220
|
+
const ContactsRemove403 = ForbiddenError;
|
|
221
|
+
const ContactsRemove404 = ResourceNotFoundError;
|
|
222
|
+
const ContactsRemove422 = ValidationError;
|
|
223
|
+
const ContactsRemove500 = InternalError;
|
|
224
|
+
const ContactsRemove502 = BillingProviderError;
|
|
225
|
+
const ContactsRemove504 = GatewayTimeoutError;
|
|
226
|
+
const ContactsUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
227
|
+
const ContactsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
228
|
+
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
229
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
230
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
231
|
+
profile: Schema.optionalKey(Schema.Union([ContactProfileUpdate, Schema.Null])),
|
|
232
|
+
preferences: Schema.optionalKey(Schema.Union([Schema.Union([ContactPreferences, Schema.Null]), Schema.Null])),
|
|
233
|
+
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
234
|
+
Schema.Literal("active"),
|
|
235
|
+
Schema.Literal("paused"),
|
|
236
|
+
Schema.Literal("blocked"),
|
|
237
|
+
Schema.Literal("archived")
|
|
238
|
+
]), Schema.Null])),
|
|
239
|
+
statusReason: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
240
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
241
|
+
metadata: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
|
|
242
|
+
});
|
|
243
|
+
const ContactsUpdate200 = Contact;
|
|
244
|
+
const ContactsUpdate401 = UnauthorizedError;
|
|
245
|
+
const ContactsUpdate402 = PaymentRequiredError;
|
|
246
|
+
const ContactsUpdate403 = ForbiddenError;
|
|
247
|
+
const ContactsUpdate404 = ResourceNotFoundError;
|
|
248
|
+
const ContactsUpdate422 = ValidationError;
|
|
249
|
+
const ContactsUpdate500 = InternalError;
|
|
250
|
+
const ContactsUpdate502 = BillingProviderError;
|
|
251
|
+
const ContactsUpdate504 = GatewayTimeoutError;
|
|
252
|
+
const ContactsGetActivityTimelinePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
253
|
+
const ContactsGetActivityTimelineQuery = /* @__PURE__ */ Schema.Struct({
|
|
254
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
255
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
|
|
256
|
+
channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null]))
|
|
257
|
+
});
|
|
258
|
+
const ContactsGetActivityTimeline200 = ContactActivityPage;
|
|
259
|
+
const ContactsGetActivityTimeline401 = UnauthorizedError;
|
|
260
|
+
const ContactsGetActivityTimeline403 = ForbiddenError;
|
|
261
|
+
const ContactsGetActivityTimeline404 = ResourceNotFoundError;
|
|
262
|
+
const ContactsGetActivityTimeline422 = ValidationError;
|
|
263
|
+
const ContactsGetActivityTimeline500 = InternalError;
|
|
264
|
+
const ContactsGetActivityTimeline504 = GatewayTimeoutError;
|
|
265
|
+
const ContactsGetEngagementPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
266
|
+
const ContactsGetEngagement200 = /* @__PURE__ */ Schema.Struct({
|
|
267
|
+
totalMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
268
|
+
messagesSent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
269
|
+
messagesReceived: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
270
|
+
activeConversations: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
271
|
+
lastActivityAt: Schema.Union([Schema.String, Schema.Null]),
|
|
272
|
+
channelsUsed: Schema.Record(Schema.String, Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })))
|
|
273
|
+
});
|
|
274
|
+
const ContactsGetEngagement401 = UnauthorizedError;
|
|
275
|
+
const ContactsGetEngagement403 = ForbiddenError;
|
|
276
|
+
const ContactsGetEngagement404 = ResourceNotFoundError;
|
|
277
|
+
const ContactsGetEngagement422 = ValidationError;
|
|
278
|
+
const ContactsGetEngagement500 = InternalError;
|
|
279
|
+
const ContactsGetEngagement504 = GatewayTimeoutError;
|
|
280
|
+
const ContactsGetGroupMembershipsPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
281
|
+
const ContactsGetGroupMembershipsQuery = /* @__PURE__ */ Schema.Struct({
|
|
282
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
283
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
|
|
284
|
+
});
|
|
285
|
+
const ContactsGetGroupMemberships200 = ContactGroupMembershipPage;
|
|
286
|
+
const ContactsGetGroupMemberships401 = UnauthorizedError;
|
|
287
|
+
const ContactsGetGroupMemberships403 = ForbiddenError;
|
|
288
|
+
const ContactsGetGroupMemberships404 = ResourceNotFoundError;
|
|
289
|
+
const ContactsGetGroupMemberships422 = ValidationError;
|
|
290
|
+
const ContactsGetGroupMemberships500 = InternalError;
|
|
291
|
+
const ContactsGetGroupMemberships504 = GatewayTimeoutError;
|
|
292
|
+
const ContactsAddIdentityPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
293
|
+
const ContactsAddIdentityRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
294
|
+
channel: Schema.Literal("email"),
|
|
295
|
+
identifier: Schema.String,
|
|
296
|
+
verified: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
297
|
+
});
|
|
298
|
+
const ContactsAddIdentity200 = Contact;
|
|
299
|
+
const ContactsAddIdentity401 = UnauthorizedError;
|
|
300
|
+
const ContactsAddIdentity403 = ForbiddenError;
|
|
301
|
+
const ContactsAddIdentity404 = ResourceNotFoundError;
|
|
302
|
+
const ContactsAddIdentity409 = ConflictError;
|
|
303
|
+
const ContactsAddIdentity422 = ValidationError;
|
|
304
|
+
const ContactsAddIdentity500 = InternalError;
|
|
305
|
+
const ContactsAddIdentity504 = GatewayTimeoutError;
|
|
306
|
+
const ContactsRemoveIdentityPathParams = /* @__PURE__ */ Schema.Struct({
|
|
307
|
+
id: ContactId,
|
|
308
|
+
identityId: ContactIdentityId
|
|
309
|
+
});
|
|
310
|
+
const ContactsRemoveIdentity200 = Contact;
|
|
311
|
+
const ContactsRemoveIdentity401 = UnauthorizedError;
|
|
312
|
+
const ContactsRemoveIdentity403 = ForbiddenError;
|
|
313
|
+
const ContactsRemoveIdentity404 = ResourceNotFoundError;
|
|
314
|
+
const ContactsRemoveIdentity422 = ValidationError;
|
|
315
|
+
const ContactsRemoveIdentity500 = InternalError;
|
|
316
|
+
const ContactsRemoveIdentity504 = GatewayTimeoutError;
|
|
317
|
+
const ContactsAddTagsPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
318
|
+
const ContactsAddTagsRequestJson = /* @__PURE__ */ Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) });
|
|
319
|
+
const ContactsAddTags200 = Contact;
|
|
320
|
+
const ContactsAddTags401 = UnauthorizedError;
|
|
321
|
+
const ContactsAddTags403 = ForbiddenError;
|
|
322
|
+
const ContactsAddTags404 = ResourceNotFoundError;
|
|
323
|
+
const ContactsAddTags422 = ValidationError;
|
|
324
|
+
const ContactsAddTags500 = InternalError;
|
|
325
|
+
const ContactsAddTags504 = GatewayTimeoutError;
|
|
326
|
+
const ContactsRemoveTagsPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
|
|
327
|
+
const ContactsRemoveTagsRequestJson = /* @__PURE__ */ Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) });
|
|
328
|
+
const ContactsRemoveTags200 = Contact;
|
|
329
|
+
const ContactsRemoveTags401 = UnauthorizedError;
|
|
330
|
+
const ContactsRemoveTags403 = ForbiddenError;
|
|
331
|
+
const ContactsRemoveTags404 = ResourceNotFoundError;
|
|
332
|
+
const ContactsRemoveTags422 = ValidationError;
|
|
333
|
+
const ContactsRemoveTags500 = InternalError;
|
|
334
|
+
const ContactsRemoveTags504 = GatewayTimeoutError;
|
|
335
|
+
const ContactsBulkDeleteRequestJson = /* @__PURE__ */ Schema.Struct({ ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]) });
|
|
336
|
+
const ContactsBulkDelete200 = /* @__PURE__ */ Schema.Struct({
|
|
337
|
+
deleted: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
338
|
+
failed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
339
|
+
});
|
|
340
|
+
const ContactsBulkDelete401 = UnauthorizedError;
|
|
341
|
+
const ContactsBulkDelete403 = ForbiddenError;
|
|
342
|
+
const ContactsBulkDelete422 = ValidationError;
|
|
343
|
+
const ContactsBulkDelete500 = InternalError;
|
|
344
|
+
const ContactsBulkDelete502 = BillingProviderError;
|
|
345
|
+
const ContactsBulkDelete504 = GatewayTimeoutError;
|
|
346
|
+
const ContactsBulkImportRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
347
|
+
contacts: Schema.Array(Schema.Struct({
|
|
348
|
+
name: Schema.String,
|
|
349
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
350
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
351
|
+
identities: Schema.optionalKey(Schema.Union([Schema.Array(ContactIdentityInput), Schema.Null])),
|
|
352
|
+
profile: Schema.optionalKey(Schema.Union([Schema.Union([ContactProfile, Schema.Null]), Schema.Null])),
|
|
353
|
+
preferences: Schema.optionalKey(Schema.Union([Schema.Union([ContactPreferences, Schema.Null]), Schema.Null])),
|
|
354
|
+
tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
355
|
+
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
356
|
+
Schema.Literal("active"),
|
|
357
|
+
Schema.Literal("paused"),
|
|
358
|
+
Schema.Literal("blocked"),
|
|
359
|
+
Schema.Literal("archived")
|
|
360
|
+
]), Schema.Null])),
|
|
361
|
+
statusReason: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
362
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
363
|
+
metadata: Schema.optionalKey(Schema.Union([Schema.Union([JsonObject, Schema.Null]), Schema.Null]))
|
|
364
|
+
})),
|
|
365
|
+
onConflict: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("skip"), Schema.Literal("update")]), Schema.Null]))
|
|
366
|
+
});
|
|
367
|
+
const ContactsBulkImport200 = /* @__PURE__ */ Schema.Struct({
|
|
368
|
+
total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
369
|
+
created: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
370
|
+
updated: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
371
|
+
skipped: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
372
|
+
errors: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
373
|
+
results: Schema.Array(Schema.Struct({
|
|
374
|
+
index: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
|
|
375
|
+
status: Schema.Union([
|
|
376
|
+
Schema.Literal("created"),
|
|
377
|
+
Schema.Literal("updated"),
|
|
378
|
+
Schema.Literal("skipped"),
|
|
379
|
+
Schema.Literal("error")
|
|
380
|
+
]),
|
|
381
|
+
contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
|
|
382
|
+
error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
383
|
+
}))
|
|
384
|
+
});
|
|
385
|
+
const ContactsBulkImport401 = UnauthorizedError;
|
|
386
|
+
const ContactsBulkImport402 = PaymentRequiredError;
|
|
387
|
+
const ContactsBulkImport403 = ForbiddenError;
|
|
388
|
+
const ContactsBulkImport422 = ValidationError;
|
|
389
|
+
const ContactsBulkImport500 = InternalError;
|
|
390
|
+
const ContactsBulkImport502 = BillingProviderError;
|
|
391
|
+
const ContactsBulkImport504 = GatewayTimeoutError;
|
|
392
|
+
const ContactsBulkUpdateStatusRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
393
|
+
ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]),
|
|
394
|
+
status: Schema.Union([
|
|
395
|
+
Schema.Literal("active"),
|
|
396
|
+
Schema.Literal("paused"),
|
|
397
|
+
Schema.Literal("blocked"),
|
|
398
|
+
Schema.Literal("archived")
|
|
399
|
+
])
|
|
400
|
+
});
|
|
401
|
+
const ContactsBulkUpdateStatus200 = BulkUpdateResult;
|
|
402
|
+
const ContactsBulkUpdateStatus401 = UnauthorizedError;
|
|
403
|
+
const ContactsBulkUpdateStatus402 = PaymentRequiredError;
|
|
404
|
+
const ContactsBulkUpdateStatus403 = ForbiddenError;
|
|
405
|
+
const ContactsBulkUpdateStatus422 = ValidationError;
|
|
406
|
+
const ContactsBulkUpdateStatus500 = InternalError;
|
|
407
|
+
const ContactsBulkUpdateStatus502 = BillingProviderError;
|
|
408
|
+
const ContactsBulkUpdateStatus504 = GatewayTimeoutError;
|
|
409
|
+
const ContactsBulkUpdateTagsRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
410
|
+
ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]),
|
|
411
|
+
operation: Schema.Union([
|
|
412
|
+
Schema.Literal("add"),
|
|
413
|
+
Schema.Literal("remove"),
|
|
414
|
+
Schema.Literal("set")
|
|
415
|
+
]),
|
|
416
|
+
tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String])
|
|
417
|
+
});
|
|
418
|
+
const ContactsBulkUpdateTags200 = BulkUpdateResult;
|
|
419
|
+
const ContactsBulkUpdateTags401 = UnauthorizedError;
|
|
420
|
+
const ContactsBulkUpdateTags403 = ForbiddenError;
|
|
421
|
+
const ContactsBulkUpdateTags422 = ValidationError;
|
|
422
|
+
const ContactsBulkUpdateTags500 = InternalError;
|
|
423
|
+
const ContactsBulkUpdateTags504 = GatewayTimeoutError;
|
|
424
|
+
const ContactsExportRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
425
|
+
ids: Schema.optionalKey(Schema.Union([Schema.Array(ContactId), Schema.Null])),
|
|
426
|
+
format: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("json"), Schema.Literal("csv")]), Schema.Null])),
|
|
427
|
+
filters: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
428
|
+
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
429
|
+
Schema.Literal("active"),
|
|
430
|
+
Schema.Literal("paused"),
|
|
431
|
+
Schema.Literal("blocked"),
|
|
432
|
+
Schema.Literal("archived")
|
|
433
|
+
]), Schema.Null])),
|
|
434
|
+
tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]))
|
|
435
|
+
}), Schema.Null])),
|
|
436
|
+
fields: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]))
|
|
437
|
+
});
|
|
438
|
+
const ContactsExport200 = /* @__PURE__ */ Schema.Struct({
|
|
439
|
+
data: Schema.String,
|
|
440
|
+
format: Schema.Union([Schema.Literal("json"), Schema.Literal("csv")]),
|
|
441
|
+
count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
442
|
+
});
|
|
443
|
+
const ContactsExport401 = UnauthorizedError;
|
|
444
|
+
const ContactsExport403 = ForbiddenError;
|
|
445
|
+
const ContactsExport422 = ValidationError;
|
|
446
|
+
const ContactsExport500 = InternalError;
|
|
447
|
+
const ContactsExport504 = GatewayTimeoutError;
|
|
448
|
+
const ContactsFindRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
449
|
+
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
450
|
+
phone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
451
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
452
|
+
});
|
|
453
|
+
const ContactsFind200 = /* @__PURE__ */ Schema.Union([Contact, Schema.Null]);
|
|
454
|
+
const ContactsFind401 = UnauthorizedError;
|
|
455
|
+
const ContactsFind403 = ForbiddenError;
|
|
456
|
+
const ContactsFind409 = ConflictError;
|
|
457
|
+
const ContactsFind422 = ValidationError;
|
|
458
|
+
const ContactsFind500 = InternalError;
|
|
459
|
+
const ContactsFind504 = GatewayTimeoutError;
|
|
460
|
+
const ContactsFindOrCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
461
|
+
lookup: ContactLookup,
|
|
462
|
+
create: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
463
|
+
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
464
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
465
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
466
|
+
identities: Schema.optionalKey(Schema.Union([Schema.Array(ContactIdentityInput), Schema.Null])),
|
|
467
|
+
profile: Schema.optionalKey(Schema.Union([Schema.Union([ContactProfile, Schema.Null]), Schema.Null])),
|
|
468
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
|
|
469
|
+
}), Schema.Null]))
|
|
470
|
+
});
|
|
471
|
+
const ContactsFindOrCreate200 = /* @__PURE__ */ Schema.Struct({
|
|
472
|
+
contact: Contact,
|
|
473
|
+
created: Schema.Boolean
|
|
474
|
+
});
|
|
475
|
+
const ContactsFindOrCreate401 = UnauthorizedError;
|
|
476
|
+
const ContactsFindOrCreate402 = PaymentRequiredError;
|
|
477
|
+
const ContactsFindOrCreate403 = ForbiddenError;
|
|
478
|
+
const ContactsFindOrCreate409 = ConflictError;
|
|
479
|
+
const ContactsFindOrCreate422 = ValidationError;
|
|
480
|
+
const ContactsFindOrCreate500 = InternalError;
|
|
481
|
+
const ContactsFindOrCreate502 = BillingProviderError;
|
|
482
|
+
const ContactsFindOrCreate504 = GatewayTimeoutError;
|
|
483
|
+
var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpoint.get("contactsList", "/v1/contacts", {
|
|
484
|
+
query: ContactsListQuery,
|
|
485
|
+
success: ContactsList200,
|
|
486
|
+
error: [
|
|
487
|
+
ContactsList401.pipe(HttpApiSchema.status(401)),
|
|
488
|
+
ContactsList403.pipe(HttpApiSchema.status(403)),
|
|
489
|
+
ContactsList422.pipe(HttpApiSchema.status(422)),
|
|
490
|
+
ContactsList500,
|
|
491
|
+
ContactsList504.pipe(HttpApiSchema.status(504))
|
|
492
|
+
]
|
|
493
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.list").annotate(OpenApi.Summary, "List contacts").annotate(OpenApi.Description, "Returns contact summaries for the organization, newest first, filterable by search term, status, and creation time (`after`, `before`). `fields` is a comma-separated list of defined custom field keys to return in each summary's `customFields`; omitted keys and unselected fields are not returned. Filter by one defined custom field with `customField` and a JSON-encoded scalar `customFieldValue` (for example, `\"creator\"`, `42`, or `true`). Both filter parameters are required together, and unknown keys or values of the wrong type are rejected. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read full identities, profile, and metadata with `GET /v1/contacts/{id}`."), HttpApiEndpoint.post("contactsCreate", "/v1/contacts", {
|
|
494
|
+
payload: ContactsCreateRequestJson,
|
|
495
|
+
success: ContactsCreate201.pipe(HttpApiSchema.status(201)),
|
|
496
|
+
error: [
|
|
497
|
+
ContactsCreate401.pipe(HttpApiSchema.status(401)),
|
|
498
|
+
ContactsCreate402.pipe(HttpApiSchema.status(402)),
|
|
499
|
+
ContactsCreate403.pipe(HttpApiSchema.status(403)),
|
|
500
|
+
ContactsCreate409.pipe(HttpApiSchema.status(409)),
|
|
501
|
+
ContactsCreate422.pipe(HttpApiSchema.status(422)),
|
|
502
|
+
ContactsCreate500,
|
|
503
|
+
ContactsCreate502.pipe(HttpApiSchema.status(502)),
|
|
504
|
+
ContactsCreate504.pipe(HttpApiSchema.status(504))
|
|
505
|
+
]
|
|
506
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.create").annotate(OpenApi.Summary, "Create a contact").annotate(OpenApi.Description, "Creates a contact and returns it with a 201 status. An identity another contact already holds is a conflict."), HttpApiEndpoint.get("contactsGet", "/v1/contacts/:id", {
|
|
507
|
+
params: ContactsGetPathParams,
|
|
508
|
+
success: ContactsGet200,
|
|
509
|
+
error: [
|
|
510
|
+
ContactsGet401.pipe(HttpApiSchema.status(401)),
|
|
511
|
+
ContactsGet403.pipe(HttpApiSchema.status(403)),
|
|
512
|
+
ContactsGet404.pipe(HttpApiSchema.status(404)),
|
|
513
|
+
ContactsGet422.pipe(HttpApiSchema.status(422)),
|
|
514
|
+
ContactsGet500,
|
|
515
|
+
ContactsGet504.pipe(HttpApiSchema.status(504))
|
|
516
|
+
]
|
|
517
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.get").annotate(OpenApi.Summary, "Get a contact").annotate(OpenApi.Description, "Returns a contact with its identities, profile, tags, and metadata."), HttpApiEndpoint.delete("contactsRemove", "/v1/contacts/:id", {
|
|
518
|
+
params: ContactsRemovePathParams,
|
|
519
|
+
success: ContactsRemove200,
|
|
520
|
+
error: [
|
|
521
|
+
ContactsRemove401.pipe(HttpApiSchema.status(401)),
|
|
522
|
+
ContactsRemove403.pipe(HttpApiSchema.status(403)),
|
|
523
|
+
ContactsRemove404.pipe(HttpApiSchema.status(404)),
|
|
524
|
+
ContactsRemove422.pipe(HttpApiSchema.status(422)),
|
|
525
|
+
ContactsRemove500,
|
|
526
|
+
ContactsRemove502.pipe(HttpApiSchema.status(502)),
|
|
527
|
+
ContactsRemove504.pipe(HttpApiSchema.status(504))
|
|
528
|
+
]
|
|
529
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.remove").annotate(OpenApi.Summary, "Delete a contact").annotate(OpenApi.Description, "Permanently deletes a contact by its ID."), HttpApiEndpoint.patch("contactsUpdate", "/v1/contacts/:id", {
|
|
530
|
+
params: ContactsUpdatePathParams,
|
|
531
|
+
payload: ContactsUpdateRequestJson,
|
|
532
|
+
success: ContactsUpdate200,
|
|
533
|
+
error: [
|
|
534
|
+
ContactsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
535
|
+
ContactsUpdate402.pipe(HttpApiSchema.status(402)),
|
|
536
|
+
ContactsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
537
|
+
ContactsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
538
|
+
ContactsUpdate422.pipe(HttpApiSchema.status(422)),
|
|
539
|
+
ContactsUpdate500,
|
|
540
|
+
ContactsUpdate502.pipe(HttpApiSchema.status(502)),
|
|
541
|
+
ContactsUpdate504.pipe(HttpApiSchema.status(504))
|
|
542
|
+
]
|
|
543
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.update").annotate(OpenApi.Summary, "Update a contact").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `profile` replaces each field it names and `null` clears one; its `customFields` merge by key the same way. Identities and tags are not updated here: use `POST /v1/contacts/{id}/identities`, `DELETE /v1/contacts/{id}/identities/{identityId}`, `POST /v1/contacts/{id}/tags`, and `DELETE /v1/contacts/{id}/tags`."), HttpApiEndpoint.get("contactsGetActivityTimeline", "/v1/contacts/:id/activity", {
|
|
544
|
+
params: ContactsGetActivityTimelinePathParams,
|
|
545
|
+
query: ContactsGetActivityTimelineQuery,
|
|
546
|
+
success: ContactsGetActivityTimeline200,
|
|
547
|
+
error: [
|
|
548
|
+
ContactsGetActivityTimeline401.pipe(HttpApiSchema.status(401)),
|
|
549
|
+
ContactsGetActivityTimeline403.pipe(HttpApiSchema.status(403)),
|
|
550
|
+
ContactsGetActivityTimeline404.pipe(HttpApiSchema.status(404)),
|
|
551
|
+
ContactsGetActivityTimeline422.pipe(HttpApiSchema.status(422)),
|
|
552
|
+
ContactsGetActivityTimeline500,
|
|
553
|
+
ContactsGetActivityTimeline504.pipe(HttpApiSchema.status(504))
|
|
554
|
+
]
|
|
555
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.getActivityTimeline").annotate(OpenApi.Summary, "Get contact activity timeline").annotate(OpenApi.Description, "Returns a contact's message activity, newest first, optionally filtered by channel. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.get("contactsGetEngagement", "/v1/contacts/:id/engagement", {
|
|
556
|
+
params: ContactsGetEngagementPathParams,
|
|
557
|
+
success: ContactsGetEngagement200,
|
|
558
|
+
error: [
|
|
559
|
+
ContactsGetEngagement401.pipe(HttpApiSchema.status(401)),
|
|
560
|
+
ContactsGetEngagement403.pipe(HttpApiSchema.status(403)),
|
|
561
|
+
ContactsGetEngagement404.pipe(HttpApiSchema.status(404)),
|
|
562
|
+
ContactsGetEngagement422.pipe(HttpApiSchema.status(422)),
|
|
563
|
+
ContactsGetEngagement500,
|
|
564
|
+
ContactsGetEngagement504.pipe(HttpApiSchema.status(504))
|
|
565
|
+
]
|
|
566
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.getEngagement").annotate(OpenApi.Summary, "Get contact engagement metrics").annotate(OpenApi.Description, "Returns aggregated engagement metrics for a contact, including message counts and active conversation totals."), HttpApiEndpoint.get("contactsGetGroupMemberships", "/v1/contacts/:id/groups", {
|
|
567
|
+
params: ContactsGetGroupMembershipsPathParams,
|
|
568
|
+
query: ContactsGetGroupMembershipsQuery,
|
|
569
|
+
success: ContactsGetGroupMemberships200,
|
|
570
|
+
error: [
|
|
571
|
+
ContactsGetGroupMemberships401.pipe(HttpApiSchema.status(401)),
|
|
572
|
+
ContactsGetGroupMemberships403.pipe(HttpApiSchema.status(403)),
|
|
573
|
+
ContactsGetGroupMemberships404.pipe(HttpApiSchema.status(404)),
|
|
574
|
+
ContactsGetGroupMemberships422.pipe(HttpApiSchema.status(422)),
|
|
575
|
+
ContactsGetGroupMemberships500,
|
|
576
|
+
ContactsGetGroupMemberships504.pipe(HttpApiSchema.status(504))
|
|
577
|
+
]
|
|
578
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.getGroupMemberships").annotate(OpenApi.Summary, "List a contact's group memberships").annotate(OpenApi.Description, "Returns the contact groups a contact belongs to, most recently joined first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("contactsAddIdentity", "/v1/contacts/:id/identities", {
|
|
579
|
+
params: ContactsAddIdentityPathParams,
|
|
580
|
+
payload: ContactsAddIdentityRequestJson,
|
|
581
|
+
success: ContactsAddIdentity200,
|
|
582
|
+
error: [
|
|
583
|
+
ContactsAddIdentity401.pipe(HttpApiSchema.status(401)),
|
|
584
|
+
ContactsAddIdentity403.pipe(HttpApiSchema.status(403)),
|
|
585
|
+
ContactsAddIdentity404.pipe(HttpApiSchema.status(404)),
|
|
586
|
+
ContactsAddIdentity409.pipe(HttpApiSchema.status(409)),
|
|
587
|
+
ContactsAddIdentity422.pipe(HttpApiSchema.status(422)),
|
|
588
|
+
ContactsAddIdentity500,
|
|
589
|
+
ContactsAddIdentity504.pipe(HttpApiSchema.status(504))
|
|
590
|
+
]
|
|
591
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.addIdentity").annotate(OpenApi.Summary, "Add a contact identity").annotate(OpenApi.Description, "Adds an address the contact is reached at and returns the contact. Adding an address the contact already has updates whether it is verified. An address another contact holds is a conflict."), HttpApiEndpoint.delete("contactsRemoveIdentity", "/v1/contacts/:id/identities/:identityId", {
|
|
592
|
+
params: ContactsRemoveIdentityPathParams,
|
|
593
|
+
success: ContactsRemoveIdentity200,
|
|
594
|
+
error: [
|
|
595
|
+
ContactsRemoveIdentity401.pipe(HttpApiSchema.status(401)),
|
|
596
|
+
ContactsRemoveIdentity403.pipe(HttpApiSchema.status(403)),
|
|
597
|
+
ContactsRemoveIdentity404.pipe(HttpApiSchema.status(404)),
|
|
598
|
+
ContactsRemoveIdentity422.pipe(HttpApiSchema.status(422)),
|
|
599
|
+
ContactsRemoveIdentity500,
|
|
600
|
+
ContactsRemoveIdentity504.pipe(HttpApiSchema.status(504))
|
|
601
|
+
]
|
|
602
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.removeIdentity").annotate(OpenApi.Summary, "Remove a contact identity").annotate(OpenApi.Description, "Removes one address from the contact and returns the contact."), HttpApiEndpoint.post("contactsAddTags", "/v1/contacts/:id/tags", {
|
|
603
|
+
params: ContactsAddTagsPathParams,
|
|
604
|
+
payload: ContactsAddTagsRequestJson,
|
|
605
|
+
success: ContactsAddTags200,
|
|
606
|
+
error: [
|
|
607
|
+
ContactsAddTags401.pipe(HttpApiSchema.status(401)),
|
|
608
|
+
ContactsAddTags403.pipe(HttpApiSchema.status(403)),
|
|
609
|
+
ContactsAddTags404.pipe(HttpApiSchema.status(404)),
|
|
610
|
+
ContactsAddTags422.pipe(HttpApiSchema.status(422)),
|
|
611
|
+
ContactsAddTags500,
|
|
612
|
+
ContactsAddTags504.pipe(HttpApiSchema.status(504))
|
|
613
|
+
]
|
|
614
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.addTags").annotate(OpenApi.Summary, "Add contact tags").annotate(OpenApi.Description, "Adds the given tags to the contact, keeping the tags it already has, and returns the contact."), HttpApiEndpoint.delete("contactsRemoveTags", "/v1/contacts/:id/tags", {
|
|
615
|
+
params: ContactsRemoveTagsPathParams,
|
|
616
|
+
payload: ContactsRemoveTagsRequestJson,
|
|
617
|
+
success: ContactsRemoveTags200,
|
|
618
|
+
error: [
|
|
619
|
+
ContactsRemoveTags401.pipe(HttpApiSchema.status(401)),
|
|
620
|
+
ContactsRemoveTags403.pipe(HttpApiSchema.status(403)),
|
|
621
|
+
ContactsRemoveTags404.pipe(HttpApiSchema.status(404)),
|
|
622
|
+
ContactsRemoveTags422.pipe(HttpApiSchema.status(422)),
|
|
623
|
+
ContactsRemoveTags500,
|
|
624
|
+
ContactsRemoveTags504.pipe(HttpApiSchema.status(504))
|
|
625
|
+
]
|
|
626
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.removeTags").annotate(OpenApi.Summary, "Remove contact tags").annotate(OpenApi.Description, "Removes the given tags from the contact and returns the contact. A tag the contact does not have is ignored."), HttpApiEndpoint.post("contactsBulkDelete", "/v1/contacts/bulk-delete", {
|
|
627
|
+
payload: ContactsBulkDeleteRequestJson,
|
|
628
|
+
success: ContactsBulkDelete200,
|
|
629
|
+
error: [
|
|
630
|
+
ContactsBulkDelete401.pipe(HttpApiSchema.status(401)),
|
|
631
|
+
ContactsBulkDelete403.pipe(HttpApiSchema.status(403)),
|
|
632
|
+
ContactsBulkDelete422.pipe(HttpApiSchema.status(422)),
|
|
633
|
+
ContactsBulkDelete500,
|
|
634
|
+
ContactsBulkDelete502.pipe(HttpApiSchema.status(502)),
|
|
635
|
+
ContactsBulkDelete504.pipe(HttpApiSchema.status(504))
|
|
636
|
+
]
|
|
637
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.bulkDelete").annotate(OpenApi.Summary, "Bulk delete contacts").annotate(OpenApi.Description, "Permanently deletes multiple contacts by ID, returning counts of deleted and failed records."), HttpApiEndpoint.post("contactsBulkImport", "/v1/contacts/bulk-import", {
|
|
638
|
+
payload: ContactsBulkImportRequestJson,
|
|
639
|
+
success: ContactsBulkImport200,
|
|
640
|
+
error: [
|
|
641
|
+
ContactsBulkImport401.pipe(HttpApiSchema.status(401)),
|
|
642
|
+
ContactsBulkImport402.pipe(HttpApiSchema.status(402)),
|
|
643
|
+
ContactsBulkImport403.pipe(HttpApiSchema.status(403)),
|
|
644
|
+
ContactsBulkImport422.pipe(HttpApiSchema.status(422)),
|
|
645
|
+
ContactsBulkImport500,
|
|
646
|
+
ContactsBulkImport502.pipe(HttpApiSchema.status(502)),
|
|
647
|
+
ContactsBulkImport504.pipe(HttpApiSchema.status(504))
|
|
648
|
+
]
|
|
649
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.bulkImport").annotate(OpenApi.Summary, "Bulk import contacts").annotate(OpenApi.Description, "Creates contacts in bulk from a list of entries shaped like a create request, returning per-entry results with created, updated, skipped, and error counts. An entry whose identities match an existing contact is skipped, or updates it with `onConflict: \"update\"`."), HttpApiEndpoint.post("contactsBulkUpdateStatus", "/v1/contacts/bulk-update-status", {
|
|
650
|
+
payload: ContactsBulkUpdateStatusRequestJson,
|
|
651
|
+
success: ContactsBulkUpdateStatus200,
|
|
652
|
+
error: [
|
|
653
|
+
ContactsBulkUpdateStatus401.pipe(HttpApiSchema.status(401)),
|
|
654
|
+
ContactsBulkUpdateStatus402.pipe(HttpApiSchema.status(402)),
|
|
655
|
+
ContactsBulkUpdateStatus403.pipe(HttpApiSchema.status(403)),
|
|
656
|
+
ContactsBulkUpdateStatus422.pipe(HttpApiSchema.status(422)),
|
|
657
|
+
ContactsBulkUpdateStatus500,
|
|
658
|
+
ContactsBulkUpdateStatus502.pipe(HttpApiSchema.status(502)),
|
|
659
|
+
ContactsBulkUpdateStatus504.pipe(HttpApiSchema.status(504))
|
|
660
|
+
]
|
|
661
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.bulkUpdateStatus").annotate(OpenApi.Summary, "Bulk update contact status").annotate(OpenApi.Description, "Sets the status on multiple contacts in one request, returning counts of updated and failed records."), HttpApiEndpoint.post("contactsBulkUpdateTags", "/v1/contacts/bulk-update-tags", {
|
|
662
|
+
payload: ContactsBulkUpdateTagsRequestJson,
|
|
663
|
+
success: ContactsBulkUpdateTags200,
|
|
664
|
+
error: [
|
|
665
|
+
ContactsBulkUpdateTags401.pipe(HttpApiSchema.status(401)),
|
|
666
|
+
ContactsBulkUpdateTags403.pipe(HttpApiSchema.status(403)),
|
|
667
|
+
ContactsBulkUpdateTags422.pipe(HttpApiSchema.status(422)),
|
|
668
|
+
ContactsBulkUpdateTags500,
|
|
669
|
+
ContactsBulkUpdateTags504.pipe(HttpApiSchema.status(504))
|
|
670
|
+
]
|
|
671
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.bulkUpdateTags").annotate(OpenApi.Summary, "Bulk update contact tags").annotate(OpenApi.Description, "Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records."), HttpApiEndpoint.post("contactsExport", "/v1/contacts/export", {
|
|
672
|
+
payload: ContactsExportRequestJson,
|
|
673
|
+
success: ContactsExport200,
|
|
674
|
+
error: [
|
|
675
|
+
ContactsExport401.pipe(HttpApiSchema.status(401)),
|
|
676
|
+
ContactsExport403.pipe(HttpApiSchema.status(403)),
|
|
677
|
+
ContactsExport422.pipe(HttpApiSchema.status(422)),
|
|
678
|
+
ContactsExport500,
|
|
679
|
+
ContactsExport504.pipe(HttpApiSchema.status(504))
|
|
680
|
+
]
|
|
681
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.export").annotate(OpenApi.Summary, "Export contacts").annotate(OpenApi.Description, "Exports contacts as JSON or CSV, returning the serialized data and a count of exported records."), HttpApiEndpoint.post("contactsFind", "/v1/contacts/find", {
|
|
682
|
+
payload: ContactsFindRequestJson,
|
|
683
|
+
success: ContactsFind200,
|
|
684
|
+
error: [
|
|
685
|
+
ContactsFind401.pipe(HttpApiSchema.status(401)),
|
|
686
|
+
ContactsFind403.pipe(HttpApiSchema.status(403)),
|
|
687
|
+
ContactsFind409.pipe(HttpApiSchema.status(409)),
|
|
688
|
+
ContactsFind422.pipe(HttpApiSchema.status(422)),
|
|
689
|
+
ContactsFind500,
|
|
690
|
+
ContactsFind504.pipe(HttpApiSchema.status(504))
|
|
691
|
+
]
|
|
692
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.find").annotate(OpenApi.Summary, "Find a contact").annotate(OpenApi.Description, "Looks up a single contact by email address or external ID and returns null when no contact matches."), HttpApiEndpoint.post("contactsFindOrCreate", "/v1/contacts/find-or-create", {
|
|
693
|
+
payload: ContactsFindOrCreateRequestJson,
|
|
694
|
+
success: ContactsFindOrCreate200,
|
|
695
|
+
error: [
|
|
696
|
+
ContactsFindOrCreate401.pipe(HttpApiSchema.status(401)),
|
|
697
|
+
ContactsFindOrCreate402.pipe(HttpApiSchema.status(402)),
|
|
698
|
+
ContactsFindOrCreate403.pipe(HttpApiSchema.status(403)),
|
|
699
|
+
ContactsFindOrCreate409.pipe(HttpApiSchema.status(409)),
|
|
700
|
+
ContactsFindOrCreate422.pipe(HttpApiSchema.status(422)),
|
|
701
|
+
ContactsFindOrCreate500,
|
|
702
|
+
ContactsFindOrCreate502.pipe(HttpApiSchema.status(502)),
|
|
703
|
+
ContactsFindOrCreate504.pipe(HttpApiSchema.status(504))
|
|
704
|
+
]
|
|
705
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.findOrCreate").annotate(OpenApi.Summary, "Find or create a contact").annotate(OpenApi.Description, "Looks up exactly one identifier through `lookup: { type, value }`. Returns `{ contact, created: false }` unchanged when it exists. Otherwise creates the lookup identity (or external ID), applies `create` attributes, and returns `{ contact, created: true }`. Additional addresses belong in `create.identities`, custom fields in `create.profile.customFields`; custom field keys must be defined and values must match their types. An external ID lookup cannot be contradicted by `create.externalId`. Creation returns HTTP 409 ConflictError if an externalId or address belongs to another contact; the conflicting field is named and no contact is created. Use the update endpoint to change an existing contact.")).annotate(OpenApi.Description, "Contact CRUD, bulk operations, engagement metrics, and activity timeline") {};
|
|
706
|
+
//#endregion
|
|
707
|
+
export { BulkUpdateResult, Contact, ContactActivityPage, ContactCustomFields, ContactGroupMembershipPage, ContactIdentityInput, ContactListMembership, ContactLocation, ContactLookup, ContactPage, ContactPreferences, ContactProfile, ContactProfileUpdate, ContactSummary, ContactsAddIdentity200, ContactsAddIdentity401, ContactsAddIdentity403, ContactsAddIdentity404, ContactsAddIdentity409, ContactsAddIdentity422, ContactsAddIdentity500, ContactsAddIdentity504, ContactsAddIdentityPathParams, ContactsAddIdentityRequestJson, ContactsAddTags200, ContactsAddTags401, ContactsAddTags403, ContactsAddTags404, ContactsAddTags422, ContactsAddTags500, ContactsAddTags504, ContactsAddTagsPathParams, ContactsAddTagsRequestJson, ContactsBulkDelete200, ContactsBulkDelete401, ContactsBulkDelete403, ContactsBulkDelete422, ContactsBulkDelete500, ContactsBulkDelete502, ContactsBulkDelete504, ContactsBulkDeleteRequestJson, ContactsBulkImport200, ContactsBulkImport401, ContactsBulkImport402, ContactsBulkImport403, ContactsBulkImport422, ContactsBulkImport500, ContactsBulkImport502, ContactsBulkImport504, ContactsBulkImportRequestJson, ContactsBulkUpdateStatus200, ContactsBulkUpdateStatus401, ContactsBulkUpdateStatus402, ContactsBulkUpdateStatus403, ContactsBulkUpdateStatus422, ContactsBulkUpdateStatus500, ContactsBulkUpdateStatus502, ContactsBulkUpdateStatus504, ContactsBulkUpdateStatusRequestJson, ContactsBulkUpdateTags200, ContactsBulkUpdateTags401, ContactsBulkUpdateTags403, ContactsBulkUpdateTags422, ContactsBulkUpdateTags500, ContactsBulkUpdateTags504, ContactsBulkUpdateTagsRequestJson, ContactsCreate201, ContactsCreate401, ContactsCreate402, ContactsCreate403, ContactsCreate409, ContactsCreate422, ContactsCreate500, ContactsCreate502, ContactsCreate504, ContactsCreateRequestJson, ContactsExport200, ContactsExport401, ContactsExport403, ContactsExport422, ContactsExport500, ContactsExport504, ContactsExportRequestJson, ContactsFind200, ContactsFind401, ContactsFind403, ContactsFind409, ContactsFind422, ContactsFind500, ContactsFind504, ContactsFindOrCreate200, ContactsFindOrCreate401, ContactsFindOrCreate402, ContactsFindOrCreate403, ContactsFindOrCreate409, ContactsFindOrCreate422, ContactsFindOrCreate500, ContactsFindOrCreate502, ContactsFindOrCreate504, ContactsFindOrCreateRequestJson, ContactsFindRequestJson, ContactsGet200, ContactsGet401, ContactsGet403, ContactsGet404, ContactsGet422, ContactsGet500, ContactsGet504, ContactsGetActivityTimeline200, ContactsGetActivityTimeline401, ContactsGetActivityTimeline403, ContactsGetActivityTimeline404, ContactsGetActivityTimeline422, ContactsGetActivityTimeline500, ContactsGetActivityTimeline504, ContactsGetActivityTimelinePathParams, ContactsGetActivityTimelineQuery, ContactsGetEngagement200, ContactsGetEngagement401, ContactsGetEngagement403, ContactsGetEngagement404, ContactsGetEngagement422, ContactsGetEngagement500, ContactsGetEngagement504, ContactsGetEngagementPathParams, ContactsGetGroupMemberships200, ContactsGetGroupMemberships401, ContactsGetGroupMemberships403, ContactsGetGroupMemberships404, ContactsGetGroupMemberships422, ContactsGetGroupMemberships500, ContactsGetGroupMemberships504, ContactsGetGroupMembershipsPathParams, ContactsGetGroupMembershipsQuery, ContactsGetPathParams, ContactsGroup, ContactsList200, ContactsList401, ContactsList403, ContactsList422, ContactsList500, ContactsList504, ContactsListQuery, ContactsRemove200, ContactsRemove401, ContactsRemove403, ContactsRemove404, ContactsRemove422, ContactsRemove500, ContactsRemove502, ContactsRemove504, ContactsRemoveIdentity200, ContactsRemoveIdentity401, ContactsRemoveIdentity403, ContactsRemoveIdentity404, ContactsRemoveIdentity422, ContactsRemoveIdentity500, ContactsRemoveIdentity504, ContactsRemoveIdentityPathParams, ContactsRemovePathParams, ContactsRemoveTags200, ContactsRemoveTags401, ContactsRemoveTags403, ContactsRemoveTags404, ContactsRemoveTags422, ContactsRemoveTags500, ContactsRemoveTags504, ContactsRemoveTagsPathParams, ContactsRemoveTagsRequestJson, ContactsUpdate200, ContactsUpdate401, ContactsUpdate402, ContactsUpdate403, ContactsUpdate404, ContactsUpdate422, ContactsUpdate500, ContactsUpdate502, ContactsUpdate504, ContactsUpdatePathParams, ContactsUpdateRequestJson };
|
|
708
|
+
|
|
709
|
+
//# sourceMappingURL=contacts.js.map
|