@wix/auto_sdk_crm_contacts 1.0.1351 → 1.0.1353
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/build/cjs/schemas.js +933 -888
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/schemas.mjs +933 -888
- package/build/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
- package/build/internal/cjs/index.js +0 -2031
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -1702
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -1284
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -2816
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -1966
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -1640
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -1221
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -2750
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/cjs/schemas.js
CHANGED
|
@@ -66,105 +66,107 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
66
66
|
// src/contacts-v4-contact-contacts.schemas.ts
|
|
67
67
|
var z = __toESM(require("zod"));
|
|
68
68
|
var CreateContactRequest = /* @__PURE__ */ z.object({
|
|
69
|
-
info: z.object({
|
|
70
|
-
name: z.object({
|
|
71
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
72
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
69
|
+
info: /* @__PURE__ */ z.object({
|
|
70
|
+
name: /* @__PURE__ */ z.object({
|
|
71
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
72
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
73
73
|
}).describe("Contact's first and last name.").optional(),
|
|
74
|
-
emails: z.object({
|
|
75
|
-
items: z.array(
|
|
76
|
-
z.object({
|
|
77
|
-
_id: z.string().describe("Email ID.").regex(
|
|
74
|
+
emails: /* @__PURE__ */ z.object({
|
|
75
|
+
items: /* @__PURE__ */ z.array(
|
|
76
|
+
/* @__PURE__ */ z.object({
|
|
77
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
78
78
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
79
79
|
"Must be a valid GUID"
|
|
80
80
|
).optional().nullable(),
|
|
81
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).optional(),
|
|
82
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
83
|
-
primary: z.boolean().describe(
|
|
81
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).optional(),
|
|
82
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
83
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
84
84
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
85
85
|
).optional().nullable()
|
|
86
86
|
})
|
|
87
87
|
).max(50).optional()
|
|
88
88
|
}).describe("Contact's email addresses.").optional(),
|
|
89
|
-
phones: z.object({
|
|
90
|
-
items: z.array(
|
|
91
|
-
z.object({
|
|
92
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
89
|
+
phones: /* @__PURE__ */ z.object({
|
|
90
|
+
items: /* @__PURE__ */ z.array(
|
|
91
|
+
/* @__PURE__ */ z.object({
|
|
92
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
93
93
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
94
94
|
"Must be a valid GUID"
|
|
95
95
|
).optional().nullable(),
|
|
96
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "MOBILE", "WORK", "FAX"]).optional(),
|
|
97
|
-
countryCode: z.string().describe(
|
|
96
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "MOBILE", "WORK", "FAX"]).optional(),
|
|
97
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
98
98
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
99
99
|
).optional().nullable(),
|
|
100
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
101
|
-
e164Phone: z.string().describe(
|
|
100
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
101
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
102
102
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
103
103
|
).optional().nullable(),
|
|
104
|
-
primary: z.boolean().describe(
|
|
104
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
105
105
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
106
106
|
).optional().nullable()
|
|
107
107
|
})
|
|
108
108
|
).max(50).optional()
|
|
109
109
|
}).describe("Contact's phone numbers.").optional(),
|
|
110
|
-
addresses: z.object({
|
|
111
|
-
items: z.array(
|
|
112
|
-
z.object({
|
|
113
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
110
|
+
addresses: /* @__PURE__ */ z.object({
|
|
111
|
+
items: /* @__PURE__ */ z.array(
|
|
112
|
+
/* @__PURE__ */ z.object({
|
|
113
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
114
114
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
115
115
|
"Must be a valid GUID"
|
|
116
116
|
).optional().nullable(),
|
|
117
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).optional(),
|
|
118
|
-
address: z.object({
|
|
119
|
-
city: z.string().optional().nullable(),
|
|
120
|
-
subdivision: z.string().optional().nullable(),
|
|
121
|
-
country: z.string().optional().nullable(),
|
|
122
|
-
postalCode: z.string().optional().nullable(),
|
|
123
|
-
addressLine1: z.string().optional().nullable(),
|
|
124
|
-
addressLine2: z.string().optional().nullable()
|
|
117
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).optional(),
|
|
118
|
+
address: /* @__PURE__ */ z.object({
|
|
119
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
120
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
121
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
122
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
123
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
124
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
125
125
|
}).describe("Street address.").optional()
|
|
126
126
|
})
|
|
127
127
|
).max(50).optional()
|
|
128
128
|
}).describe("Contact's street addresses.").optional(),
|
|
129
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
130
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
131
|
-
birthdate: z.string().describe(
|
|
129
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
130
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
131
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
132
132
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
133
133
|
).optional().nullable(),
|
|
134
|
-
locale: z.string().describe(
|
|
134
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
135
135
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
136
136
|
).optional().nullable(),
|
|
137
|
-
labelKeys: z.object({
|
|
137
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
138
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
139
|
+
}).describe(
|
|
138
140
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
139
141
|
).optional(),
|
|
140
|
-
extendedFields: z.object({
|
|
141
|
-
items: z.record(z.string(), z.any()).describe(
|
|
142
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
143
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
142
144
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
143
145
|
).optional()
|
|
144
146
|
}).describe("Additional custom fields.\n\nEmpty fields are not returned.").optional(),
|
|
145
|
-
picture: z.object({
|
|
146
|
-
image: z.string().describe(
|
|
147
|
+
picture: /* @__PURE__ */ z.object({
|
|
148
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
147
149
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
148
150
|
).optional()
|
|
149
151
|
}).describe("Contact's profile picture.").optional()
|
|
150
152
|
}).describe("Contact info."),
|
|
151
|
-
options: z.object({
|
|
152
|
-
allowDuplicates: z.boolean().describe(
|
|
153
|
+
options: /* @__PURE__ */ z.object({
|
|
154
|
+
allowDuplicates: /* @__PURE__ */ z.boolean().describe(
|
|
153
155
|
"Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`"
|
|
154
156
|
).optional()
|
|
155
157
|
}).describe("Create contact options.").optional()
|
|
156
158
|
});
|
|
157
159
|
var CreateContactResponse = /* @__PURE__ */ z.object({
|
|
158
|
-
contact: z.object({
|
|
159
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
160
|
+
contact: /* @__PURE__ */ z.object({
|
|
161
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
160
162
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
161
163
|
"Must be a valid GUID"
|
|
162
164
|
).optional(),
|
|
163
|
-
revision: z.number().int().describe(
|
|
165
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
164
166
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
165
167
|
).optional(),
|
|
166
|
-
source: z.object({
|
|
167
|
-
sourceType: z.enum([
|
|
168
|
+
source: /* @__PURE__ */ z.object({
|
|
169
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
168
170
|
"OTHER",
|
|
169
171
|
"ADMIN",
|
|
170
172
|
"WIX_APP",
|
|
@@ -185,16 +187,16 @@ var CreateContactResponse = /* @__PURE__ */ z.object({
|
|
|
185
187
|
"WIX_CODE",
|
|
186
188
|
"HOPP"
|
|
187
189
|
]).describe("Source type.").optional(),
|
|
188
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
190
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
189
191
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
190
192
|
"Must be a valid GUID"
|
|
191
193
|
).optional().nullable()
|
|
192
194
|
}).describe("Details about the contact's source.").optional(),
|
|
193
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
194
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
195
|
-
lastActivity: z.object({
|
|
196
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
197
|
-
activityType: z.enum([
|
|
195
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
196
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
197
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
198
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
199
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
198
200
|
"GENERAL",
|
|
199
201
|
"CONTACT_CREATED",
|
|
200
202
|
"MEMBER_LOGIN",
|
|
@@ -238,44 +240,44 @@ var CreateContactResponse = /* @__PURE__ */ z.object({
|
|
|
238
240
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
239
241
|
]).describe("Contact's last action in the site.").optional()
|
|
240
242
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
241
|
-
primaryInfo: z.object({
|
|
242
|
-
email: z.string().describe(
|
|
243
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
244
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
243
245
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
244
246
|
).email().optional().nullable(),
|
|
245
|
-
phone: z.string().describe(
|
|
247
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
246
248
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
247
249
|
).optional().nullable()
|
|
248
250
|
}).describe("Contact's primary phone and email.").optional(),
|
|
249
|
-
info: z.object({
|
|
250
|
-
name: z.object({
|
|
251
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
252
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
251
|
+
info: /* @__PURE__ */ z.object({
|
|
252
|
+
name: /* @__PURE__ */ z.object({
|
|
253
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
254
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
253
255
|
}).describe("Contact's first and last name.").optional(),
|
|
254
|
-
emails: z.object({
|
|
255
|
-
items: z.array(
|
|
256
|
-
z.object({
|
|
257
|
-
_id: z.string().describe("Email ID.").regex(
|
|
256
|
+
emails: /* @__PURE__ */ z.object({
|
|
257
|
+
items: /* @__PURE__ */ z.array(
|
|
258
|
+
/* @__PURE__ */ z.object({
|
|
259
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
258
260
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
259
261
|
"Must be a valid GUID"
|
|
260
262
|
).optional().nullable(),
|
|
261
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
263
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
262
264
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
263
265
|
).optional(),
|
|
264
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
265
|
-
primary: z.boolean().describe(
|
|
266
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
267
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
266
268
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
267
269
|
).optional().nullable()
|
|
268
270
|
})
|
|
269
271
|
).max(50).optional()
|
|
270
272
|
}).describe("Contact's email addresses.").optional(),
|
|
271
|
-
phones: z.object({
|
|
272
|
-
items: z.array(
|
|
273
|
-
z.object({
|
|
274
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
273
|
+
phones: /* @__PURE__ */ z.object({
|
|
274
|
+
items: /* @__PURE__ */ z.array(
|
|
275
|
+
/* @__PURE__ */ z.object({
|
|
276
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
275
277
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
276
278
|
"Must be a valid GUID"
|
|
277
279
|
).optional().nullable(),
|
|
278
|
-
tag: z.enum([
|
|
280
|
+
tag: /* @__PURE__ */ z.enum([
|
|
279
281
|
"UNTAGGED",
|
|
280
282
|
"MAIN",
|
|
281
283
|
"HOME",
|
|
@@ -285,69 +287,71 @@ var CreateContactResponse = /* @__PURE__ */ z.object({
|
|
|
285
287
|
]).describe(
|
|
286
288
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
287
289
|
).optional(),
|
|
288
|
-
countryCode: z.string().describe(
|
|
290
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
289
291
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
290
292
|
).optional().nullable(),
|
|
291
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
292
|
-
e164Phone: z.string().describe(
|
|
293
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
294
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
293
295
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
294
296
|
).optional().nullable(),
|
|
295
|
-
primary: z.boolean().describe(
|
|
297
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
296
298
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
297
299
|
).optional().nullable()
|
|
298
300
|
})
|
|
299
301
|
).max(50).optional()
|
|
300
302
|
}).describe("Contact's phone numbers.").optional(),
|
|
301
|
-
addresses: z.object({
|
|
302
|
-
items: z.array(
|
|
303
|
-
z.object({
|
|
304
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
303
|
+
addresses: /* @__PURE__ */ z.object({
|
|
304
|
+
items: /* @__PURE__ */ z.array(
|
|
305
|
+
/* @__PURE__ */ z.object({
|
|
306
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
305
307
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
306
308
|
"Must be a valid GUID"
|
|
307
309
|
).optional().nullable(),
|
|
308
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
310
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
309
311
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
310
312
|
).optional(),
|
|
311
|
-
address: z.object({
|
|
312
|
-
city: z.string().optional().nullable(),
|
|
313
|
-
subdivision: z.string().optional().nullable(),
|
|
314
|
-
country: z.string().optional().nullable(),
|
|
315
|
-
postalCode: z.string().optional().nullable(),
|
|
316
|
-
addressLine1: z.string().optional().nullable(),
|
|
317
|
-
addressLine2: z.string().optional().nullable()
|
|
313
|
+
address: /* @__PURE__ */ z.object({
|
|
314
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
315
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
316
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
317
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
318
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
319
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
318
320
|
}).describe("Street address.").optional()
|
|
319
321
|
})
|
|
320
322
|
).max(50).optional()
|
|
321
323
|
}).describe("Contact's street addresses.").optional(),
|
|
322
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
323
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
324
|
-
birthdate: z.string().describe(
|
|
324
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
325
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
326
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
325
327
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
326
328
|
).optional().nullable(),
|
|
327
|
-
locale: z.string().describe(
|
|
329
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
328
330
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
329
331
|
).optional().nullable(),
|
|
330
|
-
labelKeys: z.object({
|
|
332
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
333
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
334
|
+
}).describe(
|
|
331
335
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
332
336
|
).optional(),
|
|
333
|
-
extendedFields: z.object({
|
|
334
|
-
items: z.record(z.string(), z.any()).describe(
|
|
337
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
338
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
335
339
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
336
340
|
).optional()
|
|
337
341
|
}).describe(
|
|
338
342
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
339
343
|
).optional(),
|
|
340
|
-
picture: z.object({
|
|
341
|
-
image: z.string().describe(
|
|
344
|
+
picture: /* @__PURE__ */ z.object({
|
|
345
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
342
346
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
343
347
|
).optional()
|
|
344
348
|
}).describe("Contact's profile picture.").optional()
|
|
345
349
|
}).describe("Contact's details.").optional(),
|
|
346
|
-
primaryEmail: z.object({
|
|
347
|
-
email: z.string().describe(
|
|
350
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
351
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
348
352
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
349
353
|
).email().optional().nullable(),
|
|
350
|
-
subscriptionStatus: z.enum([
|
|
354
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
351
355
|
"NO_SUBSCRIPTION_STATUS",
|
|
352
356
|
"NOT_SET",
|
|
353
357
|
"PENDING",
|
|
@@ -356,21 +360,21 @@ var CreateContactResponse = /* @__PURE__ */ z.object({
|
|
|
356
360
|
]).describe(
|
|
357
361
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
358
362
|
).optional(),
|
|
359
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
363
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
360
364
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
361
365
|
).optional()
|
|
362
366
|
}).describe("Contact's primary email details.").optional(),
|
|
363
|
-
primaryPhone: z.object({
|
|
364
|
-
countryCode: z.string().describe(
|
|
367
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
368
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
365
369
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
366
370
|
).optional().nullable(),
|
|
367
|
-
e164Phone: z.string().describe(
|
|
371
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
368
372
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
369
373
|
).optional().nullable(),
|
|
370
|
-
formattedPhone: z.string().describe(
|
|
374
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
371
375
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
372
376
|
).optional().nullable(),
|
|
373
|
-
subscriptionStatus: z.enum([
|
|
377
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
374
378
|
"NO_SUBSCRIPTION_STATUS",
|
|
375
379
|
"NOT_SET",
|
|
376
380
|
"PENDING",
|
|
@@ -379,119 +383,121 @@ var CreateContactResponse = /* @__PURE__ */ z.object({
|
|
|
379
383
|
]).describe(
|
|
380
384
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
381
385
|
).optional(),
|
|
382
|
-
phone: z.string().describe(
|
|
386
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
383
387
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
384
388
|
).optional().nullable()
|
|
385
389
|
}).describe("Contact's primary phone details.").optional()
|
|
386
390
|
}).describe("Contact.").optional()
|
|
387
391
|
});
|
|
388
392
|
var UpdateContactRequest = /* @__PURE__ */ z.object({
|
|
389
|
-
contactId: z.string().describe("ID of the contact to update.").regex(
|
|
393
|
+
contactId: /* @__PURE__ */ z.string().describe("ID of the contact to update.").regex(
|
|
390
394
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
391
395
|
"Must be a valid GUID"
|
|
392
396
|
),
|
|
393
|
-
info: z.object({
|
|
394
|
-
name: z.object({
|
|
395
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
396
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
397
|
+
info: /* @__PURE__ */ z.object({
|
|
398
|
+
name: /* @__PURE__ */ z.object({
|
|
399
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
400
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
397
401
|
}).describe("Contact's first and last name.").optional(),
|
|
398
|
-
emails: z.object({
|
|
399
|
-
items: z.array(
|
|
400
|
-
z.object({
|
|
401
|
-
_id: z.string().describe("Email ID.").regex(
|
|
402
|
+
emails: /* @__PURE__ */ z.object({
|
|
403
|
+
items: /* @__PURE__ */ z.array(
|
|
404
|
+
/* @__PURE__ */ z.object({
|
|
405
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
402
406
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
403
407
|
"Must be a valid GUID"
|
|
404
408
|
).optional().nullable(),
|
|
405
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).optional(),
|
|
406
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
407
|
-
primary: z.boolean().describe(
|
|
409
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).optional(),
|
|
410
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
411
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
408
412
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
409
413
|
).optional().nullable()
|
|
410
414
|
})
|
|
411
415
|
).max(50).optional()
|
|
412
416
|
}).describe("Contact's email addresses.").optional(),
|
|
413
|
-
phones: z.object({
|
|
414
|
-
items: z.array(
|
|
415
|
-
z.object({
|
|
416
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
417
|
+
phones: /* @__PURE__ */ z.object({
|
|
418
|
+
items: /* @__PURE__ */ z.array(
|
|
419
|
+
/* @__PURE__ */ z.object({
|
|
420
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
417
421
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
418
422
|
"Must be a valid GUID"
|
|
419
423
|
).optional().nullable(),
|
|
420
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "MOBILE", "WORK", "FAX"]).optional(),
|
|
421
|
-
countryCode: z.string().describe(
|
|
424
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "MOBILE", "WORK", "FAX"]).optional(),
|
|
425
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
422
426
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
423
427
|
).optional().nullable(),
|
|
424
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
425
|
-
e164Phone: z.string().describe(
|
|
428
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
429
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
426
430
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
427
431
|
).optional().nullable(),
|
|
428
|
-
primary: z.boolean().describe(
|
|
432
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
429
433
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
430
434
|
).optional().nullable()
|
|
431
435
|
})
|
|
432
436
|
).max(50).optional()
|
|
433
437
|
}).describe("Contact's phone numbers.").optional(),
|
|
434
|
-
addresses: z.object({
|
|
435
|
-
items: z.array(
|
|
436
|
-
z.object({
|
|
437
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
438
|
+
addresses: /* @__PURE__ */ z.object({
|
|
439
|
+
items: /* @__PURE__ */ z.array(
|
|
440
|
+
/* @__PURE__ */ z.object({
|
|
441
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
438
442
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
439
443
|
"Must be a valid GUID"
|
|
440
444
|
).optional().nullable(),
|
|
441
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).optional(),
|
|
442
|
-
address: z.object({
|
|
443
|
-
city: z.string().optional().nullable(),
|
|
444
|
-
subdivision: z.string().optional().nullable(),
|
|
445
|
-
country: z.string().optional().nullable(),
|
|
446
|
-
postalCode: z.string().optional().nullable(),
|
|
447
|
-
addressLine1: z.string().optional().nullable(),
|
|
448
|
-
addressLine2: z.string().optional().nullable()
|
|
445
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).optional(),
|
|
446
|
+
address: /* @__PURE__ */ z.object({
|
|
447
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
448
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
449
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
450
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
451
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
452
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
449
453
|
}).describe("Street address.").optional()
|
|
450
454
|
})
|
|
451
455
|
).max(50).optional()
|
|
452
456
|
}).describe("Contact's street addresses.").optional(),
|
|
453
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
454
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
455
|
-
birthdate: z.string().describe(
|
|
457
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
458
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
459
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
456
460
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
457
461
|
).optional().nullable(),
|
|
458
|
-
locale: z.string().describe(
|
|
462
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
459
463
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
460
464
|
).optional().nullable(),
|
|
461
|
-
labelKeys: z.object({
|
|
465
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
466
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
467
|
+
}).describe(
|
|
462
468
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
463
469
|
).optional(),
|
|
464
|
-
extendedFields: z.object({
|
|
465
|
-
items: z.record(z.string(), z.any()).describe(
|
|
470
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
471
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
466
472
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
467
473
|
).optional()
|
|
468
474
|
}).describe("Additional custom fields.\n\nEmpty fields are not returned.").optional(),
|
|
469
|
-
picture: z.object({
|
|
470
|
-
image: z.string().describe(
|
|
475
|
+
picture: /* @__PURE__ */ z.object({
|
|
476
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
471
477
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
472
478
|
).optional()
|
|
473
479
|
}).describe("Contact's profile picture.").optional()
|
|
474
480
|
}).describe("Contact info."),
|
|
475
|
-
revision: z.number().int().describe(
|
|
481
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
476
482
|
"Revision number.\nWhen updating, include the existing `revision`\nto prevent conflicting updates."
|
|
477
483
|
),
|
|
478
|
-
options: z.object({
|
|
479
|
-
allowDuplicates: z.boolean().describe(
|
|
484
|
+
options: /* @__PURE__ */ z.object({
|
|
485
|
+
allowDuplicates: /* @__PURE__ */ z.boolean().describe(
|
|
480
486
|
"Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`"
|
|
481
487
|
).optional()
|
|
482
488
|
}).describe("Contact update options.").optional()
|
|
483
489
|
});
|
|
484
490
|
var UpdateContactResponse = /* @__PURE__ */ z.object({
|
|
485
|
-
contact: z.object({
|
|
486
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
491
|
+
contact: /* @__PURE__ */ z.object({
|
|
492
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
487
493
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
488
494
|
"Must be a valid GUID"
|
|
489
495
|
).optional(),
|
|
490
|
-
revision: z.number().int().describe(
|
|
496
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
491
497
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
492
498
|
).optional(),
|
|
493
|
-
source: z.object({
|
|
494
|
-
sourceType: z.enum([
|
|
499
|
+
source: /* @__PURE__ */ z.object({
|
|
500
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
495
501
|
"OTHER",
|
|
496
502
|
"ADMIN",
|
|
497
503
|
"WIX_APP",
|
|
@@ -512,16 +518,16 @@ var UpdateContactResponse = /* @__PURE__ */ z.object({
|
|
|
512
518
|
"WIX_CODE",
|
|
513
519
|
"HOPP"
|
|
514
520
|
]).describe("Source type.").optional(),
|
|
515
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
521
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
516
522
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
517
523
|
"Must be a valid GUID"
|
|
518
524
|
).optional().nullable()
|
|
519
525
|
}).describe("Details about the contact's source.").optional(),
|
|
520
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
521
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
522
|
-
lastActivity: z.object({
|
|
523
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
524
|
-
activityType: z.enum([
|
|
526
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
527
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
528
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
529
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
530
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
525
531
|
"GENERAL",
|
|
526
532
|
"CONTACT_CREATED",
|
|
527
533
|
"MEMBER_LOGIN",
|
|
@@ -565,44 +571,44 @@ var UpdateContactResponse = /* @__PURE__ */ z.object({
|
|
|
565
571
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
566
572
|
]).describe("Contact's last action in the site.").optional()
|
|
567
573
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
568
|
-
primaryInfo: z.object({
|
|
569
|
-
email: z.string().describe(
|
|
574
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
575
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
570
576
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
571
577
|
).email().optional().nullable(),
|
|
572
|
-
phone: z.string().describe(
|
|
578
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
573
579
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
574
580
|
).optional().nullable()
|
|
575
581
|
}).describe("Contact's primary phone and email.").optional(),
|
|
576
|
-
info: z.object({
|
|
577
|
-
name: z.object({
|
|
578
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
579
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
582
|
+
info: /* @__PURE__ */ z.object({
|
|
583
|
+
name: /* @__PURE__ */ z.object({
|
|
584
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
585
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
580
586
|
}).describe("Contact's first and last name.").optional(),
|
|
581
|
-
emails: z.object({
|
|
582
|
-
items: z.array(
|
|
583
|
-
z.object({
|
|
584
|
-
_id: z.string().describe("Email ID.").regex(
|
|
587
|
+
emails: /* @__PURE__ */ z.object({
|
|
588
|
+
items: /* @__PURE__ */ z.array(
|
|
589
|
+
/* @__PURE__ */ z.object({
|
|
590
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
585
591
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
586
592
|
"Must be a valid GUID"
|
|
587
593
|
).optional().nullable(),
|
|
588
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
594
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
589
595
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
590
596
|
).optional(),
|
|
591
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
592
|
-
primary: z.boolean().describe(
|
|
597
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
598
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
593
599
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
594
600
|
).optional().nullable()
|
|
595
601
|
})
|
|
596
602
|
).max(50).optional()
|
|
597
603
|
}).describe("Contact's email addresses.").optional(),
|
|
598
|
-
phones: z.object({
|
|
599
|
-
items: z.array(
|
|
600
|
-
z.object({
|
|
601
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
604
|
+
phones: /* @__PURE__ */ z.object({
|
|
605
|
+
items: /* @__PURE__ */ z.array(
|
|
606
|
+
/* @__PURE__ */ z.object({
|
|
607
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
602
608
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
603
609
|
"Must be a valid GUID"
|
|
604
610
|
).optional().nullable(),
|
|
605
|
-
tag: z.enum([
|
|
611
|
+
tag: /* @__PURE__ */ z.enum([
|
|
606
612
|
"UNTAGGED",
|
|
607
613
|
"MAIN",
|
|
608
614
|
"HOME",
|
|
@@ -612,69 +618,71 @@ var UpdateContactResponse = /* @__PURE__ */ z.object({
|
|
|
612
618
|
]).describe(
|
|
613
619
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
614
620
|
).optional(),
|
|
615
|
-
countryCode: z.string().describe(
|
|
621
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
616
622
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
617
623
|
).optional().nullable(),
|
|
618
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
619
|
-
e164Phone: z.string().describe(
|
|
624
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
625
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
620
626
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
621
627
|
).optional().nullable(),
|
|
622
|
-
primary: z.boolean().describe(
|
|
628
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
623
629
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
624
630
|
).optional().nullable()
|
|
625
631
|
})
|
|
626
632
|
).max(50).optional()
|
|
627
633
|
}).describe("Contact's phone numbers.").optional(),
|
|
628
|
-
addresses: z.object({
|
|
629
|
-
items: z.array(
|
|
630
|
-
z.object({
|
|
631
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
634
|
+
addresses: /* @__PURE__ */ z.object({
|
|
635
|
+
items: /* @__PURE__ */ z.array(
|
|
636
|
+
/* @__PURE__ */ z.object({
|
|
637
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
632
638
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
633
639
|
"Must be a valid GUID"
|
|
634
640
|
).optional().nullable(),
|
|
635
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
641
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
636
642
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
637
643
|
).optional(),
|
|
638
|
-
address: z.object({
|
|
639
|
-
city: z.string().optional().nullable(),
|
|
640
|
-
subdivision: z.string().optional().nullable(),
|
|
641
|
-
country: z.string().optional().nullable(),
|
|
642
|
-
postalCode: z.string().optional().nullable(),
|
|
643
|
-
addressLine1: z.string().optional().nullable(),
|
|
644
|
-
addressLine2: z.string().optional().nullable()
|
|
644
|
+
address: /* @__PURE__ */ z.object({
|
|
645
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
646
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
647
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
648
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
649
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
650
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
645
651
|
}).describe("Street address.").optional()
|
|
646
652
|
})
|
|
647
653
|
).max(50).optional()
|
|
648
654
|
}).describe("Contact's street addresses.").optional(),
|
|
649
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
650
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
651
|
-
birthdate: z.string().describe(
|
|
655
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
656
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
657
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
652
658
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
653
659
|
).optional().nullable(),
|
|
654
|
-
locale: z.string().describe(
|
|
660
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
655
661
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
656
662
|
).optional().nullable(),
|
|
657
|
-
labelKeys: z.object({
|
|
663
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
664
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
665
|
+
}).describe(
|
|
658
666
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
659
667
|
).optional(),
|
|
660
|
-
extendedFields: z.object({
|
|
661
|
-
items: z.record(z.string(), z.any()).describe(
|
|
668
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
669
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
662
670
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
663
671
|
).optional()
|
|
664
672
|
}).describe(
|
|
665
673
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
666
674
|
).optional(),
|
|
667
|
-
picture: z.object({
|
|
668
|
-
image: z.string().describe(
|
|
675
|
+
picture: /* @__PURE__ */ z.object({
|
|
676
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
669
677
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
670
678
|
).optional()
|
|
671
679
|
}).describe("Contact's profile picture.").optional()
|
|
672
680
|
}).describe("Contact's details.").optional(),
|
|
673
|
-
primaryEmail: z.object({
|
|
674
|
-
email: z.string().describe(
|
|
681
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
682
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
675
683
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
676
684
|
).email().optional().nullable(),
|
|
677
|
-
subscriptionStatus: z.enum([
|
|
685
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
678
686
|
"NO_SUBSCRIPTION_STATUS",
|
|
679
687
|
"NOT_SET",
|
|
680
688
|
"PENDING",
|
|
@@ -683,21 +691,21 @@ var UpdateContactResponse = /* @__PURE__ */ z.object({
|
|
|
683
691
|
]).describe(
|
|
684
692
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
685
693
|
).optional(),
|
|
686
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
694
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
687
695
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
688
696
|
).optional()
|
|
689
697
|
}).describe("Contact's primary email details.").optional(),
|
|
690
|
-
primaryPhone: z.object({
|
|
691
|
-
countryCode: z.string().describe(
|
|
698
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
699
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
692
700
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
693
701
|
).optional().nullable(),
|
|
694
|
-
e164Phone: z.string().describe(
|
|
702
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
695
703
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
696
704
|
).optional().nullable(),
|
|
697
|
-
formattedPhone: z.string().describe(
|
|
705
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
698
706
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
699
707
|
).optional().nullable(),
|
|
700
|
-
subscriptionStatus: z.enum([
|
|
708
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
701
709
|
"NO_SUBSCRIPTION_STATUS",
|
|
702
710
|
"NOT_SET",
|
|
703
711
|
"PENDING",
|
|
@@ -706,33 +714,35 @@ var UpdateContactResponse = /* @__PURE__ */ z.object({
|
|
|
706
714
|
]).describe(
|
|
707
715
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
708
716
|
).optional(),
|
|
709
|
-
phone: z.string().describe(
|
|
717
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
710
718
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
711
719
|
).optional().nullable()
|
|
712
720
|
}).describe("Contact's primary phone details.").optional()
|
|
713
721
|
}).describe("Updated contact.").optional()
|
|
714
722
|
});
|
|
715
723
|
var MergeContactsRequest = /* @__PURE__ */ z.object({
|
|
716
|
-
targetContactId: z.string().describe("Target contact ID.").regex(
|
|
724
|
+
targetContactId: /* @__PURE__ */ z.string().describe("Target contact ID.").regex(
|
|
717
725
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
718
726
|
"Must be a valid GUID"
|
|
719
727
|
),
|
|
720
|
-
targetContactRevision: z.object({ value: z.number().int().optional() }).describe(
|
|
728
|
+
targetContactRevision: /* @__PURE__ */ z.object({ value: /* @__PURE__ */ z.number().int().optional() }).describe(
|
|
721
729
|
"Target contact revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe target contact's current `revision` must be specified."
|
|
722
730
|
),
|
|
723
|
-
options: z.object({
|
|
731
|
+
options: /* @__PURE__ */ z.object({
|
|
732
|
+
sourceContactIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).min(1).max(5).optional()
|
|
733
|
+
}).describe("Merge contacts options.").optional()
|
|
724
734
|
});
|
|
725
735
|
var MergeContactsResponse = /* @__PURE__ */ z.object({
|
|
726
|
-
contact: z.object({
|
|
727
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
736
|
+
contact: /* @__PURE__ */ z.object({
|
|
737
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
728
738
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
729
739
|
"Must be a valid GUID"
|
|
730
740
|
).optional(),
|
|
731
|
-
revision: z.number().int().describe(
|
|
741
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
732
742
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
733
743
|
).optional(),
|
|
734
|
-
source: z.object({
|
|
735
|
-
sourceType: z.enum([
|
|
744
|
+
source: /* @__PURE__ */ z.object({
|
|
745
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
736
746
|
"OTHER",
|
|
737
747
|
"ADMIN",
|
|
738
748
|
"WIX_APP",
|
|
@@ -753,16 +763,16 @@ var MergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
753
763
|
"WIX_CODE",
|
|
754
764
|
"HOPP"
|
|
755
765
|
]).describe("Source type.").optional(),
|
|
756
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
766
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
757
767
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
758
768
|
"Must be a valid GUID"
|
|
759
769
|
).optional().nullable()
|
|
760
770
|
}).describe("Details about the contact's source.").optional(),
|
|
761
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
762
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
763
|
-
lastActivity: z.object({
|
|
764
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
765
|
-
activityType: z.enum([
|
|
771
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
772
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
773
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
774
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
775
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
766
776
|
"GENERAL",
|
|
767
777
|
"CONTACT_CREATED",
|
|
768
778
|
"MEMBER_LOGIN",
|
|
@@ -806,44 +816,44 @@ var MergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
806
816
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
807
817
|
]).describe("Contact's last action in the site.").optional()
|
|
808
818
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
809
|
-
primaryInfo: z.object({
|
|
810
|
-
email: z.string().describe(
|
|
819
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
820
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
811
821
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
812
822
|
).email().optional().nullable(),
|
|
813
|
-
phone: z.string().describe(
|
|
823
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
814
824
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
815
825
|
).optional().nullable()
|
|
816
826
|
}).describe("Contact's primary phone and email.").optional(),
|
|
817
|
-
info: z.object({
|
|
818
|
-
name: z.object({
|
|
819
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
820
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
827
|
+
info: /* @__PURE__ */ z.object({
|
|
828
|
+
name: /* @__PURE__ */ z.object({
|
|
829
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
830
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
821
831
|
}).describe("Contact's first and last name.").optional(),
|
|
822
|
-
emails: z.object({
|
|
823
|
-
items: z.array(
|
|
824
|
-
z.object({
|
|
825
|
-
_id: z.string().describe("Email ID.").regex(
|
|
832
|
+
emails: /* @__PURE__ */ z.object({
|
|
833
|
+
items: /* @__PURE__ */ z.array(
|
|
834
|
+
/* @__PURE__ */ z.object({
|
|
835
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
826
836
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
827
837
|
"Must be a valid GUID"
|
|
828
838
|
).optional().nullable(),
|
|
829
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
839
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
830
840
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
831
841
|
).optional(),
|
|
832
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
833
|
-
primary: z.boolean().describe(
|
|
842
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
843
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
834
844
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
835
845
|
).optional().nullable()
|
|
836
846
|
})
|
|
837
847
|
).max(50).optional()
|
|
838
848
|
}).describe("Contact's email addresses.").optional(),
|
|
839
|
-
phones: z.object({
|
|
840
|
-
items: z.array(
|
|
841
|
-
z.object({
|
|
842
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
849
|
+
phones: /* @__PURE__ */ z.object({
|
|
850
|
+
items: /* @__PURE__ */ z.array(
|
|
851
|
+
/* @__PURE__ */ z.object({
|
|
852
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
843
853
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
844
854
|
"Must be a valid GUID"
|
|
845
855
|
).optional().nullable(),
|
|
846
|
-
tag: z.enum([
|
|
856
|
+
tag: /* @__PURE__ */ z.enum([
|
|
847
857
|
"UNTAGGED",
|
|
848
858
|
"MAIN",
|
|
849
859
|
"HOME",
|
|
@@ -853,69 +863,71 @@ var MergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
853
863
|
]).describe(
|
|
854
864
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
855
865
|
).optional(),
|
|
856
|
-
countryCode: z.string().describe(
|
|
866
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
857
867
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
858
868
|
).optional().nullable(),
|
|
859
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
860
|
-
e164Phone: z.string().describe(
|
|
869
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
870
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
861
871
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
862
872
|
).optional().nullable(),
|
|
863
|
-
primary: z.boolean().describe(
|
|
873
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
864
874
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
865
875
|
).optional().nullable()
|
|
866
876
|
})
|
|
867
877
|
).max(50).optional()
|
|
868
878
|
}).describe("Contact's phone numbers.").optional(),
|
|
869
|
-
addresses: z.object({
|
|
870
|
-
items: z.array(
|
|
871
|
-
z.object({
|
|
872
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
879
|
+
addresses: /* @__PURE__ */ z.object({
|
|
880
|
+
items: /* @__PURE__ */ z.array(
|
|
881
|
+
/* @__PURE__ */ z.object({
|
|
882
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
873
883
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
874
884
|
"Must be a valid GUID"
|
|
875
885
|
).optional().nullable(),
|
|
876
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
886
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
877
887
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
878
888
|
).optional(),
|
|
879
|
-
address: z.object({
|
|
880
|
-
city: z.string().optional().nullable(),
|
|
881
|
-
subdivision: z.string().optional().nullable(),
|
|
882
|
-
country: z.string().optional().nullable(),
|
|
883
|
-
postalCode: z.string().optional().nullable(),
|
|
884
|
-
addressLine1: z.string().optional().nullable(),
|
|
885
|
-
addressLine2: z.string().optional().nullable()
|
|
889
|
+
address: /* @__PURE__ */ z.object({
|
|
890
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
891
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
892
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
893
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
894
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
895
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
886
896
|
}).describe("Street address.").optional()
|
|
887
897
|
})
|
|
888
898
|
).max(50).optional()
|
|
889
899
|
}).describe("Contact's street addresses.").optional(),
|
|
890
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
891
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
892
|
-
birthdate: z.string().describe(
|
|
900
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
901
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
902
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
893
903
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
894
904
|
).optional().nullable(),
|
|
895
|
-
locale: z.string().describe(
|
|
905
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
896
906
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
897
907
|
).optional().nullable(),
|
|
898
|
-
labelKeys: z.object({
|
|
908
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
909
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
910
|
+
}).describe(
|
|
899
911
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
900
912
|
).optional(),
|
|
901
|
-
extendedFields: z.object({
|
|
902
|
-
items: z.record(z.string(), z.any()).describe(
|
|
913
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
914
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
903
915
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
904
916
|
).optional()
|
|
905
917
|
}).describe(
|
|
906
918
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
907
919
|
).optional(),
|
|
908
|
-
picture: z.object({
|
|
909
|
-
image: z.string().describe(
|
|
920
|
+
picture: /* @__PURE__ */ z.object({
|
|
921
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
910
922
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
911
923
|
).optional()
|
|
912
924
|
}).describe("Contact's profile picture.").optional()
|
|
913
925
|
}).describe("Contact's details.").optional(),
|
|
914
|
-
primaryEmail: z.object({
|
|
915
|
-
email: z.string().describe(
|
|
926
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
927
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
916
928
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
917
929
|
).email().optional().nullable(),
|
|
918
|
-
subscriptionStatus: z.enum([
|
|
930
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
919
931
|
"NO_SUBSCRIPTION_STATUS",
|
|
920
932
|
"NOT_SET",
|
|
921
933
|
"PENDING",
|
|
@@ -924,21 +936,21 @@ var MergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
924
936
|
]).describe(
|
|
925
937
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
926
938
|
).optional(),
|
|
927
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
939
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
928
940
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
929
941
|
).optional()
|
|
930
942
|
}).describe("Contact's primary email details.").optional(),
|
|
931
|
-
primaryPhone: z.object({
|
|
932
|
-
countryCode: z.string().describe(
|
|
943
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
944
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
933
945
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
934
946
|
).optional().nullable(),
|
|
935
|
-
e164Phone: z.string().describe(
|
|
947
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
936
948
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
937
949
|
).optional().nullable(),
|
|
938
|
-
formattedPhone: z.string().describe(
|
|
950
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
939
951
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
940
952
|
).optional().nullable(),
|
|
941
|
-
subscriptionStatus: z.enum([
|
|
953
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
942
954
|
"NO_SUBSCRIPTION_STATUS",
|
|
943
955
|
"NOT_SET",
|
|
944
956
|
"PENDING",
|
|
@@ -947,30 +959,32 @@ var MergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
947
959
|
]).describe(
|
|
948
960
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
949
961
|
).optional(),
|
|
950
|
-
phone: z.string().describe(
|
|
962
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
951
963
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
952
964
|
).optional().nullable()
|
|
953
965
|
}).describe("Contact's primary phone details.").optional()
|
|
954
966
|
}).describe("Updated target contact.").optional()
|
|
955
967
|
});
|
|
956
968
|
var PreviewMergeContactsRequest = /* @__PURE__ */ z.object({
|
|
957
|
-
targetContactId: z.string().describe("Target contact ID.").regex(
|
|
969
|
+
targetContactId: /* @__PURE__ */ z.string().describe("Target contact ID.").regex(
|
|
958
970
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
959
971
|
"Must be a valid GUID"
|
|
960
972
|
),
|
|
961
|
-
options: z.object({
|
|
973
|
+
options: /* @__PURE__ */ z.object({
|
|
974
|
+
sourceContactIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).min(1).max(5).optional()
|
|
975
|
+
}).describe("Preview merge contacts options.").optional()
|
|
962
976
|
});
|
|
963
977
|
var PreviewMergeContactsResponse = /* @__PURE__ */ z.object({
|
|
964
|
-
contact: z.object({
|
|
965
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
978
|
+
contact: /* @__PURE__ */ z.object({
|
|
979
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
966
980
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
967
981
|
"Must be a valid GUID"
|
|
968
982
|
).optional(),
|
|
969
|
-
revision: z.number().int().describe(
|
|
983
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
970
984
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
971
985
|
).optional(),
|
|
972
|
-
source: z.object({
|
|
973
|
-
sourceType: z.enum([
|
|
986
|
+
source: /* @__PURE__ */ z.object({
|
|
987
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
974
988
|
"OTHER",
|
|
975
989
|
"ADMIN",
|
|
976
990
|
"WIX_APP",
|
|
@@ -991,16 +1005,16 @@ var PreviewMergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
991
1005
|
"WIX_CODE",
|
|
992
1006
|
"HOPP"
|
|
993
1007
|
]).describe("Source type.").optional(),
|
|
994
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1008
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
995
1009
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
996
1010
|
"Must be a valid GUID"
|
|
997
1011
|
).optional().nullable()
|
|
998
1012
|
}).describe("Details about the contact's source.").optional(),
|
|
999
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1000
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1001
|
-
lastActivity: z.object({
|
|
1002
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1003
|
-
activityType: z.enum([
|
|
1013
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1014
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1015
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
1016
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1017
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
1004
1018
|
"GENERAL",
|
|
1005
1019
|
"CONTACT_CREATED",
|
|
1006
1020
|
"MEMBER_LOGIN",
|
|
@@ -1044,44 +1058,44 @@ var PreviewMergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1044
1058
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
1045
1059
|
]).describe("Contact's last action in the site.").optional()
|
|
1046
1060
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
1047
|
-
primaryInfo: z.object({
|
|
1048
|
-
email: z.string().describe(
|
|
1061
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
1062
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1049
1063
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1050
1064
|
).email().optional().nullable(),
|
|
1051
|
-
phone: z.string().describe(
|
|
1065
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1052
1066
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1053
1067
|
).optional().nullable()
|
|
1054
1068
|
}).describe("Contact's primary phone and email.").optional(),
|
|
1055
|
-
info: z.object({
|
|
1056
|
-
name: z.object({
|
|
1057
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1058
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1069
|
+
info: /* @__PURE__ */ z.object({
|
|
1070
|
+
name: /* @__PURE__ */ z.object({
|
|
1071
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1072
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1059
1073
|
}).describe("Contact's first and last name.").optional(),
|
|
1060
|
-
emails: z.object({
|
|
1061
|
-
items: z.array(
|
|
1062
|
-
z.object({
|
|
1063
|
-
_id: z.string().describe("Email ID.").regex(
|
|
1074
|
+
emails: /* @__PURE__ */ z.object({
|
|
1075
|
+
items: /* @__PURE__ */ z.array(
|
|
1076
|
+
/* @__PURE__ */ z.object({
|
|
1077
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
1064
1078
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1065
1079
|
"Must be a valid GUID"
|
|
1066
1080
|
).optional().nullable(),
|
|
1067
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1081
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1068
1082
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1069
1083
|
).optional(),
|
|
1070
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1071
|
-
primary: z.boolean().describe(
|
|
1084
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1085
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1072
1086
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
1073
1087
|
).optional().nullable()
|
|
1074
1088
|
})
|
|
1075
1089
|
).max(50).optional()
|
|
1076
1090
|
}).describe("Contact's email addresses.").optional(),
|
|
1077
|
-
phones: z.object({
|
|
1078
|
-
items: z.array(
|
|
1079
|
-
z.object({
|
|
1080
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
1091
|
+
phones: /* @__PURE__ */ z.object({
|
|
1092
|
+
items: /* @__PURE__ */ z.array(
|
|
1093
|
+
/* @__PURE__ */ z.object({
|
|
1094
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
1081
1095
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1082
1096
|
"Must be a valid GUID"
|
|
1083
1097
|
).optional().nullable(),
|
|
1084
|
-
tag: z.enum([
|
|
1098
|
+
tag: /* @__PURE__ */ z.enum([
|
|
1085
1099
|
"UNTAGGED",
|
|
1086
1100
|
"MAIN",
|
|
1087
1101
|
"HOME",
|
|
@@ -1091,69 +1105,71 @@ var PreviewMergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1091
1105
|
]).describe(
|
|
1092
1106
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1093
1107
|
).optional(),
|
|
1094
|
-
countryCode: z.string().describe(
|
|
1108
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1095
1109
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
1096
1110
|
).optional().nullable(),
|
|
1097
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1098
|
-
e164Phone: z.string().describe(
|
|
1111
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1112
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1099
1113
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
1100
1114
|
).optional().nullable(),
|
|
1101
|
-
primary: z.boolean().describe(
|
|
1115
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1102
1116
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
1103
1117
|
).optional().nullable()
|
|
1104
1118
|
})
|
|
1105
1119
|
).max(50).optional()
|
|
1106
1120
|
}).describe("Contact's phone numbers.").optional(),
|
|
1107
|
-
addresses: z.object({
|
|
1108
|
-
items: z.array(
|
|
1109
|
-
z.object({
|
|
1110
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
1121
|
+
addresses: /* @__PURE__ */ z.object({
|
|
1122
|
+
items: /* @__PURE__ */ z.array(
|
|
1123
|
+
/* @__PURE__ */ z.object({
|
|
1124
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
1111
1125
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1112
1126
|
"Must be a valid GUID"
|
|
1113
1127
|
).optional().nullable(),
|
|
1114
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
1128
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
1115
1129
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1116
1130
|
).optional(),
|
|
1117
|
-
address: z.object({
|
|
1118
|
-
city: z.string().optional().nullable(),
|
|
1119
|
-
subdivision: z.string().optional().nullable(),
|
|
1120
|
-
country: z.string().optional().nullable(),
|
|
1121
|
-
postalCode: z.string().optional().nullable(),
|
|
1122
|
-
addressLine1: z.string().optional().nullable(),
|
|
1123
|
-
addressLine2: z.string().optional().nullable()
|
|
1131
|
+
address: /* @__PURE__ */ z.object({
|
|
1132
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1133
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1134
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1135
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1136
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1137
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
1124
1138
|
}).describe("Street address.").optional()
|
|
1125
1139
|
})
|
|
1126
1140
|
).max(50).optional()
|
|
1127
1141
|
}).describe("Contact's street addresses.").optional(),
|
|
1128
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1129
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1130
|
-
birthdate: z.string().describe(
|
|
1142
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1143
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1144
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
1131
1145
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
1132
1146
|
).optional().nullable(),
|
|
1133
|
-
locale: z.string().describe(
|
|
1147
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
1134
1148
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
1135
1149
|
).optional().nullable(),
|
|
1136
|
-
labelKeys: z.object({
|
|
1150
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
1151
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
1152
|
+
}).describe(
|
|
1137
1153
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
1138
1154
|
).optional(),
|
|
1139
|
-
extendedFields: z.object({
|
|
1140
|
-
items: z.record(z.string(), z.any()).describe(
|
|
1155
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
1156
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
1141
1157
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
1142
1158
|
).optional()
|
|
1143
1159
|
}).describe(
|
|
1144
1160
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
1145
1161
|
).optional(),
|
|
1146
|
-
picture: z.object({
|
|
1147
|
-
image: z.string().describe(
|
|
1162
|
+
picture: /* @__PURE__ */ z.object({
|
|
1163
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
1148
1164
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
1149
1165
|
).optional()
|
|
1150
1166
|
}).describe("Contact's profile picture.").optional()
|
|
1151
1167
|
}).describe("Contact's details.").optional(),
|
|
1152
|
-
primaryEmail: z.object({
|
|
1153
|
-
email: z.string().describe(
|
|
1168
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
1169
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1154
1170
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1155
1171
|
).email().optional().nullable(),
|
|
1156
|
-
subscriptionStatus: z.enum([
|
|
1172
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1157
1173
|
"NO_SUBSCRIPTION_STATUS",
|
|
1158
1174
|
"NOT_SET",
|
|
1159
1175
|
"PENDING",
|
|
@@ -1162,21 +1178,21 @@ var PreviewMergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1162
1178
|
]).describe(
|
|
1163
1179
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
1164
1180
|
).optional(),
|
|
1165
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
1181
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
1166
1182
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
1167
1183
|
).optional()
|
|
1168
1184
|
}).describe("Contact's primary email details.").optional(),
|
|
1169
|
-
primaryPhone: z.object({
|
|
1170
|
-
countryCode: z.string().describe(
|
|
1185
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
1186
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1171
1187
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1172
1188
|
).optional().nullable(),
|
|
1173
|
-
e164Phone: z.string().describe(
|
|
1189
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1174
1190
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
1175
1191
|
).optional().nullable(),
|
|
1176
|
-
formattedPhone: z.string().describe(
|
|
1192
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
1177
1193
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
1178
1194
|
).optional().nullable(),
|
|
1179
|
-
subscriptionStatus: z.enum([
|
|
1195
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1180
1196
|
"NO_SUBSCRIPTION_STATUS",
|
|
1181
1197
|
"NOT_SET",
|
|
1182
1198
|
"PENDING",
|
|
@@ -1185,37 +1201,37 @@ var PreviewMergeContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1185
1201
|
]).describe(
|
|
1186
1202
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
1187
1203
|
).optional(),
|
|
1188
|
-
phone: z.string().describe(
|
|
1204
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1189
1205
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1190
1206
|
).optional().nullable()
|
|
1191
1207
|
}).describe("Contact's primary phone details.").optional()
|
|
1192
1208
|
}).describe("Preview of the updated target contact.").optional()
|
|
1193
1209
|
});
|
|
1194
1210
|
var DeleteContactRequest = /* @__PURE__ */ z.object({
|
|
1195
|
-
contactId: z.string().describe("ID of the contact to delete.").regex(
|
|
1211
|
+
contactId: /* @__PURE__ */ z.string().describe("ID of the contact to delete.").regex(
|
|
1196
1212
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1197
1213
|
"Must be a valid GUID"
|
|
1198
1214
|
)
|
|
1199
1215
|
});
|
|
1200
1216
|
var DeleteContactResponse = /* @__PURE__ */ z.object({});
|
|
1201
1217
|
var LabelContactRequest = /* @__PURE__ */ z.object({
|
|
1202
|
-
contactId: z.string().describe("ID of the contact to add labels to.").regex(
|
|
1218
|
+
contactId: /* @__PURE__ */ z.string().describe("ID of the contact to add labels to.").regex(
|
|
1203
1219
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1204
1220
|
"Must be a valid GUID"
|
|
1205
1221
|
),
|
|
1206
|
-
labelKeys: z.array(z.string()).min(1).max(100)
|
|
1222
|
+
labelKeys: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).min(1).max(100)
|
|
1207
1223
|
});
|
|
1208
1224
|
var LabelContactResponse = /* @__PURE__ */ z.object({
|
|
1209
|
-
contact: z.object({
|
|
1210
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
1225
|
+
contact: /* @__PURE__ */ z.object({
|
|
1226
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
1211
1227
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1212
1228
|
"Must be a valid GUID"
|
|
1213
1229
|
).optional(),
|
|
1214
|
-
revision: z.number().int().describe(
|
|
1230
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
1215
1231
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
1216
1232
|
).optional(),
|
|
1217
|
-
source: z.object({
|
|
1218
|
-
sourceType: z.enum([
|
|
1233
|
+
source: /* @__PURE__ */ z.object({
|
|
1234
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
1219
1235
|
"OTHER",
|
|
1220
1236
|
"ADMIN",
|
|
1221
1237
|
"WIX_APP",
|
|
@@ -1236,16 +1252,16 @@ var LabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1236
1252
|
"WIX_CODE",
|
|
1237
1253
|
"HOPP"
|
|
1238
1254
|
]).describe("Source type.").optional(),
|
|
1239
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1255
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1240
1256
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1241
1257
|
"Must be a valid GUID"
|
|
1242
1258
|
).optional().nullable()
|
|
1243
1259
|
}).describe("Details about the contact's source.").optional(),
|
|
1244
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1245
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1246
|
-
lastActivity: z.object({
|
|
1247
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1248
|
-
activityType: z.enum([
|
|
1260
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1261
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1262
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
1263
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1264
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
1249
1265
|
"GENERAL",
|
|
1250
1266
|
"CONTACT_CREATED",
|
|
1251
1267
|
"MEMBER_LOGIN",
|
|
@@ -1289,44 +1305,44 @@ var LabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1289
1305
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
1290
1306
|
]).describe("Contact's last action in the site.").optional()
|
|
1291
1307
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
1292
|
-
primaryInfo: z.object({
|
|
1293
|
-
email: z.string().describe(
|
|
1308
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
1309
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1294
1310
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1295
1311
|
).email().optional().nullable(),
|
|
1296
|
-
phone: z.string().describe(
|
|
1312
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1297
1313
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1298
1314
|
).optional().nullable()
|
|
1299
1315
|
}).describe("Contact's primary phone and email.").optional(),
|
|
1300
|
-
info: z.object({
|
|
1301
|
-
name: z.object({
|
|
1302
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1303
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1316
|
+
info: /* @__PURE__ */ z.object({
|
|
1317
|
+
name: /* @__PURE__ */ z.object({
|
|
1318
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1319
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1304
1320
|
}).describe("Contact's first and last name.").optional(),
|
|
1305
|
-
emails: z.object({
|
|
1306
|
-
items: z.array(
|
|
1307
|
-
z.object({
|
|
1308
|
-
_id: z.string().describe("Email ID.").regex(
|
|
1321
|
+
emails: /* @__PURE__ */ z.object({
|
|
1322
|
+
items: /* @__PURE__ */ z.array(
|
|
1323
|
+
/* @__PURE__ */ z.object({
|
|
1324
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
1309
1325
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1310
1326
|
"Must be a valid GUID"
|
|
1311
1327
|
).optional().nullable(),
|
|
1312
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1328
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1313
1329
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1314
1330
|
).optional(),
|
|
1315
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1316
|
-
primary: z.boolean().describe(
|
|
1331
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1332
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1317
1333
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
1318
1334
|
).optional().nullable()
|
|
1319
1335
|
})
|
|
1320
1336
|
).max(50).optional()
|
|
1321
1337
|
}).describe("Contact's email addresses.").optional(),
|
|
1322
|
-
phones: z.object({
|
|
1323
|
-
items: z.array(
|
|
1324
|
-
z.object({
|
|
1325
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
1338
|
+
phones: /* @__PURE__ */ z.object({
|
|
1339
|
+
items: /* @__PURE__ */ z.array(
|
|
1340
|
+
/* @__PURE__ */ z.object({
|
|
1341
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
1326
1342
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1327
1343
|
"Must be a valid GUID"
|
|
1328
1344
|
).optional().nullable(),
|
|
1329
|
-
tag: z.enum([
|
|
1345
|
+
tag: /* @__PURE__ */ z.enum([
|
|
1330
1346
|
"UNTAGGED",
|
|
1331
1347
|
"MAIN",
|
|
1332
1348
|
"HOME",
|
|
@@ -1336,69 +1352,71 @@ var LabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1336
1352
|
]).describe(
|
|
1337
1353
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1338
1354
|
).optional(),
|
|
1339
|
-
countryCode: z.string().describe(
|
|
1355
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1340
1356
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
1341
1357
|
).optional().nullable(),
|
|
1342
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1343
|
-
e164Phone: z.string().describe(
|
|
1358
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1359
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1344
1360
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
1345
1361
|
).optional().nullable(),
|
|
1346
|
-
primary: z.boolean().describe(
|
|
1362
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1347
1363
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
1348
1364
|
).optional().nullable()
|
|
1349
1365
|
})
|
|
1350
1366
|
).max(50).optional()
|
|
1351
1367
|
}).describe("Contact's phone numbers.").optional(),
|
|
1352
|
-
addresses: z.object({
|
|
1353
|
-
items: z.array(
|
|
1354
|
-
z.object({
|
|
1355
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
1368
|
+
addresses: /* @__PURE__ */ z.object({
|
|
1369
|
+
items: /* @__PURE__ */ z.array(
|
|
1370
|
+
/* @__PURE__ */ z.object({
|
|
1371
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
1356
1372
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1357
1373
|
"Must be a valid GUID"
|
|
1358
1374
|
).optional().nullable(),
|
|
1359
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
1375
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
1360
1376
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1361
1377
|
).optional(),
|
|
1362
|
-
address: z.object({
|
|
1363
|
-
city: z.string().optional().nullable(),
|
|
1364
|
-
subdivision: z.string().optional().nullable(),
|
|
1365
|
-
country: z.string().optional().nullable(),
|
|
1366
|
-
postalCode: z.string().optional().nullable(),
|
|
1367
|
-
addressLine1: z.string().optional().nullable(),
|
|
1368
|
-
addressLine2: z.string().optional().nullable()
|
|
1378
|
+
address: /* @__PURE__ */ z.object({
|
|
1379
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1380
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1381
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1382
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1383
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1384
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
1369
1385
|
}).describe("Street address.").optional()
|
|
1370
1386
|
})
|
|
1371
1387
|
).max(50).optional()
|
|
1372
1388
|
}).describe("Contact's street addresses.").optional(),
|
|
1373
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1374
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1375
|
-
birthdate: z.string().describe(
|
|
1389
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1390
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1391
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
1376
1392
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
1377
1393
|
).optional().nullable(),
|
|
1378
|
-
locale: z.string().describe(
|
|
1394
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
1379
1395
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
1380
1396
|
).optional().nullable(),
|
|
1381
|
-
labelKeys: z.object({
|
|
1397
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
1398
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
1399
|
+
}).describe(
|
|
1382
1400
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
1383
1401
|
).optional(),
|
|
1384
|
-
extendedFields: z.object({
|
|
1385
|
-
items: z.record(z.string(), z.any()).describe(
|
|
1402
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
1403
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
1386
1404
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
1387
1405
|
).optional()
|
|
1388
1406
|
}).describe(
|
|
1389
1407
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
1390
1408
|
).optional(),
|
|
1391
|
-
picture: z.object({
|
|
1392
|
-
image: z.string().describe(
|
|
1409
|
+
picture: /* @__PURE__ */ z.object({
|
|
1410
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
1393
1411
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
1394
1412
|
).optional()
|
|
1395
1413
|
}).describe("Contact's profile picture.").optional()
|
|
1396
1414
|
}).describe("Contact's details.").optional(),
|
|
1397
|
-
primaryEmail: z.object({
|
|
1398
|
-
email: z.string().describe(
|
|
1415
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
1416
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1399
1417
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1400
1418
|
).email().optional().nullable(),
|
|
1401
|
-
subscriptionStatus: z.enum([
|
|
1419
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1402
1420
|
"NO_SUBSCRIPTION_STATUS",
|
|
1403
1421
|
"NOT_SET",
|
|
1404
1422
|
"PENDING",
|
|
@@ -1407,21 +1425,21 @@ var LabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1407
1425
|
]).describe(
|
|
1408
1426
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
1409
1427
|
).optional(),
|
|
1410
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
1428
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
1411
1429
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
1412
1430
|
).optional()
|
|
1413
1431
|
}).describe("Contact's primary email details.").optional(),
|
|
1414
|
-
primaryPhone: z.object({
|
|
1415
|
-
countryCode: z.string().describe(
|
|
1432
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
1433
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1416
1434
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1417
1435
|
).optional().nullable(),
|
|
1418
|
-
e164Phone: z.string().describe(
|
|
1436
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1419
1437
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
1420
1438
|
).optional().nullable(),
|
|
1421
|
-
formattedPhone: z.string().describe(
|
|
1439
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
1422
1440
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
1423
1441
|
).optional().nullable(),
|
|
1424
|
-
subscriptionStatus: z.enum([
|
|
1442
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1425
1443
|
"NO_SUBSCRIPTION_STATUS",
|
|
1426
1444
|
"NOT_SET",
|
|
1427
1445
|
"PENDING",
|
|
@@ -1430,30 +1448,30 @@ var LabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1430
1448
|
]).describe(
|
|
1431
1449
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
1432
1450
|
).optional(),
|
|
1433
|
-
phone: z.string().describe(
|
|
1451
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1434
1452
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1435
1453
|
).optional().nullable()
|
|
1436
1454
|
}).describe("Contact's primary phone details.").optional()
|
|
1437
1455
|
}).describe("Updated contact.").optional()
|
|
1438
1456
|
});
|
|
1439
1457
|
var UnlabelContactRequest = /* @__PURE__ */ z.object({
|
|
1440
|
-
contactId: z.string().describe("ID of the contact to remove labels from.").regex(
|
|
1458
|
+
contactId: /* @__PURE__ */ z.string().describe("ID of the contact to remove labels from.").regex(
|
|
1441
1459
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1442
1460
|
"Must be a valid GUID"
|
|
1443
1461
|
),
|
|
1444
|
-
labelKeys: z.array(z.string()).min(1).max(100)
|
|
1462
|
+
labelKeys: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).min(1).max(100)
|
|
1445
1463
|
});
|
|
1446
1464
|
var UnlabelContactResponse = /* @__PURE__ */ z.object({
|
|
1447
|
-
contact: z.object({
|
|
1448
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
1465
|
+
contact: /* @__PURE__ */ z.object({
|
|
1466
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
1449
1467
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1450
1468
|
"Must be a valid GUID"
|
|
1451
1469
|
).optional(),
|
|
1452
|
-
revision: z.number().int().describe(
|
|
1470
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
1453
1471
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
1454
1472
|
).optional(),
|
|
1455
|
-
source: z.object({
|
|
1456
|
-
sourceType: z.enum([
|
|
1473
|
+
source: /* @__PURE__ */ z.object({
|
|
1474
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
1457
1475
|
"OTHER",
|
|
1458
1476
|
"ADMIN",
|
|
1459
1477
|
"WIX_APP",
|
|
@@ -1474,16 +1492,16 @@ var UnlabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1474
1492
|
"WIX_CODE",
|
|
1475
1493
|
"HOPP"
|
|
1476
1494
|
]).describe("Source type.").optional(),
|
|
1477
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1495
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1478
1496
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1479
1497
|
"Must be a valid GUID"
|
|
1480
1498
|
).optional().nullable()
|
|
1481
1499
|
}).describe("Details about the contact's source.").optional(),
|
|
1482
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1483
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1484
|
-
lastActivity: z.object({
|
|
1485
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1486
|
-
activityType: z.enum([
|
|
1500
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1501
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1502
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
1503
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1504
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
1487
1505
|
"GENERAL",
|
|
1488
1506
|
"CONTACT_CREATED",
|
|
1489
1507
|
"MEMBER_LOGIN",
|
|
@@ -1527,44 +1545,44 @@ var UnlabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1527
1545
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
1528
1546
|
]).describe("Contact's last action in the site.").optional()
|
|
1529
1547
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
1530
|
-
primaryInfo: z.object({
|
|
1531
|
-
email: z.string().describe(
|
|
1548
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
1549
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1532
1550
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1533
1551
|
).email().optional().nullable(),
|
|
1534
|
-
phone: z.string().describe(
|
|
1552
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1535
1553
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1536
1554
|
).optional().nullable()
|
|
1537
1555
|
}).describe("Contact's primary phone and email.").optional(),
|
|
1538
|
-
info: z.object({
|
|
1539
|
-
name: z.object({
|
|
1540
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1541
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1556
|
+
info: /* @__PURE__ */ z.object({
|
|
1557
|
+
name: /* @__PURE__ */ z.object({
|
|
1558
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1559
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1542
1560
|
}).describe("Contact's first and last name.").optional(),
|
|
1543
|
-
emails: z.object({
|
|
1544
|
-
items: z.array(
|
|
1545
|
-
z.object({
|
|
1546
|
-
_id: z.string().describe("Email ID.").regex(
|
|
1561
|
+
emails: /* @__PURE__ */ z.object({
|
|
1562
|
+
items: /* @__PURE__ */ z.array(
|
|
1563
|
+
/* @__PURE__ */ z.object({
|
|
1564
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
1547
1565
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1548
1566
|
"Must be a valid GUID"
|
|
1549
1567
|
).optional().nullable(),
|
|
1550
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1568
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1551
1569
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1552
1570
|
).optional(),
|
|
1553
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1554
|
-
primary: z.boolean().describe(
|
|
1571
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1572
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1555
1573
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
1556
1574
|
).optional().nullable()
|
|
1557
1575
|
})
|
|
1558
1576
|
).max(50).optional()
|
|
1559
1577
|
}).describe("Contact's email addresses.").optional(),
|
|
1560
|
-
phones: z.object({
|
|
1561
|
-
items: z.array(
|
|
1562
|
-
z.object({
|
|
1563
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
1578
|
+
phones: /* @__PURE__ */ z.object({
|
|
1579
|
+
items: /* @__PURE__ */ z.array(
|
|
1580
|
+
/* @__PURE__ */ z.object({
|
|
1581
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
1564
1582
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1565
1583
|
"Must be a valid GUID"
|
|
1566
1584
|
).optional().nullable(),
|
|
1567
|
-
tag: z.enum([
|
|
1585
|
+
tag: /* @__PURE__ */ z.enum([
|
|
1568
1586
|
"UNTAGGED",
|
|
1569
1587
|
"MAIN",
|
|
1570
1588
|
"HOME",
|
|
@@ -1574,69 +1592,71 @@ var UnlabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1574
1592
|
]).describe(
|
|
1575
1593
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1576
1594
|
).optional(),
|
|
1577
|
-
countryCode: z.string().describe(
|
|
1595
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1578
1596
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
1579
1597
|
).optional().nullable(),
|
|
1580
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1581
|
-
e164Phone: z.string().describe(
|
|
1598
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1599
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1582
1600
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
1583
1601
|
).optional().nullable(),
|
|
1584
|
-
primary: z.boolean().describe(
|
|
1602
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1585
1603
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
1586
1604
|
).optional().nullable()
|
|
1587
1605
|
})
|
|
1588
1606
|
).max(50).optional()
|
|
1589
1607
|
}).describe("Contact's phone numbers.").optional(),
|
|
1590
|
-
addresses: z.object({
|
|
1591
|
-
items: z.array(
|
|
1592
|
-
z.object({
|
|
1593
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
1608
|
+
addresses: /* @__PURE__ */ z.object({
|
|
1609
|
+
items: /* @__PURE__ */ z.array(
|
|
1610
|
+
/* @__PURE__ */ z.object({
|
|
1611
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
1594
1612
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1595
1613
|
"Must be a valid GUID"
|
|
1596
1614
|
).optional().nullable(),
|
|
1597
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
1615
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
1598
1616
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1599
1617
|
).optional(),
|
|
1600
|
-
address: z.object({
|
|
1601
|
-
city: z.string().optional().nullable(),
|
|
1602
|
-
subdivision: z.string().optional().nullable(),
|
|
1603
|
-
country: z.string().optional().nullable(),
|
|
1604
|
-
postalCode: z.string().optional().nullable(),
|
|
1605
|
-
addressLine1: z.string().optional().nullable(),
|
|
1606
|
-
addressLine2: z.string().optional().nullable()
|
|
1618
|
+
address: /* @__PURE__ */ z.object({
|
|
1619
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1620
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1621
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1622
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1623
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1624
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
1607
1625
|
}).describe("Street address.").optional()
|
|
1608
1626
|
})
|
|
1609
1627
|
).max(50).optional()
|
|
1610
1628
|
}).describe("Contact's street addresses.").optional(),
|
|
1611
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1612
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1613
|
-
birthdate: z.string().describe(
|
|
1629
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1630
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1631
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
1614
1632
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
1615
1633
|
).optional().nullable(),
|
|
1616
|
-
locale: z.string().describe(
|
|
1634
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
1617
1635
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
1618
1636
|
).optional().nullable(),
|
|
1619
|
-
labelKeys: z.object({
|
|
1637
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
1638
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
1639
|
+
}).describe(
|
|
1620
1640
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
1621
1641
|
).optional(),
|
|
1622
|
-
extendedFields: z.object({
|
|
1623
|
-
items: z.record(z.string(), z.any()).describe(
|
|
1642
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
1643
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
1624
1644
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
1625
1645
|
).optional()
|
|
1626
1646
|
}).describe(
|
|
1627
1647
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
1628
1648
|
).optional(),
|
|
1629
|
-
picture: z.object({
|
|
1630
|
-
image: z.string().describe(
|
|
1649
|
+
picture: /* @__PURE__ */ z.object({
|
|
1650
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
1631
1651
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
1632
1652
|
).optional()
|
|
1633
1653
|
}).describe("Contact's profile picture.").optional()
|
|
1634
1654
|
}).describe("Contact's details.").optional(),
|
|
1635
|
-
primaryEmail: z.object({
|
|
1636
|
-
email: z.string().describe(
|
|
1655
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
1656
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1637
1657
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1638
1658
|
).email().optional().nullable(),
|
|
1639
|
-
subscriptionStatus: z.enum([
|
|
1659
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1640
1660
|
"NO_SUBSCRIPTION_STATUS",
|
|
1641
1661
|
"NOT_SET",
|
|
1642
1662
|
"PENDING",
|
|
@@ -1645,21 +1665,21 @@ var UnlabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1645
1665
|
]).describe(
|
|
1646
1666
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
1647
1667
|
).optional(),
|
|
1648
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
1668
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
1649
1669
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
1650
1670
|
).optional()
|
|
1651
1671
|
}).describe("Contact's primary email details.").optional(),
|
|
1652
|
-
primaryPhone: z.object({
|
|
1653
|
-
countryCode: z.string().describe(
|
|
1672
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
1673
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1654
1674
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1655
1675
|
).optional().nullable(),
|
|
1656
|
-
e164Phone: z.string().describe(
|
|
1676
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1657
1677
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
1658
1678
|
).optional().nullable(),
|
|
1659
|
-
formattedPhone: z.string().describe(
|
|
1679
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
1660
1680
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
1661
1681
|
).optional().nullable(),
|
|
1662
|
-
subscriptionStatus: z.enum([
|
|
1682
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1663
1683
|
"NO_SUBSCRIPTION_STATUS",
|
|
1664
1684
|
"NOT_SET",
|
|
1665
1685
|
"PENDING",
|
|
@@ -1668,46 +1688,53 @@ var UnlabelContactResponse = /* @__PURE__ */ z.object({
|
|
|
1668
1688
|
]).describe(
|
|
1669
1689
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
1670
1690
|
).optional(),
|
|
1671
|
-
phone: z.string().describe(
|
|
1691
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1672
1692
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1673
1693
|
).optional().nullable()
|
|
1674
1694
|
}).describe("Contact's primary phone details.").optional()
|
|
1675
1695
|
}).describe("Updated contact.").optional()
|
|
1676
1696
|
});
|
|
1677
1697
|
var ListContactsRequest = /* @__PURE__ */ z.object({
|
|
1678
|
-
options: z.object({
|
|
1679
|
-
sort: z.object({
|
|
1680
|
-
fieldName: z.string().describe(
|
|
1698
|
+
options: /* @__PURE__ */ z.object({
|
|
1699
|
+
sort: /* @__PURE__ */ z.object({
|
|
1700
|
+
fieldName: /* @__PURE__ */ z.string().describe(
|
|
1681
1701
|
"Field to sort by.\n\nSupported properties:\n`createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n`info.jobTitle`, `info.birthdate`"
|
|
1682
1702
|
).max(100).optional(),
|
|
1683
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
1703
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional()
|
|
1684
1704
|
}).describe(
|
|
1685
1705
|
"[Sort order](https://dev.wix.com/api/rest/contacts/contacts/sort-and-filter)."
|
|
1686
1706
|
).optional(),
|
|
1687
|
-
paging: z.object({
|
|
1688
|
-
limit: z.number().int().describe(
|
|
1707
|
+
paging: /* @__PURE__ */ z.object({
|
|
1708
|
+
limit: /* @__PURE__ */ z.number().int().describe(
|
|
1689
1709
|
"Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n\nDefault: `50`. <br>\nMaximum: `1000`."
|
|
1690
1710
|
).min(0).max(1e3).optional().nullable(),
|
|
1691
|
-
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
1711
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
1692
1712
|
}).describe(
|
|
1693
1713
|
"[Pagination](https://dev.wix.com/api/rest/getting-started/pagination), defaults to offset = 0 and limit = 50 (max limit 1,000)."
|
|
1694
1714
|
).optional(),
|
|
1695
|
-
fields: z.array(z.string()).max(100).optional(),
|
|
1696
|
-
fieldsets:
|
|
1715
|
+
fields: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(100).optional(),
|
|
1716
|
+
fieldsets: /* @__PURE__ */ z.array(
|
|
1717
|
+
/* @__PURE__ */ z.enum([
|
|
1718
|
+
"BASIC",
|
|
1719
|
+
"COMMUNICATION_DETAILS",
|
|
1720
|
+
"EXTENDED",
|
|
1721
|
+
"FULL"
|
|
1722
|
+
])
|
|
1723
|
+
).max(10).optional()
|
|
1697
1724
|
}).describe("Object containing list of options for retrieving contacts.").optional()
|
|
1698
1725
|
});
|
|
1699
1726
|
var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
1700
|
-
contacts: z.array(
|
|
1701
|
-
z.object({
|
|
1702
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
1727
|
+
contacts: /* @__PURE__ */ z.array(
|
|
1728
|
+
/* @__PURE__ */ z.object({
|
|
1729
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
1703
1730
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1704
1731
|
"Must be a valid GUID"
|
|
1705
1732
|
).optional(),
|
|
1706
|
-
revision: z.number().int().describe(
|
|
1733
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
1707
1734
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
1708
1735
|
).optional(),
|
|
1709
|
-
source: z.object({
|
|
1710
|
-
sourceType: z.enum([
|
|
1736
|
+
source: /* @__PURE__ */ z.object({
|
|
1737
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
1711
1738
|
"OTHER",
|
|
1712
1739
|
"ADMIN",
|
|
1713
1740
|
"WIX_APP",
|
|
@@ -1728,16 +1755,16 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1728
1755
|
"WIX_CODE",
|
|
1729
1756
|
"HOPP"
|
|
1730
1757
|
]).describe("Source type.").optional(),
|
|
1731
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1758
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
1732
1759
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1733
1760
|
"Must be a valid GUID"
|
|
1734
1761
|
).optional().nullable()
|
|
1735
1762
|
}).describe("Details about the contact's source.").optional(),
|
|
1736
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1737
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1738
|
-
lastActivity: z.object({
|
|
1739
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1740
|
-
activityType: z.enum([
|
|
1763
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
1764
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
1765
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
1766
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
1767
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
1741
1768
|
"GENERAL",
|
|
1742
1769
|
"CONTACT_CREATED",
|
|
1743
1770
|
"MEMBER_LOGIN",
|
|
@@ -1781,44 +1808,44 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1781
1808
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
1782
1809
|
]).describe("Contact's last action in the site.").optional()
|
|
1783
1810
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
1784
|
-
primaryInfo: z.object({
|
|
1785
|
-
email: z.string().describe(
|
|
1811
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
1812
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1786
1813
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1787
1814
|
).email().optional().nullable(),
|
|
1788
|
-
phone: z.string().describe(
|
|
1815
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1789
1816
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1790
1817
|
).optional().nullable()
|
|
1791
1818
|
}).describe("Contact's primary phone and email.").optional(),
|
|
1792
|
-
info: z.object({
|
|
1793
|
-
name: z.object({
|
|
1794
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1795
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1819
|
+
info: /* @__PURE__ */ z.object({
|
|
1820
|
+
name: /* @__PURE__ */ z.object({
|
|
1821
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
1822
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
1796
1823
|
}).describe("Contact's first and last name.").optional(),
|
|
1797
|
-
emails: z.object({
|
|
1798
|
-
items: z.array(
|
|
1799
|
-
z.object({
|
|
1800
|
-
_id: z.string().describe("Email ID.").regex(
|
|
1824
|
+
emails: /* @__PURE__ */ z.object({
|
|
1825
|
+
items: /* @__PURE__ */ z.array(
|
|
1826
|
+
/* @__PURE__ */ z.object({
|
|
1827
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
1801
1828
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1802
1829
|
"Must be a valid GUID"
|
|
1803
1830
|
).optional().nullable(),
|
|
1804
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1831
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
1805
1832
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1806
1833
|
).optional(),
|
|
1807
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1808
|
-
primary: z.boolean().describe(
|
|
1834
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
1835
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1809
1836
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
1810
1837
|
).optional().nullable()
|
|
1811
1838
|
})
|
|
1812
1839
|
).max(50).optional()
|
|
1813
1840
|
}).describe("Contact's email addresses.").optional(),
|
|
1814
|
-
phones: z.object({
|
|
1815
|
-
items: z.array(
|
|
1816
|
-
z.object({
|
|
1817
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
1841
|
+
phones: /* @__PURE__ */ z.object({
|
|
1842
|
+
items: /* @__PURE__ */ z.array(
|
|
1843
|
+
/* @__PURE__ */ z.object({
|
|
1844
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
1818
1845
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1819
1846
|
"Must be a valid GUID"
|
|
1820
1847
|
).optional().nullable(),
|
|
1821
|
-
tag: z.enum([
|
|
1848
|
+
tag: /* @__PURE__ */ z.enum([
|
|
1822
1849
|
"UNTAGGED",
|
|
1823
1850
|
"MAIN",
|
|
1824
1851
|
"HOME",
|
|
@@ -1828,27 +1855,27 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1828
1855
|
]).describe(
|
|
1829
1856
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1830
1857
|
).optional(),
|
|
1831
|
-
countryCode: z.string().describe(
|
|
1858
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1832
1859
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
1833
1860
|
).optional().nullable(),
|
|
1834
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1835
|
-
e164Phone: z.string().describe(
|
|
1861
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
1862
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1836
1863
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
1837
1864
|
).optional().nullable(),
|
|
1838
|
-
primary: z.boolean().describe(
|
|
1865
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
1839
1866
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
1840
1867
|
).optional().nullable()
|
|
1841
1868
|
})
|
|
1842
1869
|
).max(50).optional()
|
|
1843
1870
|
}).describe("Contact's phone numbers.").optional(),
|
|
1844
|
-
addresses: z.object({
|
|
1845
|
-
items: z.array(
|
|
1846
|
-
z.object({
|
|
1847
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
1871
|
+
addresses: /* @__PURE__ */ z.object({
|
|
1872
|
+
items: /* @__PURE__ */ z.array(
|
|
1873
|
+
/* @__PURE__ */ z.object({
|
|
1874
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
1848
1875
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1849
1876
|
"Must be a valid GUID"
|
|
1850
1877
|
).optional().nullable(),
|
|
1851
|
-
tag: z.enum([
|
|
1878
|
+
tag: /* @__PURE__ */ z.enum([
|
|
1852
1879
|
"UNTAGGED",
|
|
1853
1880
|
"HOME",
|
|
1854
1881
|
"WORK",
|
|
@@ -1857,46 +1884,48 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1857
1884
|
]).describe(
|
|
1858
1885
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
1859
1886
|
).optional(),
|
|
1860
|
-
address: z.object({
|
|
1861
|
-
city: z.string().optional().nullable(),
|
|
1862
|
-
subdivision: z.string().optional().nullable(),
|
|
1863
|
-
country: z.string().optional().nullable(),
|
|
1864
|
-
postalCode: z.string().optional().nullable(),
|
|
1865
|
-
addressLine1: z.string().optional().nullable(),
|
|
1866
|
-
addressLine2: z.string().optional().nullable()
|
|
1887
|
+
address: /* @__PURE__ */ z.object({
|
|
1888
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1889
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1890
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1891
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1892
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
1893
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
1867
1894
|
}).describe("Street address.").optional()
|
|
1868
1895
|
})
|
|
1869
1896
|
).max(50).optional()
|
|
1870
1897
|
}).describe("Contact's street addresses.").optional(),
|
|
1871
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1872
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1873
|
-
birthdate: z.string().describe(
|
|
1898
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
1899
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
1900
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
1874
1901
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
1875
1902
|
).optional().nullable(),
|
|
1876
|
-
locale: z.string().describe(
|
|
1903
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
1877
1904
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
1878
1905
|
).optional().nullable(),
|
|
1879
|
-
labelKeys: z.object({
|
|
1906
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
1907
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
1908
|
+
}).describe(
|
|
1880
1909
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
1881
1910
|
).optional(),
|
|
1882
|
-
extendedFields: z.object({
|
|
1883
|
-
items: z.record(z.string(), z.any()).describe(
|
|
1911
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
1912
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
1884
1913
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
1885
1914
|
).optional()
|
|
1886
1915
|
}).describe(
|
|
1887
1916
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
1888
1917
|
).optional(),
|
|
1889
|
-
picture: z.object({
|
|
1890
|
-
image: z.string().describe(
|
|
1918
|
+
picture: /* @__PURE__ */ z.object({
|
|
1919
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
1891
1920
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
1892
1921
|
).optional()
|
|
1893
1922
|
}).describe("Contact's profile picture.").optional()
|
|
1894
1923
|
}).describe("Contact's details.").optional(),
|
|
1895
|
-
primaryEmail: z.object({
|
|
1896
|
-
email: z.string().describe(
|
|
1924
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
1925
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
1897
1926
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
1898
1927
|
).email().optional().nullable(),
|
|
1899
|
-
subscriptionStatus: z.enum([
|
|
1928
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1900
1929
|
"NO_SUBSCRIPTION_STATUS",
|
|
1901
1930
|
"NOT_SET",
|
|
1902
1931
|
"PENDING",
|
|
@@ -1905,7 +1934,7 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1905
1934
|
]).describe(
|
|
1906
1935
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
1907
1936
|
).optional(),
|
|
1908
|
-
deliverabilityStatus: z.enum([
|
|
1937
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum([
|
|
1909
1938
|
"NOT_SET",
|
|
1910
1939
|
"VALID",
|
|
1911
1940
|
"BOUNCED",
|
|
@@ -1915,17 +1944,17 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1915
1944
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
1916
1945
|
).optional()
|
|
1917
1946
|
}).describe("Contact's primary email details.").optional(),
|
|
1918
|
-
primaryPhone: z.object({
|
|
1919
|
-
countryCode: z.string().describe(
|
|
1947
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
1948
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
1920
1949
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1921
1950
|
).optional().nullable(),
|
|
1922
|
-
e164Phone: z.string().describe(
|
|
1951
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
1923
1952
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
1924
1953
|
).optional().nullable(),
|
|
1925
|
-
formattedPhone: z.string().describe(
|
|
1954
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
1926
1955
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
1927
1956
|
).optional().nullable(),
|
|
1928
|
-
subscriptionStatus: z.enum([
|
|
1957
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
1929
1958
|
"NO_SUBSCRIPTION_STATUS",
|
|
1930
1959
|
"NOT_SET",
|
|
1931
1960
|
"PENDING",
|
|
@@ -1934,118 +1963,121 @@ var ListContactsResponse = /* @__PURE__ */ z.object({
|
|
|
1934
1963
|
]).describe(
|
|
1935
1964
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
1936
1965
|
).optional(),
|
|
1937
|
-
phone: z.string().describe(
|
|
1966
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
1938
1967
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
1939
1968
|
).optional().nullable()
|
|
1940
1969
|
}).describe("Contact's primary phone details.").optional()
|
|
1941
1970
|
})
|
|
1942
1971
|
).optional(),
|
|
1943
|
-
pagingMetadata: z.object({
|
|
1944
|
-
count: z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
1945
|
-
offset: z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
1946
|
-
total: z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
1947
|
-
tooManyToCount: z.boolean().describe(
|
|
1972
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
1973
|
+
count: /* @__PURE__ */ z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
1974
|
+
offset: /* @__PURE__ */ z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
1975
|
+
total: /* @__PURE__ */ z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
1976
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
1948
1977
|
"A flag that indicates the server failed to calculate 'total' field."
|
|
1949
1978
|
).optional().nullable()
|
|
1950
1979
|
}).describe("Details on the paged set of results returned.").optional()
|
|
1951
1980
|
});
|
|
1952
1981
|
var QueryContactsRequest = /* @__PURE__ */ z.object({
|
|
1953
|
-
query: z.object({
|
|
1954
|
-
filter: z.object({
|
|
1955
|
-
_id: z.object({
|
|
1956
|
-
$eq: z.string(),
|
|
1957
|
-
$exists: z.boolean(),
|
|
1958
|
-
$in: z.array(z.string()),
|
|
1959
|
-
$ne: z.string()
|
|
1982
|
+
query: /* @__PURE__ */ z.object({
|
|
1983
|
+
filter: /* @__PURE__ */ z.object({
|
|
1984
|
+
_id: /* @__PURE__ */ z.object({
|
|
1985
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
1986
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
1987
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
1988
|
+
$ne: /* @__PURE__ */ z.string()
|
|
1989
|
+
}).partial().strict().optional(),
|
|
1990
|
+
"info.locale": /* @__PURE__ */ z.object({
|
|
1991
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
1992
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
1993
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
1994
|
+
$ne: /* @__PURE__ */ z.string()
|
|
1960
1995
|
}).partial().strict().optional(),
|
|
1961
|
-
|
|
1962
|
-
$eq: z.string(),
|
|
1963
|
-
$
|
|
1964
|
-
$
|
|
1965
|
-
$
|
|
1996
|
+
_createdDate: /* @__PURE__ */ z.object({
|
|
1997
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
1998
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
1999
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
2000
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
2001
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
2002
|
+
$ne: /* @__PURE__ */ z.string()
|
|
1966
2003
|
}).partial().strict().optional(),
|
|
1967
|
-
|
|
1968
|
-
$eq: z.string(),
|
|
1969
|
-
$gt: z.string(),
|
|
1970
|
-
$gte: z.string(),
|
|
1971
|
-
$lt: z.string(),
|
|
1972
|
-
$lte: z.string(),
|
|
1973
|
-
$ne: z.string()
|
|
2004
|
+
"lastActivity.activityDate": /* @__PURE__ */ z.object({
|
|
2005
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2006
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
2007
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
2008
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
2009
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
2010
|
+
$ne: /* @__PURE__ */ z.string()
|
|
1974
2011
|
}).partial().strict().optional(),
|
|
1975
|
-
"
|
|
1976
|
-
$eq: z.string(),
|
|
1977
|
-
$gt: z.string(),
|
|
1978
|
-
$gte: z.string(),
|
|
1979
|
-
$lt: z.string(),
|
|
1980
|
-
$lte: z.string(),
|
|
1981
|
-
$ne: z.string()
|
|
2012
|
+
"info.birthdate": /* @__PURE__ */ z.object({
|
|
2013
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2014
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
2015
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
2016
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
2017
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
2018
|
+
$ne: /* @__PURE__ */ z.string()
|
|
1982
2019
|
}).partial().strict().optional(),
|
|
1983
|
-
|
|
1984
|
-
$eq: z.string(),
|
|
1985
|
-
$gt: z.string(),
|
|
1986
|
-
$gte: z.string(),
|
|
1987
|
-
$lt: z.string(),
|
|
1988
|
-
$lte: z.string(),
|
|
1989
|
-
$ne: z.string()
|
|
2020
|
+
_updatedDate: /* @__PURE__ */ z.object({
|
|
2021
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2022
|
+
$gt: /* @__PURE__ */ z.string(),
|
|
2023
|
+
$gte: /* @__PURE__ */ z.string(),
|
|
2024
|
+
$lt: /* @__PURE__ */ z.string(),
|
|
2025
|
+
$lte: /* @__PURE__ */ z.string(),
|
|
2026
|
+
$ne: /* @__PURE__ */ z.string()
|
|
1990
2027
|
}).partial().strict().optional(),
|
|
1991
|
-
|
|
1992
|
-
$eq: z.string(),
|
|
1993
|
-
$
|
|
1994
|
-
$
|
|
1995
|
-
$
|
|
1996
|
-
$
|
|
1997
|
-
$ne: z.string()
|
|
2028
|
+
"primaryInfo.email": /* @__PURE__ */ z.object({
|
|
2029
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2030
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
2031
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
2032
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
2033
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
1998
2034
|
}).partial().strict().optional(),
|
|
1999
|
-
"
|
|
2000
|
-
$eq: z.string(),
|
|
2001
|
-
$exists: z.boolean(),
|
|
2002
|
-
$in: z.array(z.string()),
|
|
2003
|
-
$ne: z.string(),
|
|
2004
|
-
$startsWith: z.string()
|
|
2035
|
+
"info.name.first": /* @__PURE__ */ z.object({
|
|
2036
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2037
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
2038
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
2039
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
2040
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
2005
2041
|
}).partial().strict().optional(),
|
|
2006
|
-
"info.name.
|
|
2007
|
-
$eq: z.string(),
|
|
2008
|
-
$exists: z.boolean(),
|
|
2009
|
-
$in: z.array(z.string()),
|
|
2010
|
-
$ne: z.string(),
|
|
2011
|
-
$startsWith: z.string()
|
|
2042
|
+
"info.name.last": /* @__PURE__ */ z.object({
|
|
2043
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2044
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
2045
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
2046
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
2047
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
2012
2048
|
}).partial().strict().optional(),
|
|
2013
|
-
"info.
|
|
2014
|
-
$eq: z.string(),
|
|
2015
|
-
$exists: z.boolean(),
|
|
2016
|
-
$in: z.array(z.string()),
|
|
2017
|
-
$ne: z.string(),
|
|
2018
|
-
$startsWith: z.string()
|
|
2049
|
+
"info.company": /* @__PURE__ */ z.object({
|
|
2050
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2051
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
2052
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
2053
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
2054
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
2019
2055
|
}).partial().strict().optional(),
|
|
2020
|
-
"info.
|
|
2021
|
-
$eq: z.string(),
|
|
2022
|
-
$exists: z.boolean(),
|
|
2023
|
-
$in: z.array(z.string()),
|
|
2024
|
-
$ne: z.string(),
|
|
2025
|
-
$startsWith: z.string()
|
|
2056
|
+
"info.jobTitle": /* @__PURE__ */ z.object({
|
|
2057
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2058
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
2059
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
2060
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
2061
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
2026
2062
|
}).partial().strict().optional(),
|
|
2027
|
-
"
|
|
2028
|
-
$eq: z.string(),
|
|
2029
|
-
$exists: z.boolean(),
|
|
2030
|
-
$in: z.array(z.string()),
|
|
2031
|
-
$ne: z.string(),
|
|
2032
|
-
$startsWith: z.string()
|
|
2063
|
+
"primaryInfo.phone": /* @__PURE__ */ z.object({
|
|
2064
|
+
$eq: /* @__PURE__ */ z.string(),
|
|
2065
|
+
$exists: /* @__PURE__ */ z.boolean(),
|
|
2066
|
+
$in: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()),
|
|
2067
|
+
$ne: /* @__PURE__ */ z.string(),
|
|
2068
|
+
$startsWith: /* @__PURE__ */ z.string()
|
|
2033
2069
|
}).partial().strict().optional(),
|
|
2034
|
-
"
|
|
2035
|
-
$
|
|
2036
|
-
$
|
|
2037
|
-
$in: z.array(z.string()),
|
|
2038
|
-
$ne: z.string(),
|
|
2039
|
-
$startsWith: z.string()
|
|
2070
|
+
"info.labelKeys": /* @__PURE__ */ z.object({
|
|
2071
|
+
$hasAll: /* @__PURE__ */ z.array(/* @__PURE__ */ z.any()),
|
|
2072
|
+
$hasSome: /* @__PURE__ */ z.array(/* @__PURE__ */ z.any())
|
|
2040
2073
|
}).partial().strict().optional(),
|
|
2041
|
-
|
|
2042
|
-
$
|
|
2043
|
-
$
|
|
2044
|
-
$not: z.any().optional()
|
|
2074
|
+
$and: /* @__PURE__ */ z.array(/* @__PURE__ */ z.any()).optional(),
|
|
2075
|
+
$or: /* @__PURE__ */ z.array(/* @__PURE__ */ z.any()).optional(),
|
|
2076
|
+
$not: /* @__PURE__ */ z.any().optional()
|
|
2045
2077
|
}).strict().optional(),
|
|
2046
|
-
sort: z.array(
|
|
2047
|
-
z.object({
|
|
2048
|
-
fieldName: z.enum([
|
|
2078
|
+
sort: /* @__PURE__ */ z.array(
|
|
2079
|
+
/* @__PURE__ */ z.object({
|
|
2080
|
+
fieldName: /* @__PURE__ */ z.enum([
|
|
2049
2081
|
"_createdDate",
|
|
2050
2082
|
"lastActivity.activityDate",
|
|
2051
2083
|
"info.birthdate",
|
|
@@ -2055,28 +2087,28 @@ var QueryContactsRequest = /* @__PURE__ */ z.object({
|
|
|
2055
2087
|
"info.company",
|
|
2056
2088
|
"info.jobTitle"
|
|
2057
2089
|
]).optional(),
|
|
2058
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
2090
|
+
order: /* @__PURE__ */ z.enum(["ASC", "DESC"]).optional()
|
|
2059
2091
|
})
|
|
2060
2092
|
).optional()
|
|
2061
|
-
}).catchall(z.any()).describe("Query options."),
|
|
2062
|
-
options: z.object({
|
|
2063
|
-
search: z.string().describe(
|
|
2093
|
+
}).catchall(/* @__PURE__ */ z.any()).describe("Query options."),
|
|
2094
|
+
options: /* @__PURE__ */ z.object({
|
|
2095
|
+
search: /* @__PURE__ */ z.string().describe(
|
|
2064
2096
|
"Plain text search for an exact match.\n\nSupported properties:\n`info.name.first`, `info.name.last`, `info.emails.email`, `info.phones.phone`\n\nMax: 100 characters"
|
|
2065
2097
|
).max(100).optional().nullable()
|
|
2066
2098
|
}).describe("Query contact options.").optional()
|
|
2067
2099
|
});
|
|
2068
2100
|
var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
2069
|
-
contacts: z.array(
|
|
2070
|
-
z.object({
|
|
2071
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
2101
|
+
contacts: /* @__PURE__ */ z.array(
|
|
2102
|
+
/* @__PURE__ */ z.object({
|
|
2103
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
2072
2104
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2073
2105
|
"Must be a valid GUID"
|
|
2074
2106
|
).optional(),
|
|
2075
|
-
revision: z.number().int().describe(
|
|
2107
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
2076
2108
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
2077
2109
|
).optional(),
|
|
2078
|
-
source: z.object({
|
|
2079
|
-
sourceType: z.enum([
|
|
2110
|
+
source: /* @__PURE__ */ z.object({
|
|
2111
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
2080
2112
|
"OTHER",
|
|
2081
2113
|
"ADMIN",
|
|
2082
2114
|
"WIX_APP",
|
|
@@ -2097,16 +2129,16 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2097
2129
|
"WIX_CODE",
|
|
2098
2130
|
"HOPP"
|
|
2099
2131
|
]).describe("Source type.").optional(),
|
|
2100
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
2132
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
2101
2133
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2102
2134
|
"Must be a valid GUID"
|
|
2103
2135
|
).optional().nullable()
|
|
2104
2136
|
}).describe("Details about the contact's source.").optional(),
|
|
2105
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
2106
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
2107
|
-
lastActivity: z.object({
|
|
2108
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
2109
|
-
activityType: z.enum([
|
|
2137
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
2138
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
2139
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
2140
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
2141
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
2110
2142
|
"GENERAL",
|
|
2111
2143
|
"CONTACT_CREATED",
|
|
2112
2144
|
"MEMBER_LOGIN",
|
|
@@ -2150,44 +2182,44 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2150
2182
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
2151
2183
|
]).describe("Contact's last action in the site.").optional()
|
|
2152
2184
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
2153
|
-
primaryInfo: z.object({
|
|
2154
|
-
email: z.string().describe(
|
|
2185
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
2186
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
2155
2187
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
2156
2188
|
).email().optional().nullable(),
|
|
2157
|
-
phone: z.string().describe(
|
|
2189
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
2158
2190
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
2159
2191
|
).optional().nullable()
|
|
2160
2192
|
}).describe("Contact's primary phone and email.").optional(),
|
|
2161
|
-
info: z.object({
|
|
2162
|
-
name: z.object({
|
|
2163
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
2164
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
2193
|
+
info: /* @__PURE__ */ z.object({
|
|
2194
|
+
name: /* @__PURE__ */ z.object({
|
|
2195
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
2196
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
2165
2197
|
}).describe("Contact's first and last name.").optional(),
|
|
2166
|
-
emails: z.object({
|
|
2167
|
-
items: z.array(
|
|
2168
|
-
z.object({
|
|
2169
|
-
_id: z.string().describe("Email ID.").regex(
|
|
2198
|
+
emails: /* @__PURE__ */ z.object({
|
|
2199
|
+
items: /* @__PURE__ */ z.array(
|
|
2200
|
+
/* @__PURE__ */ z.object({
|
|
2201
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
2170
2202
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2171
2203
|
"Must be a valid GUID"
|
|
2172
2204
|
).optional().nullable(),
|
|
2173
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
2205
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
2174
2206
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
2175
2207
|
).optional(),
|
|
2176
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
2177
|
-
primary: z.boolean().describe(
|
|
2208
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
2209
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
2178
2210
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
2179
2211
|
).optional().nullable()
|
|
2180
2212
|
})
|
|
2181
2213
|
).max(50).optional()
|
|
2182
2214
|
}).describe("Contact's email addresses.").optional(),
|
|
2183
|
-
phones: z.object({
|
|
2184
|
-
items: z.array(
|
|
2185
|
-
z.object({
|
|
2186
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
2215
|
+
phones: /* @__PURE__ */ z.object({
|
|
2216
|
+
items: /* @__PURE__ */ z.array(
|
|
2217
|
+
/* @__PURE__ */ z.object({
|
|
2218
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
2187
2219
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2188
2220
|
"Must be a valid GUID"
|
|
2189
2221
|
).optional().nullable(),
|
|
2190
|
-
tag: z.enum([
|
|
2222
|
+
tag: /* @__PURE__ */ z.enum([
|
|
2191
2223
|
"UNTAGGED",
|
|
2192
2224
|
"MAIN",
|
|
2193
2225
|
"HOME",
|
|
@@ -2197,27 +2229,27 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2197
2229
|
]).describe(
|
|
2198
2230
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
2199
2231
|
).optional(),
|
|
2200
|
-
countryCode: z.string().describe(
|
|
2232
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
2201
2233
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
2202
2234
|
).optional().nullable(),
|
|
2203
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
2204
|
-
e164Phone: z.string().describe(
|
|
2235
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
2236
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
2205
2237
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
2206
2238
|
).optional().nullable(),
|
|
2207
|
-
primary: z.boolean().describe(
|
|
2239
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
2208
2240
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
2209
2241
|
).optional().nullable()
|
|
2210
2242
|
})
|
|
2211
2243
|
).max(50).optional()
|
|
2212
2244
|
}).describe("Contact's phone numbers.").optional(),
|
|
2213
|
-
addresses: z.object({
|
|
2214
|
-
items: z.array(
|
|
2215
|
-
z.object({
|
|
2216
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
2245
|
+
addresses: /* @__PURE__ */ z.object({
|
|
2246
|
+
items: /* @__PURE__ */ z.array(
|
|
2247
|
+
/* @__PURE__ */ z.object({
|
|
2248
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
2217
2249
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2218
2250
|
"Must be a valid GUID"
|
|
2219
2251
|
).optional().nullable(),
|
|
2220
|
-
tag: z.enum([
|
|
2252
|
+
tag: /* @__PURE__ */ z.enum([
|
|
2221
2253
|
"UNTAGGED",
|
|
2222
2254
|
"HOME",
|
|
2223
2255
|
"WORK",
|
|
@@ -2226,46 +2258,48 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2226
2258
|
]).describe(
|
|
2227
2259
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
2228
2260
|
).optional(),
|
|
2229
|
-
address: z.object({
|
|
2230
|
-
city: z.string().optional().nullable(),
|
|
2231
|
-
subdivision: z.string().optional().nullable(),
|
|
2232
|
-
country: z.string().optional().nullable(),
|
|
2233
|
-
postalCode: z.string().optional().nullable(),
|
|
2234
|
-
addressLine1: z.string().optional().nullable(),
|
|
2235
|
-
addressLine2: z.string().optional().nullable()
|
|
2261
|
+
address: /* @__PURE__ */ z.object({
|
|
2262
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2263
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2264
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2265
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2266
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2267
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
2236
2268
|
}).describe("Street address.").optional()
|
|
2237
2269
|
})
|
|
2238
2270
|
).max(50).optional()
|
|
2239
2271
|
}).describe("Contact's street addresses.").optional(),
|
|
2240
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
2241
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
2242
|
-
birthdate: z.string().describe(
|
|
2272
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
2273
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
2274
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
2243
2275
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
2244
2276
|
).optional().nullable(),
|
|
2245
|
-
locale: z.string().describe(
|
|
2277
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
2246
2278
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
2247
2279
|
).optional().nullable(),
|
|
2248
|
-
labelKeys: z.object({
|
|
2280
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
2281
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
2282
|
+
}).describe(
|
|
2249
2283
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
2250
2284
|
).optional(),
|
|
2251
|
-
extendedFields: z.object({
|
|
2252
|
-
items: z.record(z.string(), z.any()).describe(
|
|
2285
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
2286
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2253
2287
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
2254
2288
|
).optional()
|
|
2255
2289
|
}).describe(
|
|
2256
2290
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
2257
2291
|
).optional(),
|
|
2258
|
-
picture: z.object({
|
|
2259
|
-
image: z.string().describe(
|
|
2292
|
+
picture: /* @__PURE__ */ z.object({
|
|
2293
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
2260
2294
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
2261
2295
|
).optional()
|
|
2262
2296
|
}).describe("Contact's profile picture.").optional()
|
|
2263
2297
|
}).describe("Contact's details.").optional(),
|
|
2264
|
-
primaryEmail: z.object({
|
|
2265
|
-
email: z.string().describe(
|
|
2298
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
2299
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
2266
2300
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
2267
2301
|
).email().optional().nullable(),
|
|
2268
|
-
subscriptionStatus: z.enum([
|
|
2302
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
2269
2303
|
"NO_SUBSCRIPTION_STATUS",
|
|
2270
2304
|
"NOT_SET",
|
|
2271
2305
|
"PENDING",
|
|
@@ -2274,7 +2308,7 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2274
2308
|
]).describe(
|
|
2275
2309
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
2276
2310
|
).optional(),
|
|
2277
|
-
deliverabilityStatus: z.enum([
|
|
2311
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum([
|
|
2278
2312
|
"NOT_SET",
|
|
2279
2313
|
"VALID",
|
|
2280
2314
|
"BOUNCED",
|
|
@@ -2284,17 +2318,17 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2284
2318
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
2285
2319
|
).optional()
|
|
2286
2320
|
}).describe("Contact's primary email details.").optional(),
|
|
2287
|
-
primaryPhone: z.object({
|
|
2288
|
-
countryCode: z.string().describe(
|
|
2321
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
2322
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
2289
2323
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2290
2324
|
).optional().nullable(),
|
|
2291
|
-
e164Phone: z.string().describe(
|
|
2325
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
2292
2326
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
2293
2327
|
).optional().nullable(),
|
|
2294
|
-
formattedPhone: z.string().describe(
|
|
2328
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
2295
2329
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
2296
2330
|
).optional().nullable(),
|
|
2297
|
-
subscriptionStatus: z.enum([
|
|
2331
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
2298
2332
|
"NO_SUBSCRIPTION_STATUS",
|
|
2299
2333
|
"NOT_SET",
|
|
2300
2334
|
"PENDING",
|
|
@@ -2303,36 +2337,36 @@ var QueryContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2303
2337
|
]).describe(
|
|
2304
2338
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
2305
2339
|
).optional(),
|
|
2306
|
-
phone: z.string().describe(
|
|
2340
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
2307
2341
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
2308
2342
|
).optional().nullable()
|
|
2309
2343
|
}).describe("Contact's primary phone details.").optional()
|
|
2310
2344
|
})
|
|
2311
2345
|
).optional(),
|
|
2312
|
-
pagingMetadata: z.object({
|
|
2313
|
-
count: z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
2314
|
-
offset: z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
2315
|
-
total: z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
2316
|
-
tooManyToCount: z.boolean().describe(
|
|
2346
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
2347
|
+
count: /* @__PURE__ */ z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
2348
|
+
offset: /* @__PURE__ */ z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
2349
|
+
total: /* @__PURE__ */ z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
2350
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
2317
2351
|
"A flag that indicates the server failed to calculate 'total' field."
|
|
2318
2352
|
).optional().nullable()
|
|
2319
2353
|
}).describe("Details on the paged set of results returned.").optional()
|
|
2320
2354
|
});
|
|
2321
2355
|
var ListFacetsRequest = /* @__PURE__ */ z.object({
|
|
2322
|
-
options: z.object({
|
|
2323
|
-
paging: z.object({
|
|
2324
|
-
limit: z.number().int().describe(
|
|
2356
|
+
options: /* @__PURE__ */ z.object({
|
|
2357
|
+
paging: /* @__PURE__ */ z.object({
|
|
2358
|
+
limit: /* @__PURE__ */ z.number().int().describe(
|
|
2325
2359
|
"Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n\nDefault: `50`. <br>\nMaximum: `1000`."
|
|
2326
2360
|
).min(0).max(1e3).optional().nullable(),
|
|
2327
|
-
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
2361
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
2328
2362
|
}).describe("Pagination options.").optional(),
|
|
2329
|
-
language: z.string().describe("Language for localization.").optional().nullable()
|
|
2363
|
+
language: /* @__PURE__ */ z.string().describe("Language for localization.").optional().nullable()
|
|
2330
2364
|
}).describe("List facets options.").optional()
|
|
2331
2365
|
});
|
|
2332
2366
|
var ListFacetsResponse = /* @__PURE__ */ z.object({
|
|
2333
|
-
facets: z.array(
|
|
2334
|
-
z.object({
|
|
2335
|
-
facetType: z.enum([
|
|
2367
|
+
facets: /* @__PURE__ */ z.array(
|
|
2368
|
+
/* @__PURE__ */ z.object({
|
|
2369
|
+
facetType: /* @__PURE__ */ z.enum([
|
|
2336
2370
|
"UNKNOWN",
|
|
2337
2371
|
"ALL_CONTACTS",
|
|
2338
2372
|
"NOT_LABELED",
|
|
@@ -2340,43 +2374,43 @@ var ListFacetsResponse = /* @__PURE__ */ z.object({
|
|
|
2340
2374
|
"SUBSCRIPTION_STATUS",
|
|
2341
2375
|
"MEMBERSHIP_STATUS"
|
|
2342
2376
|
]).describe("Type of facet.").optional(),
|
|
2343
|
-
namespace: z.string().describe(
|
|
2377
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
2344
2378
|
"Scope for facet keys.\nWhen a facet key exists in a namespace,\neach key is unique within that namespace.\n\nCurrently, facets not created by Wix are in the `custom` namespace."
|
|
2345
2379
|
).optional().nullable(),
|
|
2346
|
-
namespaceDisplayName: z.string().describe("Human-readable display name.").optional().nullable(),
|
|
2347
|
-
facetKey: z.string().describe("Facet key, automatically generated.").optional().nullable(),
|
|
2348
|
-
facetDisplayName: z.string().describe("Human-readable name. Shown in the Wix UI.").optional().nullable(),
|
|
2349
|
-
count: z.number().int().describe("Number of contacts the facet applies to.").optional().nullable(),
|
|
2350
|
-
queryFilter: z.record(z.string(), z.any()).describe("Filter used to query contacts of this facet.").optional().nullable()
|
|
2380
|
+
namespaceDisplayName: /* @__PURE__ */ z.string().describe("Human-readable display name.").optional().nullable(),
|
|
2381
|
+
facetKey: /* @__PURE__ */ z.string().describe("Facet key, automatically generated.").optional().nullable(),
|
|
2382
|
+
facetDisplayName: /* @__PURE__ */ z.string().describe("Human-readable name. Shown in the Wix UI.").optional().nullable(),
|
|
2383
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of contacts the facet applies to.").optional().nullable(),
|
|
2384
|
+
queryFilter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Filter used to query contacts of this facet.").optional().nullable()
|
|
2351
2385
|
})
|
|
2352
2386
|
).optional(),
|
|
2353
|
-
pagingMetadata: z.object({
|
|
2354
|
-
count: z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
2355
|
-
offset: z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
2356
|
-
total: z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
2357
|
-
tooManyToCount: z.boolean().describe(
|
|
2387
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
2388
|
+
count: /* @__PURE__ */ z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
2389
|
+
offset: /* @__PURE__ */ z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
2390
|
+
total: /* @__PURE__ */ z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
2391
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
2358
2392
|
"A flag that indicates the server failed to calculate 'total' field."
|
|
2359
2393
|
).optional().nullable()
|
|
2360
2394
|
}).describe("Details on the paged set of results returned.").optional()
|
|
2361
2395
|
});
|
|
2362
2396
|
var QueryFacetsRequest = /* @__PURE__ */ z.object({
|
|
2363
|
-
options: z.object({
|
|
2364
|
-
paging: z.object({
|
|
2365
|
-
limit: z.number().int().describe(
|
|
2397
|
+
options: /* @__PURE__ */ z.object({
|
|
2398
|
+
paging: /* @__PURE__ */ z.object({
|
|
2399
|
+
limit: /* @__PURE__ */ z.number().int().describe(
|
|
2366
2400
|
"Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).\n\nDefault: `50`. <br>\nMaximum: `1000`."
|
|
2367
2401
|
).min(0).max(1e3).optional().nullable(),
|
|
2368
|
-
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
2402
|
+
offset: /* @__PURE__ */ z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
2369
2403
|
}).describe("Pagination options.").optional(),
|
|
2370
|
-
language: z.string().describe("Language for localization.").optional().nullable(),
|
|
2371
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
2404
|
+
language: /* @__PURE__ */ z.string().describe("Language for localization.").optional().nullable(),
|
|
2405
|
+
filter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2372
2406
|
"Filterable fields:\n- `'info.extendedFields.emailSubscriptions.effectiveEmail'` (`$exists`).\n- `'info.extendedFields.emailSubscriptions.subscriptionStatus'` (`$eq`, `$ne`, `$in`, `$nin`).\n- `'info.extendedFields.emailSubscriptions.deliverabilityStatus'` (`$eq`, `$ne`, `$in`, `$nin`)."
|
|
2373
2407
|
).optional().nullable()
|
|
2374
2408
|
}).describe("Query facets options.").optional()
|
|
2375
2409
|
});
|
|
2376
2410
|
var QueryFacetsResponse = /* @__PURE__ */ z.object({
|
|
2377
|
-
facets: z.array(
|
|
2378
|
-
z.object({
|
|
2379
|
-
facetType: z.enum([
|
|
2411
|
+
facets: /* @__PURE__ */ z.array(
|
|
2412
|
+
/* @__PURE__ */ z.object({
|
|
2413
|
+
facetType: /* @__PURE__ */ z.enum([
|
|
2380
2414
|
"UNKNOWN",
|
|
2381
2415
|
"ALL_CONTACTS",
|
|
2382
2416
|
"NOT_LABELED",
|
|
@@ -2384,37 +2418,37 @@ var QueryFacetsResponse = /* @__PURE__ */ z.object({
|
|
|
2384
2418
|
"SUBSCRIPTION_STATUS",
|
|
2385
2419
|
"MEMBERSHIP_STATUS"
|
|
2386
2420
|
]).describe("Type of facet.").optional(),
|
|
2387
|
-
namespace: z.string().describe(
|
|
2421
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
2388
2422
|
"Scope for facet keys.\nWhen a facet key exists in a namespace,\neach key is unique within that namespace.\n\nCurrently, facets not created by Wix are in the `custom` namespace."
|
|
2389
2423
|
).optional().nullable(),
|
|
2390
|
-
namespaceDisplayName: z.string().describe("Human-readable display name.").optional().nullable(),
|
|
2391
|
-
facetKey: z.string().describe("Facet key, automatically generated.").optional().nullable(),
|
|
2392
|
-
facetDisplayName: z.string().describe("Human-readable name. Shown in the Wix UI.").optional().nullable(),
|
|
2393
|
-
count: z.number().int().describe("Number of contacts the facet applies to.").optional().nullable(),
|
|
2394
|
-
queryFilter: z.record(z.string(), z.any()).describe("Filter used to query contacts of this facet.").optional().nullable()
|
|
2424
|
+
namespaceDisplayName: /* @__PURE__ */ z.string().describe("Human-readable display name.").optional().nullable(),
|
|
2425
|
+
facetKey: /* @__PURE__ */ z.string().describe("Facet key, automatically generated.").optional().nullable(),
|
|
2426
|
+
facetDisplayName: /* @__PURE__ */ z.string().describe("Human-readable name. Shown in the Wix UI.").optional().nullable(),
|
|
2427
|
+
count: /* @__PURE__ */ z.number().int().describe("Number of contacts the facet applies to.").optional().nullable(),
|
|
2428
|
+
queryFilter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe("Filter used to query contacts of this facet.").optional().nullable()
|
|
2395
2429
|
})
|
|
2396
2430
|
).optional(),
|
|
2397
|
-
pagingMetadata: z.object({
|
|
2398
|
-
count: z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
2399
|
-
offset: z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
2400
|
-
total: z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
2401
|
-
tooManyToCount: z.boolean().describe(
|
|
2431
|
+
pagingMetadata: /* @__PURE__ */ z.object({
|
|
2432
|
+
count: /* @__PURE__ */ z.number().int().describe("The number of items returned in this response.").optional().nullable(),
|
|
2433
|
+
offset: /* @__PURE__ */ z.number().int().describe("The offset which was requested.").optional().nullable(),
|
|
2434
|
+
total: /* @__PURE__ */ z.number().int().describe("The total number of items that match the query.").optional().nullable(),
|
|
2435
|
+
tooManyToCount: /* @__PURE__ */ z.boolean().describe(
|
|
2402
2436
|
"A flag that indicates the server failed to calculate 'total' field."
|
|
2403
2437
|
).optional().nullable()
|
|
2404
2438
|
}).describe("Details on the paged set of results returned.").optional()
|
|
2405
2439
|
});
|
|
2406
2440
|
var BulkDeleteContactsRequest = /* @__PURE__ */ z.object({
|
|
2407
|
-
options: z.object({
|
|
2408
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
2441
|
+
options: /* @__PURE__ */ z.object({
|
|
2442
|
+
filter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2409
2443
|
'Filter object.\n\nPossible filters:\n`$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n\nSee [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\nfor a detailed list of supported filters for contact properties, extended fields, and custom fields.\n\n\nExample:\n`{ "filter": { "info.name.last": "Smith" } }`'
|
|
2410
2444
|
).optional().nullable(),
|
|
2411
|
-
search: z.string().describe(
|
|
2445
|
+
search: /* @__PURE__ */ z.string().describe(
|
|
2412
2446
|
"Plain text search for an exact match, up to 100 characters.\n\nSearchable fields:\n\n- `info.name.first`\n- `info.name.last`\n- `info.emails.email`\n- `info.phones.phone`"
|
|
2413
2447
|
).max(100).optional().nullable()
|
|
2414
2448
|
}).describe("Bulk delete contacts options.").optional()
|
|
2415
2449
|
});
|
|
2416
2450
|
var BulkDeleteContactsResponse = /* @__PURE__ */ z.object({
|
|
2417
|
-
jobId: z.string().describe(
|
|
2451
|
+
jobId: /* @__PURE__ */ z.string().describe(
|
|
2418
2452
|
"Bulk job ID.\nThe job's status can be retrieved with Get Bulk Job."
|
|
2419
2453
|
).regex(
|
|
2420
2454
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -2422,41 +2456,41 @@ var BulkDeleteContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2422
2456
|
).optional()
|
|
2423
2457
|
});
|
|
2424
2458
|
var BulkUpdateContactsRequest = /* @__PURE__ */ z.object({
|
|
2425
|
-
options: z.object({
|
|
2426
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
2459
|
+
options: /* @__PURE__ */ z.object({
|
|
2460
|
+
filter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2427
2461
|
'Filter object.\n\nPossible filters:\n`$eq`, `$exists`, `$gt`, `$gte`, `$hasAll`, `$hasSome`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.\n\nSee [Sort, Filter, and Search](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\nfor a detailed list of supported filters for contact properties, extended fields, and custom fields.\n\n\nExample:\n`{ "filter": { "info.name.last": "Smith" } }`'
|
|
2428
2462
|
).optional().nullable(),
|
|
2429
|
-
search: z.string().describe(
|
|
2463
|
+
search: /* @__PURE__ */ z.string().describe(
|
|
2430
2464
|
"Plain text search for an exact match, up to 100 characters.\n\nSearchable fields:\n\n- `info.name.first`\n- `info.name.last`\n- `info.emails.email`\n- `info.phones.phone`"
|
|
2431
2465
|
).max(100).optional().nullable(),
|
|
2432
|
-
info: z.object({
|
|
2433
|
-
name: z.object({
|
|
2434
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
2435
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
2466
|
+
info: /* @__PURE__ */ z.object({
|
|
2467
|
+
name: /* @__PURE__ */ z.object({
|
|
2468
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
2469
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
2436
2470
|
}).describe("Contact's first and last name.").optional(),
|
|
2437
|
-
emails: z.object({
|
|
2438
|
-
items: z.array(
|
|
2439
|
-
z.object({
|
|
2440
|
-
_id: z.string().describe("Email ID.").regex(
|
|
2471
|
+
emails: /* @__PURE__ */ z.object({
|
|
2472
|
+
items: /* @__PURE__ */ z.array(
|
|
2473
|
+
/* @__PURE__ */ z.object({
|
|
2474
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
2441
2475
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2442
2476
|
"Must be a valid GUID"
|
|
2443
2477
|
).optional().nullable(),
|
|
2444
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).optional(),
|
|
2445
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
2446
|
-
primary: z.boolean().describe(
|
|
2478
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).optional(),
|
|
2479
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
2480
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
2447
2481
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
2448
2482
|
).optional().nullable()
|
|
2449
2483
|
})
|
|
2450
2484
|
).max(50).optional()
|
|
2451
2485
|
}).describe("Contact's email addresses.").optional(),
|
|
2452
|
-
phones: z.object({
|
|
2453
|
-
items: z.array(
|
|
2454
|
-
z.object({
|
|
2455
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
2486
|
+
phones: /* @__PURE__ */ z.object({
|
|
2487
|
+
items: /* @__PURE__ */ z.array(
|
|
2488
|
+
/* @__PURE__ */ z.object({
|
|
2489
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
2456
2490
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2457
2491
|
"Must be a valid GUID"
|
|
2458
2492
|
).optional().nullable(),
|
|
2459
|
-
tag: z.enum([
|
|
2493
|
+
tag: /* @__PURE__ */ z.enum([
|
|
2460
2494
|
"UNTAGGED",
|
|
2461
2495
|
"MAIN",
|
|
2462
2496
|
"HOME",
|
|
@@ -2464,58 +2498,60 @@ var BulkUpdateContactsRequest = /* @__PURE__ */ z.object({
|
|
|
2464
2498
|
"WORK",
|
|
2465
2499
|
"FAX"
|
|
2466
2500
|
]).optional(),
|
|
2467
|
-
countryCode: z.string().describe(
|
|
2501
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
2468
2502
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
2469
2503
|
).optional().nullable(),
|
|
2470
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
2471
|
-
e164Phone: z.string().describe(
|
|
2504
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
2505
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
2472
2506
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
2473
2507
|
).optional().nullable(),
|
|
2474
|
-
primary: z.boolean().describe(
|
|
2508
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
2475
2509
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
2476
2510
|
).optional().nullable()
|
|
2477
2511
|
})
|
|
2478
2512
|
).max(50).optional()
|
|
2479
2513
|
}).describe("Contact's phone numbers.").optional(),
|
|
2480
|
-
addresses: z.object({
|
|
2481
|
-
items: z.array(
|
|
2482
|
-
z.object({
|
|
2483
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
2514
|
+
addresses: /* @__PURE__ */ z.object({
|
|
2515
|
+
items: /* @__PURE__ */ z.array(
|
|
2516
|
+
/* @__PURE__ */ z.object({
|
|
2517
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
2484
2518
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2485
2519
|
"Must be a valid GUID"
|
|
2486
2520
|
).optional().nullable(),
|
|
2487
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).optional(),
|
|
2488
|
-
address: z.object({
|
|
2489
|
-
city: z.string().optional().nullable(),
|
|
2490
|
-
subdivision: z.string().optional().nullable(),
|
|
2491
|
-
country: z.string().optional().nullable(),
|
|
2492
|
-
postalCode: z.string().optional().nullable(),
|
|
2493
|
-
addressLine1: z.string().optional().nullable(),
|
|
2494
|
-
addressLine2: z.string().optional().nullable()
|
|
2521
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).optional(),
|
|
2522
|
+
address: /* @__PURE__ */ z.object({
|
|
2523
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2524
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2525
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2526
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2527
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2528
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
2495
2529
|
}).describe("Street address.").optional()
|
|
2496
2530
|
})
|
|
2497
2531
|
).max(50).optional()
|
|
2498
2532
|
}).describe("Contact's street addresses.").optional(),
|
|
2499
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
2500
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
2501
|
-
birthdate: z.string().describe(
|
|
2533
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
2534
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
2535
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
2502
2536
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
2503
2537
|
).optional().nullable(),
|
|
2504
|
-
locale: z.string().describe(
|
|
2538
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
2505
2539
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
2506
2540
|
).optional().nullable(),
|
|
2507
|
-
labelKeys: z.object({
|
|
2541
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
2542
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
2543
|
+
}).describe(
|
|
2508
2544
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
2509
2545
|
).optional(),
|
|
2510
|
-
extendedFields: z.object({
|
|
2511
|
-
items: z.record(z.string(), z.any()).describe(
|
|
2546
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
2547
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2512
2548
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
2513
2549
|
).optional()
|
|
2514
2550
|
}).describe(
|
|
2515
2551
|
"Additional custom fields.\n\nEmpty fields are not returned."
|
|
2516
2552
|
).optional(),
|
|
2517
|
-
picture: z.object({
|
|
2518
|
-
image: z.string().describe(
|
|
2553
|
+
picture: /* @__PURE__ */ z.object({
|
|
2554
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
2519
2555
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
2520
2556
|
).optional()
|
|
2521
2557
|
}).describe("Contact's profile picture.").optional()
|
|
@@ -2523,7 +2559,7 @@ var BulkUpdateContactsRequest = /* @__PURE__ */ z.object({
|
|
|
2523
2559
|
}).describe("Bulk update contacts options.").optional()
|
|
2524
2560
|
});
|
|
2525
2561
|
var BulkUpdateContactsResponse = /* @__PURE__ */ z.object({
|
|
2526
|
-
jobId: z.string().describe(
|
|
2562
|
+
jobId: /* @__PURE__ */ z.string().describe(
|
|
2527
2563
|
"Bulk job ID.\nThe job's status can be retrieved with Get Bulk Job."
|
|
2528
2564
|
).regex(
|
|
2529
2565
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -2531,19 +2567,19 @@ var BulkUpdateContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2531
2567
|
).optional()
|
|
2532
2568
|
});
|
|
2533
2569
|
var BulkLabelAndUnlabelContactsRequest = /* @__PURE__ */ z.object({
|
|
2534
|
-
options: z.object({
|
|
2535
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
2570
|
+
options: /* @__PURE__ */ z.object({
|
|
2571
|
+
filter: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2536
2572
|
"Filter options.\nLabels will be removed from contacts that meet the `filter` and `search` criteria.\n\nSee\n[Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\nfor a list of supported filters and fields."
|
|
2537
2573
|
).optional().nullable(),
|
|
2538
|
-
search: z.string().describe(
|
|
2574
|
+
search: /* @__PURE__ */ z.string().describe(
|
|
2539
2575
|
"Plain text search for an exact match, up to 100 characters.\nLabels will be removed from contacts that meet the `filter` and `search` criteria.\n\nSee\n[Field Support for Filtering, Sorting, and Searching](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/sort-filter-and-search)\nfor a list of searchable fields."
|
|
2540
2576
|
).max(100).optional().nullable(),
|
|
2541
|
-
labelKeysToAdd: z.array(z.string()).max(100).optional(),
|
|
2542
|
-
labelKeysToRemove: z.array(z.string()).max(100).optional()
|
|
2577
|
+
labelKeysToAdd: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(100).optional(),
|
|
2578
|
+
labelKeysToRemove: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(100).optional()
|
|
2543
2579
|
}).describe("Bulk label and unlabel contacts options.").optional()
|
|
2544
2580
|
});
|
|
2545
2581
|
var BulkLabelAndUnlabelContactsResponse = /* @__PURE__ */ z.object({
|
|
2546
|
-
jobId: z.string().describe(
|
|
2582
|
+
jobId: /* @__PURE__ */ z.string().describe(
|
|
2547
2583
|
"Bulk job ID.\nThe job's status can be retrieved with Get Bulk Job."
|
|
2548
2584
|
).regex(
|
|
2549
2585
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -2551,25 +2587,32 @@ var BulkLabelAndUnlabelContactsResponse = /* @__PURE__ */ z.object({
|
|
|
2551
2587
|
).optional()
|
|
2552
2588
|
});
|
|
2553
2589
|
var GetContactRequest = /* @__PURE__ */ z.object({
|
|
2554
|
-
_id: z.string().describe("ID of the contact to retrieve.").regex(
|
|
2590
|
+
_id: /* @__PURE__ */ z.string().describe("ID of the contact to retrieve.").regex(
|
|
2555
2591
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2556
2592
|
"Must be a valid GUID"
|
|
2557
2593
|
),
|
|
2558
|
-
options: z.object({
|
|
2559
|
-
fields: z.array(z.string()).max(100).optional(),
|
|
2560
|
-
fieldsets:
|
|
2594
|
+
options: /* @__PURE__ */ z.object({
|
|
2595
|
+
fields: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(100).optional(),
|
|
2596
|
+
fieldsets: /* @__PURE__ */ z.array(
|
|
2597
|
+
/* @__PURE__ */ z.enum([
|
|
2598
|
+
"BASIC",
|
|
2599
|
+
"COMMUNICATION_DETAILS",
|
|
2600
|
+
"EXTENDED",
|
|
2601
|
+
"FULL"
|
|
2602
|
+
])
|
|
2603
|
+
).max(10).optional()
|
|
2561
2604
|
}).describe("Get contact options.").optional()
|
|
2562
2605
|
});
|
|
2563
2606
|
var GetContactResponse = /* @__PURE__ */ z.object({
|
|
2564
|
-
_id: z.string().describe("Contact ID.").regex(
|
|
2607
|
+
_id: /* @__PURE__ */ z.string().describe("Contact ID.").regex(
|
|
2565
2608
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2566
2609
|
"Must be a valid GUID"
|
|
2567
2610
|
).optional(),
|
|
2568
|
-
revision: z.number().int().describe(
|
|
2611
|
+
revision: /* @__PURE__ */ z.number().int().describe(
|
|
2569
2612
|
"Revision number, which increments by 1 each time the contact is updated.\nTo prevent conflicting changes,\nthe existing `revision` must be specified when updating a contact."
|
|
2570
2613
|
).optional(),
|
|
2571
|
-
source: z.object({
|
|
2572
|
-
sourceType: z.enum([
|
|
2614
|
+
source: /* @__PURE__ */ z.object({
|
|
2615
|
+
sourceType: /* @__PURE__ */ z.enum([
|
|
2573
2616
|
"OTHER",
|
|
2574
2617
|
"ADMIN",
|
|
2575
2618
|
"WIX_APP",
|
|
@@ -2590,16 +2633,16 @@ var GetContactResponse = /* @__PURE__ */ z.object({
|
|
|
2590
2633
|
"WIX_CODE",
|
|
2591
2634
|
"HOPP"
|
|
2592
2635
|
]).describe("Source type.").optional(),
|
|
2593
|
-
appId: z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
2636
|
+
appId: /* @__PURE__ */ z.string().describe("App ID, if the contact was created by an app.").regex(
|
|
2594
2637
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2595
2638
|
"Must be a valid GUID"
|
|
2596
2639
|
).optional().nullable()
|
|
2597
2640
|
}).describe("Details about the contact's source.").optional(),
|
|
2598
|
-
_createdDate: z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
2599
|
-
_updatedDate: z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
2600
|
-
lastActivity: z.object({
|
|
2601
|
-
activityDate: z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
2602
|
-
activityType: z.enum([
|
|
2641
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the contact was created.").optional().nullable(),
|
|
2642
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the contact was last updated.").optional().nullable(),
|
|
2643
|
+
lastActivity: /* @__PURE__ */ z.object({
|
|
2644
|
+
activityDate: /* @__PURE__ */ z.date().describe("Date and time of the last action.").optional().nullable(),
|
|
2645
|
+
activityType: /* @__PURE__ */ z.enum([
|
|
2603
2646
|
"GENERAL",
|
|
2604
2647
|
"CONTACT_CREATED",
|
|
2605
2648
|
"MEMBER_LOGIN",
|
|
@@ -2643,107 +2686,109 @@ var GetContactResponse = /* @__PURE__ */ z.object({
|
|
|
2643
2686
|
"PHONE_SUBSCRIPTION_UNSUBSCRIBE"
|
|
2644
2687
|
]).describe("Contact's last action in the site.").optional()
|
|
2645
2688
|
}).describe("Details about the contact's last action in the site.").optional(),
|
|
2646
|
-
primaryInfo: z.object({
|
|
2647
|
-
email: z.string().describe(
|
|
2689
|
+
primaryInfo: /* @__PURE__ */ z.object({
|
|
2690
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
2648
2691
|
"Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
2649
2692
|
).email().optional().nullable(),
|
|
2650
|
-
phone: z.string().describe(
|
|
2693
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
2651
2694
|
"Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
2652
2695
|
).optional().nullable()
|
|
2653
2696
|
}).describe("Contact's primary phone and email.").optional(),
|
|
2654
|
-
info: z.object({
|
|
2655
|
-
name: z.object({
|
|
2656
|
-
first: z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
2657
|
-
last: z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
2697
|
+
info: /* @__PURE__ */ z.object({
|
|
2698
|
+
name: /* @__PURE__ */ z.object({
|
|
2699
|
+
first: /* @__PURE__ */ z.string().describe("Contact's first name.").max(1e3).optional().nullable(),
|
|
2700
|
+
last: /* @__PURE__ */ z.string().describe("Contact's last name.").max(1e3).optional().nullable()
|
|
2658
2701
|
}).describe("Contact's first and last name.").optional(),
|
|
2659
|
-
emails: z.object({
|
|
2660
|
-
items: z.array(
|
|
2661
|
-
z.object({
|
|
2662
|
-
_id: z.string().describe("Email ID.").regex(
|
|
2702
|
+
emails: /* @__PURE__ */ z.object({
|
|
2703
|
+
items: /* @__PURE__ */ z.array(
|
|
2704
|
+
/* @__PURE__ */ z.object({
|
|
2705
|
+
_id: /* @__PURE__ */ z.string().describe("Email ID.").regex(
|
|
2663
2706
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2664
2707
|
"Must be a valid GUID"
|
|
2665
2708
|
).optional().nullable(),
|
|
2666
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
2709
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "WORK"]).describe(
|
|
2667
2710
|
'Email type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
2668
2711
|
).optional(),
|
|
2669
|
-
email: z.string().describe("Email address.").min(1).max(320).optional(),
|
|
2670
|
-
primary: z.boolean().describe(
|
|
2712
|
+
email: /* @__PURE__ */ z.string().describe("Email address.").min(1).max(320).optional(),
|
|
2713
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
2671
2714
|
"Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nChanging the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email."
|
|
2672
2715
|
).optional().nullable()
|
|
2673
2716
|
})
|
|
2674
2717
|
).max(50).optional()
|
|
2675
2718
|
}).describe("Contact's email addresses.").optional(),
|
|
2676
|
-
phones: z.object({
|
|
2677
|
-
items: z.array(
|
|
2678
|
-
z.object({
|
|
2679
|
-
_id: z.string().describe("Phone ID.").regex(
|
|
2719
|
+
phones: /* @__PURE__ */ z.object({
|
|
2720
|
+
items: /* @__PURE__ */ z.array(
|
|
2721
|
+
/* @__PURE__ */ z.object({
|
|
2722
|
+
_id: /* @__PURE__ */ z.string().describe("Phone ID.").regex(
|
|
2680
2723
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2681
2724
|
"Must be a valid GUID"
|
|
2682
2725
|
).optional().nullable(),
|
|
2683
|
-
tag: z.enum(["UNTAGGED", "MAIN", "HOME", "MOBILE", "WORK", "FAX"]).describe(
|
|
2726
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "MAIN", "HOME", "MOBILE", "WORK", "FAX"]).describe(
|
|
2684
2727
|
'Phone type.\n\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
2685
2728
|
).optional(),
|
|
2686
|
-
countryCode: z.string().describe(
|
|
2729
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
2687
2730
|
"[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code."
|
|
2688
2731
|
).optional().nullable(),
|
|
2689
|
-
phone: z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
2690
|
-
e164Phone: z.string().describe(
|
|
2732
|
+
phone: /* @__PURE__ */ z.string().describe("Phone number.").min(1).max(50).optional(),
|
|
2733
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
2691
2734
|
"[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid."
|
|
2692
2735
|
).optional().nullable(),
|
|
2693
|
-
primary: z.boolean().describe(
|
|
2736
|
+
primary: /* @__PURE__ */ z.boolean().describe(
|
|
2694
2737
|
"Indicates whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nChanging the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone."
|
|
2695
2738
|
).optional().nullable()
|
|
2696
2739
|
})
|
|
2697
2740
|
).max(50).optional()
|
|
2698
2741
|
}).describe("Contact's phone numbers.").optional(),
|
|
2699
|
-
addresses: z.object({
|
|
2700
|
-
items: z.array(
|
|
2701
|
-
z.object({
|
|
2702
|
-
_id: z.string().describe("Street address ID.").regex(
|
|
2742
|
+
addresses: /* @__PURE__ */ z.object({
|
|
2743
|
+
items: /* @__PURE__ */ z.array(
|
|
2744
|
+
/* @__PURE__ */ z.object({
|
|
2745
|
+
_id: /* @__PURE__ */ z.string().describe("Street address ID.").regex(
|
|
2703
2746
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2704
2747
|
"Must be a valid GUID"
|
|
2705
2748
|
).optional().nullable(),
|
|
2706
|
-
tag: z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
2749
|
+
tag: /* @__PURE__ */ z.enum(["UNTAGGED", "HOME", "WORK", "BILLING", "SHIPPING"]).describe(
|
|
2707
2750
|
'Address type.\n`UNTAGGED` is shown as "Other" in the Contact List.'
|
|
2708
2751
|
).optional(),
|
|
2709
|
-
address: z.object({
|
|
2710
|
-
city: z.string().optional().nullable(),
|
|
2711
|
-
subdivision: z.string().optional().nullable(),
|
|
2712
|
-
country: z.string().optional().nullable(),
|
|
2713
|
-
postalCode: z.string().optional().nullable(),
|
|
2714
|
-
addressLine1: z.string().optional().nullable(),
|
|
2715
|
-
addressLine2: z.string().optional().nullable()
|
|
2752
|
+
address: /* @__PURE__ */ z.object({
|
|
2753
|
+
city: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2754
|
+
subdivision: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2755
|
+
country: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2756
|
+
postalCode: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2757
|
+
addressLine1: /* @__PURE__ */ z.string().optional().nullable(),
|
|
2758
|
+
addressLine2: /* @__PURE__ */ z.string().optional().nullable()
|
|
2716
2759
|
}).describe("Street address.").optional()
|
|
2717
2760
|
})
|
|
2718
2761
|
).max(50).optional()
|
|
2719
2762
|
}).describe("Contact's street addresses.").optional(),
|
|
2720
|
-
company: z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
2721
|
-
jobTitle: z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
2722
|
-
birthdate: z.string().describe(
|
|
2763
|
+
company: /* @__PURE__ */ z.string().describe("Contact's company name.").max(1e3).optional().nullable(),
|
|
2764
|
+
jobTitle: /* @__PURE__ */ z.string().describe("Contact's job title.").max(1e3).optional().nullable(),
|
|
2765
|
+
birthdate: /* @__PURE__ */ z.string().describe(
|
|
2723
2766
|
"Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`."
|
|
2724
2767
|
).optional().nullable(),
|
|
2725
|
-
locale: z.string().describe(
|
|
2768
|
+
locale: /* @__PURE__ */ z.string().describe(
|
|
2726
2769
|
"Locale in\n[IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nTypically, this is a lowercase 2-letter language code,\nfollowed by a hyphen, followed by an uppercase 2-letter country code.\nFor example, `en-US` for U.S. English, and `de-DE` for Germany German."
|
|
2727
2770
|
).optional().nullable(),
|
|
2728
|
-
labelKeys: z.object({
|
|
2771
|
+
labelKeys: /* @__PURE__ */ z.object({
|
|
2772
|
+
items: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(2e3).optional()
|
|
2773
|
+
}).describe(
|
|
2729
2774
|
"List of contact's labels.\n\nLabels are used to organize contacts. Labels can be\nadded and removed using Label Contact and Unlabel Contact, respectively.\n\nTo view or manage contact labels, use the Labels API."
|
|
2730
2775
|
).optional(),
|
|
2731
|
-
extendedFields: z.object({
|
|
2732
|
-
items: z.record(z.string(), z.any()).describe(
|
|
2776
|
+
extendedFields: /* @__PURE__ */ z.object({
|
|
2777
|
+
items: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
2733
2778
|
"Contact's extended fields,\nwhere each key is the field key,\nand each value is the field's value for the contact.\n\nTo view and manage extended fields, use the Extended Fields API."
|
|
2734
2779
|
).optional()
|
|
2735
2780
|
}).describe("Additional custom fields.\n\nEmpty fields are not returned.").optional(),
|
|
2736
|
-
picture: z.object({
|
|
2737
|
-
image: z.string().describe(
|
|
2781
|
+
picture: /* @__PURE__ */ z.object({
|
|
2782
|
+
image: /* @__PURE__ */ z.string().describe(
|
|
2738
2783
|
"Image.\nThis can contain an image URL or a Wix Media image ID."
|
|
2739
2784
|
).optional()
|
|
2740
2785
|
}).describe("Contact's profile picture.").optional()
|
|
2741
2786
|
}).describe("Contact's details.").optional(),
|
|
2742
|
-
primaryEmail: z.object({
|
|
2743
|
-
email: z.string().describe(
|
|
2787
|
+
primaryEmail: /* @__PURE__ */ z.object({
|
|
2788
|
+
email: /* @__PURE__ */ z.string().describe(
|
|
2744
2789
|
"Primary email address.\n\nThis field reflects the email address in `info.emails`\nwhere `primary` is `true`."
|
|
2745
2790
|
).email().optional().nullable(),
|
|
2746
|
-
subscriptionStatus: z.enum([
|
|
2791
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
2747
2792
|
"NO_SUBSCRIPTION_STATUS",
|
|
2748
2793
|
"NOT_SET",
|
|
2749
2794
|
"PENDING",
|
|
@@ -2752,21 +2797,21 @@ var GetContactResponse = /* @__PURE__ */ z.object({
|
|
|
2752
2797
|
]).describe(
|
|
2753
2798
|
"Indicates the recipient's opt-in or opt-out status for marketing emails.\n\nDefault: `NOT_SET`"
|
|
2754
2799
|
).optional(),
|
|
2755
|
-
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
2800
|
+
deliverabilityStatus: /* @__PURE__ */ z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
2756
2801
|
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`"
|
|
2757
2802
|
).optional()
|
|
2758
2803
|
}).describe("Contact's primary email details.").optional(),
|
|
2759
|
-
primaryPhone: z.object({
|
|
2760
|
-
countryCode: z.string().describe(
|
|
2804
|
+
primaryPhone: /* @__PURE__ */ z.object({
|
|
2805
|
+
countryCode: /* @__PURE__ */ z.string().describe(
|
|
2761
2806
|
"Country code of the primary phone number in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2762
2807
|
).optional().nullable(),
|
|
2763
|
-
e164Phone: z.string().describe(
|
|
2808
|
+
e164Phone: /* @__PURE__ */ z.string().describe(
|
|
2764
2809
|
"Phone number in [ITU E.164](https://www.itu.int/rec/T-REC-E.164/) format.\nAutomatically generated using `phone` and `countryCode` when both values are valid."
|
|
2765
2810
|
).optional().nullable(),
|
|
2766
|
-
formattedPhone: z.string().describe(
|
|
2811
|
+
formattedPhone: /* @__PURE__ */ z.string().describe(
|
|
2767
2812
|
"Formatted phone. Automatically generated using `phone` and `countryCode`."
|
|
2768
2813
|
).optional().nullable(),
|
|
2769
|
-
subscriptionStatus: z.enum([
|
|
2814
|
+
subscriptionStatus: /* @__PURE__ */ z.enum([
|
|
2770
2815
|
"NO_SUBSCRIPTION_STATUS",
|
|
2771
2816
|
"NOT_SET",
|
|
2772
2817
|
"PENDING",
|
|
@@ -2775,7 +2820,7 @@ var GetContactResponse = /* @__PURE__ */ z.object({
|
|
|
2775
2820
|
]).describe(
|
|
2776
2821
|
"Indicates the recipient's opt-in or opt-out status for SMS messages.\n\nDefault:\n- `NOT_SET` when the phone is a valid E164 phone.\n- `NO_SUBSCRIPTION_STATUS` when the phone is not a valid E164 phone."
|
|
2777
2822
|
).optional(),
|
|
2778
|
-
phone: z.string().describe(
|
|
2823
|
+
phone: /* @__PURE__ */ z.string().describe(
|
|
2779
2824
|
"Primary phone number.\n\nThis field reflects the phone number in `info.phones`\nwhere `primary` is `true`."
|
|
2780
2825
|
).optional().nullable()
|
|
2781
2826
|
}).describe("Contact's primary phone details.").optional()
|