@wix/auto_sdk_crm_contacts 1.0.387 → 1.0.389

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 (29) hide show
  1. package/build/cjs/index.d.ts +23 -9
  2. package/build/cjs/index.js +1 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{contacts-v4-contact-contacts.universal-B8Y8hXy8.d.ts → index.typings.d.ts} +470 -1
  5. package/build/cjs/index.typings.js +1126 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2 -1
  8. package/build/es/index.d.mts +23 -9
  9. package/build/es/index.mjs +1 -0
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/{contacts-v4-contact-contacts.universal-B8Y8hXy8.d.mts → index.typings.d.mts} +470 -1
  12. package/build/es/index.typings.mjs +1073 -0
  13. package/build/es/index.typings.mjs.map +1 -0
  14. package/build/es/meta.d.mts +2 -1
  15. package/build/internal/cjs/index.d.ts +23 -9
  16. package/build/internal/cjs/index.js +1 -0
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/{contacts-v4-contact-contacts.universal-GFgRnaQp.d.ts → index.typings.d.ts} +470 -1
  19. package/build/internal/cjs/index.typings.js +1126 -0
  20. package/build/internal/cjs/index.typings.js.map +1 -0
  21. package/build/internal/cjs/meta.d.ts +2 -1
  22. package/build/internal/es/index.d.mts +23 -9
  23. package/build/internal/es/index.mjs +1 -0
  24. package/build/internal/es/index.mjs.map +1 -1
  25. package/build/internal/es/{contacts-v4-contact-contacts.universal-GFgRnaQp.d.mts → index.typings.d.mts} +470 -1
  26. package/build/internal/es/index.typings.mjs +1073 -0
  27. package/build/internal/es/index.typings.mjs.map +1 -0
  28. package/build/internal/es/meta.d.mts +2 -1
  29. package/package.json +2 -2
