@wix/auto_sdk_crm_contacts-v-5 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.ts +4256 -0
- package/build/cjs/index.d.ts +522 -0
- package/build/cjs/index.js +3749 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +38 -0
- package/build/cjs/index.typings.js +3445 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2929 -0
- package/build/cjs/meta.js +2558 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +5693 -0
- package/build/cjs/schemas.js +8216 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.mts +4256 -0
- package/build/es/index.d.mts +522 -0
- package/build/es/index.mjs +3666 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +38 -0
- package/build/es/index.typings.mjs +3361 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2929 -0
- package/build/es/meta.mjs +2473 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +5693 -0
- package/build/es/schemas.mjs +8116 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.ts +4256 -0
- package/build/internal/cjs/index.d.ts +522 -0
- package/build/internal/cjs/index.js +3749 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +38 -0
- package/build/internal/cjs/index.typings.js +3445 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2929 -0
- package/build/internal/cjs/meta.js +2558 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +5693 -0
- package/build/internal/cjs/schemas.js +8216 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/contacts-v5-contact-contacts-v-5.universal-78Io5ULf.d.mts +4256 -0
- package/build/internal/es/index.d.mts +522 -0
- package/build/internal/es/index.mjs +3666 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +38 -0
- package/build/internal/es/index.typings.mjs +3361 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2929 -0
- package/build/internal/es/meta.mjs +2473 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +5693 -0
- package/build/internal/es/schemas.mjs +8116 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,3666 @@
|
|
|
1
|
+
// src/contacts-v5-contact-contacts-v-5.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
4
|
+
import {
|
|
5
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
6
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
7
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
8
|
+
|
|
9
|
+
// src/contacts-v5-contact-contacts-v-5.http.ts
|
|
10
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
12
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
13
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
15
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
16
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
17
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
18
|
+
function resolveWixContactsV5ContactsUrl(opts) {
|
|
19
|
+
const domainToMappings = {
|
|
20
|
+
"bo._base_domain_": [
|
|
21
|
+
{
|
|
22
|
+
srcPath: "/_api/contacts-v5-app",
|
|
23
|
+
destPath: ""
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"wixbo.ai": [
|
|
27
|
+
{
|
|
28
|
+
srcPath: "/_api/contacts-v5-app",
|
|
29
|
+
destPath: ""
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"wix-bo.com": [
|
|
33
|
+
{
|
|
34
|
+
srcPath: "/_api/contacts-v5-app",
|
|
35
|
+
destPath: ""
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"manage._base_domain_": [
|
|
39
|
+
{
|
|
40
|
+
srcPath: "/_api/contacts/v5/contacts",
|
|
41
|
+
destPath: "/v5/contacts"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
srcPath: "/_api/contacts/v5/bulk/contacts",
|
|
45
|
+
destPath: "/v5/bulk/contacts"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
_: [
|
|
49
|
+
{
|
|
50
|
+
srcPath: "/_api/contacts/v5/contacts",
|
|
51
|
+
destPath: "/v5/contacts"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/_api/contacts/v5/bulk/contacts",
|
|
55
|
+
destPath: "/v5/bulk/contacts"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"*.dev.wix-code.com": [
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/_api/contacts/v5/contacts",
|
|
61
|
+
destPath: "/v5/contacts"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/_api/contacts/v5/bulk/contacts",
|
|
65
|
+
destPath: "/v5/bulk/contacts"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"www.wixapis.com": [
|
|
69
|
+
{
|
|
70
|
+
srcPath: "/contacts/v5/contacts",
|
|
71
|
+
destPath: "/v5/contacts"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
srcPath: "/contacts/v5/bulk/contacts",
|
|
75
|
+
destPath: "/v5/bulk/contacts"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
80
|
+
}
|
|
81
|
+
function resolveWixContactsV5ContactSubscriptionsUrl(opts) {
|
|
82
|
+
const domainToMappings = {
|
|
83
|
+
"bo._base_domain_": [
|
|
84
|
+
{
|
|
85
|
+
srcPath: "/_api/contacts-v5-app",
|
|
86
|
+
destPath: ""
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"wixbo.ai": [
|
|
90
|
+
{
|
|
91
|
+
srcPath: "/_api/contacts-v5-app",
|
|
92
|
+
destPath: ""
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"wix-bo.com": [
|
|
96
|
+
{
|
|
97
|
+
srcPath: "/_api/contacts-v5-app",
|
|
98
|
+
destPath: ""
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"manage._base_domain_": [
|
|
102
|
+
{
|
|
103
|
+
srcPath: "/_api/contacts/v5/contacts",
|
|
104
|
+
destPath: "/v5/contacts"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
srcPath: "/_api/contacts/v5/bulk/contacts",
|
|
108
|
+
destPath: "/v5/bulk/contacts"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
_: [
|
|
112
|
+
{
|
|
113
|
+
srcPath: "/_api/contacts/v5/contacts",
|
|
114
|
+
destPath: "/v5/contacts"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
srcPath: "/_api/contacts/v5/bulk/contacts",
|
|
118
|
+
destPath: "/v5/bulk/contacts"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"*.dev.wix-code.com": [
|
|
122
|
+
{
|
|
123
|
+
srcPath: "/_api/contacts/v5/contacts",
|
|
124
|
+
destPath: "/v5/contacts"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
srcPath: "/_api/contacts/v5/bulk/contacts",
|
|
128
|
+
destPath: "/v5/bulk/contacts"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"www.wixapis.com": [
|
|
132
|
+
{
|
|
133
|
+
srcPath: "/contacts/v5/contacts",
|
|
134
|
+
destPath: "/v5/contacts"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
srcPath: "/contacts/v5/bulk/contacts",
|
|
138
|
+
destPath: "/v5/bulk/contacts"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
};
|
|
142
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
143
|
+
}
|
|
144
|
+
var PACKAGE_NAME = "@wix/auto_sdk_crm_contacts-v-5";
|
|
145
|
+
function bulkUpdateContactSubscriptions(payload) {
|
|
146
|
+
function __bulkUpdateContactSubscriptions({ host }) {
|
|
147
|
+
const metadata = {
|
|
148
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
149
|
+
method: "POST",
|
|
150
|
+
methodFqn: "wix.contacts.v5.ContactSubscriptions.BulkUpdateContactSubscriptions",
|
|
151
|
+
packageName: PACKAGE_NAME,
|
|
152
|
+
migrationOptions: {
|
|
153
|
+
optInTransformResponse: true
|
|
154
|
+
},
|
|
155
|
+
url: resolveWixContactsV5ContactSubscriptionsUrl({
|
|
156
|
+
protoPath: "/v5/bulk/contacts/subscriptions/update",
|
|
157
|
+
data: payload,
|
|
158
|
+
host
|
|
159
|
+
}),
|
|
160
|
+
data: payload
|
|
161
|
+
};
|
|
162
|
+
return metadata;
|
|
163
|
+
}
|
|
164
|
+
return __bulkUpdateContactSubscriptions;
|
|
165
|
+
}
|
|
166
|
+
function createContact(payload) {
|
|
167
|
+
function __createContact({ host }) {
|
|
168
|
+
const serializedData = transformPaths(payload, [
|
|
169
|
+
{
|
|
170
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
171
|
+
paths: [
|
|
172
|
+
{ path: "contact.createdDate" },
|
|
173
|
+
{ path: "contact.updatedDate" },
|
|
174
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
175
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
176
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
177
|
+
{ path: "contact.lastActivity.date" },
|
|
178
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
179
|
+
{ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate" },
|
|
180
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
181
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
186
|
+
paths: [
|
|
187
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
188
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
]);
|
|
192
|
+
const metadata = {
|
|
193
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
194
|
+
method: "POST",
|
|
195
|
+
methodFqn: "wix.contacts.v5.Contacts.CreateContact",
|
|
196
|
+
packageName: PACKAGE_NAME,
|
|
197
|
+
migrationOptions: {
|
|
198
|
+
optInTransformResponse: true
|
|
199
|
+
},
|
|
200
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
201
|
+
protoPath: "/v5/contacts",
|
|
202
|
+
data: serializedData,
|
|
203
|
+
host
|
|
204
|
+
}),
|
|
205
|
+
data: serializedData,
|
|
206
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
207
|
+
{
|
|
208
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
209
|
+
paths: [
|
|
210
|
+
{ path: "contact.createdDate" },
|
|
211
|
+
{ path: "contact.updatedDate" },
|
|
212
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
213
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
214
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
215
|
+
{ path: "contact.lastActivity.date" },
|
|
216
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
217
|
+
{
|
|
218
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
219
|
+
},
|
|
220
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
221
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
226
|
+
paths: [
|
|
227
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
228
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
])
|
|
232
|
+
};
|
|
233
|
+
return metadata;
|
|
234
|
+
}
|
|
235
|
+
return __createContact;
|
|
236
|
+
}
|
|
237
|
+
function getContact(payload) {
|
|
238
|
+
function __getContact({ host }) {
|
|
239
|
+
const metadata = {
|
|
240
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
241
|
+
method: "GET",
|
|
242
|
+
methodFqn: "wix.contacts.v5.Contacts.GetContact",
|
|
243
|
+
packageName: PACKAGE_NAME,
|
|
244
|
+
migrationOptions: {
|
|
245
|
+
optInTransformResponse: true
|
|
246
|
+
},
|
|
247
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
248
|
+
protoPath: "/v5/contacts/{contactId}",
|
|
249
|
+
data: payload,
|
|
250
|
+
host
|
|
251
|
+
}),
|
|
252
|
+
params: toURLSearchParams(payload),
|
|
253
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
254
|
+
{
|
|
255
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
256
|
+
paths: [
|
|
257
|
+
{ path: "contact.createdDate" },
|
|
258
|
+
{ path: "contact.updatedDate" },
|
|
259
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
260
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
261
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
262
|
+
{ path: "contact.lastActivity.date" },
|
|
263
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
264
|
+
{
|
|
265
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
266
|
+
},
|
|
267
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
268
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
273
|
+
paths: [
|
|
274
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
275
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
])
|
|
279
|
+
};
|
|
280
|
+
return metadata;
|
|
281
|
+
}
|
|
282
|
+
return __getContact;
|
|
283
|
+
}
|
|
284
|
+
function updateContact(payload) {
|
|
285
|
+
function __updateContact({ host }) {
|
|
286
|
+
const serializedData = transformPaths(payload, [
|
|
287
|
+
{
|
|
288
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
289
|
+
paths: [{ path: "fieldMask" }]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
293
|
+
paths: [
|
|
294
|
+
{ path: "contact.createdDate" },
|
|
295
|
+
{ path: "contact.updatedDate" },
|
|
296
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
297
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
298
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
299
|
+
{ path: "contact.lastActivity.date" },
|
|
300
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
301
|
+
{ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate" },
|
|
302
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
303
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
308
|
+
paths: [
|
|
309
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
310
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
]);
|
|
314
|
+
const metadata = {
|
|
315
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
316
|
+
method: "PATCH",
|
|
317
|
+
methodFqn: "wix.contacts.v5.Contacts.UpdateContact",
|
|
318
|
+
packageName: PACKAGE_NAME,
|
|
319
|
+
migrationOptions: {
|
|
320
|
+
optInTransformResponse: true
|
|
321
|
+
},
|
|
322
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
323
|
+
protoPath: "/v5/contacts/{contact.id}",
|
|
324
|
+
data: serializedData,
|
|
325
|
+
host
|
|
326
|
+
}),
|
|
327
|
+
data: serializedData,
|
|
328
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
329
|
+
{
|
|
330
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
331
|
+
paths: [
|
|
332
|
+
{ path: "contact.createdDate" },
|
|
333
|
+
{ path: "contact.updatedDate" },
|
|
334
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
335
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
336
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
337
|
+
{ path: "contact.lastActivity.date" },
|
|
338
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
339
|
+
{
|
|
340
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
341
|
+
},
|
|
342
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
343
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
348
|
+
paths: [
|
|
349
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
350
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
])
|
|
354
|
+
};
|
|
355
|
+
return metadata;
|
|
356
|
+
}
|
|
357
|
+
return __updateContact;
|
|
358
|
+
}
|
|
359
|
+
function upsertContact(payload) {
|
|
360
|
+
function __upsertContact({ host }) {
|
|
361
|
+
const serializedData = transformPaths(payload, [
|
|
362
|
+
{
|
|
363
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
364
|
+
paths: [{ path: "fieldMask" }]
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
368
|
+
paths: [
|
|
369
|
+
{ path: "contact.createdDate" },
|
|
370
|
+
{ path: "contact.updatedDate" },
|
|
371
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
372
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
373
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
374
|
+
{ path: "contact.lastActivity.date" },
|
|
375
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
376
|
+
{ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate" },
|
|
377
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
378
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
383
|
+
paths: [
|
|
384
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
385
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
]);
|
|
389
|
+
const metadata = {
|
|
390
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
391
|
+
method: "POST",
|
|
392
|
+
methodFqn: "wix.contacts.v5.Contacts.UpsertContact",
|
|
393
|
+
packageName: PACKAGE_NAME,
|
|
394
|
+
migrationOptions: {
|
|
395
|
+
optInTransformResponse: true
|
|
396
|
+
},
|
|
397
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
398
|
+
protoPath: "/v5/contacts/upsert",
|
|
399
|
+
data: serializedData,
|
|
400
|
+
host
|
|
401
|
+
}),
|
|
402
|
+
data: serializedData,
|
|
403
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
404
|
+
{
|
|
405
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
406
|
+
paths: [
|
|
407
|
+
{ path: "contact.createdDate" },
|
|
408
|
+
{ path: "contact.updatedDate" },
|
|
409
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
410
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
411
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
412
|
+
{ path: "contact.lastActivity.date" },
|
|
413
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
414
|
+
{
|
|
415
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
416
|
+
},
|
|
417
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
418
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
423
|
+
paths: [
|
|
424
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
425
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
])
|
|
429
|
+
};
|
|
430
|
+
return metadata;
|
|
431
|
+
}
|
|
432
|
+
return __upsertContact;
|
|
433
|
+
}
|
|
434
|
+
function updateContactTags(payload) {
|
|
435
|
+
function __updateContactTags({ host }) {
|
|
436
|
+
const metadata = {
|
|
437
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
438
|
+
method: "POST",
|
|
439
|
+
methodFqn: "wix.contacts.v5.Contacts.UpdateContactTags",
|
|
440
|
+
packageName: PACKAGE_NAME,
|
|
441
|
+
migrationOptions: {
|
|
442
|
+
optInTransformResponse: true
|
|
443
|
+
},
|
|
444
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
445
|
+
protoPath: "/v5/contacts/{contactId}/update-tags",
|
|
446
|
+
data: payload,
|
|
447
|
+
host
|
|
448
|
+
}),
|
|
449
|
+
data: payload,
|
|
450
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
451
|
+
{
|
|
452
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
453
|
+
paths: [
|
|
454
|
+
{ path: "contact.createdDate" },
|
|
455
|
+
{ path: "contact.updatedDate" },
|
|
456
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
457
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
458
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
459
|
+
{ path: "contact.lastActivity.date" },
|
|
460
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
461
|
+
{
|
|
462
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
463
|
+
},
|
|
464
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
465
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
470
|
+
paths: [
|
|
471
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
472
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
])
|
|
476
|
+
};
|
|
477
|
+
return metadata;
|
|
478
|
+
}
|
|
479
|
+
return __updateContactTags;
|
|
480
|
+
}
|
|
481
|
+
function mergeContacts(payload) {
|
|
482
|
+
function __mergeContacts({ host }) {
|
|
483
|
+
const serializedData = transformPaths(payload, [
|
|
484
|
+
{
|
|
485
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
486
|
+
paths: [{ path: "fieldMask" }]
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
490
|
+
paths: [
|
|
491
|
+
{ path: "targetContact.createdDate" },
|
|
492
|
+
{ path: "targetContact.updatedDate" },
|
|
493
|
+
{ path: "targetContact.email.subscriptionStatus.updatedDate" },
|
|
494
|
+
{ path: "targetContact.phone.subscriptionStatus.updatedDate" },
|
|
495
|
+
{ path: "targetContact.image.urlExpirationDate" },
|
|
496
|
+
{ path: "targetContact.lastActivity.date" },
|
|
497
|
+
{ path: "targetContact.memberInfo.signupDate" },
|
|
498
|
+
{
|
|
499
|
+
path: "targetContact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
500
|
+
},
|
|
501
|
+
{ path: "targetContact.memberInfo.sessionInfo.lastWebLogin" },
|
|
502
|
+
{ path: "targetContact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
507
|
+
paths: [
|
|
508
|
+
{ path: "targetContact.addresses.address.geocode.latitude" },
|
|
509
|
+
{ path: "targetContact.addresses.address.geocode.longitude" }
|
|
510
|
+
]
|
|
511
|
+
}
|
|
512
|
+
]);
|
|
513
|
+
const metadata = {
|
|
514
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
515
|
+
method: "POST",
|
|
516
|
+
methodFqn: "wix.contacts.v5.Contacts.MergeContacts",
|
|
517
|
+
packageName: PACKAGE_NAME,
|
|
518
|
+
migrationOptions: {
|
|
519
|
+
optInTransformResponse: true
|
|
520
|
+
},
|
|
521
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
522
|
+
protoPath: "/v5/contacts/{targetContactId}/merge",
|
|
523
|
+
data: serializedData,
|
|
524
|
+
host
|
|
525
|
+
}),
|
|
526
|
+
data: serializedData,
|
|
527
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
528
|
+
{
|
|
529
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
530
|
+
paths: [
|
|
531
|
+
{ path: "contact.createdDate" },
|
|
532
|
+
{ path: "contact.updatedDate" },
|
|
533
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
534
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
535
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
536
|
+
{ path: "contact.lastActivity.date" },
|
|
537
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
538
|
+
{
|
|
539
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
540
|
+
},
|
|
541
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
542
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
547
|
+
paths: [
|
|
548
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
549
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
550
|
+
]
|
|
551
|
+
}
|
|
552
|
+
])
|
|
553
|
+
};
|
|
554
|
+
return metadata;
|
|
555
|
+
}
|
|
556
|
+
return __mergeContacts;
|
|
557
|
+
}
|
|
558
|
+
function deleteContact(payload) {
|
|
559
|
+
function __deleteContact({ host }) {
|
|
560
|
+
const metadata = {
|
|
561
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
562
|
+
method: "DELETE",
|
|
563
|
+
methodFqn: "wix.contacts.v5.Contacts.DeleteContact",
|
|
564
|
+
packageName: PACKAGE_NAME,
|
|
565
|
+
migrationOptions: {
|
|
566
|
+
optInTransformResponse: true
|
|
567
|
+
},
|
|
568
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
569
|
+
protoPath: "/v5/contacts/{contactId}",
|
|
570
|
+
data: payload,
|
|
571
|
+
host
|
|
572
|
+
}),
|
|
573
|
+
params: toURLSearchParams(payload)
|
|
574
|
+
};
|
|
575
|
+
return metadata;
|
|
576
|
+
}
|
|
577
|
+
return __deleteContact;
|
|
578
|
+
}
|
|
579
|
+
function findMatchingContacts(payload) {
|
|
580
|
+
function __findMatchingContacts({ host }) {
|
|
581
|
+
const metadata = {
|
|
582
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
583
|
+
method: "GET",
|
|
584
|
+
methodFqn: "wix.contacts.v5.Contacts.FindMatchingContacts",
|
|
585
|
+
packageName: PACKAGE_NAME,
|
|
586
|
+
migrationOptions: {
|
|
587
|
+
optInTransformResponse: true
|
|
588
|
+
},
|
|
589
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
590
|
+
protoPath: "/v5/contacts/find-matching",
|
|
591
|
+
data: payload,
|
|
592
|
+
host
|
|
593
|
+
}),
|
|
594
|
+
params: toURLSearchParams(payload),
|
|
595
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
596
|
+
{
|
|
597
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
598
|
+
paths: [
|
|
599
|
+
{ path: "contacts.createdDate" },
|
|
600
|
+
{ path: "contacts.updatedDate" },
|
|
601
|
+
{ path: "contacts.email.subscriptionStatus.updatedDate" },
|
|
602
|
+
{ path: "contacts.phone.subscriptionStatus.updatedDate" },
|
|
603
|
+
{ path: "contacts.image.urlExpirationDate" },
|
|
604
|
+
{ path: "contacts.lastActivity.date" },
|
|
605
|
+
{ path: "contacts.memberInfo.signupDate" },
|
|
606
|
+
{
|
|
607
|
+
path: "contacts.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
608
|
+
},
|
|
609
|
+
{ path: "contacts.memberInfo.sessionInfo.lastWebLogin" },
|
|
610
|
+
{ path: "contacts.memberInfo.sessionInfo.lastMobileLogin" }
|
|
611
|
+
]
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
615
|
+
paths: [
|
|
616
|
+
{ path: "contacts.addresses.address.geocode.latitude" },
|
|
617
|
+
{ path: "contacts.addresses.address.geocode.longitude" }
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
])
|
|
621
|
+
};
|
|
622
|
+
return metadata;
|
|
623
|
+
}
|
|
624
|
+
return __findMatchingContacts;
|
|
625
|
+
}
|
|
626
|
+
function queryContacts(payload) {
|
|
627
|
+
function __queryContacts({ host }) {
|
|
628
|
+
const metadata = {
|
|
629
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
630
|
+
method: "GET",
|
|
631
|
+
methodFqn: "wix.contacts.v5.Contacts.QueryContacts",
|
|
632
|
+
packageName: PACKAGE_NAME,
|
|
633
|
+
migrationOptions: {
|
|
634
|
+
optInTransformResponse: true
|
|
635
|
+
},
|
|
636
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
637
|
+
protoPath: "/v5/contacts/query",
|
|
638
|
+
data: payload,
|
|
639
|
+
host
|
|
640
|
+
}),
|
|
641
|
+
params: toURLSearchParams(payload, true),
|
|
642
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
643
|
+
{
|
|
644
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
645
|
+
paths: [
|
|
646
|
+
{ path: "contacts.createdDate" },
|
|
647
|
+
{ path: "contacts.updatedDate" },
|
|
648
|
+
{ path: "contacts.email.subscriptionStatus.updatedDate" },
|
|
649
|
+
{ path: "contacts.phone.subscriptionStatus.updatedDate" },
|
|
650
|
+
{ path: "contacts.image.urlExpirationDate" },
|
|
651
|
+
{ path: "contacts.lastActivity.date" },
|
|
652
|
+
{ path: "contacts.memberInfo.signupDate" },
|
|
653
|
+
{
|
|
654
|
+
path: "contacts.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
655
|
+
},
|
|
656
|
+
{ path: "contacts.memberInfo.sessionInfo.lastWebLogin" },
|
|
657
|
+
{ path: "contacts.memberInfo.sessionInfo.lastMobileLogin" }
|
|
658
|
+
]
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
662
|
+
paths: [
|
|
663
|
+
{ path: "contacts.addresses.address.geocode.latitude" },
|
|
664
|
+
{ path: "contacts.addresses.address.geocode.longitude" }
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
]),
|
|
668
|
+
fallback: [
|
|
669
|
+
{
|
|
670
|
+
method: "POST",
|
|
671
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
672
|
+
protoPath: "/v5/contacts/query",
|
|
673
|
+
data: payload,
|
|
674
|
+
host
|
|
675
|
+
}),
|
|
676
|
+
data: payload
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
};
|
|
680
|
+
return metadata;
|
|
681
|
+
}
|
|
682
|
+
return __queryContacts;
|
|
683
|
+
}
|
|
684
|
+
function searchContacts(payload) {
|
|
685
|
+
function __searchContacts({ host }) {
|
|
686
|
+
const serializedData = transformPaths(payload, [
|
|
687
|
+
{
|
|
688
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
689
|
+
paths: [
|
|
690
|
+
{ path: "search.aggregations.range.buckets.from" },
|
|
691
|
+
{ path: "search.aggregations.range.buckets.to" },
|
|
692
|
+
{
|
|
693
|
+
path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
}
|
|
700
|
+
]);
|
|
701
|
+
const metadata = {
|
|
702
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
703
|
+
method: "GET",
|
|
704
|
+
methodFqn: "wix.contacts.v5.Contacts.SearchContacts",
|
|
705
|
+
packageName: PACKAGE_NAME,
|
|
706
|
+
migrationOptions: {
|
|
707
|
+
optInTransformResponse: true
|
|
708
|
+
},
|
|
709
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
710
|
+
protoPath: "/v5/contacts/search",
|
|
711
|
+
data: serializedData,
|
|
712
|
+
host
|
|
713
|
+
}),
|
|
714
|
+
params: toURLSearchParams(serializedData, true),
|
|
715
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
716
|
+
{
|
|
717
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
718
|
+
paths: [
|
|
719
|
+
{ path: "contacts.createdDate" },
|
|
720
|
+
{ path: "contacts.updatedDate" },
|
|
721
|
+
{ path: "contacts.email.subscriptionStatus.updatedDate" },
|
|
722
|
+
{ path: "contacts.phone.subscriptionStatus.updatedDate" },
|
|
723
|
+
{ path: "contacts.image.urlExpirationDate" },
|
|
724
|
+
{ path: "contacts.lastActivity.date" },
|
|
725
|
+
{ path: "contacts.memberInfo.signupDate" },
|
|
726
|
+
{
|
|
727
|
+
path: "contacts.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
728
|
+
},
|
|
729
|
+
{ path: "contacts.memberInfo.sessionInfo.lastWebLogin" },
|
|
730
|
+
{ path: "contacts.memberInfo.sessionInfo.lastMobileLogin" }
|
|
731
|
+
]
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
735
|
+
paths: [
|
|
736
|
+
{ path: "contacts.addresses.address.geocode.latitude" },
|
|
737
|
+
{ path: "contacts.addresses.address.geocode.longitude" },
|
|
738
|
+
{ path: "aggregationData.results.ranges.results.from" },
|
|
739
|
+
{ path: "aggregationData.results.ranges.results.to" },
|
|
740
|
+
{
|
|
741
|
+
path: "aggregationData.results.nested.results.results.*.range.from"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
path: "aggregationData.results.nested.results.results.*.range.to"
|
|
745
|
+
},
|
|
746
|
+
{ path: "aggregationData.results.scalar.value" },
|
|
747
|
+
{
|
|
748
|
+
path: "aggregationData.results.nested.results.results.*.scalar.value"
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
}
|
|
752
|
+
]),
|
|
753
|
+
fallback: [
|
|
754
|
+
{
|
|
755
|
+
method: "POST",
|
|
756
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
757
|
+
protoPath: "/v5/contacts/search",
|
|
758
|
+
data: serializedData,
|
|
759
|
+
host
|
|
760
|
+
}),
|
|
761
|
+
data: serializedData
|
|
762
|
+
}
|
|
763
|
+
]
|
|
764
|
+
};
|
|
765
|
+
return metadata;
|
|
766
|
+
}
|
|
767
|
+
return __searchContacts;
|
|
768
|
+
}
|
|
769
|
+
function countContacts(payload) {
|
|
770
|
+
function __countContacts({ host }) {
|
|
771
|
+
const metadata = {
|
|
772
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
773
|
+
method: "POST",
|
|
774
|
+
methodFqn: "wix.contacts.v5.Contacts.CountContacts",
|
|
775
|
+
packageName: PACKAGE_NAME,
|
|
776
|
+
migrationOptions: {
|
|
777
|
+
optInTransformResponse: true
|
|
778
|
+
},
|
|
779
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
780
|
+
protoPath: "/v5/contacts/count",
|
|
781
|
+
data: payload,
|
|
782
|
+
host
|
|
783
|
+
}),
|
|
784
|
+
data: payload
|
|
785
|
+
};
|
|
786
|
+
return metadata;
|
|
787
|
+
}
|
|
788
|
+
return __countContacts;
|
|
789
|
+
}
|
|
790
|
+
function generateContactImageUploadUrl(payload) {
|
|
791
|
+
function __generateContactImageUploadUrl({ host }) {
|
|
792
|
+
const metadata = {
|
|
793
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
794
|
+
method: "POST",
|
|
795
|
+
methodFqn: "wix.contacts.v5.Contacts.GenerateContactImageUploadUrl",
|
|
796
|
+
packageName: PACKAGE_NAME,
|
|
797
|
+
migrationOptions: {
|
|
798
|
+
optInTransformResponse: true
|
|
799
|
+
},
|
|
800
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
801
|
+
protoPath: "/v5/contacts/{contactId}/image/upload-url",
|
|
802
|
+
data: payload,
|
|
803
|
+
host
|
|
804
|
+
}),
|
|
805
|
+
data: payload
|
|
806
|
+
};
|
|
807
|
+
return metadata;
|
|
808
|
+
}
|
|
809
|
+
return __generateContactImageUploadUrl;
|
|
810
|
+
}
|
|
811
|
+
function addContactAdditionalEmail(payload) {
|
|
812
|
+
function __addContactAdditionalEmail({ host }) {
|
|
813
|
+
const metadata = {
|
|
814
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
815
|
+
method: "POST",
|
|
816
|
+
methodFqn: "wix.contacts.v5.Contacts.AddContactAdditionalEmail",
|
|
817
|
+
packageName: PACKAGE_NAME,
|
|
818
|
+
migrationOptions: {
|
|
819
|
+
optInTransformResponse: true
|
|
820
|
+
},
|
|
821
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
822
|
+
protoPath: "/v5/contacts/{contactId}/additional-emails",
|
|
823
|
+
data: payload,
|
|
824
|
+
host
|
|
825
|
+
}),
|
|
826
|
+
data: payload,
|
|
827
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
828
|
+
{
|
|
829
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
830
|
+
paths: [
|
|
831
|
+
{ path: "contact.createdDate" },
|
|
832
|
+
{ path: "contact.updatedDate" },
|
|
833
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
834
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
835
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
836
|
+
{ path: "contact.lastActivity.date" },
|
|
837
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
838
|
+
{
|
|
839
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
840
|
+
},
|
|
841
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
842
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
843
|
+
]
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
847
|
+
paths: [
|
|
848
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
849
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
])
|
|
853
|
+
};
|
|
854
|
+
return metadata;
|
|
855
|
+
}
|
|
856
|
+
return __addContactAdditionalEmail;
|
|
857
|
+
}
|
|
858
|
+
function addContactAdditionalPhone(payload) {
|
|
859
|
+
function __addContactAdditionalPhone({ host }) {
|
|
860
|
+
const metadata = {
|
|
861
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
862
|
+
method: "POST",
|
|
863
|
+
methodFqn: "wix.contacts.v5.Contacts.AddContactAdditionalPhone",
|
|
864
|
+
packageName: PACKAGE_NAME,
|
|
865
|
+
migrationOptions: {
|
|
866
|
+
optInTransformResponse: true
|
|
867
|
+
},
|
|
868
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
869
|
+
protoPath: "/v5/contacts/{contactId}/additional-phones",
|
|
870
|
+
data: payload,
|
|
871
|
+
host
|
|
872
|
+
}),
|
|
873
|
+
data: payload,
|
|
874
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
875
|
+
{
|
|
876
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
877
|
+
paths: [
|
|
878
|
+
{ path: "contact.createdDate" },
|
|
879
|
+
{ path: "contact.updatedDate" },
|
|
880
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
881
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
882
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
883
|
+
{ path: "contact.lastActivity.date" },
|
|
884
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
885
|
+
{
|
|
886
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
887
|
+
},
|
|
888
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
889
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
890
|
+
]
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
894
|
+
paths: [
|
|
895
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
896
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
])
|
|
900
|
+
};
|
|
901
|
+
return metadata;
|
|
902
|
+
}
|
|
903
|
+
return __addContactAdditionalPhone;
|
|
904
|
+
}
|
|
905
|
+
function addContactAddress(payload) {
|
|
906
|
+
function __addContactAddress({ host }) {
|
|
907
|
+
const serializedData = transformPaths(payload, [
|
|
908
|
+
{
|
|
909
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
910
|
+
paths: [
|
|
911
|
+
{ path: "address.address.geocode.latitude" },
|
|
912
|
+
{ path: "address.address.geocode.longitude" }
|
|
913
|
+
]
|
|
914
|
+
}
|
|
915
|
+
]);
|
|
916
|
+
const metadata = {
|
|
917
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
918
|
+
method: "POST",
|
|
919
|
+
methodFqn: "wix.contacts.v5.Contacts.AddContactAddress",
|
|
920
|
+
packageName: PACKAGE_NAME,
|
|
921
|
+
migrationOptions: {
|
|
922
|
+
optInTransformResponse: true
|
|
923
|
+
},
|
|
924
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
925
|
+
protoPath: "/v5/contacts/{contactId}/addresses",
|
|
926
|
+
data: serializedData,
|
|
927
|
+
host
|
|
928
|
+
}),
|
|
929
|
+
data: serializedData,
|
|
930
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
931
|
+
{
|
|
932
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
933
|
+
paths: [
|
|
934
|
+
{ path: "contact.createdDate" },
|
|
935
|
+
{ path: "contact.updatedDate" },
|
|
936
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
937
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
938
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
939
|
+
{ path: "contact.lastActivity.date" },
|
|
940
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
941
|
+
{
|
|
942
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
943
|
+
},
|
|
944
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
945
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
946
|
+
]
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
950
|
+
paths: [
|
|
951
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
952
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
953
|
+
]
|
|
954
|
+
}
|
|
955
|
+
])
|
|
956
|
+
};
|
|
957
|
+
return metadata;
|
|
958
|
+
}
|
|
959
|
+
return __addContactAddress;
|
|
960
|
+
}
|
|
961
|
+
function deleteContactAddress(payload) {
|
|
962
|
+
function __deleteContactAddress({ host }) {
|
|
963
|
+
const metadata = {
|
|
964
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
965
|
+
method: "DELETE",
|
|
966
|
+
methodFqn: "wix.contacts.v5.Contacts.DeleteContactAddress",
|
|
967
|
+
packageName: PACKAGE_NAME,
|
|
968
|
+
migrationOptions: {
|
|
969
|
+
optInTransformResponse: true
|
|
970
|
+
},
|
|
971
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
972
|
+
protoPath: "/v5/contacts/{contactId}/addresses/{addressId}",
|
|
973
|
+
data: payload,
|
|
974
|
+
host
|
|
975
|
+
}),
|
|
976
|
+
params: toURLSearchParams(payload),
|
|
977
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
978
|
+
{
|
|
979
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
980
|
+
paths: [
|
|
981
|
+
{ path: "contact.createdDate" },
|
|
982
|
+
{ path: "contact.updatedDate" },
|
|
983
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
984
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
985
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
986
|
+
{ path: "contact.lastActivity.date" },
|
|
987
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
988
|
+
{
|
|
989
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
990
|
+
},
|
|
991
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
992
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
993
|
+
]
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
997
|
+
paths: [
|
|
998
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
999
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
])
|
|
1003
|
+
};
|
|
1004
|
+
return metadata;
|
|
1005
|
+
}
|
|
1006
|
+
return __deleteContactAddress;
|
|
1007
|
+
}
|
|
1008
|
+
function updateContactAddress(payload) {
|
|
1009
|
+
function __updateContactAddress({ host }) {
|
|
1010
|
+
const serializedData = transformPaths(payload, [
|
|
1011
|
+
{
|
|
1012
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
1013
|
+
paths: [
|
|
1014
|
+
{ path: "address.address.geocode.latitude" },
|
|
1015
|
+
{ path: "address.address.geocode.longitude" }
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
]);
|
|
1019
|
+
const metadata = {
|
|
1020
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1021
|
+
method: "PATCH",
|
|
1022
|
+
methodFqn: "wix.contacts.v5.Contacts.UpdateContactAddress",
|
|
1023
|
+
packageName: PACKAGE_NAME,
|
|
1024
|
+
migrationOptions: {
|
|
1025
|
+
optInTransformResponse: true
|
|
1026
|
+
},
|
|
1027
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1028
|
+
protoPath: "/v5/contacts/{contactId}/addresses/{address.id}",
|
|
1029
|
+
data: serializedData,
|
|
1030
|
+
host
|
|
1031
|
+
}),
|
|
1032
|
+
data: serializedData,
|
|
1033
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1034
|
+
{
|
|
1035
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1036
|
+
paths: [
|
|
1037
|
+
{ path: "contact.createdDate" },
|
|
1038
|
+
{ path: "contact.updatedDate" },
|
|
1039
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
1040
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
1041
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
1042
|
+
{ path: "contact.lastActivity.date" },
|
|
1043
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
1044
|
+
{
|
|
1045
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1046
|
+
},
|
|
1047
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
1048
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1049
|
+
]
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1053
|
+
paths: [
|
|
1054
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
1055
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
])
|
|
1059
|
+
};
|
|
1060
|
+
return metadata;
|
|
1061
|
+
}
|
|
1062
|
+
return __updateContactAddress;
|
|
1063
|
+
}
|
|
1064
|
+
function bulkCreateContacts(payload) {
|
|
1065
|
+
function __bulkCreateContacts({ host }) {
|
|
1066
|
+
const serializedData = transformPaths(payload, [
|
|
1067
|
+
{
|
|
1068
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
1069
|
+
paths: [
|
|
1070
|
+
{ path: "contacts.createdDate" },
|
|
1071
|
+
{ path: "contacts.updatedDate" },
|
|
1072
|
+
{ path: "contacts.email.subscriptionStatus.updatedDate" },
|
|
1073
|
+
{ path: "contacts.phone.subscriptionStatus.updatedDate" },
|
|
1074
|
+
{ path: "contacts.image.urlExpirationDate" },
|
|
1075
|
+
{ path: "contacts.lastActivity.date" },
|
|
1076
|
+
{ path: "contacts.memberInfo.signupDate" },
|
|
1077
|
+
{ path: "contacts.memberInfo.profileInfo.photo.urlExpirationDate" },
|
|
1078
|
+
{ path: "contacts.memberInfo.sessionInfo.lastWebLogin" },
|
|
1079
|
+
{ path: "contacts.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1080
|
+
]
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
1084
|
+
paths: [
|
|
1085
|
+
{ path: "contacts.addresses.address.geocode.latitude" },
|
|
1086
|
+
{ path: "contacts.addresses.address.geocode.longitude" }
|
|
1087
|
+
]
|
|
1088
|
+
}
|
|
1089
|
+
]);
|
|
1090
|
+
const metadata = {
|
|
1091
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1092
|
+
method: "POST",
|
|
1093
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkCreateContacts",
|
|
1094
|
+
packageName: PACKAGE_NAME,
|
|
1095
|
+
migrationOptions: {
|
|
1096
|
+
optInTransformResponse: true
|
|
1097
|
+
},
|
|
1098
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1099
|
+
protoPath: "/v5/bulk/contacts/create",
|
|
1100
|
+
data: serializedData,
|
|
1101
|
+
host
|
|
1102
|
+
}),
|
|
1103
|
+
data: serializedData,
|
|
1104
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1105
|
+
{
|
|
1106
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1107
|
+
paths: [
|
|
1108
|
+
{ path: "results.item.createdDate" },
|
|
1109
|
+
{ path: "results.item.updatedDate" },
|
|
1110
|
+
{ path: "results.item.email.subscriptionStatus.updatedDate" },
|
|
1111
|
+
{ path: "results.item.phone.subscriptionStatus.updatedDate" },
|
|
1112
|
+
{ path: "results.item.image.urlExpirationDate" },
|
|
1113
|
+
{ path: "results.item.lastActivity.date" },
|
|
1114
|
+
{ path: "results.item.memberInfo.signupDate" },
|
|
1115
|
+
{
|
|
1116
|
+
path: "results.item.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1117
|
+
},
|
|
1118
|
+
{ path: "results.item.memberInfo.sessionInfo.lastWebLogin" },
|
|
1119
|
+
{ path: "results.item.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1120
|
+
]
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1124
|
+
paths: [
|
|
1125
|
+
{ path: "results.item.addresses.address.geocode.latitude" },
|
|
1126
|
+
{ path: "results.item.addresses.address.geocode.longitude" }
|
|
1127
|
+
]
|
|
1128
|
+
}
|
|
1129
|
+
])
|
|
1130
|
+
};
|
|
1131
|
+
return metadata;
|
|
1132
|
+
}
|
|
1133
|
+
return __bulkCreateContacts;
|
|
1134
|
+
}
|
|
1135
|
+
function bulkUpdateContacts(payload) {
|
|
1136
|
+
function __bulkUpdateContacts({ host }) {
|
|
1137
|
+
const serializedData = transformPaths(payload, [
|
|
1138
|
+
{
|
|
1139
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
1140
|
+
paths: [{ path: "contacts.fieldMask" }]
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
1144
|
+
paths: [
|
|
1145
|
+
{ path: "contacts.contact.createdDate" },
|
|
1146
|
+
{ path: "contacts.contact.updatedDate" },
|
|
1147
|
+
{ path: "contacts.contact.email.subscriptionStatus.updatedDate" },
|
|
1148
|
+
{ path: "contacts.contact.phone.subscriptionStatus.updatedDate" },
|
|
1149
|
+
{ path: "contacts.contact.image.urlExpirationDate" },
|
|
1150
|
+
{ path: "contacts.contact.lastActivity.date" },
|
|
1151
|
+
{ path: "contacts.contact.memberInfo.signupDate" },
|
|
1152
|
+
{
|
|
1153
|
+
path: "contacts.contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1154
|
+
},
|
|
1155
|
+
{ path: "contacts.contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
1156
|
+
{ path: "contacts.contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1157
|
+
]
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
1161
|
+
paths: [
|
|
1162
|
+
{ path: "contacts.contact.addresses.address.geocode.latitude" },
|
|
1163
|
+
{ path: "contacts.contact.addresses.address.geocode.longitude" }
|
|
1164
|
+
]
|
|
1165
|
+
}
|
|
1166
|
+
]);
|
|
1167
|
+
const metadata = {
|
|
1168
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1169
|
+
method: "POST",
|
|
1170
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkUpdateContacts",
|
|
1171
|
+
packageName: PACKAGE_NAME,
|
|
1172
|
+
migrationOptions: {
|
|
1173
|
+
optInTransformResponse: true
|
|
1174
|
+
},
|
|
1175
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1176
|
+
protoPath: "/v5/bulk/contacts/update",
|
|
1177
|
+
data: serializedData,
|
|
1178
|
+
host
|
|
1179
|
+
}),
|
|
1180
|
+
data: serializedData,
|
|
1181
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1182
|
+
{
|
|
1183
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1184
|
+
paths: [
|
|
1185
|
+
{ path: "results.item.createdDate" },
|
|
1186
|
+
{ path: "results.item.updatedDate" },
|
|
1187
|
+
{ path: "results.item.email.subscriptionStatus.updatedDate" },
|
|
1188
|
+
{ path: "results.item.phone.subscriptionStatus.updatedDate" },
|
|
1189
|
+
{ path: "results.item.image.urlExpirationDate" },
|
|
1190
|
+
{ path: "results.item.lastActivity.date" },
|
|
1191
|
+
{ path: "results.item.memberInfo.signupDate" },
|
|
1192
|
+
{
|
|
1193
|
+
path: "results.item.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1194
|
+
},
|
|
1195
|
+
{ path: "results.item.memberInfo.sessionInfo.lastWebLogin" },
|
|
1196
|
+
{ path: "results.item.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1197
|
+
]
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1201
|
+
paths: [
|
|
1202
|
+
{ path: "results.item.addresses.address.geocode.latitude" },
|
|
1203
|
+
{ path: "results.item.addresses.address.geocode.longitude" }
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
])
|
|
1207
|
+
};
|
|
1208
|
+
return metadata;
|
|
1209
|
+
}
|
|
1210
|
+
return __bulkUpdateContacts;
|
|
1211
|
+
}
|
|
1212
|
+
function bulkUpdateContactTags(payload) {
|
|
1213
|
+
function __bulkUpdateContactTags({ host }) {
|
|
1214
|
+
const metadata = {
|
|
1215
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1216
|
+
method: "POST",
|
|
1217
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkUpdateContactTags",
|
|
1218
|
+
packageName: PACKAGE_NAME,
|
|
1219
|
+
migrationOptions: {
|
|
1220
|
+
optInTransformResponse: true
|
|
1221
|
+
},
|
|
1222
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1223
|
+
protoPath: "/v5/bulk/contacts/update-tags",
|
|
1224
|
+
data: payload,
|
|
1225
|
+
host
|
|
1226
|
+
}),
|
|
1227
|
+
data: payload,
|
|
1228
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1229
|
+
{
|
|
1230
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1231
|
+
paths: [
|
|
1232
|
+
{ path: "results.item.createdDate" },
|
|
1233
|
+
{ path: "results.item.updatedDate" },
|
|
1234
|
+
{ path: "results.item.email.subscriptionStatus.updatedDate" },
|
|
1235
|
+
{ path: "results.item.phone.subscriptionStatus.updatedDate" },
|
|
1236
|
+
{ path: "results.item.image.urlExpirationDate" },
|
|
1237
|
+
{ path: "results.item.lastActivity.date" },
|
|
1238
|
+
{ path: "results.item.memberInfo.signupDate" },
|
|
1239
|
+
{
|
|
1240
|
+
path: "results.item.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1241
|
+
},
|
|
1242
|
+
{ path: "results.item.memberInfo.sessionInfo.lastWebLogin" },
|
|
1243
|
+
{ path: "results.item.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1244
|
+
]
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1248
|
+
paths: [
|
|
1249
|
+
{ path: "results.item.addresses.address.geocode.latitude" },
|
|
1250
|
+
{ path: "results.item.addresses.address.geocode.longitude" }
|
|
1251
|
+
]
|
|
1252
|
+
}
|
|
1253
|
+
])
|
|
1254
|
+
};
|
|
1255
|
+
return metadata;
|
|
1256
|
+
}
|
|
1257
|
+
return __bulkUpdateContactTags;
|
|
1258
|
+
}
|
|
1259
|
+
function bulkUpdateContactTagsByFilter(payload) {
|
|
1260
|
+
function __bulkUpdateContactTagsByFilter({ host }) {
|
|
1261
|
+
const metadata = {
|
|
1262
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1263
|
+
method: "POST",
|
|
1264
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkUpdateContactTagsByFilter",
|
|
1265
|
+
packageName: PACKAGE_NAME,
|
|
1266
|
+
migrationOptions: {
|
|
1267
|
+
optInTransformResponse: true
|
|
1268
|
+
},
|
|
1269
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1270
|
+
protoPath: "/v5/bulk/contacts/update-tags-by-filter",
|
|
1271
|
+
data: payload,
|
|
1272
|
+
host
|
|
1273
|
+
}),
|
|
1274
|
+
data: payload
|
|
1275
|
+
};
|
|
1276
|
+
return metadata;
|
|
1277
|
+
}
|
|
1278
|
+
return __bulkUpdateContactTagsByFilter;
|
|
1279
|
+
}
|
|
1280
|
+
function bulkUpsertContacts(payload) {
|
|
1281
|
+
function __bulkUpsertContacts({ host }) {
|
|
1282
|
+
const serializedData = transformPaths(payload, [
|
|
1283
|
+
{
|
|
1284
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
1285
|
+
paths: [{ path: "contacts.fieldMask" }]
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
1289
|
+
paths: [
|
|
1290
|
+
{ path: "contacts.contact.createdDate" },
|
|
1291
|
+
{ path: "contacts.contact.updatedDate" },
|
|
1292
|
+
{ path: "contacts.contact.email.subscriptionStatus.updatedDate" },
|
|
1293
|
+
{ path: "contacts.contact.phone.subscriptionStatus.updatedDate" },
|
|
1294
|
+
{ path: "contacts.contact.image.urlExpirationDate" },
|
|
1295
|
+
{ path: "contacts.contact.lastActivity.date" },
|
|
1296
|
+
{ path: "contacts.contact.memberInfo.signupDate" },
|
|
1297
|
+
{
|
|
1298
|
+
path: "contacts.contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1299
|
+
},
|
|
1300
|
+
{ path: "contacts.contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
1301
|
+
{ path: "contacts.contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1302
|
+
]
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
1306
|
+
paths: [
|
|
1307
|
+
{ path: "contacts.contact.addresses.address.geocode.latitude" },
|
|
1308
|
+
{ path: "contacts.contact.addresses.address.geocode.longitude" }
|
|
1309
|
+
]
|
|
1310
|
+
}
|
|
1311
|
+
]);
|
|
1312
|
+
const metadata = {
|
|
1313
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1314
|
+
method: "POST",
|
|
1315
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkUpsertContacts",
|
|
1316
|
+
packageName: PACKAGE_NAME,
|
|
1317
|
+
migrationOptions: {
|
|
1318
|
+
optInTransformResponse: true
|
|
1319
|
+
},
|
|
1320
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1321
|
+
protoPath: "/v5/bulk/contacts/upsert",
|
|
1322
|
+
data: serializedData,
|
|
1323
|
+
host
|
|
1324
|
+
}),
|
|
1325
|
+
data: serializedData,
|
|
1326
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1327
|
+
{
|
|
1328
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1329
|
+
paths: [
|
|
1330
|
+
{ path: "results.item.createdDate" },
|
|
1331
|
+
{ path: "results.item.updatedDate" },
|
|
1332
|
+
{ path: "results.item.email.subscriptionStatus.updatedDate" },
|
|
1333
|
+
{ path: "results.item.phone.subscriptionStatus.updatedDate" },
|
|
1334
|
+
{ path: "results.item.image.urlExpirationDate" },
|
|
1335
|
+
{ path: "results.item.lastActivity.date" },
|
|
1336
|
+
{ path: "results.item.memberInfo.signupDate" },
|
|
1337
|
+
{
|
|
1338
|
+
path: "results.item.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1339
|
+
},
|
|
1340
|
+
{ path: "results.item.memberInfo.sessionInfo.lastWebLogin" },
|
|
1341
|
+
{ path: "results.item.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1342
|
+
]
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1346
|
+
paths: [
|
|
1347
|
+
{ path: "results.item.addresses.address.geocode.latitude" },
|
|
1348
|
+
{ path: "results.item.addresses.address.geocode.longitude" }
|
|
1349
|
+
]
|
|
1350
|
+
}
|
|
1351
|
+
])
|
|
1352
|
+
};
|
|
1353
|
+
return metadata;
|
|
1354
|
+
}
|
|
1355
|
+
return __bulkUpsertContacts;
|
|
1356
|
+
}
|
|
1357
|
+
function bulkDeleteContacts(payload) {
|
|
1358
|
+
function __bulkDeleteContacts({ host }) {
|
|
1359
|
+
const metadata = {
|
|
1360
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1361
|
+
method: "POST",
|
|
1362
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkDeleteContacts",
|
|
1363
|
+
packageName: PACKAGE_NAME,
|
|
1364
|
+
migrationOptions: {
|
|
1365
|
+
optInTransformResponse: true
|
|
1366
|
+
},
|
|
1367
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1368
|
+
protoPath: "/v5/bulk/contacts/delete",
|
|
1369
|
+
data: payload,
|
|
1370
|
+
host
|
|
1371
|
+
}),
|
|
1372
|
+
data: payload
|
|
1373
|
+
};
|
|
1374
|
+
return metadata;
|
|
1375
|
+
}
|
|
1376
|
+
return __bulkDeleteContacts;
|
|
1377
|
+
}
|
|
1378
|
+
function bulkDeleteContactsByFilter(payload) {
|
|
1379
|
+
function __bulkDeleteContactsByFilter({ host }) {
|
|
1380
|
+
const metadata = {
|
|
1381
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1382
|
+
method: "POST",
|
|
1383
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkDeleteContactsByFilter",
|
|
1384
|
+
packageName: PACKAGE_NAME,
|
|
1385
|
+
migrationOptions: {
|
|
1386
|
+
optInTransformResponse: true
|
|
1387
|
+
},
|
|
1388
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1389
|
+
protoPath: "/v5/bulk/contacts/delete-by-filter",
|
|
1390
|
+
data: payload,
|
|
1391
|
+
host
|
|
1392
|
+
}),
|
|
1393
|
+
data: payload
|
|
1394
|
+
};
|
|
1395
|
+
return metadata;
|
|
1396
|
+
}
|
|
1397
|
+
return __bulkDeleteContactsByFilter;
|
|
1398
|
+
}
|
|
1399
|
+
function removeContactFromTrashBin(payload) {
|
|
1400
|
+
function __removeContactFromTrashBin({ host }) {
|
|
1401
|
+
const metadata = {
|
|
1402
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1403
|
+
method: "DELETE",
|
|
1404
|
+
methodFqn: "wix.contacts.v5.Contacts.RemoveContactFromTrashBin",
|
|
1405
|
+
packageName: PACKAGE_NAME,
|
|
1406
|
+
migrationOptions: {
|
|
1407
|
+
optInTransformResponse: true
|
|
1408
|
+
},
|
|
1409
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1410
|
+
protoPath: "/v5/contacts/trash-bin/{contactId}",
|
|
1411
|
+
data: payload,
|
|
1412
|
+
host
|
|
1413
|
+
}),
|
|
1414
|
+
params: toURLSearchParams(payload)
|
|
1415
|
+
};
|
|
1416
|
+
return metadata;
|
|
1417
|
+
}
|
|
1418
|
+
return __removeContactFromTrashBin;
|
|
1419
|
+
}
|
|
1420
|
+
function restoreContactFromTrashBin(payload) {
|
|
1421
|
+
function __restoreContactFromTrashBin({ host }) {
|
|
1422
|
+
const metadata = {
|
|
1423
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1424
|
+
method: "POST",
|
|
1425
|
+
methodFqn: "wix.contacts.v5.Contacts.RestoreContactFromTrashBin",
|
|
1426
|
+
packageName: PACKAGE_NAME,
|
|
1427
|
+
migrationOptions: {
|
|
1428
|
+
optInTransformResponse: true
|
|
1429
|
+
},
|
|
1430
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1431
|
+
protoPath: "/v5/contacts/trash-bin/{contactId}/restore",
|
|
1432
|
+
data: payload,
|
|
1433
|
+
host
|
|
1434
|
+
}),
|
|
1435
|
+
data: payload,
|
|
1436
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1437
|
+
{
|
|
1438
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1439
|
+
paths: [
|
|
1440
|
+
{ path: "contact.createdDate" },
|
|
1441
|
+
{ path: "contact.updatedDate" },
|
|
1442
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
1443
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
1444
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
1445
|
+
{ path: "contact.lastActivity.date" },
|
|
1446
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
1447
|
+
{
|
|
1448
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1449
|
+
},
|
|
1450
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
1451
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1452
|
+
]
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1456
|
+
paths: [
|
|
1457
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
1458
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
1459
|
+
]
|
|
1460
|
+
}
|
|
1461
|
+
])
|
|
1462
|
+
};
|
|
1463
|
+
return metadata;
|
|
1464
|
+
}
|
|
1465
|
+
return __restoreContactFromTrashBin;
|
|
1466
|
+
}
|
|
1467
|
+
function bulkRestoreContactsFromTrashBin(payload) {
|
|
1468
|
+
function __bulkRestoreContactsFromTrashBin({ host }) {
|
|
1469
|
+
const metadata = {
|
|
1470
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1471
|
+
method: "POST",
|
|
1472
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkRestoreContactsFromTrashBin",
|
|
1473
|
+
packageName: PACKAGE_NAME,
|
|
1474
|
+
migrationOptions: {
|
|
1475
|
+
optInTransformResponse: true
|
|
1476
|
+
},
|
|
1477
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1478
|
+
protoPath: "/v5/bulk/contacts/trash-bin/restore",
|
|
1479
|
+
data: payload,
|
|
1480
|
+
host
|
|
1481
|
+
}),
|
|
1482
|
+
data: payload,
|
|
1483
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1484
|
+
{
|
|
1485
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1486
|
+
paths: [
|
|
1487
|
+
{ path: "results.item.createdDate" },
|
|
1488
|
+
{ path: "results.item.updatedDate" },
|
|
1489
|
+
{ path: "results.item.email.subscriptionStatus.updatedDate" },
|
|
1490
|
+
{ path: "results.item.phone.subscriptionStatus.updatedDate" },
|
|
1491
|
+
{ path: "results.item.image.urlExpirationDate" },
|
|
1492
|
+
{ path: "results.item.lastActivity.date" },
|
|
1493
|
+
{ path: "results.item.memberInfo.signupDate" },
|
|
1494
|
+
{
|
|
1495
|
+
path: "results.item.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1496
|
+
},
|
|
1497
|
+
{ path: "results.item.memberInfo.sessionInfo.lastWebLogin" },
|
|
1498
|
+
{ path: "results.item.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1499
|
+
]
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1503
|
+
paths: [
|
|
1504
|
+
{ path: "results.item.addresses.address.geocode.latitude" },
|
|
1505
|
+
{ path: "results.item.addresses.address.geocode.longitude" }
|
|
1506
|
+
]
|
|
1507
|
+
}
|
|
1508
|
+
])
|
|
1509
|
+
};
|
|
1510
|
+
return metadata;
|
|
1511
|
+
}
|
|
1512
|
+
return __bulkRestoreContactsFromTrashBin;
|
|
1513
|
+
}
|
|
1514
|
+
function getDeletedContact(payload) {
|
|
1515
|
+
function __getDeletedContact({ host }) {
|
|
1516
|
+
const metadata = {
|
|
1517
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1518
|
+
method: "GET",
|
|
1519
|
+
methodFqn: "wix.contacts.v5.Contacts.GetDeletedContact",
|
|
1520
|
+
packageName: PACKAGE_NAME,
|
|
1521
|
+
migrationOptions: {
|
|
1522
|
+
optInTransformResponse: true
|
|
1523
|
+
},
|
|
1524
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1525
|
+
protoPath: "/v5/contacts/trash-bin/{contactId}",
|
|
1526
|
+
data: payload,
|
|
1527
|
+
host
|
|
1528
|
+
}),
|
|
1529
|
+
params: toURLSearchParams(payload),
|
|
1530
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1531
|
+
{
|
|
1532
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1533
|
+
paths: [
|
|
1534
|
+
{ path: "contact.createdDate" },
|
|
1535
|
+
{ path: "contact.updatedDate" },
|
|
1536
|
+
{ path: "contact.email.subscriptionStatus.updatedDate" },
|
|
1537
|
+
{ path: "contact.phone.subscriptionStatus.updatedDate" },
|
|
1538
|
+
{ path: "contact.image.urlExpirationDate" },
|
|
1539
|
+
{ path: "contact.lastActivity.date" },
|
|
1540
|
+
{ path: "contact.memberInfo.signupDate" },
|
|
1541
|
+
{
|
|
1542
|
+
path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1543
|
+
},
|
|
1544
|
+
{ path: "contact.memberInfo.sessionInfo.lastWebLogin" },
|
|
1545
|
+
{ path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1546
|
+
]
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1550
|
+
paths: [
|
|
1551
|
+
{ path: "contact.addresses.address.geocode.latitude" },
|
|
1552
|
+
{ path: "contact.addresses.address.geocode.longitude" }
|
|
1553
|
+
]
|
|
1554
|
+
}
|
|
1555
|
+
])
|
|
1556
|
+
};
|
|
1557
|
+
return metadata;
|
|
1558
|
+
}
|
|
1559
|
+
return __getDeletedContact;
|
|
1560
|
+
}
|
|
1561
|
+
function listDeletedContacts(payload) {
|
|
1562
|
+
function __listDeletedContacts({ host }) {
|
|
1563
|
+
const serializedData = transformPaths(payload, [
|
|
1564
|
+
{
|
|
1565
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
1566
|
+
paths: [{ path: "deletedFromDate" }, { path: "deletedToDate" }]
|
|
1567
|
+
}
|
|
1568
|
+
]);
|
|
1569
|
+
const metadata = {
|
|
1570
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1571
|
+
method: "GET",
|
|
1572
|
+
methodFqn: "wix.contacts.v5.Contacts.ListDeletedContacts",
|
|
1573
|
+
packageName: PACKAGE_NAME,
|
|
1574
|
+
migrationOptions: {
|
|
1575
|
+
optInTransformResponse: true
|
|
1576
|
+
},
|
|
1577
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1578
|
+
protoPath: "/v5/contacts/trash-bin",
|
|
1579
|
+
data: serializedData,
|
|
1580
|
+
host
|
|
1581
|
+
}),
|
|
1582
|
+
params: toURLSearchParams(serializedData),
|
|
1583
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1584
|
+
{
|
|
1585
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1586
|
+
paths: [
|
|
1587
|
+
{ path: "contacts.createdDate" },
|
|
1588
|
+
{ path: "contacts.updatedDate" },
|
|
1589
|
+
{ path: "contacts.email.subscriptionStatus.updatedDate" },
|
|
1590
|
+
{ path: "contacts.phone.subscriptionStatus.updatedDate" },
|
|
1591
|
+
{ path: "contacts.image.urlExpirationDate" },
|
|
1592
|
+
{ path: "contacts.lastActivity.date" },
|
|
1593
|
+
{ path: "contacts.memberInfo.signupDate" },
|
|
1594
|
+
{
|
|
1595
|
+
path: "contacts.memberInfo.profileInfo.photo.urlExpirationDate"
|
|
1596
|
+
},
|
|
1597
|
+
{ path: "contacts.memberInfo.sessionInfo.lastWebLogin" },
|
|
1598
|
+
{ path: "contacts.memberInfo.sessionInfo.lastMobileLogin" }
|
|
1599
|
+
]
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1603
|
+
paths: [
|
|
1604
|
+
{ path: "contacts.addresses.address.geocode.latitude" },
|
|
1605
|
+
{ path: "contacts.addresses.address.geocode.longitude" }
|
|
1606
|
+
]
|
|
1607
|
+
}
|
|
1608
|
+
])
|
|
1609
|
+
};
|
|
1610
|
+
return metadata;
|
|
1611
|
+
}
|
|
1612
|
+
return __listDeletedContacts;
|
|
1613
|
+
}
|
|
1614
|
+
function getContactImageUploadStatus(payload) {
|
|
1615
|
+
function __getContactImageUploadStatus({ host }) {
|
|
1616
|
+
const metadata = {
|
|
1617
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1618
|
+
method: "GET",
|
|
1619
|
+
methodFqn: "wix.contacts.v5.Contacts.GetContactImageUploadStatus",
|
|
1620
|
+
packageName: PACKAGE_NAME,
|
|
1621
|
+
migrationOptions: {
|
|
1622
|
+
optInTransformResponse: true
|
|
1623
|
+
},
|
|
1624
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1625
|
+
protoPath: "/v5/contacts/{contactId}/image-upload/{imageUploadId}",
|
|
1626
|
+
data: payload,
|
|
1627
|
+
host
|
|
1628
|
+
}),
|
|
1629
|
+
params: toURLSearchParams(payload)
|
|
1630
|
+
};
|
|
1631
|
+
return metadata;
|
|
1632
|
+
}
|
|
1633
|
+
return __getContactImageUploadStatus;
|
|
1634
|
+
}
|
|
1635
|
+
function bulkUpdatePhoneCountryCodeByFilter(payload) {
|
|
1636
|
+
function __bulkUpdatePhoneCountryCodeByFilter({ host }) {
|
|
1637
|
+
const metadata = {
|
|
1638
|
+
entityFqdn: "wix.contacts.v5.contact",
|
|
1639
|
+
method: "POST",
|
|
1640
|
+
methodFqn: "wix.contacts.v5.Contacts.BulkUpdatePhoneCountryCodeByFilter",
|
|
1641
|
+
packageName: PACKAGE_NAME,
|
|
1642
|
+
migrationOptions: {
|
|
1643
|
+
optInTransformResponse: true
|
|
1644
|
+
},
|
|
1645
|
+
url: resolveWixContactsV5ContactsUrl({
|
|
1646
|
+
protoPath: "/v5/bulk/contacts/update-phone-country-code-by-filter",
|
|
1647
|
+
data: payload,
|
|
1648
|
+
host
|
|
1649
|
+
}),
|
|
1650
|
+
data: payload
|
|
1651
|
+
};
|
|
1652
|
+
return metadata;
|
|
1653
|
+
}
|
|
1654
|
+
return __bulkUpdatePhoneCountryCodeByFilter;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
// src/contacts-v5-contact-contacts-v-5.universal.ts
|
|
1658
|
+
import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
|
|
1659
|
+
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
|
|
1660
|
+
import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
|
|
1661
|
+
import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
|
|
1662
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
1663
|
+
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
1664
|
+
import { createSearchUtils } from "@wix/sdk-runtime/search-builder-utils";
|
|
1665
|
+
var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
|
|
1666
|
+
SubscriptionStatus2["NO_SUBSCRIPTION_STATUS"] = "NO_SUBSCRIPTION_STATUS";
|
|
1667
|
+
SubscriptionStatus2["NOT_SET"] = "NOT_SET";
|
|
1668
|
+
SubscriptionStatus2["PENDING"] = "PENDING";
|
|
1669
|
+
SubscriptionStatus2["SUBSCRIBED"] = "SUBSCRIBED";
|
|
1670
|
+
SubscriptionStatus2["UNSUBSCRIBED"] = "UNSUBSCRIBED";
|
|
1671
|
+
return SubscriptionStatus2;
|
|
1672
|
+
})(SubscriptionStatus || {});
|
|
1673
|
+
var EmailDeliverabilityStatus = /* @__PURE__ */ ((EmailDeliverabilityStatus2) => {
|
|
1674
|
+
EmailDeliverabilityStatus2["NOT_SET"] = "NOT_SET";
|
|
1675
|
+
EmailDeliverabilityStatus2["VALID"] = "VALID";
|
|
1676
|
+
EmailDeliverabilityStatus2["BOUNCED"] = "BOUNCED";
|
|
1677
|
+
EmailDeliverabilityStatus2["SPAM_COMPLAINT"] = "SPAM_COMPLAINT";
|
|
1678
|
+
EmailDeliverabilityStatus2["INACTIVE"] = "INACTIVE";
|
|
1679
|
+
return EmailDeliverabilityStatus2;
|
|
1680
|
+
})(EmailDeliverabilityStatus || {});
|
|
1681
|
+
var PhoneTag = /* @__PURE__ */ ((PhoneTag2) => {
|
|
1682
|
+
PhoneTag2["OTHER"] = "OTHER";
|
|
1683
|
+
PhoneTag2["MAIN"] = "MAIN";
|
|
1684
|
+
PhoneTag2["HOME"] = "HOME";
|
|
1685
|
+
PhoneTag2["MOBILE"] = "MOBILE";
|
|
1686
|
+
PhoneTag2["WORK"] = "WORK";
|
|
1687
|
+
PhoneTag2["FAX"] = "FAX";
|
|
1688
|
+
return PhoneTag2;
|
|
1689
|
+
})(PhoneTag || {});
|
|
1690
|
+
var PhoneDeliverabilityStatus = /* @__PURE__ */ ((PhoneDeliverabilityStatus2) => {
|
|
1691
|
+
PhoneDeliverabilityStatus2["NO_PHONE_DELIVERABILITY_STATUS"] = "NO_PHONE_DELIVERABILITY_STATUS";
|
|
1692
|
+
PhoneDeliverabilityStatus2["NOT_SET"] = "NOT_SET";
|
|
1693
|
+
PhoneDeliverabilityStatus2["VALID"] = "VALID";
|
|
1694
|
+
PhoneDeliverabilityStatus2["INVALID"] = "INVALID";
|
|
1695
|
+
return PhoneDeliverabilityStatus2;
|
|
1696
|
+
})(PhoneDeliverabilityStatus || {});
|
|
1697
|
+
var AddressTag = /* @__PURE__ */ ((AddressTag2) => {
|
|
1698
|
+
AddressTag2["OTHER"] = "OTHER";
|
|
1699
|
+
AddressTag2["HOME"] = "HOME";
|
|
1700
|
+
AddressTag2["WORK"] = "WORK";
|
|
1701
|
+
AddressTag2["BILLING"] = "BILLING";
|
|
1702
|
+
AddressTag2["SHIPPING"] = "SHIPPING";
|
|
1703
|
+
return AddressTag2;
|
|
1704
|
+
})(AddressTag || {});
|
|
1705
|
+
var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
|
|
1706
|
+
SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
1707
|
+
SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
1708
|
+
SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
1709
|
+
SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
1710
|
+
SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
1711
|
+
SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
1712
|
+
SubdivisionType2["COUNTRY"] = "COUNTRY";
|
|
1713
|
+
return SubdivisionType2;
|
|
1714
|
+
})(SubdivisionType || {});
|
|
1715
|
+
var MemberStatus = /* @__PURE__ */ ((MemberStatus2) => {
|
|
1716
|
+
MemberStatus2["PENDING"] = "PENDING";
|
|
1717
|
+
MemberStatus2["ACTIVE"] = "ACTIVE";
|
|
1718
|
+
MemberStatus2["BLOCKED"] = "BLOCKED";
|
|
1719
|
+
MemberStatus2["OFFLINE"] = "OFFLINE";
|
|
1720
|
+
return MemberStatus2;
|
|
1721
|
+
})(MemberStatus || {});
|
|
1722
|
+
var PrivacyStatus = /* @__PURE__ */ ((PrivacyStatus2) => {
|
|
1723
|
+
PrivacyStatus2["PRIVATE"] = "PRIVATE";
|
|
1724
|
+
PrivacyStatus2["PUBLIC"] = "PUBLIC";
|
|
1725
|
+
return PrivacyStatus2;
|
|
1726
|
+
})(PrivacyStatus || {});
|
|
1727
|
+
var Role = /* @__PURE__ */ ((Role2) => {
|
|
1728
|
+
Role2["OWNER"] = "OWNER";
|
|
1729
|
+
Role2["CONTRIBUTOR"] = "CONTRIBUTOR";
|
|
1730
|
+
Role2["MEMBER"] = "MEMBER";
|
|
1731
|
+
return Role2;
|
|
1732
|
+
})(Role || {});
|
|
1733
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
1734
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
1735
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
1736
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
1737
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
1738
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
1739
|
+
return WebhookIdentityType2;
|
|
1740
|
+
})(WebhookIdentityType || {});
|
|
1741
|
+
var Mode = /* @__PURE__ */ ((Mode2) => {
|
|
1742
|
+
Mode2["OR"] = "OR";
|
|
1743
|
+
Mode2["AND"] = "AND";
|
|
1744
|
+
return Mode2;
|
|
1745
|
+
})(Mode || {});
|
|
1746
|
+
var V5SubscriptionStatus = /* @__PURE__ */ ((V5SubscriptionStatus2) => {
|
|
1747
|
+
V5SubscriptionStatus2["NOT_SET"] = "NOT_SET";
|
|
1748
|
+
V5SubscriptionStatus2["SUBSCRIBED"] = "SUBSCRIBED";
|
|
1749
|
+
V5SubscriptionStatus2["UNSUBSCRIBED"] = "UNSUBSCRIBED";
|
|
1750
|
+
return V5SubscriptionStatus2;
|
|
1751
|
+
})(V5SubscriptionStatus || {});
|
|
1752
|
+
var MatchType = /* @__PURE__ */ ((MatchType2) => {
|
|
1753
|
+
MatchType2["EMAIL"] = "EMAIL";
|
|
1754
|
+
MatchType2["PHONE"] = "PHONE";
|
|
1755
|
+
MatchType2["EXTERNAL_ID"] = "EXTERNAL_ID";
|
|
1756
|
+
MatchType2["EMAIL_AND_PHONE"] = "EMAIL_AND_PHONE";
|
|
1757
|
+
return MatchType2;
|
|
1758
|
+
})(MatchType || {});
|
|
1759
|
+
var UpsertMode = /* @__PURE__ */ ((UpsertMode2) => {
|
|
1760
|
+
UpsertMode2["OVERWRITE"] = "OVERWRITE";
|
|
1761
|
+
UpsertMode2["APPEND"] = "APPEND";
|
|
1762
|
+
UpsertMode2["OVERWRITE_APPEND_ARRAYS"] = "OVERWRITE_APPEND_ARRAYS";
|
|
1763
|
+
return UpsertMode2;
|
|
1764
|
+
})(UpsertMode || {});
|
|
1765
|
+
var UpsertContactResponseAction = /* @__PURE__ */ ((UpsertContactResponseAction2) => {
|
|
1766
|
+
UpsertContactResponseAction2["UPDATED"] = "UPDATED";
|
|
1767
|
+
UpsertContactResponseAction2["CREATED"] = "CREATED";
|
|
1768
|
+
return UpsertContactResponseAction2;
|
|
1769
|
+
})(UpsertContactResponseAction || {});
|
|
1770
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
1771
|
+
SortOrder2["ASC"] = "ASC";
|
|
1772
|
+
SortOrder2["DESC"] = "DESC";
|
|
1773
|
+
return SortOrder2;
|
|
1774
|
+
})(SortOrder || {});
|
|
1775
|
+
var SortType = /* @__PURE__ */ ((SortType2) => {
|
|
1776
|
+
SortType2["COUNT"] = "COUNT";
|
|
1777
|
+
SortType2["VALUE"] = "VALUE";
|
|
1778
|
+
return SortType2;
|
|
1779
|
+
})(SortType || {});
|
|
1780
|
+
var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
|
|
1781
|
+
SortDirection2["DESC"] = "DESC";
|
|
1782
|
+
SortDirection2["ASC"] = "ASC";
|
|
1783
|
+
return SortDirection2;
|
|
1784
|
+
})(SortDirection || {});
|
|
1785
|
+
var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
|
|
1786
|
+
MissingValues2["EXCLUDE"] = "EXCLUDE";
|
|
1787
|
+
MissingValues2["INCLUDE"] = "INCLUDE";
|
|
1788
|
+
return MissingValues2;
|
|
1789
|
+
})(MissingValues || {});
|
|
1790
|
+
var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
|
|
1791
|
+
ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
|
|
1792
|
+
ScalarType2["MIN"] = "MIN";
|
|
1793
|
+
ScalarType2["MAX"] = "MAX";
|
|
1794
|
+
return ScalarType2;
|
|
1795
|
+
})(ScalarType || {});
|
|
1796
|
+
var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
|
|
1797
|
+
NestedAggregationType2["VALUE"] = "VALUE";
|
|
1798
|
+
NestedAggregationType2["RANGE"] = "RANGE";
|
|
1799
|
+
NestedAggregationType2["SCALAR"] = "SCALAR";
|
|
1800
|
+
NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
|
|
1801
|
+
return NestedAggregationType2;
|
|
1802
|
+
})(NestedAggregationType || {});
|
|
1803
|
+
var Interval = /* @__PURE__ */ ((Interval2) => {
|
|
1804
|
+
Interval2["YEAR"] = "YEAR";
|
|
1805
|
+
Interval2["MONTH"] = "MONTH";
|
|
1806
|
+
Interval2["WEEK"] = "WEEK";
|
|
1807
|
+
Interval2["DAY"] = "DAY";
|
|
1808
|
+
Interval2["HOUR"] = "HOUR";
|
|
1809
|
+
Interval2["MINUTE"] = "MINUTE";
|
|
1810
|
+
Interval2["SECOND"] = "SECOND";
|
|
1811
|
+
return Interval2;
|
|
1812
|
+
})(Interval || {});
|
|
1813
|
+
var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
|
|
1814
|
+
AggregationType2["VALUE"] = "VALUE";
|
|
1815
|
+
AggregationType2["RANGE"] = "RANGE";
|
|
1816
|
+
AggregationType2["SCALAR"] = "SCALAR";
|
|
1817
|
+
AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
|
|
1818
|
+
AggregationType2["NESTED"] = "NESTED";
|
|
1819
|
+
return AggregationType2;
|
|
1820
|
+
})(AggregationType || {});
|
|
1821
|
+
var NameFormat = /* @__PURE__ */ ((NameFormat2) => {
|
|
1822
|
+
NameFormat2["BY_FIRST_NAME"] = "BY_FIRST_NAME";
|
|
1823
|
+
NameFormat2["BY_LAST_NAME"] = "BY_LAST_NAME";
|
|
1824
|
+
return NameFormat2;
|
|
1825
|
+
})(NameFormat || {});
|
|
1826
|
+
var Action = /* @__PURE__ */ ((Action2) => {
|
|
1827
|
+
Action2["UNKNOWN_ACTION"] = "UNKNOWN_ACTION";
|
|
1828
|
+
Action2["UPDATED"] = "UPDATED";
|
|
1829
|
+
Action2["CREATED"] = "CREATED";
|
|
1830
|
+
return Action2;
|
|
1831
|
+
})(Action || {});
|
|
1832
|
+
var QueryContactsByOffsetInternalRequestNameFormat = /* @__PURE__ */ ((QueryContactsByOffsetInternalRequestNameFormat2) => {
|
|
1833
|
+
QueryContactsByOffsetInternalRequestNameFormat2["BY_FIRST_NAME"] = "BY_FIRST_NAME";
|
|
1834
|
+
QueryContactsByOffsetInternalRequestNameFormat2["BY_LAST_NAME"] = "BY_LAST_NAME";
|
|
1835
|
+
return QueryContactsByOffsetInternalRequestNameFormat2;
|
|
1836
|
+
})(QueryContactsByOffsetInternalRequestNameFormat || {});
|
|
1837
|
+
var ImageUploadStatus = /* @__PURE__ */ ((ImageUploadStatus2) => {
|
|
1838
|
+
ImageUploadStatus2["IN_PROGRESS"] = "IN_PROGRESS";
|
|
1839
|
+
ImageUploadStatus2["SUCCESS"] = "SUCCESS";
|
|
1840
|
+
ImageUploadStatus2["FAILURE"] = "FAILURE";
|
|
1841
|
+
return ImageUploadStatus2;
|
|
1842
|
+
})(ImageUploadStatus || {});
|
|
1843
|
+
async function bulkUpdateContactSubscriptions2(filter, options) {
|
|
1844
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1845
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1846
|
+
filter,
|
|
1847
|
+
search: options?.search,
|
|
1848
|
+
emailSubscriptionStatus: options?.emailSubscriptionStatus,
|
|
1849
|
+
phoneSubscriptionStatus: options?.phoneSubscriptionStatus
|
|
1850
|
+
});
|
|
1851
|
+
const reqOpts = bulkUpdateContactSubscriptions(payload);
|
|
1852
|
+
sideEffects?.onSiteCall?.();
|
|
1853
|
+
try {
|
|
1854
|
+
const result = await httpClient.request(reqOpts);
|
|
1855
|
+
sideEffects?.onSuccess?.(result);
|
|
1856
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1857
|
+
} catch (err) {
|
|
1858
|
+
const transformedError = sdkTransformError(
|
|
1859
|
+
err,
|
|
1860
|
+
{
|
|
1861
|
+
spreadPathsToArguments: {},
|
|
1862
|
+
explicitPathsToArguments: {
|
|
1863
|
+
filter: "$[0]",
|
|
1864
|
+
search: "$[1].search",
|
|
1865
|
+
emailSubscriptionStatus: "$[1].emailSubscriptionStatus",
|
|
1866
|
+
phoneSubscriptionStatus: "$[1].phoneSubscriptionStatus"
|
|
1867
|
+
},
|
|
1868
|
+
singleArgumentUnchanged: false
|
|
1869
|
+
},
|
|
1870
|
+
["filter", "options"]
|
|
1871
|
+
);
|
|
1872
|
+
sideEffects?.onError?.(err);
|
|
1873
|
+
throw transformedError;
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
async function createContact2(contact, options) {
|
|
1877
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1878
|
+
const payload = transformPaths2(
|
|
1879
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
1880
|
+
contact,
|
|
1881
|
+
allowDuplicates: options?.allowDuplicates
|
|
1882
|
+
}),
|
|
1883
|
+
[
|
|
1884
|
+
{
|
|
1885
|
+
transformFn: transformSDKImageToRESTImage,
|
|
1886
|
+
paths: [
|
|
1887
|
+
{ path: "contact.image" },
|
|
1888
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
1889
|
+
]
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
1893
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
1894
|
+
}
|
|
1895
|
+
]
|
|
1896
|
+
);
|
|
1897
|
+
const reqOpts = createContact(payload);
|
|
1898
|
+
sideEffects?.onSiteCall?.();
|
|
1899
|
+
try {
|
|
1900
|
+
const result = await httpClient.request(reqOpts);
|
|
1901
|
+
sideEffects?.onSuccess?.(result);
|
|
1902
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1903
|
+
transformPaths2(result.data, [
|
|
1904
|
+
{
|
|
1905
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1906
|
+
paths: [
|
|
1907
|
+
{ path: "contact.image" },
|
|
1908
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
1909
|
+
]
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1913
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
1914
|
+
}
|
|
1915
|
+
])
|
|
1916
|
+
)?.contact;
|
|
1917
|
+
} catch (err) {
|
|
1918
|
+
const transformedError = sdkTransformError(
|
|
1919
|
+
err,
|
|
1920
|
+
{
|
|
1921
|
+
spreadPathsToArguments: {},
|
|
1922
|
+
explicitPathsToArguments: {
|
|
1923
|
+
contact: "$[0]",
|
|
1924
|
+
allowDuplicates: "$[1].allowDuplicates"
|
|
1925
|
+
},
|
|
1926
|
+
singleArgumentUnchanged: false
|
|
1927
|
+
},
|
|
1928
|
+
["contact", "options"]
|
|
1929
|
+
);
|
|
1930
|
+
sideEffects?.onError?.(err);
|
|
1931
|
+
throw transformedError;
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
async function getContact2(contactId) {
|
|
1935
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1936
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1937
|
+
contactId
|
|
1938
|
+
});
|
|
1939
|
+
const reqOpts = getContact(payload);
|
|
1940
|
+
sideEffects?.onSiteCall?.();
|
|
1941
|
+
try {
|
|
1942
|
+
const result = await httpClient.request(reqOpts);
|
|
1943
|
+
sideEffects?.onSuccess?.(result);
|
|
1944
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1945
|
+
transformPaths2(result.data, [
|
|
1946
|
+
{
|
|
1947
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1948
|
+
paths: [
|
|
1949
|
+
{ path: "contact.image" },
|
|
1950
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
1951
|
+
]
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1955
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
1956
|
+
}
|
|
1957
|
+
])
|
|
1958
|
+
)?.contact;
|
|
1959
|
+
} catch (err) {
|
|
1960
|
+
const transformedError = sdkTransformError(
|
|
1961
|
+
err,
|
|
1962
|
+
{
|
|
1963
|
+
spreadPathsToArguments: {},
|
|
1964
|
+
explicitPathsToArguments: { contactId: "$[0]" },
|
|
1965
|
+
singleArgumentUnchanged: false
|
|
1966
|
+
},
|
|
1967
|
+
["contactId"]
|
|
1968
|
+
);
|
|
1969
|
+
sideEffects?.onError?.(err);
|
|
1970
|
+
throw transformedError;
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
async function updateContact2(_id, contact, options) {
|
|
1974
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1975
|
+
const payload = transformPaths2(
|
|
1976
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
1977
|
+
contact: { ...contact, id: _id },
|
|
1978
|
+
allowDuplicates: options?.allowDuplicates
|
|
1979
|
+
}),
|
|
1980
|
+
[
|
|
1981
|
+
{
|
|
1982
|
+
transformFn: transformSDKImageToRESTImage,
|
|
1983
|
+
paths: [
|
|
1984
|
+
{ path: "contact.image" },
|
|
1985
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
1986
|
+
]
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
1990
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
1991
|
+
}
|
|
1992
|
+
]
|
|
1993
|
+
);
|
|
1994
|
+
const reqOpts = updateContact(payload);
|
|
1995
|
+
sideEffects?.onSiteCall?.();
|
|
1996
|
+
try {
|
|
1997
|
+
const result = await httpClient.request(reqOpts);
|
|
1998
|
+
sideEffects?.onSuccess?.(result);
|
|
1999
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2000
|
+
transformPaths2(result.data, [
|
|
2001
|
+
{
|
|
2002
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2003
|
+
paths: [
|
|
2004
|
+
{ path: "contact.image" },
|
|
2005
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2006
|
+
]
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2010
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2011
|
+
}
|
|
2012
|
+
])
|
|
2013
|
+
)?.contact;
|
|
2014
|
+
} catch (err) {
|
|
2015
|
+
const transformedError = sdkTransformError(
|
|
2016
|
+
err,
|
|
2017
|
+
{
|
|
2018
|
+
spreadPathsToArguments: { contact: "$[1]" },
|
|
2019
|
+
explicitPathsToArguments: {
|
|
2020
|
+
"contact.id": "$[0]",
|
|
2021
|
+
allowDuplicates: "$[2].allowDuplicates"
|
|
2022
|
+
},
|
|
2023
|
+
singleArgumentUnchanged: false
|
|
2024
|
+
},
|
|
2025
|
+
["_id", "contact", "options"]
|
|
2026
|
+
);
|
|
2027
|
+
sideEffects?.onError?.(err);
|
|
2028
|
+
throw transformedError;
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
async function upsertContact2(contact, options) {
|
|
2032
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2033
|
+
const payload = transformPaths2(
|
|
2034
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2035
|
+
contact,
|
|
2036
|
+
upsertMode: options?.upsertMode,
|
|
2037
|
+
updateMember: options?.updateMember
|
|
2038
|
+
}),
|
|
2039
|
+
[
|
|
2040
|
+
{
|
|
2041
|
+
transformFn: transformSDKImageToRESTImage,
|
|
2042
|
+
paths: [
|
|
2043
|
+
{ path: "contact.image" },
|
|
2044
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2045
|
+
]
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2049
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2050
|
+
}
|
|
2051
|
+
]
|
|
2052
|
+
);
|
|
2053
|
+
const reqOpts = upsertContact(payload);
|
|
2054
|
+
sideEffects?.onSiteCall?.();
|
|
2055
|
+
try {
|
|
2056
|
+
const result = await httpClient.request(reqOpts);
|
|
2057
|
+
sideEffects?.onSuccess?.(result);
|
|
2058
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2059
|
+
transformPaths2(result.data, [
|
|
2060
|
+
{
|
|
2061
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2062
|
+
paths: [
|
|
2063
|
+
{ path: "contact.image" },
|
|
2064
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2065
|
+
]
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2069
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2070
|
+
}
|
|
2071
|
+
])
|
|
2072
|
+
);
|
|
2073
|
+
} catch (err) {
|
|
2074
|
+
const transformedError = sdkTransformError(
|
|
2075
|
+
err,
|
|
2076
|
+
{
|
|
2077
|
+
spreadPathsToArguments: {},
|
|
2078
|
+
explicitPathsToArguments: {
|
|
2079
|
+
contact: "$[0]",
|
|
2080
|
+
upsertMode: "$[1].upsertMode",
|
|
2081
|
+
updateMember: "$[1].updateMember"
|
|
2082
|
+
},
|
|
2083
|
+
singleArgumentUnchanged: false
|
|
2084
|
+
},
|
|
2085
|
+
["contact", "options"]
|
|
2086
|
+
);
|
|
2087
|
+
sideEffects?.onError?.(err);
|
|
2088
|
+
throw transformedError;
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
async function updateContactTags2(contactId, options) {
|
|
2092
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2093
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2094
|
+
contactId,
|
|
2095
|
+
assignTags: options?.assignTags,
|
|
2096
|
+
unassignTags: options?.unassignTags
|
|
2097
|
+
});
|
|
2098
|
+
const reqOpts = updateContactTags(payload);
|
|
2099
|
+
sideEffects?.onSiteCall?.();
|
|
2100
|
+
try {
|
|
2101
|
+
const result = await httpClient.request(reqOpts);
|
|
2102
|
+
sideEffects?.onSuccess?.(result);
|
|
2103
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2104
|
+
transformPaths2(result.data, [
|
|
2105
|
+
{
|
|
2106
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2107
|
+
paths: [
|
|
2108
|
+
{ path: "contact.image" },
|
|
2109
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2110
|
+
]
|
|
2111
|
+
},
|
|
2112
|
+
{
|
|
2113
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2114
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2115
|
+
}
|
|
2116
|
+
])
|
|
2117
|
+
);
|
|
2118
|
+
} catch (err) {
|
|
2119
|
+
const transformedError = sdkTransformError(
|
|
2120
|
+
err,
|
|
2121
|
+
{
|
|
2122
|
+
spreadPathsToArguments: {},
|
|
2123
|
+
explicitPathsToArguments: {
|
|
2124
|
+
contactId: "$[0]",
|
|
2125
|
+
assignTags: "$[1].assignTags",
|
|
2126
|
+
unassignTags: "$[1].unassignTags"
|
|
2127
|
+
},
|
|
2128
|
+
singleArgumentUnchanged: false
|
|
2129
|
+
},
|
|
2130
|
+
["contactId", "options"]
|
|
2131
|
+
);
|
|
2132
|
+
sideEffects?.onError?.(err);
|
|
2133
|
+
throw transformedError;
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
async function mergeContacts2(targetContactId, targetContactRevision, options) {
|
|
2137
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2138
|
+
const payload = transformPaths2(
|
|
2139
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2140
|
+
targetContactId,
|
|
2141
|
+
targetContactRevision,
|
|
2142
|
+
targetContact: options?.targetContact,
|
|
2143
|
+
sourceContactIds: options?.sourceContactIds,
|
|
2144
|
+
preview: options?.preview,
|
|
2145
|
+
allowDuplicates: options?.allowDuplicates
|
|
2146
|
+
}),
|
|
2147
|
+
[
|
|
2148
|
+
{
|
|
2149
|
+
transformFn: transformSDKImageToRESTImage,
|
|
2150
|
+
paths: [
|
|
2151
|
+
{ path: "targetContact.image" },
|
|
2152
|
+
{ path: "targetContact.memberInfo.profileInfo.photo" }
|
|
2153
|
+
]
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2157
|
+
paths: [{ path: "targetContact.addresses.address" }]
|
|
2158
|
+
}
|
|
2159
|
+
]
|
|
2160
|
+
);
|
|
2161
|
+
const reqOpts = mergeContacts(payload);
|
|
2162
|
+
sideEffects?.onSiteCall?.();
|
|
2163
|
+
try {
|
|
2164
|
+
const result = await httpClient.request(reqOpts);
|
|
2165
|
+
sideEffects?.onSuccess?.(result);
|
|
2166
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2167
|
+
transformPaths2(result.data, [
|
|
2168
|
+
{
|
|
2169
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2170
|
+
paths: [
|
|
2171
|
+
{ path: "contact.image" },
|
|
2172
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2173
|
+
]
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2177
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2178
|
+
}
|
|
2179
|
+
])
|
|
2180
|
+
);
|
|
2181
|
+
} catch (err) {
|
|
2182
|
+
const transformedError = sdkTransformError(
|
|
2183
|
+
err,
|
|
2184
|
+
{
|
|
2185
|
+
spreadPathsToArguments: {},
|
|
2186
|
+
explicitPathsToArguments: {
|
|
2187
|
+
targetContactId: "$[0]",
|
|
2188
|
+
targetContactRevision: "$[1]",
|
|
2189
|
+
targetContact: "$[2].targetContact",
|
|
2190
|
+
sourceContactIds: "$[2].sourceContactIds",
|
|
2191
|
+
preview: "$[2].preview",
|
|
2192
|
+
allowDuplicates: "$[2].allowDuplicates"
|
|
2193
|
+
},
|
|
2194
|
+
singleArgumentUnchanged: false
|
|
2195
|
+
},
|
|
2196
|
+
["targetContactId", "targetContactRevision", "options"]
|
|
2197
|
+
);
|
|
2198
|
+
sideEffects?.onError?.(err);
|
|
2199
|
+
throw transformedError;
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
async function deleteContact2(contactId, options) {
|
|
2203
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2204
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2205
|
+
contactId,
|
|
2206
|
+
deleteMember: options?.deleteMember
|
|
2207
|
+
});
|
|
2208
|
+
const reqOpts = deleteContact(payload);
|
|
2209
|
+
sideEffects?.onSiteCall?.();
|
|
2210
|
+
try {
|
|
2211
|
+
const result = await httpClient.request(reqOpts);
|
|
2212
|
+
sideEffects?.onSuccess?.(result);
|
|
2213
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2214
|
+
} catch (err) {
|
|
2215
|
+
const transformedError = sdkTransformError(
|
|
2216
|
+
err,
|
|
2217
|
+
{
|
|
2218
|
+
spreadPathsToArguments: {},
|
|
2219
|
+
explicitPathsToArguments: {
|
|
2220
|
+
contactId: "$[0]",
|
|
2221
|
+
deleteMember: "$[1].deleteMember"
|
|
2222
|
+
},
|
|
2223
|
+
singleArgumentUnchanged: false
|
|
2224
|
+
},
|
|
2225
|
+
["contactId", "options"]
|
|
2226
|
+
);
|
|
2227
|
+
sideEffects?.onError?.(err);
|
|
2228
|
+
throw transformedError;
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
async function findMatchingContacts2(options) {
|
|
2232
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2233
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2234
|
+
externalId: options?.externalId,
|
|
2235
|
+
email: options?.email,
|
|
2236
|
+
phone: options?.phone
|
|
2237
|
+
});
|
|
2238
|
+
const reqOpts = findMatchingContacts(payload);
|
|
2239
|
+
sideEffects?.onSiteCall?.();
|
|
2240
|
+
try {
|
|
2241
|
+
const result = await httpClient.request(reqOpts);
|
|
2242
|
+
sideEffects?.onSuccess?.(result);
|
|
2243
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2244
|
+
transformPaths2(result.data, [
|
|
2245
|
+
{
|
|
2246
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2247
|
+
paths: [
|
|
2248
|
+
{ path: "contacts.image" },
|
|
2249
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
2250
|
+
]
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2254
|
+
paths: [{ path: "contacts.addresses.address" }]
|
|
2255
|
+
}
|
|
2256
|
+
])
|
|
2257
|
+
);
|
|
2258
|
+
} catch (err) {
|
|
2259
|
+
const transformedError = sdkTransformError(
|
|
2260
|
+
err,
|
|
2261
|
+
{
|
|
2262
|
+
spreadPathsToArguments: {},
|
|
2263
|
+
explicitPathsToArguments: {
|
|
2264
|
+
externalId: "$[0].externalId",
|
|
2265
|
+
email: "$[0].email",
|
|
2266
|
+
phone: "$[0].phone"
|
|
2267
|
+
},
|
|
2268
|
+
singleArgumentUnchanged: false
|
|
2269
|
+
},
|
|
2270
|
+
["options"]
|
|
2271
|
+
);
|
|
2272
|
+
sideEffects?.onError?.(err);
|
|
2273
|
+
throw transformedError;
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
function queryContacts2() {
|
|
2277
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
2278
|
+
return queryBuilder({
|
|
2279
|
+
func: async (payload) => {
|
|
2280
|
+
const reqOpts = queryContacts(payload);
|
|
2281
|
+
sideEffects?.onSiteCall?.();
|
|
2282
|
+
try {
|
|
2283
|
+
const result = await httpClient.request(reqOpts);
|
|
2284
|
+
sideEffects?.onSuccess?.(result);
|
|
2285
|
+
return result;
|
|
2286
|
+
} catch (err) {
|
|
2287
|
+
sideEffects?.onError?.(err);
|
|
2288
|
+
throw err;
|
|
2289
|
+
}
|
|
2290
|
+
},
|
|
2291
|
+
requestTransformer: (query) => {
|
|
2292
|
+
const args = [query, {}];
|
|
2293
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
2294
|
+
...args?.[1],
|
|
2295
|
+
query: args?.[0]
|
|
2296
|
+
});
|
|
2297
|
+
},
|
|
2298
|
+
responseTransformer: ({ data }) => {
|
|
2299
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
2300
|
+
transformPaths2(data, [
|
|
2301
|
+
{
|
|
2302
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2303
|
+
paths: [
|
|
2304
|
+
{ path: "contacts.image" },
|
|
2305
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
2306
|
+
]
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2310
|
+
paths: [{ path: "contacts.addresses.address" }]
|
|
2311
|
+
}
|
|
2312
|
+
])
|
|
2313
|
+
);
|
|
2314
|
+
return {
|
|
2315
|
+
items: transformedData?.contacts,
|
|
2316
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
2317
|
+
};
|
|
2318
|
+
},
|
|
2319
|
+
errorTransformer: (err) => {
|
|
2320
|
+
const transformedError = sdkTransformError(err, {
|
|
2321
|
+
spreadPathsToArguments: {},
|
|
2322
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
2323
|
+
singleArgumentUnchanged: false
|
|
2324
|
+
});
|
|
2325
|
+
throw transformedError;
|
|
2326
|
+
},
|
|
2327
|
+
pagingMethod: "CURSOR",
|
|
2328
|
+
transformationPaths: {}
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
async function typedQueryContacts(query) {
|
|
2332
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2333
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
2334
|
+
const reqOpts = queryContacts(payload);
|
|
2335
|
+
sideEffects?.onSiteCall?.();
|
|
2336
|
+
try {
|
|
2337
|
+
const result = await httpClient.request(reqOpts);
|
|
2338
|
+
sideEffects?.onSuccess?.(result);
|
|
2339
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2340
|
+
transformPaths2(result.data, [
|
|
2341
|
+
{
|
|
2342
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2343
|
+
paths: [
|
|
2344
|
+
{ path: "contacts.image" },
|
|
2345
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
2346
|
+
]
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2350
|
+
paths: [{ path: "contacts.addresses.address" }]
|
|
2351
|
+
}
|
|
2352
|
+
])
|
|
2353
|
+
);
|
|
2354
|
+
} catch (err) {
|
|
2355
|
+
const transformedError = sdkTransformError(
|
|
2356
|
+
err,
|
|
2357
|
+
{
|
|
2358
|
+
spreadPathsToArguments: {},
|
|
2359
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
2360
|
+
singleArgumentUnchanged: false
|
|
2361
|
+
},
|
|
2362
|
+
["query"]
|
|
2363
|
+
);
|
|
2364
|
+
sideEffects?.onError?.(err);
|
|
2365
|
+
throw transformedError;
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
var utils = {
|
|
2369
|
+
query: {
|
|
2370
|
+
...createQueryUtils()
|
|
2371
|
+
},
|
|
2372
|
+
search: {
|
|
2373
|
+
...createSearchUtils()
|
|
2374
|
+
}
|
|
2375
|
+
};
|
|
2376
|
+
async function searchContacts2(search, options) {
|
|
2377
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2378
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2379
|
+
search,
|
|
2380
|
+
nameFormat: options?.nameFormat
|
|
2381
|
+
});
|
|
2382
|
+
const reqOpts = searchContacts(payload);
|
|
2383
|
+
sideEffects?.onSiteCall?.();
|
|
2384
|
+
try {
|
|
2385
|
+
const result = await httpClient.request(reqOpts);
|
|
2386
|
+
sideEffects?.onSuccess?.(result);
|
|
2387
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2388
|
+
transformPaths2(result.data, [
|
|
2389
|
+
{
|
|
2390
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2391
|
+
paths: [
|
|
2392
|
+
{ path: "contacts.image" },
|
|
2393
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
2394
|
+
]
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2398
|
+
paths: [{ path: "contacts.addresses.address" }]
|
|
2399
|
+
}
|
|
2400
|
+
])
|
|
2401
|
+
);
|
|
2402
|
+
} catch (err) {
|
|
2403
|
+
const transformedError = sdkTransformError(
|
|
2404
|
+
err,
|
|
2405
|
+
{
|
|
2406
|
+
spreadPathsToArguments: {},
|
|
2407
|
+
explicitPathsToArguments: {
|
|
2408
|
+
search: "$[0]",
|
|
2409
|
+
nameFormat: "$[1].nameFormat"
|
|
2410
|
+
},
|
|
2411
|
+
singleArgumentUnchanged: false
|
|
2412
|
+
},
|
|
2413
|
+
["search", "options"]
|
|
2414
|
+
);
|
|
2415
|
+
sideEffects?.onError?.(err);
|
|
2416
|
+
throw transformedError;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
async function countContacts2(options) {
|
|
2420
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2421
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2422
|
+
filter: options?.filter,
|
|
2423
|
+
search: options?.search
|
|
2424
|
+
});
|
|
2425
|
+
const reqOpts = countContacts(payload);
|
|
2426
|
+
sideEffects?.onSiteCall?.();
|
|
2427
|
+
try {
|
|
2428
|
+
const result = await httpClient.request(reqOpts);
|
|
2429
|
+
sideEffects?.onSuccess?.(result);
|
|
2430
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2431
|
+
} catch (err) {
|
|
2432
|
+
const transformedError = sdkTransformError(
|
|
2433
|
+
err,
|
|
2434
|
+
{
|
|
2435
|
+
spreadPathsToArguments: {},
|
|
2436
|
+
explicitPathsToArguments: {
|
|
2437
|
+
filter: "$[0].filter",
|
|
2438
|
+
search: "$[0].search"
|
|
2439
|
+
},
|
|
2440
|
+
singleArgumentUnchanged: false
|
|
2441
|
+
},
|
|
2442
|
+
["options"]
|
|
2443
|
+
);
|
|
2444
|
+
sideEffects?.onError?.(err);
|
|
2445
|
+
throw transformedError;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
async function generateContactImageUploadUrl2(contactId, options) {
|
|
2449
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2450
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2451
|
+
contactId,
|
|
2452
|
+
mimeType: options?.mimeType
|
|
2453
|
+
});
|
|
2454
|
+
const reqOpts = generateContactImageUploadUrl(payload);
|
|
2455
|
+
sideEffects?.onSiteCall?.();
|
|
2456
|
+
try {
|
|
2457
|
+
const result = await httpClient.request(reqOpts);
|
|
2458
|
+
sideEffects?.onSuccess?.(result);
|
|
2459
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2460
|
+
} catch (err) {
|
|
2461
|
+
const transformedError = sdkTransformError(
|
|
2462
|
+
err,
|
|
2463
|
+
{
|
|
2464
|
+
spreadPathsToArguments: {},
|
|
2465
|
+
explicitPathsToArguments: {
|
|
2466
|
+
contactId: "$[0]",
|
|
2467
|
+
mimeType: "$[1].mimeType"
|
|
2468
|
+
},
|
|
2469
|
+
singleArgumentUnchanged: false
|
|
2470
|
+
},
|
|
2471
|
+
["contactId", "options"]
|
|
2472
|
+
);
|
|
2473
|
+
sideEffects?.onError?.(err);
|
|
2474
|
+
throw transformedError;
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
async function addContactAdditionalEmail2(contactId, email, options) {
|
|
2478
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2479
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2480
|
+
contactId,
|
|
2481
|
+
email,
|
|
2482
|
+
revision: options?.revision
|
|
2483
|
+
});
|
|
2484
|
+
const reqOpts = addContactAdditionalEmail(payload);
|
|
2485
|
+
sideEffects?.onSiteCall?.();
|
|
2486
|
+
try {
|
|
2487
|
+
const result = await httpClient.request(reqOpts);
|
|
2488
|
+
sideEffects?.onSuccess?.(result);
|
|
2489
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2490
|
+
transformPaths2(result.data, [
|
|
2491
|
+
{
|
|
2492
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2493
|
+
paths: [
|
|
2494
|
+
{ path: "contact.image" },
|
|
2495
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2496
|
+
]
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2500
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2501
|
+
}
|
|
2502
|
+
])
|
|
2503
|
+
);
|
|
2504
|
+
} catch (err) {
|
|
2505
|
+
const transformedError = sdkTransformError(
|
|
2506
|
+
err,
|
|
2507
|
+
{
|
|
2508
|
+
spreadPathsToArguments: {},
|
|
2509
|
+
explicitPathsToArguments: {
|
|
2510
|
+
contactId: "$[0]",
|
|
2511
|
+
email: "$[1]",
|
|
2512
|
+
revision: "$[2].revision"
|
|
2513
|
+
},
|
|
2514
|
+
singleArgumentUnchanged: false
|
|
2515
|
+
},
|
|
2516
|
+
["contactId", "email", "options"]
|
|
2517
|
+
);
|
|
2518
|
+
sideEffects?.onError?.(err);
|
|
2519
|
+
throw transformedError;
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
async function addContactAdditionalPhone2(contactId, phone, options) {
|
|
2523
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2524
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2525
|
+
contactId,
|
|
2526
|
+
phone,
|
|
2527
|
+
revision: options?.revision
|
|
2528
|
+
});
|
|
2529
|
+
const reqOpts = addContactAdditionalPhone(payload);
|
|
2530
|
+
sideEffects?.onSiteCall?.();
|
|
2531
|
+
try {
|
|
2532
|
+
const result = await httpClient.request(reqOpts);
|
|
2533
|
+
sideEffects?.onSuccess?.(result);
|
|
2534
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2535
|
+
transformPaths2(result.data, [
|
|
2536
|
+
{
|
|
2537
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2538
|
+
paths: [
|
|
2539
|
+
{ path: "contact.image" },
|
|
2540
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2541
|
+
]
|
|
2542
|
+
},
|
|
2543
|
+
{
|
|
2544
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2545
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2546
|
+
}
|
|
2547
|
+
])
|
|
2548
|
+
);
|
|
2549
|
+
} catch (err) {
|
|
2550
|
+
const transformedError = sdkTransformError(
|
|
2551
|
+
err,
|
|
2552
|
+
{
|
|
2553
|
+
spreadPathsToArguments: {},
|
|
2554
|
+
explicitPathsToArguments: {
|
|
2555
|
+
contactId: "$[0]",
|
|
2556
|
+
phone: "$[1]",
|
|
2557
|
+
revision: "$[2].revision"
|
|
2558
|
+
},
|
|
2559
|
+
singleArgumentUnchanged: false
|
|
2560
|
+
},
|
|
2561
|
+
["contactId", "phone", "options"]
|
|
2562
|
+
);
|
|
2563
|
+
sideEffects?.onError?.(err);
|
|
2564
|
+
throw transformedError;
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
async function addContactAddress2(contactId, address, options) {
|
|
2568
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2569
|
+
const payload = transformPaths2(
|
|
2570
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2571
|
+
contactId,
|
|
2572
|
+
address,
|
|
2573
|
+
revision: options?.revision
|
|
2574
|
+
}),
|
|
2575
|
+
[
|
|
2576
|
+
{
|
|
2577
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2578
|
+
paths: [{ path: "address.address" }]
|
|
2579
|
+
}
|
|
2580
|
+
]
|
|
2581
|
+
);
|
|
2582
|
+
const reqOpts = addContactAddress(payload);
|
|
2583
|
+
sideEffects?.onSiteCall?.();
|
|
2584
|
+
try {
|
|
2585
|
+
const result = await httpClient.request(reqOpts);
|
|
2586
|
+
sideEffects?.onSuccess?.(result);
|
|
2587
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2588
|
+
transformPaths2(result.data, [
|
|
2589
|
+
{
|
|
2590
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2591
|
+
paths: [
|
|
2592
|
+
{ path: "contact.image" },
|
|
2593
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2594
|
+
]
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2598
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2599
|
+
}
|
|
2600
|
+
])
|
|
2601
|
+
);
|
|
2602
|
+
} catch (err) {
|
|
2603
|
+
const transformedError = sdkTransformError(
|
|
2604
|
+
err,
|
|
2605
|
+
{
|
|
2606
|
+
spreadPathsToArguments: {},
|
|
2607
|
+
explicitPathsToArguments: {
|
|
2608
|
+
contactId: "$[0]",
|
|
2609
|
+
address: "$[1]",
|
|
2610
|
+
revision: "$[2].revision"
|
|
2611
|
+
},
|
|
2612
|
+
singleArgumentUnchanged: false
|
|
2613
|
+
},
|
|
2614
|
+
["contactId", "address", "options"]
|
|
2615
|
+
);
|
|
2616
|
+
sideEffects?.onError?.(err);
|
|
2617
|
+
throw transformedError;
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
async function deleteContactAddress2(identifiers, revision) {
|
|
2621
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2622
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2623
|
+
contactId: identifiers?.contactId,
|
|
2624
|
+
addressId: identifiers?.addressId,
|
|
2625
|
+
revision
|
|
2626
|
+
});
|
|
2627
|
+
const reqOpts = deleteContactAddress(payload);
|
|
2628
|
+
sideEffects?.onSiteCall?.();
|
|
2629
|
+
try {
|
|
2630
|
+
const result = await httpClient.request(reqOpts);
|
|
2631
|
+
sideEffects?.onSuccess?.(result);
|
|
2632
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2633
|
+
transformPaths2(result.data, [
|
|
2634
|
+
{
|
|
2635
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2636
|
+
paths: [
|
|
2637
|
+
{ path: "contact.image" },
|
|
2638
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2639
|
+
]
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2643
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2644
|
+
}
|
|
2645
|
+
])
|
|
2646
|
+
);
|
|
2647
|
+
} catch (err) {
|
|
2648
|
+
const transformedError = sdkTransformError(
|
|
2649
|
+
err,
|
|
2650
|
+
{
|
|
2651
|
+
spreadPathsToArguments: {},
|
|
2652
|
+
explicitPathsToArguments: {
|
|
2653
|
+
contactId: "$[0].contactId",
|
|
2654
|
+
addressId: "$[0].addressId",
|
|
2655
|
+
revision: "$[1]"
|
|
2656
|
+
},
|
|
2657
|
+
singleArgumentUnchanged: false
|
|
2658
|
+
},
|
|
2659
|
+
["identifiers", "revision"]
|
|
2660
|
+
);
|
|
2661
|
+
sideEffects?.onError?.(err);
|
|
2662
|
+
throw transformedError;
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
async function updateContactAddress2(identifiers, address, options) {
|
|
2666
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2667
|
+
const payload = transformPaths2(
|
|
2668
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2669
|
+
contactId: identifiers?.contactId,
|
|
2670
|
+
address,
|
|
2671
|
+
revision: options?.revision
|
|
2672
|
+
}),
|
|
2673
|
+
[
|
|
2674
|
+
{
|
|
2675
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2676
|
+
paths: [{ path: "address.address" }]
|
|
2677
|
+
}
|
|
2678
|
+
]
|
|
2679
|
+
);
|
|
2680
|
+
const reqOpts = updateContactAddress(payload);
|
|
2681
|
+
sideEffects?.onSiteCall?.();
|
|
2682
|
+
try {
|
|
2683
|
+
const result = await httpClient.request(reqOpts);
|
|
2684
|
+
sideEffects?.onSuccess?.(result);
|
|
2685
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2686
|
+
transformPaths2(result.data, [
|
|
2687
|
+
{
|
|
2688
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2689
|
+
paths: [
|
|
2690
|
+
{ path: "contact.image" },
|
|
2691
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
2692
|
+
]
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2696
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
2697
|
+
}
|
|
2698
|
+
])
|
|
2699
|
+
);
|
|
2700
|
+
} catch (err) {
|
|
2701
|
+
const transformedError = sdkTransformError(
|
|
2702
|
+
err,
|
|
2703
|
+
{
|
|
2704
|
+
spreadPathsToArguments: {},
|
|
2705
|
+
explicitPathsToArguments: {
|
|
2706
|
+
contactId: "$[0].contactId",
|
|
2707
|
+
address: "$[1]",
|
|
2708
|
+
revision: "$[2].revision"
|
|
2709
|
+
},
|
|
2710
|
+
singleArgumentUnchanged: false
|
|
2711
|
+
},
|
|
2712
|
+
["identifiers", "address", "options"]
|
|
2713
|
+
);
|
|
2714
|
+
sideEffects?.onError?.(err);
|
|
2715
|
+
throw transformedError;
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
async function bulkCreateContacts2(contacts, options) {
|
|
2719
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2720
|
+
const payload = transformPaths2(
|
|
2721
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2722
|
+
contacts,
|
|
2723
|
+
returnEntity: options?.returnEntity,
|
|
2724
|
+
allowDuplicates: options?.allowDuplicates
|
|
2725
|
+
}),
|
|
2726
|
+
[
|
|
2727
|
+
{
|
|
2728
|
+
transformFn: transformSDKImageToRESTImage,
|
|
2729
|
+
paths: [
|
|
2730
|
+
{ path: "contacts.image" },
|
|
2731
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
2732
|
+
]
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2736
|
+
paths: [{ path: "contacts.addresses.address" }]
|
|
2737
|
+
}
|
|
2738
|
+
]
|
|
2739
|
+
);
|
|
2740
|
+
const reqOpts = bulkCreateContacts(payload);
|
|
2741
|
+
sideEffects?.onSiteCall?.();
|
|
2742
|
+
try {
|
|
2743
|
+
const result = await httpClient.request(reqOpts);
|
|
2744
|
+
sideEffects?.onSuccess?.(result);
|
|
2745
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2746
|
+
transformPaths2(result.data, [
|
|
2747
|
+
{
|
|
2748
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2749
|
+
paths: [
|
|
2750
|
+
{ path: "results.item.image" },
|
|
2751
|
+
{ path: "results.item.memberInfo.profileInfo.photo" }
|
|
2752
|
+
]
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2756
|
+
paths: [{ path: "results.item.addresses.address" }]
|
|
2757
|
+
}
|
|
2758
|
+
])
|
|
2759
|
+
);
|
|
2760
|
+
} catch (err) {
|
|
2761
|
+
const transformedError = sdkTransformError(
|
|
2762
|
+
err,
|
|
2763
|
+
{
|
|
2764
|
+
spreadPathsToArguments: {},
|
|
2765
|
+
explicitPathsToArguments: {
|
|
2766
|
+
contacts: "$[0]",
|
|
2767
|
+
returnEntity: "$[1].returnEntity",
|
|
2768
|
+
allowDuplicates: "$[1].allowDuplicates"
|
|
2769
|
+
},
|
|
2770
|
+
singleArgumentUnchanged: false
|
|
2771
|
+
},
|
|
2772
|
+
["contacts", "options"]
|
|
2773
|
+
);
|
|
2774
|
+
sideEffects?.onError?.(err);
|
|
2775
|
+
throw transformedError;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
async function bulkUpdateContacts2(contacts, options) {
|
|
2779
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2780
|
+
const payload = transformPaths2(
|
|
2781
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2782
|
+
contacts,
|
|
2783
|
+
returnEntity: options?.returnEntity,
|
|
2784
|
+
allowDuplicates: options?.allowDuplicates
|
|
2785
|
+
}),
|
|
2786
|
+
[
|
|
2787
|
+
{
|
|
2788
|
+
transformFn: transformSDKImageToRESTImage,
|
|
2789
|
+
paths: [
|
|
2790
|
+
{ path: "contacts.contact.image" },
|
|
2791
|
+
{ path: "contacts.contact.memberInfo.profileInfo.photo" }
|
|
2792
|
+
]
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2796
|
+
paths: [{ path: "contacts.contact.addresses.address" }]
|
|
2797
|
+
}
|
|
2798
|
+
]
|
|
2799
|
+
);
|
|
2800
|
+
const reqOpts = bulkUpdateContacts(payload);
|
|
2801
|
+
sideEffects?.onSiteCall?.();
|
|
2802
|
+
try {
|
|
2803
|
+
const result = await httpClient.request(reqOpts);
|
|
2804
|
+
sideEffects?.onSuccess?.(result);
|
|
2805
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2806
|
+
transformPaths2(result.data, [
|
|
2807
|
+
{
|
|
2808
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2809
|
+
paths: [
|
|
2810
|
+
{ path: "results.item.image" },
|
|
2811
|
+
{ path: "results.item.memberInfo.profileInfo.photo" }
|
|
2812
|
+
]
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2816
|
+
paths: [{ path: "results.item.addresses.address" }]
|
|
2817
|
+
}
|
|
2818
|
+
])
|
|
2819
|
+
);
|
|
2820
|
+
} catch (err) {
|
|
2821
|
+
const transformedError = sdkTransformError(
|
|
2822
|
+
err,
|
|
2823
|
+
{
|
|
2824
|
+
spreadPathsToArguments: {},
|
|
2825
|
+
explicitPathsToArguments: {
|
|
2826
|
+
contacts: "$[0]",
|
|
2827
|
+
returnEntity: "$[1].returnEntity",
|
|
2828
|
+
allowDuplicates: "$[1].allowDuplicates"
|
|
2829
|
+
},
|
|
2830
|
+
singleArgumentUnchanged: false
|
|
2831
|
+
},
|
|
2832
|
+
["contacts", "options"]
|
|
2833
|
+
);
|
|
2834
|
+
sideEffects?.onError?.(err);
|
|
2835
|
+
throw transformedError;
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
async function bulkUpdateContactTags2(contactIds, options) {
|
|
2839
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2840
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2841
|
+
contactIds,
|
|
2842
|
+
returnEntity: options?.returnEntity,
|
|
2843
|
+
assignTags: options?.assignTags,
|
|
2844
|
+
unassignTags: options?.unassignTags
|
|
2845
|
+
});
|
|
2846
|
+
const reqOpts = bulkUpdateContactTags(payload);
|
|
2847
|
+
sideEffects?.onSiteCall?.();
|
|
2848
|
+
try {
|
|
2849
|
+
const result = await httpClient.request(reqOpts);
|
|
2850
|
+
sideEffects?.onSuccess?.(result);
|
|
2851
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2852
|
+
transformPaths2(result.data, [
|
|
2853
|
+
{
|
|
2854
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2855
|
+
paths: [
|
|
2856
|
+
{ path: "results.item.image" },
|
|
2857
|
+
{ path: "results.item.memberInfo.profileInfo.photo" }
|
|
2858
|
+
]
|
|
2859
|
+
},
|
|
2860
|
+
{
|
|
2861
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2862
|
+
paths: [{ path: "results.item.addresses.address" }]
|
|
2863
|
+
}
|
|
2864
|
+
])
|
|
2865
|
+
);
|
|
2866
|
+
} catch (err) {
|
|
2867
|
+
const transformedError = sdkTransformError(
|
|
2868
|
+
err,
|
|
2869
|
+
{
|
|
2870
|
+
spreadPathsToArguments: {},
|
|
2871
|
+
explicitPathsToArguments: {
|
|
2872
|
+
contactIds: "$[0]",
|
|
2873
|
+
returnEntity: "$[1].returnEntity",
|
|
2874
|
+
assignTags: "$[1].assignTags",
|
|
2875
|
+
unassignTags: "$[1].unassignTags"
|
|
2876
|
+
},
|
|
2877
|
+
singleArgumentUnchanged: false
|
|
2878
|
+
},
|
|
2879
|
+
["contactIds", "options"]
|
|
2880
|
+
);
|
|
2881
|
+
sideEffects?.onError?.(err);
|
|
2882
|
+
throw transformedError;
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
async function bulkUpdateContactTagsByFilter2(filter, options) {
|
|
2886
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2887
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2888
|
+
filter,
|
|
2889
|
+
search: options?.search,
|
|
2890
|
+
assignTags: options?.assignTags,
|
|
2891
|
+
unassignTags: options?.unassignTags
|
|
2892
|
+
});
|
|
2893
|
+
const reqOpts = bulkUpdateContactTagsByFilter(payload);
|
|
2894
|
+
sideEffects?.onSiteCall?.();
|
|
2895
|
+
try {
|
|
2896
|
+
const result = await httpClient.request(reqOpts);
|
|
2897
|
+
sideEffects?.onSuccess?.(result);
|
|
2898
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2899
|
+
} catch (err) {
|
|
2900
|
+
const transformedError = sdkTransformError(
|
|
2901
|
+
err,
|
|
2902
|
+
{
|
|
2903
|
+
spreadPathsToArguments: {},
|
|
2904
|
+
explicitPathsToArguments: {
|
|
2905
|
+
filter: "$[0]",
|
|
2906
|
+
search: "$[1].search",
|
|
2907
|
+
assignTags: "$[1].assignTags",
|
|
2908
|
+
unassignTags: "$[1].unassignTags"
|
|
2909
|
+
},
|
|
2910
|
+
singleArgumentUnchanged: false
|
|
2911
|
+
},
|
|
2912
|
+
["filter", "options"]
|
|
2913
|
+
);
|
|
2914
|
+
sideEffects?.onError?.(err);
|
|
2915
|
+
throw transformedError;
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
async function bulkUpsertContacts2(contacts, options) {
|
|
2919
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2920
|
+
const payload = transformPaths2(
|
|
2921
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
2922
|
+
contacts,
|
|
2923
|
+
returnEntity: options?.returnEntity,
|
|
2924
|
+
upsertMode: options?.upsertMode,
|
|
2925
|
+
updateMember: options?.updateMember
|
|
2926
|
+
}),
|
|
2927
|
+
[
|
|
2928
|
+
{
|
|
2929
|
+
transformFn: transformSDKImageToRESTImage,
|
|
2930
|
+
paths: [
|
|
2931
|
+
{ path: "contacts.contact.image" },
|
|
2932
|
+
{ path: "contacts.contact.memberInfo.profileInfo.photo" }
|
|
2933
|
+
]
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
2937
|
+
paths: [{ path: "contacts.contact.addresses.address" }]
|
|
2938
|
+
}
|
|
2939
|
+
]
|
|
2940
|
+
);
|
|
2941
|
+
const reqOpts = bulkUpsertContacts(payload);
|
|
2942
|
+
sideEffects?.onSiteCall?.();
|
|
2943
|
+
try {
|
|
2944
|
+
const result = await httpClient.request(reqOpts);
|
|
2945
|
+
sideEffects?.onSuccess?.(result);
|
|
2946
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2947
|
+
transformPaths2(result.data, [
|
|
2948
|
+
{
|
|
2949
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2950
|
+
paths: [
|
|
2951
|
+
{ path: "results.item.image" },
|
|
2952
|
+
{ path: "results.item.memberInfo.profileInfo.photo" }
|
|
2953
|
+
]
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
2957
|
+
paths: [{ path: "results.item.addresses.address" }]
|
|
2958
|
+
}
|
|
2959
|
+
])
|
|
2960
|
+
);
|
|
2961
|
+
} catch (err) {
|
|
2962
|
+
const transformedError = sdkTransformError(
|
|
2963
|
+
err,
|
|
2964
|
+
{
|
|
2965
|
+
spreadPathsToArguments: {},
|
|
2966
|
+
explicitPathsToArguments: {
|
|
2967
|
+
contacts: "$[0]",
|
|
2968
|
+
returnEntity: "$[1].returnEntity",
|
|
2969
|
+
upsertMode: "$[1].upsertMode",
|
|
2970
|
+
updateMember: "$[1].updateMember"
|
|
2971
|
+
},
|
|
2972
|
+
singleArgumentUnchanged: false
|
|
2973
|
+
},
|
|
2974
|
+
["contacts", "options"]
|
|
2975
|
+
);
|
|
2976
|
+
sideEffects?.onError?.(err);
|
|
2977
|
+
throw transformedError;
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
async function bulkDeleteContacts2(contactIds, options) {
|
|
2981
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2982
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2983
|
+
contactIds,
|
|
2984
|
+
deleteMembers: options?.deleteMembers
|
|
2985
|
+
});
|
|
2986
|
+
const reqOpts = bulkDeleteContacts(payload);
|
|
2987
|
+
sideEffects?.onSiteCall?.();
|
|
2988
|
+
try {
|
|
2989
|
+
const result = await httpClient.request(reqOpts);
|
|
2990
|
+
sideEffects?.onSuccess?.(result);
|
|
2991
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
2992
|
+
} catch (err) {
|
|
2993
|
+
const transformedError = sdkTransformError(
|
|
2994
|
+
err,
|
|
2995
|
+
{
|
|
2996
|
+
spreadPathsToArguments: {},
|
|
2997
|
+
explicitPathsToArguments: {
|
|
2998
|
+
contactIds: "$[0]",
|
|
2999
|
+
deleteMembers: "$[1].deleteMembers"
|
|
3000
|
+
},
|
|
3001
|
+
singleArgumentUnchanged: false
|
|
3002
|
+
},
|
|
3003
|
+
["contactIds", "options"]
|
|
3004
|
+
);
|
|
3005
|
+
sideEffects?.onError?.(err);
|
|
3006
|
+
throw transformedError;
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
async function bulkDeleteContactsByFilter2(filter, options) {
|
|
3010
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3011
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3012
|
+
filter,
|
|
3013
|
+
search: options?.search,
|
|
3014
|
+
deleteMembers: options?.deleteMembers
|
|
3015
|
+
});
|
|
3016
|
+
const reqOpts = bulkDeleteContactsByFilter(payload);
|
|
3017
|
+
sideEffects?.onSiteCall?.();
|
|
3018
|
+
try {
|
|
3019
|
+
const result = await httpClient.request(reqOpts);
|
|
3020
|
+
sideEffects?.onSuccess?.(result);
|
|
3021
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
3022
|
+
} catch (err) {
|
|
3023
|
+
const transformedError = sdkTransformError(
|
|
3024
|
+
err,
|
|
3025
|
+
{
|
|
3026
|
+
spreadPathsToArguments: {},
|
|
3027
|
+
explicitPathsToArguments: {
|
|
3028
|
+
filter: "$[0]",
|
|
3029
|
+
search: "$[1].search",
|
|
3030
|
+
deleteMembers: "$[1].deleteMembers"
|
|
3031
|
+
},
|
|
3032
|
+
singleArgumentUnchanged: false
|
|
3033
|
+
},
|
|
3034
|
+
["filter", "options"]
|
|
3035
|
+
);
|
|
3036
|
+
sideEffects?.onError?.(err);
|
|
3037
|
+
throw transformedError;
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
async function removeContactFromTrashBin2(contactId) {
|
|
3041
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3042
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3043
|
+
contactId
|
|
3044
|
+
});
|
|
3045
|
+
const reqOpts = removeContactFromTrashBin(payload);
|
|
3046
|
+
sideEffects?.onSiteCall?.();
|
|
3047
|
+
try {
|
|
3048
|
+
const result = await httpClient.request(reqOpts);
|
|
3049
|
+
sideEffects?.onSuccess?.(result);
|
|
3050
|
+
} catch (err) {
|
|
3051
|
+
const transformedError = sdkTransformError(
|
|
3052
|
+
err,
|
|
3053
|
+
{
|
|
3054
|
+
spreadPathsToArguments: {},
|
|
3055
|
+
explicitPathsToArguments: { contactId: "$[0]" },
|
|
3056
|
+
singleArgumentUnchanged: false
|
|
3057
|
+
},
|
|
3058
|
+
["contactId"]
|
|
3059
|
+
);
|
|
3060
|
+
sideEffects?.onError?.(err);
|
|
3061
|
+
throw transformedError;
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
async function restoreContactFromTrashBin2(contactId) {
|
|
3065
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3066
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3067
|
+
contactId
|
|
3068
|
+
});
|
|
3069
|
+
const reqOpts = restoreContactFromTrashBin(payload);
|
|
3070
|
+
sideEffects?.onSiteCall?.();
|
|
3071
|
+
try {
|
|
3072
|
+
const result = await httpClient.request(reqOpts);
|
|
3073
|
+
sideEffects?.onSuccess?.(result);
|
|
3074
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3075
|
+
transformPaths2(result.data, [
|
|
3076
|
+
{
|
|
3077
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3078
|
+
paths: [
|
|
3079
|
+
{ path: "contact.image" },
|
|
3080
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
3081
|
+
]
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3085
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
3086
|
+
}
|
|
3087
|
+
])
|
|
3088
|
+
);
|
|
3089
|
+
} catch (err) {
|
|
3090
|
+
const transformedError = sdkTransformError(
|
|
3091
|
+
err,
|
|
3092
|
+
{
|
|
3093
|
+
spreadPathsToArguments: {},
|
|
3094
|
+
explicitPathsToArguments: { contactId: "$[0]" },
|
|
3095
|
+
singleArgumentUnchanged: false
|
|
3096
|
+
},
|
|
3097
|
+
["contactId"]
|
|
3098
|
+
);
|
|
3099
|
+
sideEffects?.onError?.(err);
|
|
3100
|
+
throw transformedError;
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
async function bulkRestoreContactsFromTrashBin2(options) {
|
|
3104
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3105
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3106
|
+
contactIds: options?.contactIds,
|
|
3107
|
+
returnEntity: options?.returnEntity
|
|
3108
|
+
});
|
|
3109
|
+
const reqOpts = bulkRestoreContactsFromTrashBin(payload);
|
|
3110
|
+
sideEffects?.onSiteCall?.();
|
|
3111
|
+
try {
|
|
3112
|
+
const result = await httpClient.request(reqOpts);
|
|
3113
|
+
sideEffects?.onSuccess?.(result);
|
|
3114
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3115
|
+
transformPaths2(result.data, [
|
|
3116
|
+
{
|
|
3117
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3118
|
+
paths: [
|
|
3119
|
+
{ path: "results.item.image" },
|
|
3120
|
+
{ path: "results.item.memberInfo.profileInfo.photo" }
|
|
3121
|
+
]
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3125
|
+
paths: [{ path: "results.item.addresses.address" }]
|
|
3126
|
+
}
|
|
3127
|
+
])
|
|
3128
|
+
);
|
|
3129
|
+
} catch (err) {
|
|
3130
|
+
const transformedError = sdkTransformError(
|
|
3131
|
+
err,
|
|
3132
|
+
{
|
|
3133
|
+
spreadPathsToArguments: {},
|
|
3134
|
+
explicitPathsToArguments: {
|
|
3135
|
+
contactIds: "$[0].contactIds",
|
|
3136
|
+
returnEntity: "$[0].returnEntity"
|
|
3137
|
+
},
|
|
3138
|
+
singleArgumentUnchanged: false
|
|
3139
|
+
},
|
|
3140
|
+
["options"]
|
|
3141
|
+
);
|
|
3142
|
+
sideEffects?.onError?.(err);
|
|
3143
|
+
throw transformedError;
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
3146
|
+
async function getDeletedContact2(contactId) {
|
|
3147
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3148
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3149
|
+
contactId
|
|
3150
|
+
});
|
|
3151
|
+
const reqOpts = getDeletedContact(payload);
|
|
3152
|
+
sideEffects?.onSiteCall?.();
|
|
3153
|
+
try {
|
|
3154
|
+
const result = await httpClient.request(reqOpts);
|
|
3155
|
+
sideEffects?.onSuccess?.(result);
|
|
3156
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3157
|
+
transformPaths2(result.data, [
|
|
3158
|
+
{
|
|
3159
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3160
|
+
paths: [
|
|
3161
|
+
{ path: "contact.image" },
|
|
3162
|
+
{ path: "contact.memberInfo.profileInfo.photo" }
|
|
3163
|
+
]
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3167
|
+
paths: [{ path: "contact.addresses.address" }]
|
|
3168
|
+
}
|
|
3169
|
+
])
|
|
3170
|
+
);
|
|
3171
|
+
} catch (err) {
|
|
3172
|
+
const transformedError = sdkTransformError(
|
|
3173
|
+
err,
|
|
3174
|
+
{
|
|
3175
|
+
spreadPathsToArguments: {},
|
|
3176
|
+
explicitPathsToArguments: { contactId: "$[0]" },
|
|
3177
|
+
singleArgumentUnchanged: false
|
|
3178
|
+
},
|
|
3179
|
+
["contactId"]
|
|
3180
|
+
);
|
|
3181
|
+
sideEffects?.onError?.(err);
|
|
3182
|
+
throw transformedError;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
async function listDeletedContacts2(options) {
|
|
3186
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3187
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3188
|
+
externalId: options?.externalId,
|
|
3189
|
+
email: options?.email,
|
|
3190
|
+
phone: options?.phone,
|
|
3191
|
+
contactIds: options?.contactIds,
|
|
3192
|
+
deletedFromDate: options?.deletedFromDate,
|
|
3193
|
+
deletedToDate: options?.deletedToDate,
|
|
3194
|
+
paging: options?.paging
|
|
3195
|
+
});
|
|
3196
|
+
const reqOpts = listDeletedContacts(payload);
|
|
3197
|
+
sideEffects?.onSiteCall?.();
|
|
3198
|
+
try {
|
|
3199
|
+
const result = await httpClient.request(reqOpts);
|
|
3200
|
+
sideEffects?.onSuccess?.(result);
|
|
3201
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3202
|
+
transformPaths2(result.data, [
|
|
3203
|
+
{
|
|
3204
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3205
|
+
paths: [
|
|
3206
|
+
{ path: "contacts.image" },
|
|
3207
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
3208
|
+
]
|
|
3209
|
+
},
|
|
3210
|
+
{
|
|
3211
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3212
|
+
paths: [{ path: "contacts.addresses.address" }]
|
|
3213
|
+
}
|
|
3214
|
+
])
|
|
3215
|
+
);
|
|
3216
|
+
} catch (err) {
|
|
3217
|
+
const transformedError = sdkTransformError(
|
|
3218
|
+
err,
|
|
3219
|
+
{
|
|
3220
|
+
spreadPathsToArguments: {},
|
|
3221
|
+
explicitPathsToArguments: {
|
|
3222
|
+
externalId: "$[0].externalId",
|
|
3223
|
+
email: "$[0].email",
|
|
3224
|
+
phone: "$[0].phone",
|
|
3225
|
+
contactIds: "$[0].contactIds",
|
|
3226
|
+
deletedFromDate: "$[0].deletedFromDate",
|
|
3227
|
+
deletedToDate: "$[0].deletedToDate",
|
|
3228
|
+
paging: "$[0].paging"
|
|
3229
|
+
},
|
|
3230
|
+
singleArgumentUnchanged: false
|
|
3231
|
+
},
|
|
3232
|
+
["options"]
|
|
3233
|
+
);
|
|
3234
|
+
sideEffects?.onError?.(err);
|
|
3235
|
+
throw transformedError;
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
async function getContactImageUploadStatus2(identifiers) {
|
|
3239
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3240
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3241
|
+
contactId: identifiers?.contactId,
|
|
3242
|
+
imageUploadId: identifiers?.imageUploadId
|
|
3243
|
+
});
|
|
3244
|
+
const reqOpts = getContactImageUploadStatus(payload);
|
|
3245
|
+
sideEffects?.onSiteCall?.();
|
|
3246
|
+
try {
|
|
3247
|
+
const result = await httpClient.request(reqOpts);
|
|
3248
|
+
sideEffects?.onSuccess?.(result);
|
|
3249
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
3250
|
+
} catch (err) {
|
|
3251
|
+
const transformedError = sdkTransformError(
|
|
3252
|
+
err,
|
|
3253
|
+
{
|
|
3254
|
+
spreadPathsToArguments: {},
|
|
3255
|
+
explicitPathsToArguments: {
|
|
3256
|
+
contactId: "$[0].contactId",
|
|
3257
|
+
imageUploadId: "$[0].imageUploadId"
|
|
3258
|
+
},
|
|
3259
|
+
singleArgumentUnchanged: false
|
|
3260
|
+
},
|
|
3261
|
+
["identifiers"]
|
|
3262
|
+
);
|
|
3263
|
+
sideEffects?.onError?.(err);
|
|
3264
|
+
throw transformedError;
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3267
|
+
async function bulkUpdatePhoneCountryCodeByFilter2(options) {
|
|
3268
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3269
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3270
|
+
filter: options?.filter,
|
|
3271
|
+
search: options?.search,
|
|
3272
|
+
countryCode: options?.countryCode
|
|
3273
|
+
});
|
|
3274
|
+
const reqOpts = bulkUpdatePhoneCountryCodeByFilter(payload);
|
|
3275
|
+
sideEffects?.onSiteCall?.();
|
|
3276
|
+
try {
|
|
3277
|
+
const result = await httpClient.request(reqOpts);
|
|
3278
|
+
sideEffects?.onSuccess?.(result);
|
|
3279
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
3280
|
+
} catch (err) {
|
|
3281
|
+
const transformedError = sdkTransformError(
|
|
3282
|
+
err,
|
|
3283
|
+
{
|
|
3284
|
+
spreadPathsToArguments: {},
|
|
3285
|
+
explicitPathsToArguments: {
|
|
3286
|
+
filter: "$[0].filter",
|
|
3287
|
+
search: "$[0].search",
|
|
3288
|
+
countryCode: "$[0].countryCode"
|
|
3289
|
+
},
|
|
3290
|
+
singleArgumentUnchanged: false
|
|
3291
|
+
},
|
|
3292
|
+
["options"]
|
|
3293
|
+
);
|
|
3294
|
+
sideEffects?.onError?.(err);
|
|
3295
|
+
throw transformedError;
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
// src/contacts-v5-contact-contacts-v-5.public.ts
|
|
3300
|
+
function bulkUpdateContactSubscriptions3(httpClient) {
|
|
3301
|
+
return (filter, options) => bulkUpdateContactSubscriptions2(
|
|
3302
|
+
filter,
|
|
3303
|
+
options,
|
|
3304
|
+
// @ts-ignore
|
|
3305
|
+
{ httpClient }
|
|
3306
|
+
);
|
|
3307
|
+
}
|
|
3308
|
+
function createContact3(httpClient) {
|
|
3309
|
+
return (contact, options) => createContact2(
|
|
3310
|
+
contact,
|
|
3311
|
+
options,
|
|
3312
|
+
// @ts-ignore
|
|
3313
|
+
{ httpClient }
|
|
3314
|
+
);
|
|
3315
|
+
}
|
|
3316
|
+
function getContact3(httpClient) {
|
|
3317
|
+
return (contactId) => getContact2(
|
|
3318
|
+
contactId,
|
|
3319
|
+
// @ts-ignore
|
|
3320
|
+
{ httpClient }
|
|
3321
|
+
);
|
|
3322
|
+
}
|
|
3323
|
+
function updateContact3(httpClient) {
|
|
3324
|
+
return (_id, contact, options) => updateContact2(
|
|
3325
|
+
_id,
|
|
3326
|
+
contact,
|
|
3327
|
+
options,
|
|
3328
|
+
// @ts-ignore
|
|
3329
|
+
{ httpClient }
|
|
3330
|
+
);
|
|
3331
|
+
}
|
|
3332
|
+
function upsertContact3(httpClient) {
|
|
3333
|
+
return (contact, options) => upsertContact2(
|
|
3334
|
+
contact,
|
|
3335
|
+
options,
|
|
3336
|
+
// @ts-ignore
|
|
3337
|
+
{ httpClient }
|
|
3338
|
+
);
|
|
3339
|
+
}
|
|
3340
|
+
function updateContactTags3(httpClient) {
|
|
3341
|
+
return (contactId, options) => updateContactTags2(
|
|
3342
|
+
contactId,
|
|
3343
|
+
options,
|
|
3344
|
+
// @ts-ignore
|
|
3345
|
+
{ httpClient }
|
|
3346
|
+
);
|
|
3347
|
+
}
|
|
3348
|
+
function mergeContacts3(httpClient) {
|
|
3349
|
+
return (targetContactId, targetContactRevision, options) => mergeContacts2(
|
|
3350
|
+
targetContactId,
|
|
3351
|
+
targetContactRevision,
|
|
3352
|
+
options,
|
|
3353
|
+
// @ts-ignore
|
|
3354
|
+
{ httpClient }
|
|
3355
|
+
);
|
|
3356
|
+
}
|
|
3357
|
+
function deleteContact3(httpClient) {
|
|
3358
|
+
return (contactId, options) => deleteContact2(
|
|
3359
|
+
contactId,
|
|
3360
|
+
options,
|
|
3361
|
+
// @ts-ignore
|
|
3362
|
+
{ httpClient }
|
|
3363
|
+
);
|
|
3364
|
+
}
|
|
3365
|
+
function findMatchingContacts3(httpClient) {
|
|
3366
|
+
return (options) => findMatchingContacts2(
|
|
3367
|
+
options,
|
|
3368
|
+
// @ts-ignore
|
|
3369
|
+
{ httpClient }
|
|
3370
|
+
);
|
|
3371
|
+
}
|
|
3372
|
+
function queryContacts3(httpClient) {
|
|
3373
|
+
return () => queryContacts2(
|
|
3374
|
+
// @ts-ignore
|
|
3375
|
+
{ httpClient }
|
|
3376
|
+
);
|
|
3377
|
+
}
|
|
3378
|
+
function typedQueryContacts2(httpClient) {
|
|
3379
|
+
return (query) => typedQueryContacts(
|
|
3380
|
+
query,
|
|
3381
|
+
// @ts-ignore
|
|
3382
|
+
{ httpClient }
|
|
3383
|
+
);
|
|
3384
|
+
}
|
|
3385
|
+
function searchContacts3(httpClient) {
|
|
3386
|
+
return (search, options) => searchContacts2(
|
|
3387
|
+
search,
|
|
3388
|
+
options,
|
|
3389
|
+
// @ts-ignore
|
|
3390
|
+
{ httpClient }
|
|
3391
|
+
);
|
|
3392
|
+
}
|
|
3393
|
+
function countContacts3(httpClient) {
|
|
3394
|
+
return (options) => countContacts2(
|
|
3395
|
+
options,
|
|
3396
|
+
// @ts-ignore
|
|
3397
|
+
{ httpClient }
|
|
3398
|
+
);
|
|
3399
|
+
}
|
|
3400
|
+
function generateContactImageUploadUrl3(httpClient) {
|
|
3401
|
+
return (contactId, options) => generateContactImageUploadUrl2(
|
|
3402
|
+
contactId,
|
|
3403
|
+
options,
|
|
3404
|
+
// @ts-ignore
|
|
3405
|
+
{ httpClient }
|
|
3406
|
+
);
|
|
3407
|
+
}
|
|
3408
|
+
function addContactAdditionalEmail3(httpClient) {
|
|
3409
|
+
return (contactId, email, options) => addContactAdditionalEmail2(
|
|
3410
|
+
contactId,
|
|
3411
|
+
email,
|
|
3412
|
+
options,
|
|
3413
|
+
// @ts-ignore
|
|
3414
|
+
{ httpClient }
|
|
3415
|
+
);
|
|
3416
|
+
}
|
|
3417
|
+
function addContactAdditionalPhone3(httpClient) {
|
|
3418
|
+
return (contactId, phone, options) => addContactAdditionalPhone2(
|
|
3419
|
+
contactId,
|
|
3420
|
+
phone,
|
|
3421
|
+
options,
|
|
3422
|
+
// @ts-ignore
|
|
3423
|
+
{ httpClient }
|
|
3424
|
+
);
|
|
3425
|
+
}
|
|
3426
|
+
function addContactAddress3(httpClient) {
|
|
3427
|
+
return (contactId, address, options) => addContactAddress2(
|
|
3428
|
+
contactId,
|
|
3429
|
+
address,
|
|
3430
|
+
options,
|
|
3431
|
+
// @ts-ignore
|
|
3432
|
+
{ httpClient }
|
|
3433
|
+
);
|
|
3434
|
+
}
|
|
3435
|
+
function deleteContactAddress3(httpClient) {
|
|
3436
|
+
return (identifiers, revision) => deleteContactAddress2(
|
|
3437
|
+
identifiers,
|
|
3438
|
+
revision,
|
|
3439
|
+
// @ts-ignore
|
|
3440
|
+
{ httpClient }
|
|
3441
|
+
);
|
|
3442
|
+
}
|
|
3443
|
+
function updateContactAddress3(httpClient) {
|
|
3444
|
+
return (identifiers, address, options) => updateContactAddress2(
|
|
3445
|
+
identifiers,
|
|
3446
|
+
address,
|
|
3447
|
+
options,
|
|
3448
|
+
// @ts-ignore
|
|
3449
|
+
{ httpClient }
|
|
3450
|
+
);
|
|
3451
|
+
}
|
|
3452
|
+
function bulkCreateContacts3(httpClient) {
|
|
3453
|
+
return (contacts, options) => bulkCreateContacts2(
|
|
3454
|
+
contacts,
|
|
3455
|
+
options,
|
|
3456
|
+
// @ts-ignore
|
|
3457
|
+
{ httpClient }
|
|
3458
|
+
);
|
|
3459
|
+
}
|
|
3460
|
+
function bulkUpdateContacts3(httpClient) {
|
|
3461
|
+
return (contacts, options) => bulkUpdateContacts2(
|
|
3462
|
+
contacts,
|
|
3463
|
+
options,
|
|
3464
|
+
// @ts-ignore
|
|
3465
|
+
{ httpClient }
|
|
3466
|
+
);
|
|
3467
|
+
}
|
|
3468
|
+
function bulkUpdateContactTags3(httpClient) {
|
|
3469
|
+
return (contactIds, options) => bulkUpdateContactTags2(
|
|
3470
|
+
contactIds,
|
|
3471
|
+
options,
|
|
3472
|
+
// @ts-ignore
|
|
3473
|
+
{ httpClient }
|
|
3474
|
+
);
|
|
3475
|
+
}
|
|
3476
|
+
function bulkUpdateContactTagsByFilter3(httpClient) {
|
|
3477
|
+
return (filter, options) => bulkUpdateContactTagsByFilter2(
|
|
3478
|
+
filter,
|
|
3479
|
+
options,
|
|
3480
|
+
// @ts-ignore
|
|
3481
|
+
{ httpClient }
|
|
3482
|
+
);
|
|
3483
|
+
}
|
|
3484
|
+
function bulkUpsertContacts3(httpClient) {
|
|
3485
|
+
return (contacts, options) => bulkUpsertContacts2(
|
|
3486
|
+
contacts,
|
|
3487
|
+
options,
|
|
3488
|
+
// @ts-ignore
|
|
3489
|
+
{ httpClient }
|
|
3490
|
+
);
|
|
3491
|
+
}
|
|
3492
|
+
function bulkDeleteContacts3(httpClient) {
|
|
3493
|
+
return (contactIds, options) => bulkDeleteContacts2(
|
|
3494
|
+
contactIds,
|
|
3495
|
+
options,
|
|
3496
|
+
// @ts-ignore
|
|
3497
|
+
{ httpClient }
|
|
3498
|
+
);
|
|
3499
|
+
}
|
|
3500
|
+
function bulkDeleteContactsByFilter3(httpClient) {
|
|
3501
|
+
return (filter, options) => bulkDeleteContactsByFilter2(
|
|
3502
|
+
filter,
|
|
3503
|
+
options,
|
|
3504
|
+
// @ts-ignore
|
|
3505
|
+
{ httpClient }
|
|
3506
|
+
);
|
|
3507
|
+
}
|
|
3508
|
+
function removeContactFromTrashBin3(httpClient) {
|
|
3509
|
+
return (contactId) => removeContactFromTrashBin2(
|
|
3510
|
+
contactId,
|
|
3511
|
+
// @ts-ignore
|
|
3512
|
+
{ httpClient }
|
|
3513
|
+
);
|
|
3514
|
+
}
|
|
3515
|
+
function restoreContactFromTrashBin3(httpClient) {
|
|
3516
|
+
return (contactId) => restoreContactFromTrashBin2(
|
|
3517
|
+
contactId,
|
|
3518
|
+
// @ts-ignore
|
|
3519
|
+
{ httpClient }
|
|
3520
|
+
);
|
|
3521
|
+
}
|
|
3522
|
+
function bulkRestoreContactsFromTrashBin3(httpClient) {
|
|
3523
|
+
return (options) => bulkRestoreContactsFromTrashBin2(
|
|
3524
|
+
options,
|
|
3525
|
+
// @ts-ignore
|
|
3526
|
+
{ httpClient }
|
|
3527
|
+
);
|
|
3528
|
+
}
|
|
3529
|
+
function getDeletedContact3(httpClient) {
|
|
3530
|
+
return (contactId) => getDeletedContact2(
|
|
3531
|
+
contactId,
|
|
3532
|
+
// @ts-ignore
|
|
3533
|
+
{ httpClient }
|
|
3534
|
+
);
|
|
3535
|
+
}
|
|
3536
|
+
function listDeletedContacts3(httpClient) {
|
|
3537
|
+
return (options) => listDeletedContacts2(
|
|
3538
|
+
options,
|
|
3539
|
+
// @ts-ignore
|
|
3540
|
+
{ httpClient }
|
|
3541
|
+
);
|
|
3542
|
+
}
|
|
3543
|
+
function getContactImageUploadStatus3(httpClient) {
|
|
3544
|
+
return (identifiers) => getContactImageUploadStatus2(
|
|
3545
|
+
identifiers,
|
|
3546
|
+
// @ts-ignore
|
|
3547
|
+
{ httpClient }
|
|
3548
|
+
);
|
|
3549
|
+
}
|
|
3550
|
+
function bulkUpdatePhoneCountryCodeByFilter3(httpClient) {
|
|
3551
|
+
return (options) => bulkUpdatePhoneCountryCodeByFilter2(
|
|
3552
|
+
options,
|
|
3553
|
+
// @ts-ignore
|
|
3554
|
+
{ httpClient }
|
|
3555
|
+
);
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
// src/contacts-v5-contact-contacts-v-5.context.ts
|
|
3559
|
+
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
3560
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
3561
|
+
function customQueryContacts(httpClient) {
|
|
3562
|
+
const router = createQueryOverloadRouter({
|
|
3563
|
+
builderQueryFunction: () => queryContacts3(httpClient)(),
|
|
3564
|
+
typedQueryFunction: (query) => typedQueryContacts2(httpClient)(query),
|
|
3565
|
+
hasOptionsParameter: false
|
|
3566
|
+
});
|
|
3567
|
+
function overloadedQuery(query) {
|
|
3568
|
+
return router(...arguments);
|
|
3569
|
+
}
|
|
3570
|
+
return overloadedQuery;
|
|
3571
|
+
}
|
|
3572
|
+
var bulkUpdateContactSubscriptions4 = /* @__PURE__ */ createRESTModule(bulkUpdateContactSubscriptions3);
|
|
3573
|
+
var createContact4 = /* @__PURE__ */ createRESTModule(createContact3);
|
|
3574
|
+
var getContact4 = /* @__PURE__ */ createRESTModule(getContact3);
|
|
3575
|
+
var updateContact4 = /* @__PURE__ */ createRESTModule(updateContact3);
|
|
3576
|
+
var upsertContact4 = /* @__PURE__ */ createRESTModule(upsertContact3);
|
|
3577
|
+
var updateContactTags4 = /* @__PURE__ */ createRESTModule(updateContactTags3);
|
|
3578
|
+
var mergeContacts4 = /* @__PURE__ */ createRESTModule(mergeContacts3);
|
|
3579
|
+
var deleteContact4 = /* @__PURE__ */ createRESTModule(deleteContact3);
|
|
3580
|
+
var findMatchingContacts4 = /* @__PURE__ */ createRESTModule(findMatchingContacts3);
|
|
3581
|
+
var searchContacts4 = /* @__PURE__ */ createRESTModule(searchContacts3);
|
|
3582
|
+
var countContacts4 = /* @__PURE__ */ createRESTModule(countContacts3);
|
|
3583
|
+
var generateContactImageUploadUrl4 = /* @__PURE__ */ createRESTModule(generateContactImageUploadUrl3);
|
|
3584
|
+
var addContactAdditionalEmail4 = /* @__PURE__ */ createRESTModule(addContactAdditionalEmail3);
|
|
3585
|
+
var addContactAdditionalPhone4 = /* @__PURE__ */ createRESTModule(addContactAdditionalPhone3);
|
|
3586
|
+
var addContactAddress4 = /* @__PURE__ */ createRESTModule(addContactAddress3);
|
|
3587
|
+
var deleteContactAddress4 = /* @__PURE__ */ createRESTModule(deleteContactAddress3);
|
|
3588
|
+
var updateContactAddress4 = /* @__PURE__ */ createRESTModule(updateContactAddress3);
|
|
3589
|
+
var bulkCreateContacts4 = /* @__PURE__ */ createRESTModule(bulkCreateContacts3);
|
|
3590
|
+
var bulkUpdateContacts4 = /* @__PURE__ */ createRESTModule(bulkUpdateContacts3);
|
|
3591
|
+
var bulkUpdateContactTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateContactTags3);
|
|
3592
|
+
var bulkUpdateContactTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateContactTagsByFilter3);
|
|
3593
|
+
var bulkUpsertContacts4 = /* @__PURE__ */ createRESTModule(bulkUpsertContacts3);
|
|
3594
|
+
var bulkDeleteContacts4 = /* @__PURE__ */ createRESTModule(bulkDeleteContacts3);
|
|
3595
|
+
var bulkDeleteContactsByFilter4 = /* @__PURE__ */ createRESTModule(bulkDeleteContactsByFilter3);
|
|
3596
|
+
var removeContactFromTrashBin4 = /* @__PURE__ */ createRESTModule(removeContactFromTrashBin3);
|
|
3597
|
+
var restoreContactFromTrashBin4 = /* @__PURE__ */ createRESTModule(restoreContactFromTrashBin3);
|
|
3598
|
+
var bulkRestoreContactsFromTrashBin4 = /* @__PURE__ */ createRESTModule(bulkRestoreContactsFromTrashBin3);
|
|
3599
|
+
var getDeletedContact4 = /* @__PURE__ */ createRESTModule(getDeletedContact3);
|
|
3600
|
+
var listDeletedContacts4 = /* @__PURE__ */ createRESTModule(listDeletedContacts3);
|
|
3601
|
+
var getContactImageUploadStatus4 = /* @__PURE__ */ createRESTModule(getContactImageUploadStatus3);
|
|
3602
|
+
var bulkUpdatePhoneCountryCodeByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdatePhoneCountryCodeByFilter3);
|
|
3603
|
+
var queryContacts4 = /* @__PURE__ */ createRESTModule(customQueryContacts);
|
|
3604
|
+
export {
|
|
3605
|
+
Action,
|
|
3606
|
+
AddressTag,
|
|
3607
|
+
AggregationType,
|
|
3608
|
+
EmailDeliverabilityStatus,
|
|
3609
|
+
ImageUploadStatus,
|
|
3610
|
+
Interval,
|
|
3611
|
+
MatchType,
|
|
3612
|
+
MemberStatus,
|
|
3613
|
+
MissingValues,
|
|
3614
|
+
Mode,
|
|
3615
|
+
NameFormat,
|
|
3616
|
+
NestedAggregationType,
|
|
3617
|
+
PhoneDeliverabilityStatus,
|
|
3618
|
+
PhoneTag,
|
|
3619
|
+
PrivacyStatus,
|
|
3620
|
+
QueryContactsByOffsetInternalRequestNameFormat,
|
|
3621
|
+
Role,
|
|
3622
|
+
ScalarType,
|
|
3623
|
+
SortDirection,
|
|
3624
|
+
SortOrder,
|
|
3625
|
+
SortType,
|
|
3626
|
+
SubdivisionType,
|
|
3627
|
+
SubscriptionStatus,
|
|
3628
|
+
UpsertContactResponseAction,
|
|
3629
|
+
UpsertMode,
|
|
3630
|
+
V5SubscriptionStatus,
|
|
3631
|
+
WebhookIdentityType,
|
|
3632
|
+
addContactAdditionalEmail4 as addContactAdditionalEmail,
|
|
3633
|
+
addContactAdditionalPhone4 as addContactAdditionalPhone,
|
|
3634
|
+
addContactAddress4 as addContactAddress,
|
|
3635
|
+
bulkCreateContacts4 as bulkCreateContacts,
|
|
3636
|
+
bulkDeleteContacts4 as bulkDeleteContacts,
|
|
3637
|
+
bulkDeleteContactsByFilter4 as bulkDeleteContactsByFilter,
|
|
3638
|
+
bulkRestoreContactsFromTrashBin4 as bulkRestoreContactsFromTrashBin,
|
|
3639
|
+
bulkUpdateContactSubscriptions4 as bulkUpdateContactSubscriptions,
|
|
3640
|
+
bulkUpdateContactTags4 as bulkUpdateContactTags,
|
|
3641
|
+
bulkUpdateContactTagsByFilter4 as bulkUpdateContactTagsByFilter,
|
|
3642
|
+
bulkUpdateContacts4 as bulkUpdateContacts,
|
|
3643
|
+
bulkUpdatePhoneCountryCodeByFilter4 as bulkUpdatePhoneCountryCodeByFilter,
|
|
3644
|
+
bulkUpsertContacts4 as bulkUpsertContacts,
|
|
3645
|
+
countContacts4 as countContacts,
|
|
3646
|
+
createContact4 as createContact,
|
|
3647
|
+
deleteContact4 as deleteContact,
|
|
3648
|
+
deleteContactAddress4 as deleteContactAddress,
|
|
3649
|
+
findMatchingContacts4 as findMatchingContacts,
|
|
3650
|
+
generateContactImageUploadUrl4 as generateContactImageUploadUrl,
|
|
3651
|
+
getContact4 as getContact,
|
|
3652
|
+
getContactImageUploadStatus4 as getContactImageUploadStatus,
|
|
3653
|
+
getDeletedContact4 as getDeletedContact,
|
|
3654
|
+
listDeletedContacts4 as listDeletedContacts,
|
|
3655
|
+
mergeContacts4 as mergeContacts,
|
|
3656
|
+
queryContacts4 as queryContacts,
|
|
3657
|
+
removeContactFromTrashBin4 as removeContactFromTrashBin,
|
|
3658
|
+
restoreContactFromTrashBin4 as restoreContactFromTrashBin,
|
|
3659
|
+
searchContacts4 as searchContacts,
|
|
3660
|
+
updateContact4 as updateContact,
|
|
3661
|
+
updateContactAddress4 as updateContactAddress,
|
|
3662
|
+
updateContactTags4 as updateContactTags,
|
|
3663
|
+
upsertContact4 as upsertContact,
|
|
3664
|
+
utils
|
|
3665
|
+
};
|
|
3666
|
+
//# sourceMappingURL=index.mjs.map
|