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