@wix/crm 1.0.118 → 1.0.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/crm",
3
- "version": "1.0.118",
3
+ "version": "1.0.119",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -47,5 +47,5 @@
47
47
  "fqdn": ""
48
48
  }
49
49
  },
50
- "falconPackageHash": "93c8f3e73ff0795b0fd32df54a6d3c299f42487893fb98af0f80a0a0"
50
+ "falconPackageHash": "1eadfebcb5fbcd461870d6726893ca9076c3a9147ecf819af472a534"
51
51
  }
@@ -1,39 +1,39 @@
1
- type RESTFunctionDescriptor$5<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$5) => T;
2
- interface HttpClient$5 {
3
- request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
4
  fetchWithAuth: typeof fetch;
5
5
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
6
  }
7
- type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
8
- type HttpResponse$5<T = any> = {
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
9
  data: T;
10
10
  status: number;
11
11
  statusText: string;
12
12
  headers: any;
13
13
  request?: any;
14
14
  };
15
- type RequestOptions$5<_TResponse = any, Data = any> = {
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
16
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
17
  url: string;
18
18
  data?: Data;
19
19
  params?: URLSearchParams;
20
- } & APIMetadata$5;
21
- type APIMetadata$5 = {
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
22
  methodFqn?: string;
23
23
  entityFqdn?: string;
24
24
  packageName?: string;
25
25
  };
26
- type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
27
- type EventDefinition$4<Payload = unknown, Type extends string = string> = {
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
28
  __type: 'event-definition';
29
29
  type: Type;
30
30
  isDomainEvent?: boolean;
31
31
  transformations?: (envelope: unknown) => Payload;
32
32
  __payload: Payload;
33
33
  };
34
- declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
35
- type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
36
- type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
34
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
37
37
 
38
38
  declare global {
39
39
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -42,9 +42,9 @@ declare global {
42
42
  }
43
43
  }
44
44
 
45
- declare function createRESTModule$5<T extends RESTFunctionDescriptor$5>(descriptor: T, elevated?: boolean): BuildRESTFunction$5<T> & T;
45
+ declare function createRESTModule$5<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
46
46
 
47
- declare function createEventModule$4<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
47
+ declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
48
48
 
49
49
  declare const generateAttachmentUploadUrl: ReturnType<typeof createRESTModule$5<typeof publicGenerateAttachmentUploadUrl>>;
50
50
  declare const listAttachments: ReturnType<typeof createRESTModule$5<typeof publicListAttachments>>;
@@ -63,53 +63,9 @@ declare namespace context$5 {
63
63
  export { context$5_deleteAttachment as deleteAttachment, context$5_generateAttachmentUploadUrl as generateAttachmentUploadUrl, context$5_getAttachment as getAttachment, context$5_listAttachments as listAttachments, context$5_onAttachmentCreated as onAttachmentCreated, context$5_onAttachmentDeleted as onAttachmentDeleted };
64
64
  }
65
65
 
66
- type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
67
- interface HttpClient$4 {
68
- request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
69
- fetchWithAuth: typeof fetch;
70
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
71
- }
72
- type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
73
- type HttpResponse$4<T = any> = {
74
- data: T;
75
- status: number;
76
- statusText: string;
77
- headers: any;
78
- request?: any;
79
- };
80
- type RequestOptions$4<_TResponse = any, Data = any> = {
81
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
82
- url: string;
83
- data?: Data;
84
- params?: URLSearchParams;
85
- } & APIMetadata$4;
86
- type APIMetadata$4 = {
87
- methodFqn?: string;
88
- entityFqdn?: string;
89
- packageName?: string;
90
- };
91
- type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
92
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
93
- __type: 'event-definition';
94
- type: Type;
95
- isDomainEvent?: boolean;
96
- transformations?: (envelope: unknown) => Payload;
97
- __payload: Payload;
98
- };
99
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
100
- type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
101
- type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
102
-
103
- declare global {
104
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
105
- interface SymbolConstructor {
106
- readonly observable: symbol;
107
- }
108
- }
109
-
110
- declare function createRESTModule$4<T extends RESTFunctionDescriptor$4>(descriptor: T, elevated?: boolean): BuildRESTFunction$4<T> & T;
66
+ declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
111
67
 