@@ -0,0 +1,1073 @@
1
+ // src/contacts-v4-contact-contacts.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/contacts-v4-contact-contacts.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
13
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
15
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
16
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
17
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
18
+ function resolveComWixpressContactsCoreApiV4ContactsServiceV4Url(opts) {
19
+ const domainToMappings = {
20
+ "www._base_domain_": [
21
+ {
22
+ srcPath: "/_api/contacts/v4/contacts",
23
+ destPath: "/v4/contacts"
24
+ },
25
+ {
26
+ srcPath: "/_api/contacts/v4/bulk",
27
+ destPath: "/v4/bulk"
28
+ }
29
+ ],
30
+ "www.wixapis.com": [
31
+ {
32
+ srcPath: "/contacts/v4/contacts",
33
+ destPath: "/v4/contacts"
34
+ },
35
+ {
36
+ srcPath: "/contacts/v4/bulk",
37
+ destPath: "/v4/bulk"
38
+ }
39
+ ],
40
+ "manage._base_domain_": [
41
+ {
42
+ srcPath: "/_api/contacts/v4/contacts",
43
+ destPath: "/v4/contacts"
44
+ },
45
+ {
46
+ srcPath: "/_api/contacts/v4/bulk",
47
+ destPath: "/v4/bulk"
48
+ }
49
+ ],
50
+ "manage.nownia.com": [
51
+ {
52
+ srcPath: "/_api/contacts/v4/contacts",
53
+ destPath: "/v4/contacts"
54
+ },
55
+ {
56
+ srcPath: "/_api/contacts/v4/bulk",
57
+ destPath: "/v4/bulk"
58
+ }
59
+ ],
60
+ _: [
61
+ {
62
+ srcPath: "/_api/contacts/v4/bulk",
63
+ destPath: "/v4/bulk"
64
+ },
65
+ {
66
+ srcPath: "/_api/contacts/v4/contacts",
67
+ destPath: "/v4/contacts"
68
+ }
69
+ ],
70
+ "*.dev.wix-code.com": [
71
+ {
72
+ srcPath: "/_api/contacts/v4/bulk",
73
+ destPath: "/v4/bulk"
74
+ },
75
+ {
76
+ srcPath: "/_api/contacts/v4/contacts",
77
+ destPath: "/v4/contacts"
78
+ }
79
+ ]
80
+ };
81
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
82
+ }
83
+ var PACKAGE_NAME = "@wix/auto_sdk_crm_contacts";
84
+ function createContact(payload) {
85
+ function __createContact({ host }) {
86
+ const serializedData = transformPaths(payload, [
87
+ {
88
+ transformFn: transformSDKFloatToRESTFloat,
89
+ paths: [
90
+ { path: "info.addresses.items.address.geocode.latitude" },
91
+ { path: "info.addresses.items.address.geocode.longitude" }
92
+ ]
93
+ },
94
+ {
95
+ transformFn: transformSDKTimestampToRESTTimestamp,
96
+ paths: [{ path: "info.picture.image.urlExpirationDate" }]
97
+ }
98
+ ]);
99
+ const metadata = {
100
+ entityFqdn: "wix.contacts.v4.contact",
101
+ method: "POST",
102
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.CreateContact",
103
+ packageName: PACKAGE_NAME,
104
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
105
+ protoPath: "/v4/contacts",
106
+ data: serializedData,
107
+ host
108
+ }),
109
+ data: serializedData,
110
+ transformResponse: (payload2) => transformPaths(payload2, [
111
+ {
112
+ transformFn: transformRESTTimestampToSDKTimestamp,
113
+ paths: [
114
+ { path: "contact.createdDate" },
115
+ { path: "contact.updatedDate" },
116
+ { path: "contact.lastActivity.activityDate" },
117
+ { path: "contact.lastActivity.date" },
118
+ { path: "contact.picture.urlExpirationDate" },
119
+ { path: "contact.info.picture.image.urlExpirationDate" },
120
+ { path: "contact.memberInfo.signupDate" },
121
+ {
122
+ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
123
+ },
124
+ { path: "contact.memberInfo.sessionInfo.lastWebLogin" },
125
+ { path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
126
+ ]
127
+ },
128
+ {
129
+ transformFn: transformRESTFloatToSDKFloat,
130
+ paths: [
131
+ { path: "contact.info.addresses.items.address.geocode.latitude" },
132
+ {
133
+ path: "contact.info.addresses.items.address.geocode.longitude"
134
+ }
135
+ ]
136
+ }
137
+ ])
138
+ };
139
+ return metadata;
140
+ }
141
+ return __createContact;
142
+ }
143
+ function updateContact(payload) {
144
+ function __updateContact({ host }) {
145
+ const serializedData = transformPaths(payload, [
146
+ {
147
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
148
+ paths: [{ path: "fieldMask" }]
149
+ },
150
+ {
151
+ transformFn: transformSDKFloatToRESTFloat,
152
+ paths: [
153
+ { path: "info.addresses.items.address.geocode.latitude" },
154
+ { path: "info.addresses.items.address.geocode.longitude" }
155
+ ]
156
+ },
157
+ {
158
+ transformFn: transformSDKTimestampToRESTTimestamp,
159
+ paths: [{ path: "info.picture.image.urlExpirationDate" }]
160
+ }
161
+ ]);
162
+ const metadata = {
163
+ entityFqdn: "wix.contacts.v4.contact",
164
+ method: "PATCH",
165
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.UpdateContact",
166
+ packageName: PACKAGE_NAME,
167
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
168
+ protoPath: "/v4/contacts/{contactId}",
169
+ data: serializedData,
170
+ host
171
+ }),
172
+ data: serializedData,
173
+ transformResponse: (payload2) => transformPaths(payload2, [
174
+ {
175
+ transformFn: transformRESTTimestampToSDKTimestamp,
176
+ paths: [
177
+ { path: "contact.createdDate" },
178
+ { path: "contact.updatedDate" },
179
+ { path: "contact.lastActivity.activityDate" },
180
+ { path: "contact.lastActivity.date" },
181
+ { path: "contact.picture.urlExpirationDate" },
182
+ { path: "contact.info.picture.image.urlExpirationDate" },
183
+ { path: "contact.memberInfo.signupDate" },
184
+ {
185
+ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
186
+ },
187
+ { path: "contact.memberInfo.sessionInfo.lastWebLogin" },
188
+ { path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
189
+ ]
190
+ },
191
+ {
192
+ transformFn: transformRESTFloatToSDKFloat,
193
+ paths: [
194
+ { path: "contact.info.addresses.items.address.geocode.latitude" },
195
+ {
196
+ path: "contact.info.addresses.items.address.geocode.longitude"
197
+ }
198
+ ]
199
+ }
200
+ ])
201
+ };
202
+ return metadata;
203
+ }
204
+ return __updateContact;
205
+ }
206
+ function mergeContacts(payload) {
207
+ function __mergeContacts({ host }) {
208
+ const metadata = {
209
+ entityFqdn: "wix.contacts.v4.contact",
210
+ method: "POST",
211
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.MergeContacts",
212
+ packageName: PACKAGE_NAME,
213
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
214
+ protoPath: "/v4/contacts/{targetContactId}/merge",
215
+ data: payload,
216
+ host
217
+ }),
218
+ data: payload,
219
+ transformResponse: (payload2) => transformPaths(payload2, [
220
+ {
221
+ transformFn: transformRESTTimestampToSDKTimestamp,
222
+ paths: [
223
+ { path: "contact.createdDate" },
224
+ { path: "contact.updatedDate" },
225
+ { path: "contact.lastActivity.activityDate" },
226
+ { path: "contact.lastActivity.date" },
227
+ { path: "contact.picture.urlExpirationDate" },
228
+ { path: "contact.info.picture.image.urlExpirationDate" },
229
+ { path: "contact.memberInfo.signupDate" },
230
+ {
231
+ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
232
+ },
233
+ { path: "contact.memberInfo.sessionInfo.lastWebLogin" },
234
+ { path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
235
+ ]
236
+ },
237
+ {
238
+ transformFn: transformRESTFloatToSDKFloat,
239
+ paths: [
240
+ { path: "contact.info.addresses.items.address.geocode.latitude" },
241
+ {
242
+ path: "contact.info.addresses.items.address.geocode.longitude"
243
+ }
244
+ ]
245
+ }
246
+ ])
247
+ };
248
+ return metadata;
249
+ }
250
+ return __mergeContacts;
251
+ }
252
+ function deleteContact(payload) {
253
+ function __deleteContact({ host }) {
254
+ const metadata = {
255
+ entityFqdn: "wix.contacts.v4.contact",
256
+ method: "DELETE",
257
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.DeleteContact",
258
+ packageName: PACKAGE_NAME,
259
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
260
+ protoPath: "/v4/contacts/{contactId}",
261
+ data: payload,
262
+ host
263
+ }),
264
+ params: toURLSearchParams(payload)
265
+ };
266
+ return metadata;
267
+ }
268
+ return __deleteContact;
269
+ }
270
+ function labelContact(payload) {
271
+ function __labelContact({ host }) {
272
+ const metadata = {
273
+ entityFqdn: "wix.contacts.v4.contact",
274
+ method: "POST",
275
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.LabelContact",
276
+ packageName: PACKAGE_NAME,
277
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
278
+ protoPath: "/v4/contacts/{contactId}/labels",
279
+ data: payload,
280
+ host
281
+ }),
282
+ data: payload,
283
+ transformResponse: (payload2) => transformPaths(payload2, [
284
+ {
285
+ transformFn: transformRESTTimestampToSDKTimestamp,
286
+ paths: [
287
+ { path: "contact.createdDate" },
288
+ { path: "contact.updatedDate" },
289
+ { path: "contact.lastActivity.activityDate" },
290
+ { path: "contact.lastActivity.date" },
291
+ { path: "contact.picture.urlExpirationDate" },
292
+ { path: "contact.info.picture.image.urlExpirationDate" },
293
+ { path: "contact.memberInfo.signupDate" },
294
+ {
295
+ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
296
+ },
297
+ { path: "contact.memberInfo.sessionInfo.lastWebLogin" },
298
+ { path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
299
+ ]
300
+ },
301
+ {
302
+ transformFn: transformRESTFloatToSDKFloat,
303
+ paths: [
304
+ { path: "contact.info.addresses.items.address.geocode.latitude" },
305
+ {
306
+ path: "contact.info.addresses.items.address.geocode.longitude"
307
+ }
308
+ ]
309
+ }
310
+ ])
311
+ };
312
+ return metadata;
313
+ }
314
+ return __labelContact;
315
+ }
316
+ function unlabelContact(payload) {
317
+ function __unlabelContact({ host }) {
318
+ const metadata = {
319
+ entityFqdn: "wix.contacts.v4.contact",
320
+ method: "DELETE",
321
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.UnlabelContact",
322
+ packageName: PACKAGE_NAME,
323
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
324
+ protoPath: "/v4/contacts/{contactId}/labels",
325
+ data: payload,
326
+ host
327
+ }),
328
+ params: toURLSearchParams(payload),
329
+ transformResponse: (payload2) => transformPaths(payload2, [
330
+ {
331
+ transformFn: transformRESTTimestampToSDKTimestamp,
332
+ paths: [
333
+ { path: "contact.createdDate" },
334
+ { path: "contact.updatedDate" },
335
+ { path: "contact.lastActivity.activityDate" },
336
+ { path: "contact.lastActivity.date" },
337
+ { path: "contact.picture.urlExpirationDate" },
338
+ { path: "contact.info.picture.image.urlExpirationDate" },
339
+ { path: "contact.memberInfo.signupDate" },
340
+ {
341
+ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
342
+ },
343
+ { path: "contact.memberInfo.sessionInfo.lastWebLogin" },
344
+ { path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
345
+ ]
346
+ },
347
+ {
348
+ transformFn: transformRESTFloatToSDKFloat,
349
+ paths: [
350
+ { path: "contact.info.addresses.items.address.geocode.latitude" },
351
+ {
352
+ path: "contact.info.addresses.items.address.geocode.longitude"
353
+ }
354
+ ]
355
+ }
356
+ ])
357
+ };
358
+ return metadata;
359
+ }
360
+ return __unlabelContact;
361
+ }
362
+ function queryContacts(payload) {
363
+ function __queryContacts({ host }) {
364
+ const metadata = {
365
+ entityFqdn: "wix.contacts.v4.contact",
366
+ method: "POST",
367
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts",
368
+ packageName: PACKAGE_NAME,
369
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
370
+ protoPath: "/v4/contacts/query",
371
+ data: payload,
372
+ host
373
+ }),
374
+ data: payload,
375
+ transformResponse: (payload2) => transformPaths(payload2, [
376
+ {
377
+ transformFn: transformRESTTimestampToSDKTimestamp,
378
+ paths: [
379
+ { path: "contacts.createdDate" },
380
+ { path: "contacts.updatedDate" },
381
+ { path: "contacts.lastActivity.activityDate" },
382
+ { path: "contacts.lastActivity.date" },
383
+ { path: "contacts.picture.urlExpirationDate" },
384
+ { path: "contacts.info.picture.image.urlExpirationDate" },
385
+ { path: "contacts.memberInfo.signupDate" },
386
+ {
387
+ path: "contacts.memberInfo.profileInfo.photo.urlExpirationDate"
388
+ },
389
+ { path: "contacts.memberInfo.sessionInfo.lastWebLogin" },
390
+ { path: "contacts.memberInfo.sessionInfo.lastMobileLogin" }
391
+ ]
392
+ },
393
+ {
394
+ transformFn: transformRESTFloatToSDKFloat,
395
+ paths: [
396
+ {
397
+ path: "contacts.info.addresses.items.address.geocode.latitude"
398
+ },
399
+ {
400
+ path: "contacts.info.addresses.items.address.geocode.longitude"
401
+ }
402
+ ]
403
+ }
404
+ ])
405
+ };
406
+ return metadata;
407
+ }
408
+ return __queryContacts;
409
+ }
410
+ function getContact(payload) {
411
+ function __getContact({ host }) {
412
+ const metadata = {
413
+ entityFqdn: "wix.contacts.v4.contact",
414
+ method: "GET",
415
+ methodFqn: "com.wixpress.contacts.core.api.v4.ContactsServiceV4.GetContact",
416
+ packageName: PACKAGE_NAME,
417
+ url: resolveComWixpressContactsCoreApiV4ContactsServiceV4Url({
418
+ protoPath: "/v4/contacts/{id}",
419
+ data: payload,
420
+ host
421
+ }),
422
+ params: toURLSearchParams(payload),
423
+ transformResponse: (payload2) => transformPaths(payload2, [
424
+ {
425
+ transformFn: transformRESTTimestampToSDKTimestamp,
426
+ paths: [
427
+ { path: "contact.createdDate" },
428
+ { path: "contact.updatedDate" },
429
+ { path: "contact.lastActivity.activityDate" },
430
+ { path: "contact.lastActivity.date" },
431
+ { path: "contact.picture.urlExpirationDate" },
432
+ { path: "contact.info.picture.image.urlExpirationDate" },
433
+ { path: "contact.memberInfo.signupDate" },
434
+ {
435
+ path: "contact.memberInfo.profileInfo.photo.urlExpirationDate"
436
+ },
437
+ { path: "contact.memberInfo.sessionInfo.lastWebLogin" },
438
+ { path: "contact.memberInfo.sessionInfo.lastMobileLogin" }
439
+ ]
440
+ },
441
+ {
442
+ transformFn: transformRESTFloatToSDKFloat,
443
+ paths: [
444
+ { path: "contact.info.addresses.items.address.geocode.latitude" },
445
+ {
446
+ path: "contact.info.addresses.items.address.geocode.longitude"
447
+ }
448
+ ]
449
+ }
450
+ ])
451
+ };
452
+ return metadata;
453
+ }
454
+ return __getContact;
455
+ }
456
+
457
+ // src/contacts-v4-contact-contacts.universal.ts
458
+ import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
459
+ import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
460
+ import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
461
+ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
462
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
463
+ var ContactSourceType = /* @__PURE__ */ ((ContactSourceType2) => {
464
+ ContactSourceType2["OTHER"] = "OTHER";
465
+ ContactSourceType2["ADMIN"] = "ADMIN";
466
+ ContactSourceType2["WIX_APP"] = "WIX_APP";
467
+ ContactSourceType2["IMPORT"] = "IMPORT";
468
+ ContactSourceType2["THIRD_PARTY"] = "THIRD_PARTY";
469
+ ContactSourceType2["WIX_BOOKINGS"] = "WIX_BOOKINGS";
470
+ ContactSourceType2["WIX_CHAT"] = "WIX_CHAT";
471
+ ContactSourceType2["WIX_EMAIL_MARKETING"] = "WIX_EMAIL_MARKETING";
472
+ ContactSourceType2["WIX_EVENTS"] = "WIX_EVENTS";
473
+ ContactSourceType2["WIX_FORMS"] = "WIX_FORMS";
474
+ ContactSourceType2["WIX_GROUPS"] = "WIX_GROUPS";
475
+ ContactSourceType2["WIX_HOTELS"] = "WIX_HOTELS";
476
+ ContactSourceType2["WIX_MARKET_PLACE"] = "WIX_MARKET_PLACE";
477
+ ContactSourceType2["WIX_MUSIC"] = "WIX_MUSIC";
478
+ ContactSourceType2["WIX_RESTAURANTS"] = "WIX_RESTAURANTS";
479
+ ContactSourceType2["WIX_SITE_MEMBERS"] = "WIX_SITE_MEMBERS";
480
+ ContactSourceType2["WIX_STORES"] = "WIX_STORES";
481
+ ContactSourceType2["WIX_CODE"] = "WIX_CODE";
482
+ ContactSourceType2["HOPP"] = "HOPP";
483
+ return ContactSourceType2;
484
+ })(ContactSourceType || {});
485
+ var ContactActivityType = /* @__PURE__ */ ((ContactActivityType2) => {
486
+ ContactActivityType2["GENERAL"] = "GENERAL";
487
+ ContactActivityType2["CONTACT_CREATED"] = "CONTACT_CREATED";
488
+ ContactActivityType2["MEMBER_LOGIN"] = "MEMBER_LOGIN";
489
+ ContactActivityType2["MEMBER_REGISTER"] = "MEMBER_REGISTER";
490
+ ContactActivityType2["MEMBER_STATUS_CHANGED"] = "MEMBER_STATUS_CHANGED";
491
+ ContactActivityType2["FORM_SUBMITTED"] = "FORM_SUBMITTED";
492
+ ContactActivityType2["INBOX_FORM_SUBMITTED"] = "INBOX_FORM_SUBMITTED";
493
+ ContactActivityType2["INBOX_PAYMENT_REQUEST_PAID"] = "INBOX_PAYMENT_REQUEST_PAID";
494
+ ContactActivityType2["INBOX_MESSAGE_TO_CUSTOMER"] = "INBOX_MESSAGE_TO_CUSTOMER";
495
+ ContactActivityType2["INBOX_MESSAGE_FROM_CUSTOMER"] = "INBOX_MESSAGE_FROM_CUSTOMER";
496
+ ContactActivityType2["NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED"] = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED";
497
+ ContactActivityType2["NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE"] = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE";
498
+ ContactActivityType2["ECOM_PURCHASE"] = "ECOM_PURCHASE";
499
+ ContactActivityType2["ECOM_CART_ABANDON"] = "ECOM_CART_ABANDON";
500
+ ContactActivityType2["ECOM_CHECKOUT_BUYER"] = "ECOM_CHECKOUT_BUYER";
501
+ ContactActivityType2["BOOKINGS_APPOINTMENT"] = "BOOKINGS_APPOINTMENT";
502
+ ContactActivityType2["HOTELS_RESERVATION"] = "HOTELS_RESERVATION";
503
+ ContactActivityType2["HOTELS_PURCHASE"] = "HOTELS_PURCHASE";
504
+ ContactActivityType2["HOTELS_CONFIRMATION"] = "HOTELS_CONFIRMATION";
505
+ ContactActivityType2["HOTELS_CANCEL"] = "HOTELS_CANCEL";
506
+ ContactActivityType2["VIDEO_PURCHASE"] = "VIDEO_PURCHASE";
507
+ ContactActivityType2["VIDEO_RENT"] = "VIDEO_RENT";
508
+ ContactActivityType2["CASHIER_BUTTON_PURCHASE"] = "CASHIER_BUTTON_PURCHASE";
509
+ ContactActivityType2["ARENA_NEW_LEAD"] = "ARENA_NEW_LEAD";
510
+ ContactActivityType2["EVENTS_RSVP"] = "EVENTS_RSVP";
511
+ ContactActivityType2["INVOICE_PAY"] = "INVOICE_PAY";
512
+ ContactActivityType2["INVOICE_OVERDUE"] = "INVOICE_OVERDUE";
513
+ ContactActivityType2["PRICE_QUOTE_ACCEPT"] = "PRICE_QUOTE_ACCEPT";
514
+ ContactActivityType2["PRICE_QUOTE_EXPIRE"] = "PRICE_QUOTE_EXPIRE";
515
+ ContactActivityType2["RESTAURANTS_ORDER"] = "RESTAURANTS_ORDER";
516
+ ContactActivityType2["RESTAURANTS_RESERVATION"] = "RESTAURANTS_RESERVATION";
517
+ ContactActivityType2["SHOUTOUT_OPEN"] = "SHOUTOUT_OPEN";
518
+ ContactActivityType2["SHOUTOUT_CLICK"] = "SHOUTOUT_CLICK";
519
+ ContactActivityType2["CONTACT_MERGED"] = "CONTACT_MERGED";
520
+ ContactActivityType2["NEWSLETTER_SUBSCRIPTION_SUBSCRIBE"] = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE";
521
+ ContactActivityType2["NEWSLETTER_SUBSCRIPTION_PENDING"] = "NEWSLETTER_SUBSCRIPTION_PENDING";
522
+ ContactActivityType2["NEWSLETTER_SUBSCRIPTION_NOT_SET"] = "NEWSLETTER_SUBSCRIPTION_NOT_SET";
523
+ ContactActivityType2["PHONE_SUBSCRIPTION_SUBSCRIBE"] = "PHONE_SUBSCRIPTION_SUBSCRIBE";
524
+ ContactActivityType2["PHONE_SUBSCRIPTION_PENDING"] = "PHONE_SUBSCRIPTION_PENDING";
525
+ ContactActivityType2["PHONE_SUBSCRIPTION_NOT_SET"] = "PHONE_SUBSCRIPTION_NOT_SET";
526
+ ContactActivityType2["PHONE_SUBSCRIPTION_UNSUBSCRIBE"] = "PHONE_SUBSCRIPTION_UNSUBSCRIBE";
527
+ return ContactActivityType2;
528
+ })(ContactActivityType || {});
529
+ var EmailTag = /* @__PURE__ */ ((EmailTag2) => {
530
+ EmailTag2["UNTAGGED"] = "UNTAGGED";
531
+ EmailTag2["MAIN"] = "MAIN";
532
+ EmailTag2["HOME"] = "HOME";
533
+ EmailTag2["WORK"] = "WORK";
534
+ return EmailTag2;
535
+ })(EmailTag || {});
536
+ var PhoneTag = /* @__PURE__ */ ((PhoneTag2) => {
537
+ PhoneTag2["UNTAGGED"] = "UNTAGGED";
538
+ PhoneTag2["MAIN"] = "MAIN";
539
+ PhoneTag2["HOME"] = "HOME";
540
+ PhoneTag2["MOBILE"] = "MOBILE";
541
+ PhoneTag2["WORK"] = "WORK";
542
+ PhoneTag2["FAX"] = "FAX";
543
+ return PhoneTag2;
544
+ })(PhoneTag || {});
545
+ var AddressTag = /* @__PURE__ */ ((AddressTag2) => {
546
+ AddressTag2["UNTAGGED"] = "UNTAGGED";
547
+ AddressTag2["HOME"] = "HOME";
548
+ AddressTag2["WORK"] = "WORK";
549
+ AddressTag2["BILLING"] = "BILLING";
550
+ AddressTag2["SHIPPING"] = "SHIPPING";
551
+ return AddressTag2;
552
+ })(AddressTag || {});
553
+ var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
554
+ SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
555
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
556
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
557
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
558
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
559
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
560
+ SubdivisionType2["COUNTRY"] = "COUNTRY";
561
+ return SubdivisionType2;
562
+ })(SubdivisionType || {});
563
+ var ImageProvider = /* @__PURE__ */ ((ImageProvider2) => {
564
+ ImageProvider2["UNKNOWN"] = "UNKNOWN";
565
+ ImageProvider2["EXTERNAL"] = "EXTERNAL";
566
+ ImageProvider2["WIX_MEDIA"] = "WIX_MEDIA";
567
+ return ImageProvider2;
568
+ })(ImageProvider || {});
569
+ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
570
+ SubscriptionStatus2["NO_SUBSCRIPTION_STATUS"] = "NO_SUBSCRIPTION_STATUS";
571
+ SubscriptionStatus2["NOT_SET"] = "NOT_SET";
572
+ SubscriptionStatus2["PENDING"] = "PENDING";
573
+ SubscriptionStatus2["SUBSCRIBED"] = "SUBSCRIBED";
574
+ SubscriptionStatus2["UNSUBSCRIBED"] = "UNSUBSCRIBED";
575
+ return SubscriptionStatus2;
576
+ })(SubscriptionStatus || {});
577
+ var EmailDeliverabilityStatus = /* @__PURE__ */ ((EmailDeliverabilityStatus2) => {
578
+ EmailDeliverabilityStatus2["NOT_SET"] = "NOT_SET";
579
+ EmailDeliverabilityStatus2["VALID"] = "VALID";
580
+ EmailDeliverabilityStatus2["BOUNCED"] = "BOUNCED";
581
+ EmailDeliverabilityStatus2["SPAM_COMPLAINT"] = "SPAM_COMPLAINT";
582
+ EmailDeliverabilityStatus2["INACTIVE"] = "INACTIVE";
583
+ return EmailDeliverabilityStatus2;
584
+ })(EmailDeliverabilityStatus || {});
585
+ var PhoneDeliverabilityStatus = /* @__PURE__ */ ((PhoneDeliverabilityStatus2) => {
586
+ PhoneDeliverabilityStatus2["NO_PHONE_DELIVERABILITY_STATUS"] = "NO_PHONE_DELIVERABILITY_STATUS";
587
+ PhoneDeliverabilityStatus2["NOT_SET"] = "NOT_SET";
588
+ return PhoneDeliverabilityStatus2;
589
+ })(PhoneDeliverabilityStatus || {});
590
+ var MemberStatus = /* @__PURE__ */ ((MemberStatus2) => {
591
+ MemberStatus2["PENDING"] = "PENDING";
592
+ MemberStatus2["ACTIVE"] = "ACTIVE";
593
+ MemberStatus2["DELETED"] = "DELETED";
594
+ MemberStatus2["BLOCKED"] = "BLOCKED";
595
+ MemberStatus2["OFFLINE"] = "OFFLINE";
596
+ return MemberStatus2;
597
+ })(MemberStatus || {});
598
+ var PrivacyStatus = /* @__PURE__ */ ((PrivacyStatus2) => {
599
+ PrivacyStatus2["PRIVATE"] = "PRIVATE";
600
+ PrivacyStatus2["PUBLIC"] = "PUBLIC";
601
+ return PrivacyStatus2;
602
+ })(PrivacyStatus || {});
603
+ var Role = /* @__PURE__ */ ((Role2) => {
604
+ Role2["UNSPECIFIED_ROLE"] = "UNSPECIFIED_ROLE";
605
+ Role2["OWNER"] = "OWNER";
606
+ Role2["CONTRIBUTOR"] = "CONTRIBUTOR";
607
+ return Role2;
608
+ })(Role || {});
609
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
610
+ SortOrder2["ASC"] = "ASC";
611
+ SortOrder2["DESC"] = "DESC";
612
+ return SortOrder2;
613
+ })(SortOrder || {});
614
+ var ContactFieldSet = /* @__PURE__ */ ((ContactFieldSet2) => {
615
+ ContactFieldSet2["BASIC"] = "BASIC";
616
+ ContactFieldSet2["COMMUNICATION_DETAILS"] = "COMMUNICATION_DETAILS";
617
+ ContactFieldSet2["EXTENDED"] = "EXTENDED";
618
+ ContactFieldSet2["FULL"] = "FULL";
619
+ return ContactFieldSet2;
620
+ })(ContactFieldSet || {});
621
+ var ContactsFacetType = /* @__PURE__ */ ((ContactsFacetType2) => {
622
+ ContactsFacetType2["UNKNOWN"] = "UNKNOWN";
623
+ ContactsFacetType2["ALL_CONTACTS"] = "ALL_CONTACTS";
624
+ ContactsFacetType2["NOT_LABELED"] = "NOT_LABELED";
625
+ ContactsFacetType2["LABEL"] = "LABEL";
626
+ ContactsFacetType2["SUBSCRIPTION_STATUS"] = "SUBSCRIPTION_STATUS";
627
+ ContactsFacetType2["MEMBERSHIP_STATUS"] = "MEMBERSHIP_STATUS";
628
+ return ContactsFacetType2;
629
+ })(ContactsFacetType || {});
630
+ var Action = /* @__PURE__ */ ((Action2) => {
631
+ Action2["UNKNOWN"] = "UNKNOWN";
632
+ Action2["UPDATED"] = "UPDATED";
633
+ Action2["CREATED"] = "CREATED";
634
+ return Action2;
635
+ })(Action || {});
636
+ var UpsertContactResponseAction = /* @__PURE__ */ ((UpsertContactResponseAction2) => {
637
+ UpsertContactResponseAction2["UNKNOWN"] = "UNKNOWN";
638
+ UpsertContactResponseAction2["UPDATED"] = "UPDATED";
639
+ UpsertContactResponseAction2["CREATED"] = "CREATED";
640
+ return UpsertContactResponseAction2;
641
+ })(UpsertContactResponseAction || {});
642
+ var GetContactResponseType = /* @__PURE__ */ ((GetContactResponseType2) => {
643
+ GetContactResponseType2["REGULAR"] = "REGULAR";
644
+ GetContactResponseType2["IMPLICIT"] = "IMPLICIT";
645
+ GetContactResponseType2["MERGED"] = "MERGED";
646
+ return GetContactResponseType2;
647
+ })(GetContactResponseType || {});
648
+ var SubmitOperation = /* @__PURE__ */ ((SubmitOperation2) => {
649
+ SubmitOperation2["UNKNOWN"] = "UNKNOWN";
650
+ SubmitOperation2["CREATE"] = "CREATE";
651
+ SubmitOperation2["UPDATE"] = "UPDATE";
652
+ return SubmitOperation2;
653
+ })(SubmitOperation || {});
654
+ var Mode = /* @__PURE__ */ ((Mode2) => {
655
+ Mode2["OR"] = "OR";
656
+ Mode2["AND"] = "AND";
657
+ return Mode2;
658
+ })(Mode || {});
659
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
660
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
661
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
662
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
663
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
664
+ WebhookIdentityType2["APP"] = "APP";
665
+ return WebhookIdentityType2;
666
+ })(WebhookIdentityType || {});
667
+ async function createContact2(info, options) {
668
+ const { httpClient, sideEffects } = arguments[2];
669
+ const payload = transformPaths2(
670
+ renameKeysFromSDKRequestToRESTRequest({
671
+ info,
672
+ allowDuplicates: options?.allowDuplicates
673
+ }),
674
+ [
675
+ {
676
+ transformFn: transformSDKAddressToRESTAddress,
677
+ paths: [{ path: "info.addresses.items.address" }]
678
+ },
679
+ {
680
+ transformFn: transformSDKImageToRESTImage,
681
+ paths: [{ path: "info.picture.image" }]
682
+ }
683
+ ]
684
+ );
685
+ const reqOpts = createContact(payload);
686
+ sideEffects?.onSiteCall?.();
687
+ try {
688
+ const result = await httpClient.request(reqOpts);
689
+ sideEffects?.onSuccess?.(result);
690
+ return renameKeysFromRESTResponseToSDKResponse(
691
+ transformPaths2(result.data, [
692
+ {
693
+ transformFn: transformRESTImageToSDKImage,
694
+ paths: [
695
+ { path: "contact.picture" },
696
+ { path: "contact.info.picture.image" },
697
+ { path: "contact.memberInfo.profileInfo.photo" }
698
+ ]
699
+ },
700
+ {
701
+ transformFn: transformRESTAddressToSDKAddress,
702
+ paths: [{ path: "contact.info.addresses.items.address" }]
703
+ }
704
+ ])
705
+ );
706
+ } catch (err) {
707
+ const transformedError = sdkTransformError(
708
+ err,
709
+ {
710
+ spreadPathsToArguments: {},
711
+ explicitPathsToArguments: {
712
+ info: "$[0]",
713
+ allowDuplicates: "$[1].allowDuplicates"
714
+ },
715
+ singleArgumentUnchanged: false
716
+ },
717
+ ["info", "options"]
718
+ );
719
+ sideEffects?.onError?.(err);
720
+ throw transformedError;
721
+ }
722
+ }
723
+ async function updateContact2(contactId, info, revision, options) {
724
+ const { httpClient, sideEffects } = arguments[4];
725
+ const payload = transformPaths2(
726
+ renameKeysFromSDKRequestToRESTRequest({
727
+ contactId,
728
+ info,
729
+ revision,
730
+ allowDuplicates: options?.allowDuplicates
731
+ }),
732
+ [
733
+ {
734
+ transformFn: transformSDKAddressToRESTAddress,
735
+ paths: [{ path: "info.addresses.items.address" }]
736
+ },
737
+ {
738
+ transformFn: transformSDKImageToRESTImage,
739
+ paths: [{ path: "info.picture.image" }]
740
+ }
741
+ ]
742
+ );
743
+ const reqOpts = updateContact(payload);
744
+ sideEffects?.onSiteCall?.();
745
+ try {
746
+ const result = await httpClient.request(reqOpts);
747
+ sideEffects?.onSuccess?.(result);
748
+ return renameKeysFromRESTResponseToSDKResponse(
749
+ transformPaths2(result.data, [
750
+ {
751
+ transformFn: transformRESTImageToSDKImage,
752
+ paths: [
753
+ { path: "contact.picture" },
754
+ { path: "contact.info.picture.image" },
755
+ { path: "contact.memberInfo.profileInfo.photo" }
756
+ ]
757
+ },
758
+ {
759
+ transformFn: transformRESTAddressToSDKAddress,
760
+ paths: [{ path: "contact.info.addresses.items.address" }]
761
+ }
762
+ ])
763
+ );
764
+ } catch (err) {
765
+ const transformedError = sdkTransformError(
766
+ err,
767
+ {
768
+ spreadPathsToArguments: {},
769
+ explicitPathsToArguments: {
770
+ contactId: "$[0]",
771
+ info: "$[1]",
772
+ revision: "$[2]",
773
+ allowDuplicates: "$[3].allowDuplicates"
774
+ },
775
+ singleArgumentUnchanged: false
776
+ },
777
+ ["contactId", "info", "revision", "options"]
778
+ );
779
+ sideEffects?.onError?.(err);
780
+ throw transformedError;
781
+ }
782
+ }
783
+ async function mergeContacts2(targetContactId, targetContactRevision, options) {
784
+ const { httpClient, sideEffects } = arguments[3];
785
+ const payload = renameKeysFromSDKRequestToRESTRequest({
786
+ targetContactId,
787
+ targetContactRevision,
788
+ sourceContactIds: options?.sourceContactIds
789
+ });
790
+ const reqOpts = mergeContacts(payload);
791
+ sideEffects?.onSiteCall?.();
792
+ try {
793
+ const result = await httpClient.request(reqOpts);
794
+ sideEffects?.onSuccess?.(result);
795
+ return renameKeysFromRESTResponseToSDKResponse(
796
+ transformPaths2(result.data, [
797
+ {
798
+ transformFn: transformRESTImageToSDKImage,
799
+ paths: [
800
+ { path: "contact.picture" },
801
+ { path: "contact.info.picture.image" },
802
+ { path: "contact.memberInfo.profileInfo.photo" }
803
+ ]
804
+ },
805
+ {
806
+ transformFn: transformRESTAddressToSDKAddress,
807
+ paths: [{ path: "contact.info.addresses.items.address" }]
808
+ }
809
+ ])
810
+ );
811
+ } catch (err) {
812
+ const transformedError = sdkTransformError(
813
+ err,
814
+ {
815
+ spreadPathsToArguments: {},
816
+ explicitPathsToArguments: {
817
+ targetContactId: "$[0]",
818
+ targetContactRevision: "$[1]",
819
+ sourceContactIds: "$[2].sourceContactIds"
820
+ },
821
+ singleArgumentUnchanged: false
822
+ },
823
+ ["targetContactId", "targetContactRevision", "options"]
824
+ );
825
+ sideEffects?.onError?.(err);
826
+ throw transformedError;
827
+ }
828
+ }
829
+ async function deleteContact2(contactId) {
830
+ const { httpClient, sideEffects } = arguments[1];
831
+ const payload = renameKeysFromSDKRequestToRESTRequest({
832
+ contactId
833
+ });
834
+ const reqOpts = deleteContact(payload);
835
+ sideEffects?.onSiteCall?.();
836
+ try {
837
+ const result = await httpClient.request(reqOpts);
838
+ sideEffects?.onSuccess?.(result);
839
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
840
+ } catch (err) {
841
+ const transformedError = sdkTransformError(
842
+ err,
843
+ {
844
+ spreadPathsToArguments: {},
845
+ explicitPathsToArguments: { contactId: "$[0]" },
846
+ singleArgumentUnchanged: false
847
+ },
848
+ ["contactId"]
849
+ );
850
+ sideEffects?.onError?.(err);
851
+ throw transformedError;
852
+ }
853
+ }
854
+ async function labelContact2(contactId, labelKeys) {
855
+ const { httpClient, sideEffects } = arguments[2];
856
+ const payload = renameKeysFromSDKRequestToRESTRequest({
857
+ contactId,
858
+ labelKeys
859
+ });
860
+ const reqOpts = labelContact(payload);
861
+ sideEffects?.onSiteCall?.();
862
+ try {
863
+ const result = await httpClient.request(reqOpts);
864
+ sideEffects?.onSuccess?.(result);
865
+ return renameKeysFromRESTResponseToSDKResponse(
866
+ transformPaths2(result.data, [
867
+ {
868
+ transformFn: transformRESTImageToSDKImage,
869
+ paths: [
870
+ { path: "contact.picture" },
871
+ { path: "contact.info.picture.image" },
872
+ { path: "contact.memberInfo.profileInfo.photo" }
873
+ ]
874
+ },
875
+ {
876
+ transformFn: transformRESTAddressToSDKAddress,
877
+ paths: [{ path: "contact.info.addresses.items.address" }]
878
+ }
879
+ ])
880
+ );
881
+ } catch (err) {
882
+ const transformedError = sdkTransformError(
883
+ err,
884
+ {
885
+ spreadPathsToArguments: {},
886
+ explicitPathsToArguments: { contactId: "$[0]", labelKeys: "$[1]" },
887
+ singleArgumentUnchanged: false
888
+ },
889
+ ["contactId", "labelKeys"]
890
+ );
891
+ sideEffects?.onError?.(err);
892
+ throw transformedError;
893
+ }
894
+ }
895
+ async function unlabelContact2(contactId, labelKeys) {
896
+ const { httpClient, sideEffects } = arguments[2];
897
+ const payload = renameKeysFromSDKRequestToRESTRequest({
898
+ contactId,
899
+ labelKeys
900
+ });
901
+ const reqOpts = unlabelContact(payload);
902
+ sideEffects?.onSiteCall?.();
903
+ try {
904
+ const result = await httpClient.request(reqOpts);
905
+ sideEffects?.onSuccess?.(result);
906
+ return renameKeysFromRESTResponseToSDKResponse(
907
+ transformPaths2(result.data, [
908
+ {
909
+ transformFn: transformRESTImageToSDKImage,
910
+ paths: [
911
+ { path: "contact.picture" },
912
+ { path: "contact.info.picture.image" },
913
+ { path: "contact.memberInfo.profileInfo.photo" }
914
+ ]
915
+ },
916
+ {
917
+ transformFn: transformRESTAddressToSDKAddress,
918
+ paths: [{ path: "contact.info.addresses.items.address" }]
919
+ }
920
+ ])
921
+ );
922
+ } catch (err) {
923
+ const transformedError = sdkTransformError(
924
+ err,
925
+ {
926
+ spreadPathsToArguments: {},
927
+ explicitPathsToArguments: { contactId: "$[0]", labelKeys: "$[1]" },
928
+ singleArgumentUnchanged: false
929
+ },
930
+ ["contactId", "labelKeys"]
931
+ );
932
+ sideEffects?.onError?.(err);
933
+ throw transformedError;
934
+ }
935
+ }
936
+ function queryContacts2(options) {
937
+ const { httpClient, sideEffects } = arguments[1];
938
+ return queryBuilder({
939
+ func: async (payload) => {
940
+ const reqOpts = queryContacts({
941
+ ...payload,
942
+ ...options ?? {}
943
+ });
944
+ sideEffects?.onSiteCall?.();
945
+ try {
946
+ const result = await httpClient.request(reqOpts);
947
+ sideEffects?.onSuccess?.(result);
948
+ return result;
949
+ } catch (err) {
950
+ sideEffects?.onError?.(err);
951
+ throw err;
952
+ }
953
+ },
954
+ requestTransformer: (query) => {
955
+ const args = [query, options];
956
+ return renameKeysFromSDKRequestToRESTRequest({
957
+ ...args?.[1],
958
+ query: args?.[0]
959
+ });
960
+ },
961
+ responseTransformer: ({ data }) => {
962
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
963
+ transformPaths2(data, [
964
+ {
965
+ transformFn: transformRESTImageToSDKImage,
966
+ paths: [
967
+ { path: "contacts.picture" },
968
+ { path: "contacts.info.picture.image" },
969
+ { path: "contacts.memberInfo.profileInfo.photo" }
970
+ ]
971
+ },
972
+ {
973
+ transformFn: transformRESTAddressToSDKAddress,
974
+ paths: [{ path: "contacts.info.addresses.items.address" }]
975
+ }
976
+ ])
977
+ );
978
+ return {
979
+ items: transformedData?.contacts,
980
+ pagingMetadata: transformedData?.pagingMetadata
981
+ };
982
+ },
983
+ errorTransformer: (err) => {
984
+ const transformedError = sdkTransformError(err, {
985
+ spreadPathsToArguments: {},
986
+ explicitPathsToArguments: { query: "$[0]" },
987
+ singleArgumentUnchanged: false
988
+ });
989
+ throw transformedError;
990
+ },
991
+ pagingMethod: "OFFSET",
992
+ transformationPaths: {}
993
+ });
994
+ }
995
+ async function getContact2(_id, options) {
996
+ const { httpClient, sideEffects } = arguments[2];
997
+ const payload = renameKeysFromSDKRequestToRESTRequest({
998
+ id: _id,
999
+ fields: options?.fields,
1000
+ fieldsets: options?.fieldsets
1001
+ });
1002
+ const reqOpts = getContact(payload);
1003
+ sideEffects?.onSiteCall?.();
1004
+ try {
1005
+ const result = await httpClient.request(reqOpts);
1006
+ sideEffects?.onSuccess?.(result);
1007
+ return renameKeysFromRESTResponseToSDKResponse(
1008
+ transformPaths2(result.data, [
1009
+ {
1010
+ transformFn: transformRESTImageToSDKImage,
1011
+ paths: [
1012
+ { path: "contact.picture" },
1013
+ { path: "contact.info.picture.image" },
1014
+ { path: "contact.memberInfo.profileInfo.photo" }
1015
+ ]
1016
+ },
1017
+ {
1018
+ transformFn: transformRESTAddressToSDKAddress,
1019
+ paths: [{ path: "contact.info.addresses.items.address" }]
1020
+ }
1021
+ ])
1022
+ )?.contact;
1023
+ } catch (err) {
1024
+ const transformedError = sdkTransformError(
1025
+ err,
1026
+ {
1027
+ spreadPathsToArguments: {},
1028
+ explicitPathsToArguments: {
1029
+ id: "$[0]",
1030
+ fields: "$[1].fields",
1031
+ fieldsets: "$[1].fieldsets"
1032
+ },
1033
+ singleArgumentUnchanged: false
1034
+ },
1035
+ ["_id", "options"]
1036
+ );
1037
+ sideEffects?.onError?.(err);
1038
+ throw transformedError;
1039
+ }
1040
+ }
1041
+ export {
1042
+ Action,
1043
+ AddressTag,
1044
+ ContactActivityType,
1045
+ ContactFieldSet,
1046
+ ContactSourceType,
1047
+ ContactsFacetType,
1048
+ EmailDeliverabilityStatus,
1049
+ EmailTag,
1050
+ GetContactResponseType,
1051
+ ImageProvider,
1052
+ MemberStatus,
1053
+ Mode,
1054
+ PhoneDeliverabilityStatus,
1055
+ PhoneTag,
1056
+ PrivacyStatus,
1057
+ Role,
1058
+ SortOrder,
1059
+ SubdivisionType,
1060
+ SubmitOperation,
1061
+ SubscriptionStatus,
1062
+ UpsertContactResponseAction,
1063
+ WebhookIdentityType,
1064
+ createContact2 as createContact,
1065
+ deleteContact2 as deleteContact,
1066
+ getContact2 as getContact,
1067
+ labelContact2 as labelContact,
1068
+ mergeContacts2 as mergeContacts,
1069
+ queryContacts2 as queryContacts,
1070
+ unlabelContact2 as unlabelContact,
1071
+ updateContact2 as updateContact
1072
+ };
1073
+ //# sourceMappingURL=index.typings.mjs.map