@wix/crm 1.0.113 → 1.0.115
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 +8 -8
- package/type-bundles/context.bundle.d.ts +83 -288
- package/type-bundles/index.bundle.d.ts +44 -231
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/crm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.115",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/crm_attachments": "1.0.
|
|
22
|
-
"@wix/crm_contacts": "1.0.
|
|
23
|
-
"@wix/crm_extended-fields": "1.0.
|
|
24
|
-
"@wix/crm_labels": "1.0.
|
|
25
|
-
"@wix/crm_submitted-contact": "1.0.
|
|
26
|
-
"@wix/crm_tasks": "1.0.
|
|
21
|
+
"@wix/crm_attachments": "1.0.3",
|
|
22
|
+
"@wix/crm_contacts": "1.0.36",
|
|
23
|
+
"@wix/crm_extended-fields": "1.0.31",
|
|
24
|
+
"@wix/crm_labels": "1.0.31",
|
|
25
|
+
"@wix/crm_submitted-contact": "1.0.25",
|
|
26
|
+
"@wix/crm_tasks": "1.0.31"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"glob": "^10.4.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"fqdn": ""
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "84fbfa6d5574cd47d19e7505c0f149ce17da14cb28cca2e8b620b070"
|
|
51
51
|
}
|
|
@@ -185,41 +185,41 @@ interface GetAttachmentIdentifiers {
|
|
|
185
185
|
attachmentId: string;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
type RESTFunctionDescriptor
|
|
189
|
-
interface HttpClient
|
|
190
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
188
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
189
|
+
interface HttpClient {
|
|
190
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
191
191
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
192
192
|
}
|
|
193
|
-
type RequestOptionsFactory
|
|
194
|
-
type HttpResponse
|
|
193
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
194
|
+
type HttpResponse<T = any> = {
|
|
195
195
|
data: T;
|
|
196
196
|
status: number;
|
|
197
197
|
statusText: string;
|
|
198
198
|
headers: any;
|
|
199
199
|
request?: any;
|
|
200
200
|
};
|
|
201
|
-
type RequestOptions
|
|
201
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
202
202
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
203
203
|
url: string;
|
|
204
204
|
data?: Data;
|
|
205
205
|
params?: URLSearchParams;
|
|
206
|
-
} & APIMetadata
|
|
207
|
-
type APIMetadata
|
|
206
|
+
} & APIMetadata;
|
|
207
|
+
type APIMetadata = {
|
|
208
208
|
methodFqn?: string;
|
|
209
209
|
entityFqdn?: string;
|
|
210
210
|
packageName?: string;
|
|
211
211
|
};
|
|
212
|
-
type BuildRESTFunction
|
|
213
|
-
type EventDefinition
|
|
212
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
213
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
214
214
|
__type: 'event-definition';
|
|
215
215
|
type: Type;
|
|
216
216
|
isDomainEvent?: boolean;
|
|
217
217
|
transformations?: (envelope: unknown) => Payload;
|
|
218
218
|
__payload: Payload;
|
|
219
219
|
};
|
|
220
|
-
declare function EventDefinition
|
|
221
|
-
type EventHandler
|
|
222
|
-
type BuildEventDefinition
|
|
220
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
221
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
222
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
223
223
|
|
|
224
224
|
declare global {
|
|
225
225
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -228,10 +228,10 @@ declare global {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
declare function generateAttachmentUploadUrl$1(httpClient: HttpClient
|
|
232
|
-
declare function listAttachments$1(httpClient: HttpClient
|
|
233
|
-
declare function deleteAttachment$1(httpClient: HttpClient
|
|
234
|
-
declare function getAttachment$1(httpClient: HttpClient
|
|
231
|
+
declare function generateAttachmentUploadUrl$1(httpClient: HttpClient): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
232
|
+
declare function listAttachments$1(httpClient: HttpClient): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
233
|
+
declare function deleteAttachment$1(httpClient: HttpClient): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
234
|
+
declare function getAttachment$1(httpClient: HttpClient): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
235
235
|
image: string;
|
|
236
236
|
document: string;
|
|
237
237
|
_id: string;
|
|
@@ -240,15 +240,15 @@ declare function getAttachment$1(httpClient: HttpClient$5): (identifiers: GetAtt
|
|
|
240
240
|
mimeType: string;
|
|
241
241
|
attachmentType: AttachmentType;
|
|
242
242
|
}>;
|
|
243
|
-
declare const onAttachmentCreated$1: EventDefinition
|
|
244
|
-
declare const onAttachmentDeleted$1: EventDefinition
|
|
243
|
+
declare const onAttachmentCreated$1: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
244
|
+
declare const onAttachmentDeleted$1: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
245
245
|
|
|
246
|
-
declare const generateAttachmentUploadUrl: BuildRESTFunction
|
|
247
|
-
declare const listAttachments: BuildRESTFunction
|
|
248
|
-
declare const deleteAttachment: BuildRESTFunction
|
|
249
|
-
declare const getAttachment: BuildRESTFunction
|
|
250
|
-
declare const onAttachmentCreated: BuildEventDefinition
|
|
251
|
-
declare const onAttachmentDeleted: BuildEventDefinition
|
|
246
|
+
declare const generateAttachmentUploadUrl: BuildRESTFunction<typeof generateAttachmentUploadUrl$1>;
|
|
247
|
+
declare const listAttachments: BuildRESTFunction<typeof listAttachments$1>;
|
|
248
|
+
declare const deleteAttachment: BuildRESTFunction<typeof deleteAttachment$1>;
|
|
249
|
+
declare const getAttachment: BuildRESTFunction<typeof getAttachment$1>;
|
|
250
|
+
declare const onAttachmentCreated: BuildEventDefinition<typeof onAttachmentCreated$1>;
|
|
251
|
+
declare const onAttachmentDeleted: BuildEventDefinition<typeof onAttachmentDeleted$1>;
|
|
252
252
|
|
|
253
253
|
declare const context$5_deleteAttachment: typeof deleteAttachment;
|
|
254
254
|
declare const context$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
|
|
@@ -1129,57 +1129,14 @@ interface GetContactOptions {
|
|
|
1129
1129
|
fieldsets?: ContactFieldSet[];
|
|
1130
1130
|
}
|
|
1131
1131
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
status: number;
|
|
1141
|
-
statusText: string;
|
|
1142
|
-
headers: any;
|
|
1143
|
-
request?: any;
|
|
1144
|
-
};
|
|
1145
|
-
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
1146
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1147
|
-
url: string;
|
|
1148
|
-
data?: Data;
|
|
1149
|
-
params?: URLSearchParams;
|
|
1150
|
-
} & APIMetadata$4;
|
|
1151
|
-
type APIMetadata$4 = {
|
|
1152
|
-
methodFqn?: string;
|
|
1153
|
-
entityFqdn?: string;
|
|
1154
|
-
packageName?: string;
|
|
1155
|
-
};
|
|
1156
|
-
type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
|
|
1157
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
1158
|
-
__type: 'event-definition';
|
|
1159
|
-
type: Type;
|
|
1160
|
-
isDomainEvent?: boolean;
|
|
1161
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1162
|
-
__payload: Payload;
|
|
1163
|
-
};
|
|
1164
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
1165
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
1166
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
1167
|
-
|
|
1168
|
-
declare global {
|
|
1169
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1170
|
-
interface SymbolConstructor {
|
|
1171
|
-
readonly observable: symbol;
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
declare function createContact$1(httpClient: HttpClient$4): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
1176
|
-
declare function updateContact$1(httpClient: HttpClient$4): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1177
|
-
declare function mergeContacts$1(httpClient: HttpClient$4): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
1178
|
-
declare function deleteContact$1(httpClient: HttpClient$4): (contactId: string) => Promise<void>;
|
|
1179
|
-
declare function labelContact$1(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
1180
|
-
declare function unlabelContact$1(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
1181
|
-
declare function queryContacts$1(httpClient: HttpClient$4): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
1182
|
-
declare function getContact$1(httpClient: HttpClient$4): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
1132
|
+
declare function createContact$1(httpClient: HttpClient): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
1133
|
+
declare function updateContact$1(httpClient: HttpClient): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
1134
|
+
declare function mergeContacts$1(httpClient: HttpClient): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
1135
|
+
declare function deleteContact$1(httpClient: HttpClient): (contactId: string) => Promise<void>;
|
|
1136
|
+
declare function labelContact$1(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
1137
|
+
declare function unlabelContact$1(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
1138
|
+
declare function queryContacts$1(httpClient: HttpClient): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
1139
|
+
declare function getContact$1(httpClient: HttpClient): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
1183
1140
|
_id: string;
|
|
1184
1141
|
revision: number;
|
|
1185
1142
|
source?: {
|
|
@@ -1214,23 +1171,23 @@ declare function getContact$1(httpClient: HttpClient$4): (_id: string, options?:
|
|
|
1214
1171
|
} | undefined;
|
|
1215
1172
|
} | undefined;
|
|
1216
1173
|
}>;
|
|
1217
|
-
declare const onContactCreated$1: EventDefinition
|
|
1218
|
-
declare const onContactUpdated$1: EventDefinition
|
|
1219
|
-
declare const onContactMerged$1: EventDefinition
|
|
1220
|
-
declare const onContactDeleted$1: EventDefinition
|
|
1174
|
+
declare const onContactCreated$1: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
1175
|
+
declare const onContactUpdated$1: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
1176
|
+
declare const onContactMerged$1: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
1177
|
+
declare const onContactDeleted$1: EventDefinition<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
1221
1178
|
|
|
1222
|
-
declare const createContact: BuildRESTFunction
|
|
1223
|
-
declare const updateContact: BuildRESTFunction
|
|
1224
|
-
declare const mergeContacts: BuildRESTFunction
|
|
1225
|
-
declare const deleteContact: BuildRESTFunction
|
|
1226
|
-
declare const labelContact: BuildRESTFunction
|
|
1227
|
-
declare const unlabelContact: BuildRESTFunction
|
|
1228
|
-
declare const queryContacts: BuildRESTFunction
|
|
1229
|
-
declare const getContact: BuildRESTFunction
|
|
1230
|
-
declare const onContactCreated: BuildEventDefinition
|
|
1231
|
-
declare const onContactUpdated: BuildEventDefinition
|
|
1232
|
-
declare const onContactMerged: BuildEventDefinition
|
|
1233
|
-
declare const onContactDeleted: BuildEventDefinition
|
|
1179
|
+
declare const createContact: BuildRESTFunction<typeof createContact$1>;
|
|
1180
|
+
declare const updateContact: BuildRESTFunction<typeof updateContact$1>;
|
|
1181
|
+
declare const mergeContacts: BuildRESTFunction<typeof mergeContacts$1>;
|
|
1182
|
+
declare const deleteContact: BuildRESTFunction<typeof deleteContact$1>;
|
|
1183
|
+
declare const labelContact: BuildRESTFunction<typeof labelContact$1>;
|
|
1184
|
+
declare const unlabelContact: BuildRESTFunction<typeof unlabelContact$1>;
|
|
1185
|
+
declare const queryContacts: BuildRESTFunction<typeof queryContacts$1>;
|
|
1186
|
+
declare const getContact: BuildRESTFunction<typeof getContact$1>;
|
|
1187
|
+
declare const onContactCreated: BuildEventDefinition<typeof onContactCreated$1>;
|
|
1188
|
+
declare const onContactUpdated: BuildEventDefinition<typeof onContactUpdated$1>;
|
|
1189
|
+
declare const onContactMerged: BuildEventDefinition<typeof onContactMerged$1>;
|
|
1190
|
+
declare const onContactDeleted: BuildEventDefinition<typeof onContactDeleted$1>;
|
|
1234
1191
|
|
|
1235
1192
|
declare const context$4_createContact: typeof createContact;
|
|
1236
1193
|
declare const context$4_deleteContact: typeof deleteContact;
|
|
@@ -1549,76 +1506,33 @@ interface FieldsQueryBuilder {
|
|
|
1549
1506
|
find: () => Promise<FieldsQueryResult>;
|
|
1550
1507
|
}
|
|
1551
1508
|
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
1555
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1556
|
-
}
|
|
1557
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
1558
|
-
type HttpResponse$3<T = any> = {
|
|
1559
|
-
data: T;
|
|
1560
|
-
status: number;
|
|
1561
|
-
statusText: string;
|
|
1562
|
-
headers: any;
|
|
1563
|
-
request?: any;
|
|
1564
|
-
};
|
|
1565
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
1566
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1567
|
-
url: string;
|
|
1568
|
-
data?: Data;
|
|
1569
|
-
params?: URLSearchParams;
|
|
1570
|
-
} & APIMetadata$3;
|
|
1571
|
-
type APIMetadata$3 = {
|
|
1572
|
-
methodFqn?: string;
|
|
1573
|
-
entityFqdn?: string;
|
|
1574
|
-
packageName?: string;
|
|
1575
|
-
};
|
|
1576
|
-
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
1577
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
1578
|
-
__type: 'event-definition';
|
|
1579
|
-
type: Type;
|
|
1580
|
-
isDomainEvent?: boolean;
|
|
1581
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1582
|
-
__payload: Payload;
|
|
1583
|
-
};
|
|
1584
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
1585
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
1586
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
1587
|
-
|
|
1588
|
-
declare global {
|
|
1589
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1590
|
-
interface SymbolConstructor {
|
|
1591
|
-
readonly observable: symbol;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
declare function findOrCreateExtendedField$1(httpClient: HttpClient$3): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
1596
|
-
declare function getExtendedField$1(httpClient: HttpClient$3): (key: string) => Promise<ExtendedField & {
|
|
1509
|
+
declare function findOrCreateExtendedField$1(httpClient: HttpClient): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
1510
|
+
declare function getExtendedField$1(httpClient: HttpClient): (key: string) => Promise<ExtendedField & {
|
|
1597
1511
|
key: string;
|
|
1598
1512
|
displayName: string;
|
|
1599
1513
|
dataType: FieldDataType;
|
|
1600
1514
|
fieldType: FieldType;
|
|
1601
1515
|
}>;
|
|
1602
|
-
declare function renameExtendedField$1(httpClient: HttpClient
|
|
1516
|
+
declare function renameExtendedField$1(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
1603
1517
|
key: string;
|
|
1604
1518
|
displayName: string;
|
|
1605
1519
|
dataType: FieldDataType;
|
|
1606
1520
|
fieldType: FieldType;
|
|
1607
1521
|
}>;
|
|
1608
|
-
declare function deleteExtendedField$1(httpClient: HttpClient
|
|
1609
|
-
declare function queryExtendedFields$1(httpClient: HttpClient
|
|
1610
|
-
declare const onExtendedFieldCreated$1: EventDefinition
|
|
1611
|
-
declare const onExtendedFieldUpdated$1: EventDefinition
|
|
1612
|
-
declare const onExtendedFieldDeleted$1: EventDefinition
|
|
1522
|
+
declare function deleteExtendedField$1(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
1523
|
+
declare function queryExtendedFields$1(httpClient: HttpClient): () => FieldsQueryBuilder;
|
|
1524
|
+
declare const onExtendedFieldCreated$1: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
1525
|
+
declare const onExtendedFieldUpdated$1: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
1526
|
+
declare const onExtendedFieldDeleted$1: EventDefinition<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
1613
1527
|
|
|
1614
|
-
declare const findOrCreateExtendedField: BuildRESTFunction
|
|
1615
|
-
declare const getExtendedField: BuildRESTFunction
|
|
1616
|
-
declare const renameExtendedField: BuildRESTFunction
|
|
1617
|
-
declare const deleteExtendedField: BuildRESTFunction
|
|
1618
|
-
declare const queryExtendedFields: BuildRESTFunction
|
|
1619
|
-
declare const onExtendedFieldCreated: BuildEventDefinition
|
|
1620
|
-
declare const onExtendedFieldUpdated: BuildEventDefinition
|
|
1621
|
-
declare const onExtendedFieldDeleted: BuildEventDefinition
|
|
1528
|
+
declare const findOrCreateExtendedField: BuildRESTFunction<typeof findOrCreateExtendedField$1>;
|
|
1529
|
+
declare const getExtendedField: BuildRESTFunction<typeof getExtendedField$1>;
|
|
1530
|
+
declare const renameExtendedField: BuildRESTFunction<typeof renameExtendedField$1>;
|
|
1531
|
+
declare const deleteExtendedField: BuildRESTFunction<typeof deleteExtendedField$1>;
|
|
1532
|
+
declare const queryExtendedFields: BuildRESTFunction<typeof queryExtendedFields$1>;
|
|
1533
|
+
declare const onExtendedFieldCreated: BuildEventDefinition<typeof onExtendedFieldCreated$1>;
|
|
1534
|
+
declare const onExtendedFieldUpdated: BuildEventDefinition<typeof onExtendedFieldUpdated$1>;
|
|
1535
|
+
declare const onExtendedFieldDeleted: BuildEventDefinition<typeof onExtendedFieldDeleted$1>;
|
|
1622
1536
|
|
|
1623
1537
|
declare const context$3_deleteExtendedField: typeof deleteExtendedField;
|
|
1624
1538
|
declare const context$3_findOrCreateExtendedField: typeof findOrCreateExtendedField;
|
|
@@ -1938,74 +1852,31 @@ interface LabelsQueryBuilder {
|
|
|
1938
1852
|
find: () => Promise<LabelsQueryResult>;
|
|
1939
1853
|
}
|
|
1940
1854
|
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
1944
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1945
|
-
}
|
|
1946
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
1947
|
-
type HttpResponse$2<T = any> = {
|
|
1948
|
-
data: T;
|
|
1949
|
-
status: number;
|
|
1950
|
-
statusText: string;
|
|
1951
|
-
headers: any;
|
|
1952
|
-
request?: any;
|
|
1953
|
-
};
|
|
1954
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
1955
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1956
|
-
url: string;
|
|
1957
|
-
data?: Data;
|
|
1958
|
-
params?: URLSearchParams;
|
|
1959
|
-
} & APIMetadata$2;
|
|
1960
|
-
type APIMetadata$2 = {
|
|
1961
|
-
methodFqn?: string;
|
|
1962
|
-
entityFqdn?: string;
|
|
1963
|
-
packageName?: string;
|
|
1964
|
-
};
|
|
1965
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
1966
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
1967
|
-
__type: 'event-definition';
|
|
1968
|
-
type: Type;
|
|
1969
|
-
isDomainEvent?: boolean;
|
|
1970
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1971
|
-
__payload: Payload;
|
|
1972
|
-
};
|
|
1973
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
1974
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
1975
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
1976
|
-
|
|
1977
|
-
declare global {
|
|
1978
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1979
|
-
interface SymbolConstructor {
|
|
1980
|
-
readonly observable: symbol;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
declare function findOrCreateLabel$1(httpClient: HttpClient$2): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
1985
|
-
declare function getLabel$1(httpClient: HttpClient$2): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
1855
|
+
declare function findOrCreateLabel$1(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
1856
|
+
declare function getLabel$1(httpClient: HttpClient): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
1986
1857
|
key: string;
|
|
1987
1858
|
displayName: string;
|
|
1988
1859
|
labelType: LabelType;
|
|
1989
1860
|
}>;
|
|
1990
|
-
declare function renameLabel$1(httpClient: HttpClient
|
|
1861
|
+
declare function renameLabel$1(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
1991
1862
|
key: string;
|
|
1992
1863
|
displayName: string;
|
|
1993
1864
|
labelType: LabelType;
|
|
1994
1865
|
}>;
|
|
1995
|
-
declare function deleteLabel$1(httpClient: HttpClient
|
|
1996
|
-
declare function queryLabels$1(httpClient: HttpClient
|
|
1997
|
-
declare const onLabelCreated$1: EventDefinition
|
|
1998
|
-
declare const onLabelUpdated$1: EventDefinition
|
|
1999
|
-
declare const onLabelDeleted$1: EventDefinition
|
|
1866
|
+
declare function deleteLabel$1(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
1867
|
+
declare function queryLabels$1(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
1868
|
+
declare const onLabelCreated$1: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
1869
|
+
declare const onLabelUpdated$1: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
1870
|
+
declare const onLabelDeleted$1: EventDefinition<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
2000
1871
|
|
|
2001
|
-
declare const findOrCreateLabel: BuildRESTFunction
|
|
2002
|
-
declare const getLabel: BuildRESTFunction
|
|
2003
|
-
declare const renameLabel: BuildRESTFunction
|
|
2004
|
-
declare const deleteLabel: BuildRESTFunction
|
|
2005
|
-
declare const queryLabels: BuildRESTFunction
|
|
2006
|
-
declare const onLabelCreated: BuildEventDefinition
|
|
2007
|
-
declare const onLabelUpdated: BuildEventDefinition
|
|
2008
|
-
declare const onLabelDeleted: BuildEventDefinition
|
|
1872
|
+
declare const findOrCreateLabel: BuildRESTFunction<typeof findOrCreateLabel$1>;
|
|
1873
|
+
declare const getLabel: BuildRESTFunction<typeof getLabel$1>;
|
|
1874
|
+
declare const renameLabel: BuildRESTFunction<typeof renameLabel$1>;
|
|
1875
|
+
declare const deleteLabel: BuildRESTFunction<typeof deleteLabel$1>;
|
|
1876
|
+
declare const queryLabels: BuildRESTFunction<typeof queryLabels$1>;
|
|
1877
|
+
declare const onLabelCreated: BuildEventDefinition<typeof onLabelCreated$1>;
|
|
1878
|
+
declare const onLabelUpdated: BuildEventDefinition<typeof onLabelUpdated$1>;
|
|
1879
|
+
declare const onLabelDeleted: BuildEventDefinition<typeof onLabelDeleted$1>;
|
|
2009
1880
|
|
|
2010
1881
|
declare const context$2_deleteLabel: typeof deleteLabel;
|
|
2011
1882
|
declare const context$2_findOrCreateLabel: typeof findOrCreateLabel;
|
|
@@ -2304,42 +2175,9 @@ interface AppendOrCreateContactOptions {
|
|
|
2304
2175
|
contactId?: string | null;
|
|
2305
2176
|
}
|
|
2306
2177
|
|
|
2307
|
-
|
|
2308
|
-
interface HttpClient$1 {
|
|
2309
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
2310
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2311
|
-
}
|
|
2312
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2313
|
-
type HttpResponse$1<T = any> = {
|
|
2314
|
-
data: T;
|
|
2315
|
-
status: number;
|
|
2316
|
-
statusText: string;
|
|
2317
|
-
headers: any;
|
|
2318
|
-
request?: any;
|
|
2319
|
-
};
|
|
2320
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2321
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2322
|
-
url: string;
|
|
2323
|
-
data?: Data;
|
|
2324
|
-
params?: URLSearchParams;
|
|
2325
|
-
} & APIMetadata$1;
|
|
2326
|
-
type APIMetadata$1 = {
|
|
2327
|
-
methodFqn?: string;
|
|
2328
|
-
entityFqdn?: string;
|
|
2329
|
-
packageName?: string;
|
|
2330
|
-
};
|
|
2331
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2332
|
-
|
|
2333
|
-
declare global {
|
|
2334
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2335
|
-
interface SymbolConstructor {
|
|
2336
|
-
readonly observable: symbol;
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2178
|
+
declare function appendOrCreateContact$1(httpClient: HttpClient): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
2339
2179
|
|
|
2340
|
-
declare
|
|
2341
|
-
|
|
2342
|
-
declare const appendOrCreateContact: BuildRESTFunction$1<typeof appendOrCreateContact$1>;
|
|
2180
|
+
declare const appendOrCreateContact: BuildRESTFunction<typeof appendOrCreateContact$1>;
|
|
2343
2181
|
|
|
2344
2182
|
declare const context$1_appendOrCreateContact: typeof appendOrCreateContact;
|
|
2345
2183
|
declare namespace context$1 {
|
|
@@ -2660,49 +2498,6 @@ interface MoveTaskAfterOptions {
|
|
|
2660
2498
|
beforeTaskId?: string | null;
|
|
2661
2499
|
}
|
|
2662
2500
|
|
|
2663
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2664
|
-
interface HttpClient {
|
|
2665
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2666
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2667
|
-
}
|
|
2668
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2669
|
-
type HttpResponse<T = any> = {
|
|
2670
|
-
data: T;
|
|
2671
|
-
status: number;
|
|
2672
|
-
statusText: string;
|
|
2673
|
-
headers: any;
|
|
2674
|
-
request?: any;
|
|
2675
|
-
};
|
|
2676
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2677
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2678
|
-
url: string;
|
|
2679
|
-
data?: Data;
|
|
2680
|
-
params?: URLSearchParams;
|
|
2681
|
-
} & APIMetadata;
|
|
2682
|
-
type APIMetadata = {
|
|
2683
|
-
methodFqn?: string;
|
|
2684
|
-
entityFqdn?: string;
|
|
2685
|
-
packageName?: string;
|
|
2686
|
-
};
|
|
2687
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2688
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2689
|
-
__type: 'event-definition';
|
|
2690
|
-
type: Type;
|
|
2691
|
-
isDomainEvent?: boolean;
|
|
2692
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2693
|
-
__payload: Payload;
|
|
2694
|
-
};
|
|
2695
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2696
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
2697
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
2698
|
-
|
|
2699
|
-
declare global {
|
|
2700
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2701
|
-
interface SymbolConstructor {
|
|
2702
|
-
readonly observable: symbol;
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
2501
|
declare function createTask$1(httpClient: HttpClient): (task: Task) => Promise<Task & {
|
|
2707
2502
|
status: TaskStatus;
|
|
2708
2503
|
source?: {
|
|
@@ -381,37 +381,37 @@ interface GetAttachmentIdentifiers {
|
|
|
381
381
|
attachmentId: string;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
interface HttpClient
|
|
385
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
384
|
+
interface HttpClient {
|
|
385
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
386
386
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
387
387
|
}
|
|
388
|
-
type RequestOptionsFactory
|
|
389
|
-
type HttpResponse
|
|
388
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
389
|
+
type HttpResponse<T = any> = {
|
|
390
390
|
data: T;
|
|
391
391
|
status: number;
|
|
392
392
|
statusText: string;
|
|
393
393
|
headers: any;
|
|
394
394
|
request?: any;
|
|
395
395
|
};
|
|
396
|
-
type RequestOptions
|
|
396
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
397
397
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
398
398
|
url: string;
|
|
399
399
|
data?: Data;
|
|
400
400
|
params?: URLSearchParams;
|
|
401
|
-
} & APIMetadata
|
|
402
|
-
type APIMetadata
|
|
401
|
+
} & APIMetadata;
|
|
402
|
+
type APIMetadata = {
|
|
403
403
|
methodFqn?: string;
|
|
404
404
|
entityFqdn?: string;
|
|
405
405
|
packageName?: string;
|
|
406
406
|
};
|
|
407
|
-
type EventDefinition
|
|
407
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
408
408
|
__type: 'event-definition';
|
|
409
409
|
type: Type;
|
|
410
410
|
isDomainEvent?: boolean;
|
|
411
411
|
transformations?: (envelope: unknown) => Payload;
|
|
412
412
|
__payload: Payload;
|
|
413
413
|
};
|
|
414
|
-
declare function EventDefinition
|
|
414
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
415
415
|
|
|
416
416
|
declare global {
|
|
417
417
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -423,10 +423,10 @@ declare global {
|
|
|
423
423
|
declare const __metadata$5: {
|
|
424
424
|
PACKAGE_NAME: string;
|
|
425
425
|
};
|
|
426
|
-
declare function generateAttachmentUploadUrl(httpClient: HttpClient
|
|
427
|
-
declare function listAttachments(httpClient: HttpClient
|
|
428
|
-
declare function deleteAttachment(httpClient: HttpClient
|
|
429
|
-
declare function getAttachment(httpClient: HttpClient
|
|
426
|
+
declare function generateAttachmentUploadUrl(httpClient: HttpClient): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
427
|
+
declare function listAttachments(httpClient: HttpClient): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
428
|
+
declare function deleteAttachment(httpClient: HttpClient): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
429
|
+
declare function getAttachment(httpClient: HttpClient): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
430
430
|
image: string;
|
|
431
431
|
document: string;
|
|
432
432
|
_id: string;
|
|
@@ -435,8 +435,8 @@ declare function getAttachment(httpClient: HttpClient$5): (identifiers: GetAttac
|
|
|
435
435
|
mimeType: string;
|
|
436
436
|
attachmentType: AttachmentType;
|
|
437
437
|
}>;
|
|
438
|
-
declare const onAttachmentCreated: EventDefinition
|
|
439
|
-
declare const onAttachmentDeleted: EventDefinition
|
|
438
|
+
declare const onAttachmentCreated: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
439
|
+
declare const onAttachmentDeleted: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
440
440
|
|
|
441
441
|
type index_d$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
|
|
442
442
|
type index_d$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
|
|
@@ -2517,56 +2517,17 @@ interface GetContactOptions {
|
|
|
2517
2517
|
fieldsets?: ContactFieldSet[];
|
|
2518
2518
|
}
|
|
2519
2519
|
|
|
2520
|
-
interface HttpClient$4 {
|
|
2521
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
2522
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2523
|
-
}
|
|
2524
|
-
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
2525
|
-
type HttpResponse$4<T = any> = {
|
|
2526
|
-
data: T;
|
|
2527
|
-
status: number;
|
|
2528
|
-
statusText: string;
|
|
2529
|
-
headers: any;
|
|
2530
|
-
request?: any;
|
|
2531
|
-
};
|
|
2532
|
-
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
2533
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2534
|
-
url: string;
|
|
2535
|
-
data?: Data;
|
|
2536
|
-
params?: URLSearchParams;
|
|
2537
|
-
} & APIMetadata$4;
|
|
2538
|
-
type APIMetadata$4 = {
|
|
2539
|
-
methodFqn?: string;
|
|
2540
|
-
entityFqdn?: string;
|
|
2541
|
-
packageName?: string;
|
|
2542
|
-
};
|
|
2543
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2544
|
-
__type: 'event-definition';
|
|
2545
|
-
type: Type;
|
|
2546
|
-
isDomainEvent?: boolean;
|
|
2547
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2548
|
-
__payload: Payload;
|
|
2549
|
-
};
|
|
2550
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2551
|
-
|
|
2552
|
-
declare global {
|
|
2553
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2554
|
-
interface SymbolConstructor {
|
|
2555
|
-
readonly observable: symbol;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
2520
|
declare const __metadata$4: {
|
|
2560
2521
|
PACKAGE_NAME: string;
|
|
2561
2522
|
};
|
|
2562
|
-
declare function createContact(httpClient: HttpClient
|
|
2563
|
-
declare function updateContact(httpClient: HttpClient
|
|
2564
|
-
declare function mergeContacts(httpClient: HttpClient
|
|
2565
|
-
declare function deleteContact(httpClient: HttpClient
|
|
2566
|
-
declare function labelContact(httpClient: HttpClient
|
|
2567
|
-
declare function unlabelContact(httpClient: HttpClient
|
|
2568
|
-
declare function queryContacts(httpClient: HttpClient
|
|
2569
|
-
declare function getContact(httpClient: HttpClient
|
|
2523
|
+
declare function createContact(httpClient: HttpClient): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
2524
|
+
declare function updateContact(httpClient: HttpClient): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
2525
|
+
declare function mergeContacts(httpClient: HttpClient): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
2526
|
+
declare function deleteContact(httpClient: HttpClient): (contactId: string) => Promise<void>;
|
|
2527
|
+
declare function labelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
2528
|
+
declare function unlabelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
2529
|
+
declare function queryContacts(httpClient: HttpClient): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
2530
|
+
declare function getContact(httpClient: HttpClient): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
2570
2531
|
_id: string;
|
|
2571
2532
|
revision: number;
|
|
2572
2533
|
source?: {
|
|
@@ -2601,10 +2562,10 @@ declare function getContact(httpClient: HttpClient$4): (_id: string, options?: G
|
|
|
2601
2562
|
} | undefined;
|
|
2602
2563
|
} | undefined;
|
|
2603
2564
|
}>;
|
|
2604
|
-
declare const onContactCreated: EventDefinition
|
|
2605
|
-
declare const onContactUpdated: EventDefinition
|
|
2606
|
-
declare const onContactMerged: EventDefinition
|
|
2607
|
-
declare const onContactDeleted: EventDefinition
|
|
2565
|
+
declare const onContactCreated: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
2566
|
+
declare const onContactUpdated: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
2567
|
+
declare const onContactMerged: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
2568
|
+
declare const onContactDeleted: EventDefinition<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
2608
2569
|
|
|
2609
2570
|
type index_d$4_Action = Action;
|
|
2610
2571
|
declare const index_d$4_Action: typeof Action;
|
|
@@ -3327,66 +3288,27 @@ interface FieldsQueryBuilder {
|
|
|
3327
3288
|
find: () => Promise<FieldsQueryResult>;
|
|
3328
3289
|
}
|
|
3329
3290
|
|
|
3330
|
-
interface HttpClient$3 {
|
|
3331
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
3332
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3333
|
-
}
|
|
3334
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
3335
|
-
type HttpResponse$3<T = any> = {
|
|
3336
|
-
data: T;
|
|
3337
|
-
status: number;
|
|
3338
|
-
statusText: string;
|
|
3339
|
-
headers: any;
|
|
3340
|
-
request?: any;
|
|
3341
|
-
};
|
|
3342
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
3343
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3344
|
-
url: string;
|
|
3345
|
-
data?: Data;
|
|
3346
|
-
params?: URLSearchParams;
|
|
3347
|
-
} & APIMetadata$3;
|
|
3348
|
-
type APIMetadata$3 = {
|
|
3349
|
-
methodFqn?: string;
|
|
3350
|
-
entityFqdn?: string;
|
|
3351
|
-
packageName?: string;
|
|
3352
|
-
};
|
|
3353
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
3354
|
-
__type: 'event-definition';
|
|
3355
|
-
type: Type;
|
|
3356
|
-
isDomainEvent?: boolean;
|
|
3357
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3358
|
-
__payload: Payload;
|
|
3359
|
-
};
|
|
3360
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
3361
|
-
|
|
3362
|
-
declare global {
|
|
3363
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3364
|
-
interface SymbolConstructor {
|
|
3365
|
-
readonly observable: symbol;
|
|
3366
|
-
}
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
3291
|
declare const __metadata$3: {
|
|
3370
3292
|
PACKAGE_NAME: string;
|
|
3371
3293
|
};
|
|
3372
|
-
declare function findOrCreateExtendedField(httpClient: HttpClient
|
|
3373
|
-
declare function getExtendedField(httpClient: HttpClient
|
|
3294
|
+
declare function findOrCreateExtendedField(httpClient: HttpClient): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
3295
|
+
declare function getExtendedField(httpClient: HttpClient): (key: string) => Promise<ExtendedField & {
|
|
3374
3296
|
key: string;
|
|
3375
3297
|
displayName: string;
|
|
3376
3298
|
dataType: FieldDataType;
|
|
3377
3299
|
fieldType: FieldType;
|
|
3378
3300
|
}>;
|
|
3379
|
-
declare function renameExtendedField(httpClient: HttpClient
|
|
3301
|
+
declare function renameExtendedField(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3380
3302
|
key: string;
|
|
3381
3303
|
displayName: string;
|
|
3382
3304
|
dataType: FieldDataType;
|
|
3383
3305
|
fieldType: FieldType;
|
|
3384
3306
|
}>;
|
|
3385
|
-
declare function deleteExtendedField(httpClient: HttpClient
|
|
3386
|
-
declare function queryExtendedFields(httpClient: HttpClient
|
|
3387
|
-
declare const onExtendedFieldCreated: EventDefinition
|
|
3388
|
-
declare const onExtendedFieldUpdated: EventDefinition
|
|
3389
|
-
declare const onExtendedFieldDeleted: EventDefinition
|
|
3307
|
+
declare function deleteExtendedField(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3308
|
+
declare function queryExtendedFields(httpClient: HttpClient): () => FieldsQueryBuilder;
|
|
3309
|
+
declare const onExtendedFieldCreated: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
3310
|
+
declare const onExtendedFieldUpdated: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
3311
|
+
declare const onExtendedFieldDeleted: EventDefinition<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
3390
3312
|
|
|
3391
3313
|
type index_d$3_DeleteExtendedFieldRequest = DeleteExtendedFieldRequest;
|
|
3392
3314
|
type index_d$3_DeleteExtendedFieldResponse = DeleteExtendedFieldResponse;
|
|
@@ -4034,64 +3956,25 @@ interface LabelsQueryBuilder {
|
|
|
4034
3956
|
find: () => Promise<LabelsQueryResult>;
|
|
4035
3957
|
}
|
|
4036
3958
|
|
|
4037
|
-
interface HttpClient$2 {
|
|
4038
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
4039
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4040
|
-
}
|
|
4041
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
4042
|
-
type HttpResponse$2<T = any> = {
|
|
4043
|
-
data: T;
|
|
4044
|
-
status: number;
|
|
4045
|
-
statusText: string;
|
|
4046
|
-
headers: any;
|
|
4047
|
-
request?: any;
|
|
4048
|
-
};
|
|
4049
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
4050
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4051
|
-
url: string;
|
|
4052
|
-
data?: Data;
|
|
4053
|
-
params?: URLSearchParams;
|
|
4054
|
-
} & APIMetadata$2;
|
|
4055
|
-
type APIMetadata$2 = {
|
|
4056
|
-
methodFqn?: string;
|
|
4057
|
-
entityFqdn?: string;
|
|
4058
|
-
packageName?: string;
|
|
4059
|
-
};
|
|
4060
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
4061
|
-
__type: 'event-definition';
|
|
4062
|
-
type: Type;
|
|
4063
|
-
isDomainEvent?: boolean;
|
|
4064
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4065
|
-
__payload: Payload;
|
|
4066
|
-
};
|
|
4067
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
4068
|
-
|
|
4069
|
-
declare global {
|
|
4070
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4071
|
-
interface SymbolConstructor {
|
|
4072
|
-
readonly observable: symbol;
|
|
4073
|
-
}
|
|
4074
|
-
}
|
|
4075
|
-
|
|
4076
3959
|
declare const __metadata$2: {
|
|
4077
3960
|
PACKAGE_NAME: string;
|
|
4078
3961
|
};
|
|
4079
|
-
declare function findOrCreateLabel(httpClient: HttpClient
|
|
4080
|
-
declare function getLabel(httpClient: HttpClient
|
|
3962
|
+
declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
3963
|
+
declare function getLabel(httpClient: HttpClient): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
4081
3964
|
key: string;
|
|
4082
3965
|
displayName: string;
|
|
4083
3966
|
labelType: LabelType;
|
|
4084
3967
|
}>;
|
|
4085
|
-
declare function renameLabel(httpClient: HttpClient
|
|
3968
|
+
declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
4086
3969
|
key: string;
|
|
4087
3970
|
displayName: string;
|
|
4088
3971
|
labelType: LabelType;
|
|
4089
3972
|
}>;
|
|
4090
|
-
declare function deleteLabel(httpClient: HttpClient
|
|
4091
|
-
declare function queryLabels(httpClient: HttpClient
|
|
4092
|
-
declare const onLabelCreated: EventDefinition
|
|
4093
|
-
declare const onLabelUpdated: EventDefinition
|
|
4094
|
-
declare const onLabelDeleted: EventDefinition
|
|
3973
|
+
declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3974
|
+
declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
3975
|
+
declare const onLabelCreated: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
3976
|
+
declare const onLabelUpdated: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
3977
|
+
declare const onLabelDeleted: EventDefinition<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
4095
3978
|
|
|
4096
3979
|
type index_d$2_ContactLabel = ContactLabel;
|
|
4097
3980
|
type index_d$2_ContactLabelNamespace = ContactLabelNamespace;
|
|
@@ -4735,41 +4618,10 @@ interface AppendOrCreateContactOptions {
|
|
|
4735
4618
|
contactId?: string | null;
|
|
4736
4619
|
}
|
|
4737
4620
|
|
|
4738
|
-
interface HttpClient$1 {
|
|
4739
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
4740
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4741
|
-
}
|
|
4742
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
4743
|
-
type HttpResponse$1<T = any> = {
|
|
4744
|
-
data: T;
|
|
4745
|
-
status: number;
|
|
4746
|
-
statusText: string;
|
|
4747
|
-
headers: any;
|
|
4748
|
-
request?: any;
|
|
4749
|
-
};
|
|
4750
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
4751
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4752
|
-
url: string;
|
|
4753
|
-
data?: Data;
|
|
4754
|
-
params?: URLSearchParams;
|
|
4755
|
-
} & APIMetadata$1;
|
|
4756
|
-
type APIMetadata$1 = {
|
|
4757
|
-
methodFqn?: string;
|
|
4758
|
-
entityFqdn?: string;
|
|
4759
|
-
packageName?: string;
|
|
4760
|
-
};
|
|
4761
|
-
|
|
4762
|
-
declare global {
|
|
4763
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4764
|
-
interface SymbolConstructor {
|
|
4765
|
-
readonly observable: symbol;
|
|
4766
|
-
}
|
|
4767
|
-
}
|
|
4768
|
-
|
|
4769
4621
|
declare const __metadata$1: {
|
|
4770
4622
|
PACKAGE_NAME: string;
|
|
4771
4623
|
};
|
|
4772
|
-
declare function appendOrCreateContact(httpClient: HttpClient
|
|
4624
|
+
declare function appendOrCreateContact(httpClient: HttpClient): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4773
4625
|
|
|
4774
4626
|
type index_d$1_ActivityIcon = ActivityIcon;
|
|
4775
4627
|
type index_d$1_Address = Address;
|
|
@@ -5468,45 +5320,6 @@ interface MoveTaskAfterOptions {
|
|
|
5468
5320
|
beforeTaskId?: string | null;
|
|
5469
5321
|
}
|
|
5470
5322
|
|
|
5471
|
-
interface HttpClient {
|
|
5472
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
5473
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
5474
|
-
}
|
|
5475
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
5476
|
-
type HttpResponse<T = any> = {
|
|
5477
|
-
data: T;
|
|
5478
|
-
status: number;
|
|
5479
|
-
statusText: string;
|
|
5480
|
-
headers: any;
|
|
5481
|
-
request?: any;
|
|
5482
|
-
};
|
|
5483
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
5484
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
5485
|
-
url: string;
|
|
5486
|
-
data?: Data;
|
|
5487
|
-
params?: URLSearchParams;
|
|
5488
|
-
} & APIMetadata;
|
|
5489
|
-
type APIMetadata = {
|
|
5490
|
-
methodFqn?: string;
|
|
5491
|
-
entityFqdn?: string;
|
|
5492
|
-
packageName?: string;
|
|
5493
|
-
};
|
|
5494
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
5495
|
-
__type: 'event-definition';
|
|
5496
|
-
type: Type;
|
|
5497
|
-
isDomainEvent?: boolean;
|
|
5498
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5499
|
-
__payload: Payload;
|
|
5500
|
-
};
|
|
5501
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
5502
|
-
|
|
5503
|
-
declare global {
|
|
5504
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5505
|
-
interface SymbolConstructor {
|
|
5506
|
-
readonly observable: symbol;
|
|
5507
|
-
}
|
|
5508
|
-
}
|
|
5509
|
-
|
|
5510
5323
|
declare const __metadata: {
|
|
5511
5324
|
PACKAGE_NAME: string;
|
|
5512
5325
|
};
|