112
- declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
68
+ declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
113
69
 
114
70
  declare const createContact: ReturnType<typeof createRESTModule$4<typeof publicCreateContact>>;
115
71
  declare const updateContact: ReturnType<typeof createRESTModule$4<typeof publicUpdateContact>>;
@@ -140,53 +96,9 @@ declare namespace context$4 {
140
96
  export { context$4_createContact as createContact, context$4_deleteContact as deleteContact, context$4_getContact as getContact, context$4_labelContact as labelContact, context$4_mergeContacts as mergeContacts, context$4_onContactCreated as onContactCreated, context$4_onContactDeleted as onContactDeleted, context$4_onContactMerged as onContactMerged, context$4_onContactUpdated as onContactUpdated, context$4_queryContacts as queryContacts, context$4_unlabelContact as unlabelContact, context$4_updateContact as updateContact };
141
97
  }
142
98
 
143
- type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
144
- interface HttpClient$3 {
145
- request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
146
- fetchWithAuth: typeof fetch;
147
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
148
- }
149
- type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
150
- type HttpResponse$3<T = any> = {
151
- data: T;
152
- status: number;
153
- statusText: string;
154
- headers: any;
155
- request?: any;
156
- };
157
- type RequestOptions$3<_TResponse = any, Data = any> = {
158
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
159
- url: string;
160
- data?: Data;
161
- params?: URLSearchParams;
162
- } & APIMetadata$3;
163
- type APIMetadata$3 = {
164
- methodFqn?: string;
165
- entityFqdn?: string;
166
- packageName?: string;
167
- };
168
- type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
169
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
170
- __type: 'event-definition';
171
- type: Type;
172
- isDomainEvent?: boolean;
173
- transformations?: (envelope: unknown) => Payload;
174
- __payload: Payload;
175
- };
176
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
177
- type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
178
- type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
99
+ declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
179
100
 
180
- declare global {
181
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
182
- interface SymbolConstructor {
183
- readonly observable: symbol;
184
- }
185
- }
186
-
187
- declare function createRESTModule$3<T extends RESTFunctionDescriptor$3>(descriptor: T, elevated?: boolean): BuildRESTFunction$3<T> & T;
188
-
189
- declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
101
+ declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
190
102
 
191
103
  declare const findOrCreateExtendedField: ReturnType<typeof createRESTModule$3<typeof publicFindOrCreateExtendedField>>;
192
104
  declare const getExtendedField: ReturnType<typeof createRESTModule$3<typeof publicGetExtendedField>>;
@@ -209,53 +121,9 @@ declare namespace context$3 {
209
121
  export { context$3_deleteExtendedField as deleteExtendedField, context$3_findOrCreateExtendedField as findOrCreateExtendedField, context$3_getExtendedField as getExtendedField, context$3_onExtendedFieldCreated as onExtendedFieldCreated, context$3_onExtendedFieldDeleted as onExtendedFieldDeleted, context$3_onExtendedFieldUpdated as onExtendedFieldUpdated, context$3_queryExtendedFields as queryExtendedFields, context$3_renameExtendedField as renameExtendedField };
210
122
  }
211
123
 
212
- type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
213
- interface HttpClient$2 {
214
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
215
- fetchWithAuth: typeof fetch;
216
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
217
- }
218
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
219
- type HttpResponse$2<T = any> = {
220
- data: T;
221
- status: number;
222
- statusText: string;
223
- headers: any;
224
- request?: any;
225
- };
226
- type RequestOptions$2<_TResponse = any, Data = any> = {
227
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
228
- url: string;
229
- data?: Data;
230
- params?: URLSearchParams;
231
- } & APIMetadata$2;
232
- type APIMetadata$2 = {
233
- methodFqn?: string;
234
- entityFqdn?: string;
235
- packageName?: string;
236
- };
237
- type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
238
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
239
- __type: 'event-definition';
240
- type: Type;
241
- isDomainEvent?: boolean;
242
- transformations?: (envelope: unknown) => Payload;
243
- __payload: Payload;
244
- };
245
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
246
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
247
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
248
-
249
- declare global {
250
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
251
- interface SymbolConstructor {
252
- readonly observable: symbol;
253
- }
254
- }
124
+ declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
255
125
 
256
- declare function createRESTModule$2<T extends RESTFunctionDescriptor$2>(descriptor: T, elevated?: boolean): BuildRESTFunction$2<T> & T;
257
-
258
- declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
126
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
259
127
 
260
128
  declare const findOrCreateLabel: ReturnType<typeof createRESTModule$2<typeof publicFindOrCreateLabel>>;
261
129
  declare const getLabel: ReturnType<typeof createRESTModule$2<typeof publicGetLabel>>;
@@ -278,41 +146,7 @@ declare namespace context$2 {
278
146
  export { context$2_deleteLabel as deleteLabel, context$2_findOrCreateLabel as findOrCreateLabel, context$2_getLabel as getLabel, context$2_onLabelCreated as onLabelCreated, context$2_onLabelDeleted as onLabelDeleted, context$2_onLabelUpdated as onLabelUpdated, context$2_queryLabels as queryLabels, context$2_renameLabel as renameLabel };
279
147
  }
280
148
 
281
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
282
- interface HttpClient$1 {
283
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
284
- fetchWithAuth: typeof fetch;
285
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
286
- }
287
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
288
- type HttpResponse$1<T = any> = {
289
- data: T;
290
- status: number;
291
- statusText: string;
292
- headers: any;
293
- request?: any;
294
- };
295
- type RequestOptions$1<_TResponse = any, Data = any> = {
296
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
297
- url: string;
298
- data?: Data;
299
- params?: URLSearchParams;
300
- } & APIMetadata$1;
301
- type APIMetadata$1 = {
302
- methodFqn?: string;
303
- entityFqdn?: string;
304
- packageName?: string;
305
- };
306
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
307
-
308
- declare global {
309
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
310
- interface SymbolConstructor {
311
- readonly observable: symbol;
312
- }
313
- }
314
-
315
- declare function createRESTModule$1<T extends RESTFunctionDescriptor$1>(descriptor: T, elevated?: boolean): BuildRESTFunction$1<T> & T;
149
+ declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
316
150
 
317
151
  declare const appendOrCreateContact: ReturnType<typeof createRESTModule$1<typeof publicAppendOrCreateContact>>;
318
152
 
@@ -321,50 +155,6 @@ declare namespace context$1 {
321
155
  export { context$1_appendOrCreateContact as appendOrCreateContact };
322
156
  }
323
157
 
324
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
325
- interface HttpClient {
326
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
327
- fetchWithAuth: typeof fetch;
328
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
329
- }
330
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
331
- type HttpResponse<T = any> = {
332
- data: T;
333
- status: number;
334
- statusText: string;
335
- headers: any;
336
- request?: any;
337
- };
338
- type RequestOptions<_TResponse = any, Data = any> = {
339
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
340
- url: string;
341
- data?: Data;
342
- params?: URLSearchParams;
343
- } & APIMetadata;
344
- type APIMetadata = {
345
- methodFqn?: string;
346
- entityFqdn?: string;
347
- packageName?: string;
348
- };
349
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
350
- type EventDefinition<Payload = unknown, Type extends string = string> = {
351
- __type: 'event-definition';
352
- type: Type;
353
- isDomainEvent?: boolean;
354
- transformations?: (envelope: unknown) => Payload;
355
- __payload: Payload;
356
- };
357
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
358
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
359
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
360
-
361
- declare global {
362
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
363
- interface SymbolConstructor {
364
- readonly observable: symbol;
365
- }
366
- }
367
-
368
158
  declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
369
159
 
370
160
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
@@ -381,38 +381,38 @@ interface GetAttachmentIdentifiers {
381
381
  attachmentId: string;
382
382
  }
383
383
 
384
- interface HttpClient$5 {
385
- request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
384
+ interface HttpClient {
385
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
386
386
  fetchWithAuth: typeof fetch;
387
387
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
388
388
  }
389
- type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
390
- type HttpResponse$5<T = any> = {
389
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
390
+ type HttpResponse<T = any> = {
391
391
  data: T;
392
392
  status: number;
393
393
  statusText: string;
394
394
  headers: any;
395
395
  request?: any;
396
396
  };
397
- type RequestOptions$5<_TResponse = any, Data = any> = {
397
+ type RequestOptions<_TResponse = any, Data = any> = {
398
398
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
399
399
  url: string;
400
400
  data?: Data;
401
401
  params?: URLSearchParams;
402
- } & APIMetadata$5;
403
- type APIMetadata$5 = {
402
+ } & APIMetadata;
403
+ type APIMetadata = {
404
404
  methodFqn?: string;
405
405
  entityFqdn?: string;
406
406
  packageName?: string;
407
407
  };
408
- type EventDefinition$4<Payload = unknown, Type extends string = string> = {
408
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
409
409
  __type: 'event-definition';
410
410
  type: Type;
411
411
  isDomainEvent?: boolean;
412
412
  transformations?: (envelope: unknown) => Payload;
413
413
  __payload: Payload;
414
414
  };
415
- declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
415
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
416
416
 
417
417
  declare global {
418
418
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -424,10 +424,10 @@ declare global {
424
424
  declare const __metadata$5: {
425
425
  PACKAGE_NAME: string;
426
426
  };
427
- declare function generateAttachmentUploadUrl(httpClient: HttpClient$5): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
428
- declare function listAttachments(httpClient: HttpClient$5): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
429
- declare function deleteAttachment(httpClient: HttpClient$5): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
430
- declare function getAttachment(httpClient: HttpClient$5): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
427
+ declare function generateAttachmentUploadUrl(httpClient: HttpClient): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
428
+ declare function listAttachments(httpClient: HttpClient): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
429
+ declare function deleteAttachment(httpClient: HttpClient): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
430
+ declare function getAttachment(httpClient: HttpClient): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
431
431
  image: string;
432
432
  document: string;
433
433
  _id: string;
@@ -436,8 +436,8 @@ declare function getAttachment(httpClient: HttpClient$5): (identifiers: GetAttac
436
436
  mimeType: string;
437
437
  attachmentType: AttachmentType;
438
438
  }>;
439
- declare const onAttachmentCreated: EventDefinition$4<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
440
- declare const onAttachmentDeleted: EventDefinition$4<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
439
+ declare const onAttachmentCreated: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
440
+ declare const onAttachmentDeleted: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
441
441
 
442
442
  type index_d$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
443
443
  type index_d$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
@@ -2547,57 +2547,17 @@ interface GetContactOptions {
2547
2547
  fieldsets?: ContactFieldSet[];
2548
2548
  }
2549
2549
 
2550
- interface HttpClient$4 {
2551
- request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
2552
- fetchWithAuth: typeof fetch;
2553
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2554
- }
2555
- type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
2556
- type HttpResponse$4<T = any> = {
2557
- data: T;
2558
- status: number;
2559
- statusText: string;
2560
- headers: any;
2561
- request?: any;
2562
- };
2563
- type RequestOptions$4<_TResponse = any, Data = any> = {
2564
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2565
- url: string;
2566
- data?: Data;
2567
- params?: URLSearchParams;
2568
- } & APIMetadata$4;
2569
- type APIMetadata$4 = {
2570
- methodFqn?: string;
2571
- entityFqdn?: string;
2572
- packageName?: string;
2573
- };
2574
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
2575
- __type: 'event-definition';
2576
- type: Type;
2577
- isDomainEvent?: boolean;
2578
- transformations?: (envelope: unknown) => Payload;
2579
- __payload: Payload;
2580
- };
2581
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
2582
-
2583
- declare global {
2584
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2585
- interface SymbolConstructor {
2586
- readonly observable: symbol;
2587
- }
2588
- }
2589
-
2590
2550
  declare const __metadata$4: {
2591
2551
  PACKAGE_NAME: string;
2592
2552
  };
2593
- declare function createContact(httpClient: HttpClient$4): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
2594
- declare function updateContact(httpClient: HttpClient$4): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
2595
- declare function mergeContacts(httpClient: HttpClient$4): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
2596
- declare function deleteContact(httpClient: HttpClient$4): (contactId: string) => Promise<void>;
2597
- declare function labelContact(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
2598
- declare function unlabelContact(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
2599
- declare function queryContacts(httpClient: HttpClient$4): (options?: QueryContactsOptions) => ContactsQueryBuilder;
2600
- declare function getContact(httpClient: HttpClient$4): (_id: string, options?: GetContactOptions) => Promise<Contact & {
2553
+ declare function createContact(httpClient: HttpClient): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
2554
+ declare function updateContact(httpClient: HttpClient): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
2555
+ declare function mergeContacts(httpClient: HttpClient): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
2556
+ declare function deleteContact(httpClient: HttpClient): (contactId: string) => Promise<void>;
2557
+ declare function labelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
2558
+ declare function unlabelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
2559
+ declare function queryContacts(httpClient: HttpClient): (options?: QueryContactsOptions) => ContactsQueryBuilder;
2560
+ declare function getContact(httpClient: HttpClient): (_id: string, options?: GetContactOptions) => Promise<Contact & {
2601
2561
  _id: string;
2602
2562
  revision: number;
2603
2563
  source?: {
@@ -2632,10 +2592,10 @@ declare function getContact(httpClient: HttpClient$4): (_id: string, options?: G
2632
2592
  } | undefined;
2633
2593
  } | undefined;
2634
2594
  }>;
2635
- declare const onContactCreated: EventDefinition$3<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
2636
- declare const onContactUpdated: EventDefinition$3<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
2637
- declare const onContactMerged: EventDefinition$3<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
2638
- declare const onContactDeleted: EventDefinition$3<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
2595
+ declare const onContactCreated: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
2596
+ declare const onContactUpdated: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
2597
+ declare const onContactMerged: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
2598
+ declare const onContactDeleted: EventDefinition<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
2639
2599
 
2640
2600
  type index_d$4_Action = Action;
2641
2601
  declare const index_d$4_Action: typeof Action;
@@ -3363,67 +3323,27 @@ interface FieldsQueryBuilder {
3363
3323
  find: () => Promise<FieldsQueryResult>;
3364
3324
  }
3365
3325
 
3366
- interface HttpClient$3 {
3367
- request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
3368
- fetchWithAuth: typeof fetch;
3369
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
3370
- }
3371
- type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
3372
- type HttpResponse$3<T = any> = {
3373
- data: T;
3374
- status: number;
3375
- statusText: string;
3376
- headers: any;
3377
- request?: any;
3378
- };
3379
- type RequestOptions$3<_TResponse = any, Data = any> = {
3380
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3381
- url: string;
3382
- data?: Data;
3383
- params?: URLSearchParams;
3384
- } & APIMetadata$3;
3385
- type APIMetadata$3 = {
3386
- methodFqn?: string;
3387
- entityFqdn?: string;
3388
- packageName?: string;
3389
- };
3390
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
3391
- __type: 'event-definition';
3392
- type: Type;
3393
- isDomainEvent?: boolean;
3394
- transformations?: (envelope: unknown) => Payload;
3395
- __payload: Payload;
3396
- };
3397
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
3398
-
3399
- declare global {
3400
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3401
- interface SymbolConstructor {
3402
- readonly observable: symbol;
3403
- }
3404
- }
3405
-
3406
3326
  declare const __metadata$3: {
3407
3327
  PACKAGE_NAME: string;
3408
3328
  };
3409
- declare function findOrCreateExtendedField(httpClient: HttpClient$3): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
3410
- declare function getExtendedField(httpClient: HttpClient$3): (key: string) => Promise<ExtendedField & {
3329
+ declare function findOrCreateExtendedField(httpClient: HttpClient): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
3330
+ declare function getExtendedField(httpClient: HttpClient): (key: string) => Promise<ExtendedField & {
3411
3331
  key: string;
3412
3332
  displayName: string;
3413
3333
  dataType: FieldDataType;
3414
3334
  fieldType: FieldType;
3415
3335
  }>;
3416
- declare function renameExtendedField(httpClient: HttpClient$3): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
3336
+ declare function renameExtendedField(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
3417
3337
  key: string;
3418
3338
  displayName: string;
3419
3339
  dataType: FieldDataType;
3420
3340
  fieldType: FieldType;
3421
3341
  }>;
3422
- declare function deleteExtendedField(httpClient: HttpClient$3): (key: string) => Promise<void>;
3423
- declare function queryExtendedFields(httpClient: HttpClient$3): () => FieldsQueryBuilder;
3424
- declare const onExtendedFieldCreated: EventDefinition$2<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
3425
- declare const onExtendedFieldUpdated: EventDefinition$2<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
3426
- declare const onExtendedFieldDeleted: EventDefinition$2<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
3342
+ declare function deleteExtendedField(httpClient: HttpClient): (key: string) => Promise<void>;
3343
+ declare function queryExtendedFields(httpClient: HttpClient): () => FieldsQueryBuilder;
3344
+ declare const onExtendedFieldCreated: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
3345
+ declare const onExtendedFieldUpdated: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
3346
+ declare const onExtendedFieldDeleted: EventDefinition<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
3427
3347
 
3428
3348
  type index_d$3_DeleteExtendedFieldRequest = DeleteExtendedFieldRequest;
3429
3349
  type index_d$3_DeleteExtendedFieldResponse = DeleteExtendedFieldResponse;
@@ -4072,65 +3992,25 @@ interface LabelsQueryBuilder {
4072
3992
  find: () => Promise<LabelsQueryResult>;
4073
3993
  }
4074
3994
 
4075
- interface HttpClient$2 {
4076
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
4077
- fetchWithAuth: typeof fetch;
4078
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
4079
- }
4080
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
4081
- type HttpResponse$2<T = any> = {
4082
- data: T;
4083
- status: number;
4084
- statusText: string;
4085
- headers: any;
4086
- request?: any;
4087
- };
4088
- type RequestOptions$2<_TResponse = any, Data = any> = {
4089
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4090
- url: string;
4091
- data?: Data;
4092
- params?: URLSearchParams;
4093
- } & APIMetadata$2;
4094
- type APIMetadata$2 = {
4095
- methodFqn?: string;
4096
- entityFqdn?: string;
4097
- packageName?: string;
4098
- };
4099
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
4100
- __type: 'event-definition';
4101
- type: Type;
4102
- isDomainEvent?: boolean;
4103
- transformations?: (envelope: unknown) => Payload;
4104
- __payload: Payload;
4105
- };
4106
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
4107
-
4108
- declare global {
4109
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4110
- interface SymbolConstructor {
4111
- readonly observable: symbol;
4112
- }
4113
- }
4114
-
4115
3995
  declare const __metadata$2: {
4116
3996
  PACKAGE_NAME: string;
4117
3997
  };
4118
- declare function findOrCreateLabel(httpClient: HttpClient$2): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
4119
- declare function getLabel(httpClient: HttpClient$2): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
3998
+ declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
3999
+ declare function getLabel(httpClient: HttpClient): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
4120
4000
  key: string;
4121
4001
  displayName: string;
4122
4002
  labelType: LabelType;
4123
4003
  }>;
4124
- declare function renameLabel(httpClient: HttpClient$2): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
4004
+ declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
4125
4005
  key: string;
4126
4006
  displayName: string;
4127
4007
  labelType: LabelType;
4128
4008
  }>;
4129
- declare function deleteLabel(httpClient: HttpClient$2): (key: string) => Promise<void>;
4130
- declare function queryLabels(httpClient: HttpClient$2): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
4131
- declare const onLabelCreated: EventDefinition$1<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
4132
- declare const onLabelUpdated: EventDefinition$1<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
4133
- declare const onLabelDeleted: EventDefinition$1<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
4009
+ declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
4010
+ declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
4011
+ declare const onLabelCreated: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
4012
+ declare const onLabelUpdated: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
4013
+ declare const onLabelDeleted: EventDefinition<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
4134
4014
 
4135
4015
  type index_d$2_ContactLabel = ContactLabel;
4136
4016
  type index_d$2_ContactLabelNamespace = ContactLabelNamespace;
@@ -4774,42 +4654,10 @@ interface AppendOrCreateContactOptions {
4774
4654
  contactId?: string | null;
4775
4655
  }
4776
4656
 
4777
- interface HttpClient$1 {
4778
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
4779
- fetchWithAuth: typeof fetch;
4780
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
4781
- }
4782
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
4783
- type HttpResponse$1<T = any> = {
4784
- data: T;
4785
- status: number;
4786
- statusText: string;
4787
- headers: any;
4788
- request?: any;
4789
- };
4790
- type RequestOptions$1<_TResponse = any, Data = any> = {
4791
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4792
- url: string;
4793
- data?: Data;
4794
- params?: URLSearchParams;
4795
- } & APIMetadata$1;
4796
- type APIMetadata$1 = {
4797
- methodFqn?: string;
4798
- entityFqdn?: string;
4799
- packageName?: string;
4800
- };
4801
-
4802
- declare global {
4803
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4804
- interface SymbolConstructor {
4805
- readonly observable: symbol;
4806
- }
4807
- }
4808
-
4809
4657
  declare const __metadata$1: {
4810
4658
  PACKAGE_NAME: string;
4811
4659
  };
4812
- declare function appendOrCreateContact(httpClient: HttpClient$1): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
4660
+ declare function appendOrCreateContact(httpClient: HttpClient): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
4813
4661
 
4814
4662
  type index_d$1_ActivityIcon = ActivityIcon;
4815
4663
  type index_d$1_Address = Address;
@@ -5508,46 +5356,6 @@ interface MoveTaskAfterOptions {
5508
5356
  beforeTaskId?: string | null;
5509
5357
  }
5510
5358
 
5511
- interface HttpClient {
5512
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
5513
- fetchWithAuth: typeof fetch;
5514
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
5515
- }
5516
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
5517
- type HttpResponse<T = any> = {
5518
- data: T;
5519
- status: number;
5520
- statusText: string;
5521
- headers: any;
5522
- request?: any;
5523
- };
5524
- type RequestOptions<_TResponse = any, Data = any> = {
5525
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
5526
- url: string;
5527
- data?: Data;
5528
- params?: URLSearchParams;
5529
- } & APIMetadata;
5530
- type APIMetadata = {
5531
- methodFqn?: string;
5532
- entityFqdn?: string;
5533
- packageName?: string;
5534
- };
5535
- type EventDefinition<Payload = unknown, Type extends string = string> = {
5536
- __type: 'event-definition';
5537
- type: Type;
5538
- isDomainEvent?: boolean;
5539
- transformations?: (envelope: unknown) => Payload;
5540
- __payload: Payload;
5541
- };
5542
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
5543
-
5544
- declare global {
5545
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5546
- interface SymbolConstructor {
5547
- readonly observable: symbol;
5548
- }
5549
- }
5550
-
5551
5359
  declare const __metadata: {
5552
5360
  PACKAGE_NAME: string;
5553
5361
  };