@wix/crm 1.0.112 → 1.0.113
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 -9
- package/type-bundles/context.bundle.d.ts +297 -84
- package/type-bundles/index.bundle.d.ts +240 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/crm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.113",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,15 +18,14 @@
|
|
|
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.2",
|
|
22
|
+
"@wix/crm_contacts": "1.0.35",
|
|
23
|
+
"@wix/crm_extended-fields": "1.0.30",
|
|
24
|
+
"@wix/crm_labels": "1.0.30",
|
|
25
|
+
"@wix/crm_submitted-contact": "1.0.24",
|
|
26
|
+
"@wix/crm_tasks": "1.0.30"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
30
29
|
"glob": "^10.4.1",
|
|
31
30
|
"rollup": "^4.18.0",
|
|
32
31
|
"rollup-plugin-dts": "^6.1.1",
|
|
@@ -48,5 +47,5 @@
|
|
|
48
47
|
"fqdn": ""
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "c679fd2254bb03485cebaa58ba74d7f19d327156ec468008824f7428"
|
|
52
51
|
}
|
|
@@ -185,45 +185,53 @@ interface GetAttachmentIdentifiers {
|
|
|
185
185
|
attachmentId: string;
|
|
186
186
|
}
|
|
187
187
|
|
|
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>>;
|
|
188
|
+
type RESTFunctionDescriptor$5<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$5) => T;
|
|
189
|
+
interface HttpClient$5 {
|
|
190
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
|
|
191
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
191
192
|
}
|
|
192
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
193
|
-
type HttpResponse<T = any> = {
|
|
193
|
+
type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
|
|
194
|
+
type HttpResponse$5<T = any> = {
|
|
194
195
|
data: T;
|
|
195
196
|
status: number;
|
|
196
197
|
statusText: string;
|
|
197
198
|
headers: any;
|
|
198
199
|
request?: any;
|
|
199
200
|
};
|
|
200
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
201
|
+
type RequestOptions$5<_TResponse = any, Data = any> = {
|
|
201
202
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
202
203
|
url: string;
|
|
203
204
|
data?: Data;
|
|
204
205
|
params?: URLSearchParams;
|
|
205
|
-
} & APIMetadata;
|
|
206
|
-
type APIMetadata = {
|
|
206
|
+
} & APIMetadata$5;
|
|
207
|
+
type APIMetadata$5 = {
|
|
207
208
|
methodFqn?: string;
|
|
208
209
|
entityFqdn?: string;
|
|
209
210
|
packageName?: string;
|
|
210
211
|
};
|
|
211
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
212
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
212
|
+
type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
|
|
213
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
213
214
|
__type: 'event-definition';
|
|
214
215
|
type: Type;
|
|
215
216
|
isDomainEvent?: boolean;
|
|
216
|
-
transformations?: unknown;
|
|
217
|
+
transformations?: (envelope: unknown) => Payload;
|
|
217
218
|
__payload: Payload;
|
|
218
219
|
};
|
|
219
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
220
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
221
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
220
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
221
|
+
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
222
|
+
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
223
|
+
|
|
224
|
+
declare global {
|
|
225
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
226
|
+
interface SymbolConstructor {
|
|
227
|
+
readonly observable: symbol;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
222
230
|
|
|
223
|
-
declare function generateAttachmentUploadUrl$1(httpClient: HttpClient): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
224
|
-
declare function listAttachments$1(httpClient: HttpClient): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
225
|
-
declare function deleteAttachment$1(httpClient: HttpClient): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
226
|
-
declare function getAttachment$1(httpClient: HttpClient): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
231
|
+
declare function generateAttachmentUploadUrl$1(httpClient: HttpClient$5): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
232
|
+
declare function listAttachments$1(httpClient: HttpClient$5): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
233
|
+
declare function deleteAttachment$1(httpClient: HttpClient$5): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
234
|
+
declare function getAttachment$1(httpClient: HttpClient$5): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
227
235
|
image: string;
|
|
228
236
|
document: string;
|
|
229
237
|
_id: string;
|
|
@@ -232,15 +240,15 @@ declare function getAttachment$1(httpClient: HttpClient): (identifiers: GetAttac
|
|
|
232
240
|
mimeType: string;
|
|
233
241
|
attachmentType: AttachmentType;
|
|
234
242
|
}>;
|
|
235
|
-
declare const onAttachmentCreated$1: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
236
|
-
declare const onAttachmentDeleted$1: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
243
|
+
declare const onAttachmentCreated$1: EventDefinition$4<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
244
|
+
declare const onAttachmentDeleted$1: EventDefinition$4<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
237
245
|
|
|
238
|
-
declare const generateAttachmentUploadUrl: BuildRESTFunction<typeof generateAttachmentUploadUrl$1>;
|
|
239
|
-
declare const listAttachments: BuildRESTFunction<typeof listAttachments$1>;
|
|
240
|
-
declare const deleteAttachment: BuildRESTFunction<typeof deleteAttachment$1>;
|
|
241
|
-
declare const getAttachment: BuildRESTFunction<typeof getAttachment$1>;
|
|
242
|
-
declare const onAttachmentCreated: BuildEventDefinition<typeof onAttachmentCreated$1>;
|
|
243
|
-
declare const onAttachmentDeleted: BuildEventDefinition<typeof onAttachmentDeleted$1>;
|
|
246
|
+
declare const generateAttachmentUploadUrl: BuildRESTFunction$5<typeof generateAttachmentUploadUrl$1>;
|
|
247
|
+
declare const listAttachments: BuildRESTFunction$5<typeof listAttachments$1>;
|
|
248
|
+
declare const deleteAttachment: BuildRESTFunction$5<typeof deleteAttachment$1>;
|
|
249
|
+
declare const getAttachment: BuildRESTFunction$5<typeof getAttachment$1>;
|
|
250
|
+
declare const onAttachmentCreated: BuildEventDefinition$4<typeof onAttachmentCreated$1>;
|
|
251
|
+
declare const onAttachmentDeleted: BuildEventDefinition$4<typeof onAttachmentDeleted$1>;
|
|
244
252
|
|
|
245
253
|
declare const context$5_deleteAttachment: typeof deleteAttachment;
|
|
246
254
|
declare const context$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
|
|
@@ -1121,14 +1129,57 @@ interface GetContactOptions {
|
|
|
1121
1129
|
fieldsets?: ContactFieldSet[];
|
|
1122
1130
|
}
|
|
1123
1131
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
+
type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
|
|
1133
|
+
interface HttpClient$4 {
|
|
1134
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
1135
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1136
|
+
}
|
|
1137
|
+
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
1138
|
+
type HttpResponse$4<T = any> = {
|
|
1139
|
+
data: T;
|
|
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
1183
|
_id: string;
|
|
1133
1184
|
revision: number;
|
|
1134
1185
|
source?: {
|
|
@@ -1163,23 +1214,23 @@ declare function getContact$1(httpClient: HttpClient): (_id: string, options?: G
|
|
|
1163
1214
|
} | undefined;
|
|
1164
1215
|
} | undefined;
|
|
1165
1216
|
}>;
|
|
1166
|
-
declare const onContactCreated$1: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
1167
|
-
declare const onContactUpdated$1: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
1168
|
-
declare const onContactMerged$1: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
1169
|
-
declare const onContactDeleted$1: EventDefinition<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
1217
|
+
declare const onContactCreated$1: EventDefinition$3<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
1218
|
+
declare const onContactUpdated$1: EventDefinition$3<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
1219
|
+
declare const onContactMerged$1: EventDefinition$3<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
1220
|
+
declare const onContactDeleted$1: EventDefinition$3<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
1170
1221
|
|
|
1171
|
-
declare const createContact: BuildRESTFunction<typeof createContact$1>;
|
|
1172
|
-
declare const updateContact: BuildRESTFunction<typeof updateContact$1>;
|
|
1173
|
-
declare const mergeContacts: BuildRESTFunction<typeof mergeContacts$1>;
|
|
1174
|
-
declare const deleteContact: BuildRESTFunction<typeof deleteContact$1>;
|
|
1175
|
-
declare const labelContact: BuildRESTFunction<typeof labelContact$1>;
|
|
1176
|
-
declare const unlabelContact: BuildRESTFunction<typeof unlabelContact$1>;
|
|
1177
|
-
declare const queryContacts: BuildRESTFunction<typeof queryContacts$1>;
|
|
1178
|
-
declare const getContact: BuildRESTFunction<typeof getContact$1>;
|
|
1179
|
-
declare const onContactCreated: BuildEventDefinition<typeof onContactCreated$1>;
|
|
1180
|
-
declare const onContactUpdated: BuildEventDefinition<typeof onContactUpdated$1>;
|
|
1181
|
-
declare const onContactMerged: BuildEventDefinition<typeof onContactMerged$1>;
|
|
1182
|
-
declare const onContactDeleted: BuildEventDefinition<typeof onContactDeleted$1>;
|
|
1222
|
+
declare const createContact: BuildRESTFunction$4<typeof createContact$1>;
|
|
1223
|
+
declare const updateContact: BuildRESTFunction$4<typeof updateContact$1>;
|
|
1224
|
+
declare const mergeContacts: BuildRESTFunction$4<typeof mergeContacts$1>;
|
|
1225
|
+
declare const deleteContact: BuildRESTFunction$4<typeof deleteContact$1>;
|
|
1226
|
+
declare const labelContact: BuildRESTFunction$4<typeof labelContact$1>;
|
|
1227
|
+
declare const unlabelContact: BuildRESTFunction$4<typeof unlabelContact$1>;
|
|
1228
|
+
declare const queryContacts: BuildRESTFunction$4<typeof queryContacts$1>;
|
|
1229
|
+
declare const getContact: BuildRESTFunction$4<typeof getContact$1>;
|
|
1230
|
+
declare const onContactCreated: BuildEventDefinition$3<typeof onContactCreated$1>;
|
|
1231
|
+
declare const onContactUpdated: BuildEventDefinition$3<typeof onContactUpdated$1>;
|
|
1232
|
+
declare const onContactMerged: BuildEventDefinition$3<typeof onContactMerged$1>;
|
|
1233
|
+
declare const onContactDeleted: BuildEventDefinition$3<typeof onContactDeleted$1>;
|
|
1183
1234
|
|
|
1184
1235
|
declare const context$4_createContact: typeof createContact;
|
|
1185
1236
|
declare const context$4_deleteContact: typeof deleteContact;
|
|
@@ -1498,33 +1549,76 @@ interface FieldsQueryBuilder {
|
|
|
1498
1549
|
find: () => Promise<FieldsQueryResult>;
|
|
1499
1550
|
}
|
|
1500
1551
|
|
|
1501
|
-
|
|
1502
|
-
|
|
1552
|
+
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
1553
|
+
interface HttpClient$3 {
|
|
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 & {
|
|
1503
1597
|
key: string;
|
|
1504
1598
|
displayName: string;
|
|
1505
1599
|
dataType: FieldDataType;
|
|
1506
1600
|
fieldType: FieldType;
|
|
1507
1601
|
}>;
|
|
1508
|
-
declare function renameExtendedField$1(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
1602
|
+
declare function renameExtendedField$1(httpClient: HttpClient$3): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
1509
1603
|
key: string;
|
|
1510
1604
|
displayName: string;
|
|
1511
1605
|
dataType: FieldDataType;
|
|
1512
1606
|
fieldType: FieldType;
|
|
1513
1607
|
}>;
|
|
1514
|
-
declare function deleteExtendedField$1(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
1515
|
-
declare function queryExtendedFields$1(httpClient: HttpClient): () => FieldsQueryBuilder;
|
|
1516
|
-
declare const onExtendedFieldCreated$1: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
1517
|
-
declare const onExtendedFieldUpdated$1: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
1518
|
-
declare const onExtendedFieldDeleted$1: EventDefinition<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
1608
|
+
declare function deleteExtendedField$1(httpClient: HttpClient$3): (key: string) => Promise<void>;
|
|
1609
|
+
declare function queryExtendedFields$1(httpClient: HttpClient$3): () => FieldsQueryBuilder;
|
|
1610
|
+
declare const onExtendedFieldCreated$1: EventDefinition$2<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
1611
|
+
declare const onExtendedFieldUpdated$1: EventDefinition$2<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
1612
|
+
declare const onExtendedFieldDeleted$1: EventDefinition$2<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
1519
1613
|
|
|
1520
|
-
declare const findOrCreateExtendedField: BuildRESTFunction<typeof findOrCreateExtendedField$1>;
|
|
1521
|
-
declare const getExtendedField: BuildRESTFunction<typeof getExtendedField$1>;
|
|
1522
|
-
declare const renameExtendedField: BuildRESTFunction<typeof renameExtendedField$1>;
|
|
1523
|
-
declare const deleteExtendedField: BuildRESTFunction<typeof deleteExtendedField$1>;
|
|
1524
|
-
declare const queryExtendedFields: BuildRESTFunction<typeof queryExtendedFields$1>;
|
|
1525
|
-
declare const onExtendedFieldCreated: BuildEventDefinition<typeof onExtendedFieldCreated$1>;
|
|
1526
|
-
declare const onExtendedFieldUpdated: BuildEventDefinition<typeof onExtendedFieldUpdated$1>;
|
|
1527
|
-
declare const onExtendedFieldDeleted: BuildEventDefinition<typeof onExtendedFieldDeleted$1>;
|
|
1614
|
+
declare const findOrCreateExtendedField: BuildRESTFunction$3<typeof findOrCreateExtendedField$1>;
|
|
1615
|
+
declare const getExtendedField: BuildRESTFunction$3<typeof getExtendedField$1>;
|
|
1616
|
+
declare const renameExtendedField: BuildRESTFunction$3<typeof renameExtendedField$1>;
|
|
1617
|
+
declare const deleteExtendedField: BuildRESTFunction$3<typeof deleteExtendedField$1>;
|
|
1618
|
+
declare const queryExtendedFields: BuildRESTFunction$3<typeof queryExtendedFields$1>;
|
|
1619
|
+
declare const onExtendedFieldCreated: BuildEventDefinition$2<typeof onExtendedFieldCreated$1>;
|
|
1620
|
+
declare const onExtendedFieldUpdated: BuildEventDefinition$2<typeof onExtendedFieldUpdated$1>;
|
|
1621
|
+
declare const onExtendedFieldDeleted: BuildEventDefinition$2<typeof onExtendedFieldDeleted$1>;
|
|
1528
1622
|
|
|
1529
1623
|
declare const context$3_deleteExtendedField: typeof deleteExtendedField;
|
|
1530
1624
|
declare const context$3_findOrCreateExtendedField: typeof findOrCreateExtendedField;
|
|
@@ -1844,31 +1938,74 @@ interface LabelsQueryBuilder {
|
|
|
1844
1938
|
find: () => Promise<LabelsQueryResult>;
|
|
1845
1939
|
}
|
|
1846
1940
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1941
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
1942
|
+
interface HttpClient$2 {
|
|
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 & {
|
|
1849
1986
|
key: string;
|
|
1850
1987
|
displayName: string;
|
|
1851
1988
|
labelType: LabelType;
|
|
1852
1989
|
}>;
|
|
1853
|
-
declare function renameLabel$1(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
1990
|
+
declare function renameLabel$1(httpClient: HttpClient$2): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
1854
1991
|
key: string;
|
|
1855
1992
|
displayName: string;
|
|
1856
1993
|
labelType: LabelType;
|
|
1857
1994
|
}>;
|
|
1858
|
-
declare function deleteLabel$1(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
1859
|
-
declare function queryLabels$1(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
1860
|
-
declare const onLabelCreated$1: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
1861
|
-
declare const onLabelUpdated$1: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
1862
|
-
declare const onLabelDeleted$1: EventDefinition<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
1995
|
+
declare function deleteLabel$1(httpClient: HttpClient$2): (key: string) => Promise<void>;
|
|
1996
|
+
declare function queryLabels$1(httpClient: HttpClient$2): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
1997
|
+
declare const onLabelCreated$1: EventDefinition$1<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
1998
|
+
declare const onLabelUpdated$1: EventDefinition$1<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
1999
|
+
declare const onLabelDeleted$1: EventDefinition$1<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
1863
2000
|
|
|
1864
|
-
declare const findOrCreateLabel: BuildRESTFunction<typeof findOrCreateLabel$1>;
|
|
1865
|
-
declare const getLabel: BuildRESTFunction<typeof getLabel$1>;
|
|
1866
|
-
declare const renameLabel: BuildRESTFunction<typeof renameLabel$1>;
|
|
1867
|
-
declare const deleteLabel: BuildRESTFunction<typeof deleteLabel$1>;
|
|
1868
|
-
declare const queryLabels: BuildRESTFunction<typeof queryLabels$1>;
|
|
1869
|
-
declare const onLabelCreated: BuildEventDefinition<typeof onLabelCreated$1>;
|
|
1870
|
-
declare const onLabelUpdated: BuildEventDefinition<typeof onLabelUpdated$1>;
|
|
1871
|
-
declare const onLabelDeleted: BuildEventDefinition<typeof onLabelDeleted$1>;
|
|
2001
|
+
declare const findOrCreateLabel: BuildRESTFunction$2<typeof findOrCreateLabel$1>;
|
|
2002
|
+
declare const getLabel: BuildRESTFunction$2<typeof getLabel$1>;
|
|
2003
|
+
declare const renameLabel: BuildRESTFunction$2<typeof renameLabel$1>;
|
|
2004
|
+
declare const deleteLabel: BuildRESTFunction$2<typeof deleteLabel$1>;
|
|
2005
|
+
declare const queryLabels: BuildRESTFunction$2<typeof queryLabels$1>;
|
|
2006
|
+
declare const onLabelCreated: BuildEventDefinition$1<typeof onLabelCreated$1>;
|
|
2007
|
+
declare const onLabelUpdated: BuildEventDefinition$1<typeof onLabelUpdated$1>;
|
|
2008
|
+
declare const onLabelDeleted: BuildEventDefinition$1<typeof onLabelDeleted$1>;
|
|
1872
2009
|
|
|
1873
2010
|
declare const context$2_deleteLabel: typeof deleteLabel;
|
|
1874
2011
|
declare const context$2_findOrCreateLabel: typeof findOrCreateLabel;
|
|
@@ -2167,9 +2304,42 @@ interface AppendOrCreateContactOptions {
|
|
|
2167
2304
|
contactId?: string | null;
|
|
2168
2305
|
}
|
|
2169
2306
|
|
|
2170
|
-
|
|
2307
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
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
|
+
}
|
|
2339
|
+
|
|
2340
|
+
declare function appendOrCreateContact$1(httpClient: HttpClient$1): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
2171
2341
|
|
|
2172
|
-
declare const appendOrCreateContact: BuildRESTFunction<typeof appendOrCreateContact$1>;
|
|
2342
|
+
declare const appendOrCreateContact: BuildRESTFunction$1<typeof appendOrCreateContact$1>;
|
|
2173
2343
|
|
|
2174
2344
|
declare const context$1_appendOrCreateContact: typeof appendOrCreateContact;
|
|
2175
2345
|
declare namespace context$1 {
|
|
@@ -2490,6 +2660,49 @@ interface MoveTaskAfterOptions {
|
|
|
2490
2660
|
beforeTaskId?: string | null;
|
|
2491
2661
|
}
|
|
2492
2662
|
|
|
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
|
+
|
|
2493
2706
|
declare function createTask$1(httpClient: HttpClient): (task: Task) => Promise<Task & {
|
|
2494
2707
|
status: TaskStatus;
|
|
2495
2708
|
source?: {
|
|
@@ -381,44 +381,52 @@ interface GetAttachmentIdentifiers {
|
|
|
381
381
|
attachmentId: string;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
interface HttpClient {
|
|
385
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
384
|
+
interface HttpClient$5 {
|
|
385
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
|
|
386
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
386
387
|
}
|
|
387
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
388
|
-
type HttpResponse<T = any> = {
|
|
388
|
+
type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
|
|
389
|
+
type HttpResponse$5<T = any> = {
|
|
389
390
|
data: T;
|
|
390
391
|
status: number;
|
|
391
392
|
statusText: string;
|
|
392
393
|
headers: any;
|
|
393
394
|
request?: any;
|
|
394
395
|
};
|
|
395
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
396
|
+
type RequestOptions$5<_TResponse = any, Data = any> = {
|
|
396
397
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
397
398
|
url: string;
|
|
398
399
|
data?: Data;
|
|
399
400
|
params?: URLSearchParams;
|
|
400
|
-
} & APIMetadata;
|
|
401
|
-
type APIMetadata = {
|
|
401
|
+
} & APIMetadata$5;
|
|
402
|
+
type APIMetadata$5 = {
|
|
402
403
|
methodFqn?: string;
|
|
403
404
|
entityFqdn?: string;
|
|
404
405
|
packageName?: string;
|
|
405
406
|
};
|
|
406
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
407
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
407
408
|
__type: 'event-definition';
|
|
408
409
|
type: Type;
|
|
409
410
|
isDomainEvent?: boolean;
|
|
410
|
-
transformations?: unknown;
|
|
411
|
+
transformations?: (envelope: unknown) => Payload;
|
|
411
412
|
__payload: Payload;
|
|
412
413
|
};
|
|
413
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
414
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
415
|
+
|
|
416
|
+
declare global {
|
|
417
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
418
|
+
interface SymbolConstructor {
|
|
419
|
+
readonly observable: symbol;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
414
422
|
|
|
415
423
|
declare const __metadata$5: {
|
|
416
424
|
PACKAGE_NAME: string;
|
|
417
425
|
};
|
|
418
|
-
declare function generateAttachmentUploadUrl(httpClient: HttpClient): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
419
|
-
declare function listAttachments(httpClient: HttpClient): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
420
|
-
declare function deleteAttachment(httpClient: HttpClient): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
421
|
-
declare function getAttachment(httpClient: HttpClient): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
426
|
+
declare function generateAttachmentUploadUrl(httpClient: HttpClient$5): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
427
|
+
declare function listAttachments(httpClient: HttpClient$5): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
428
|
+
declare function deleteAttachment(httpClient: HttpClient$5): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
429
|
+
declare function getAttachment(httpClient: HttpClient$5): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
422
430
|
image: string;
|
|
423
431
|
document: string;
|
|
424
432
|
_id: string;
|
|
@@ -427,8 +435,8 @@ declare function getAttachment(httpClient: HttpClient): (identifiers: GetAttachm
|
|
|
427
435
|
mimeType: string;
|
|
428
436
|
attachmentType: AttachmentType;
|
|
429
437
|
}>;
|
|
430
|
-
declare const onAttachmentCreated: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
431
|
-
declare const onAttachmentDeleted: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
438
|
+
declare const onAttachmentCreated: EventDefinition$4<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
439
|
+
declare const onAttachmentDeleted: EventDefinition$4<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
432
440
|
|
|
433
441
|
type index_d$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
|
|
434
442
|
type index_d$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
|
|
@@ -2509,17 +2517,56 @@ interface GetContactOptions {
|
|
|
2509
2517
|
fieldsets?: ContactFieldSet[];
|
|
2510
2518
|
}
|
|
2511
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
|
+
|
|
2512
2559
|
declare const __metadata$4: {
|
|
2513
2560
|
PACKAGE_NAME: string;
|
|
2514
2561
|
};
|
|
2515
|
-
declare function createContact(httpClient: HttpClient): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
2516
|
-
declare function updateContact(httpClient: HttpClient): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
2517
|
-
declare function mergeContacts(httpClient: HttpClient): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
2518
|
-
declare function deleteContact(httpClient: HttpClient): (contactId: string) => Promise<void>;
|
|
2519
|
-
declare function labelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
2520
|
-
declare function unlabelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
2521
|
-
declare function queryContacts(httpClient: HttpClient): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
2522
|
-
declare function getContact(httpClient: HttpClient): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
2562
|
+
declare function createContact(httpClient: HttpClient$4): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
2563
|
+
declare function updateContact(httpClient: HttpClient$4): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
2564
|
+
declare function mergeContacts(httpClient: HttpClient$4): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
2565
|
+
declare function deleteContact(httpClient: HttpClient$4): (contactId: string) => Promise<void>;
|
|
2566
|
+
declare function labelContact(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
2567
|
+
declare function unlabelContact(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
2568
|
+
declare function queryContacts(httpClient: HttpClient$4): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
2569
|
+
declare function getContact(httpClient: HttpClient$4): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
2523
2570
|
_id: string;
|
|
2524
2571
|
revision: number;
|
|
2525
2572
|
source?: {
|
|
@@ -2554,10 +2601,10 @@ declare function getContact(httpClient: HttpClient): (_id: string, options?: Get
|
|
|
2554
2601
|
} | undefined;
|
|
2555
2602
|
} | undefined;
|
|
2556
2603
|
}>;
|
|
2557
|
-
declare const onContactCreated: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
2558
|
-
declare const onContactUpdated: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
2559
|
-
declare const onContactMerged: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
2560
|
-
declare const onContactDeleted: EventDefinition<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
2604
|
+
declare const onContactCreated: EventDefinition$3<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
2605
|
+
declare const onContactUpdated: EventDefinition$3<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
2606
|
+
declare const onContactMerged: EventDefinition$3<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
2607
|
+
declare const onContactDeleted: EventDefinition$3<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
2561
2608
|
|
|
2562
2609
|
type index_d$4_Action = Action;
|
|
2563
2610
|
declare const index_d$4_Action: typeof Action;
|
|
@@ -3280,27 +3327,66 @@ interface FieldsQueryBuilder {
|
|
|
3280
3327
|
find: () => Promise<FieldsQueryResult>;
|
|
3281
3328
|
}
|
|
3282
3329
|
|
|
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
|
+
|
|
3283
3369
|
declare const __metadata$3: {
|
|
3284
3370
|
PACKAGE_NAME: string;
|
|
3285
3371
|
};
|
|
3286
|
-
declare function findOrCreateExtendedField(httpClient: HttpClient): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
3287
|
-
declare function getExtendedField(httpClient: HttpClient): (key: string) => Promise<ExtendedField & {
|
|
3372
|
+
declare function findOrCreateExtendedField(httpClient: HttpClient$3): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
3373
|
+
declare function getExtendedField(httpClient: HttpClient$3): (key: string) => Promise<ExtendedField & {
|
|
3288
3374
|
key: string;
|
|
3289
3375
|
displayName: string;
|
|
3290
3376
|
dataType: FieldDataType;
|
|
3291
3377
|
fieldType: FieldType;
|
|
3292
3378
|
}>;
|
|
3293
|
-
declare function renameExtendedField(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3379
|
+
declare function renameExtendedField(httpClient: HttpClient$3): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3294
3380
|
key: string;
|
|
3295
3381
|
displayName: string;
|
|
3296
3382
|
dataType: FieldDataType;
|
|
3297
3383
|
fieldType: FieldType;
|
|
3298
3384
|
}>;
|
|
3299
|
-
declare function deleteExtendedField(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3300
|
-
declare function queryExtendedFields(httpClient: HttpClient): () => FieldsQueryBuilder;
|
|
3301
|
-
declare const onExtendedFieldCreated: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
3302
|
-
declare const onExtendedFieldUpdated: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
3303
|
-
declare const onExtendedFieldDeleted: EventDefinition<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
3385
|
+
declare function deleteExtendedField(httpClient: HttpClient$3): (key: string) => Promise<void>;
|
|
3386
|
+
declare function queryExtendedFields(httpClient: HttpClient$3): () => FieldsQueryBuilder;
|
|
3387
|
+
declare const onExtendedFieldCreated: EventDefinition$2<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
3388
|
+
declare const onExtendedFieldUpdated: EventDefinition$2<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
3389
|
+
declare const onExtendedFieldDeleted: EventDefinition$2<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
3304
3390
|
|
|
3305
3391
|
type index_d$3_DeleteExtendedFieldRequest = DeleteExtendedFieldRequest;
|
|
3306
3392
|
type index_d$3_DeleteExtendedFieldResponse = DeleteExtendedFieldResponse;
|
|
@@ -3948,25 +4034,64 @@ interface LabelsQueryBuilder {
|
|
|
3948
4034
|
find: () => Promise<LabelsQueryResult>;
|
|
3949
4035
|
}
|
|
3950
4036
|
|
|
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
|
+
|
|
3951
4076
|
declare const __metadata$2: {
|
|
3952
4077
|
PACKAGE_NAME: string;
|
|
3953
4078
|
};
|
|
3954
|
-
declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
3955
|
-
declare function getLabel(httpClient: HttpClient): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
4079
|
+
declare function findOrCreateLabel(httpClient: HttpClient$2): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
4080
|
+
declare function getLabel(httpClient: HttpClient$2): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
3956
4081
|
key: string;
|
|
3957
4082
|
displayName: string;
|
|
3958
4083
|
labelType: LabelType;
|
|
3959
4084
|
}>;
|
|
3960
|
-
declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
4085
|
+
declare function renameLabel(httpClient: HttpClient$2): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
3961
4086
|
key: string;
|
|
3962
4087
|
displayName: string;
|
|
3963
4088
|
labelType: LabelType;
|
|
3964
4089
|
}>;
|
|
3965
|
-
declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3966
|
-
declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
3967
|
-
declare const onLabelCreated: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
3968
|
-
declare const onLabelUpdated: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
3969
|
-
declare const onLabelDeleted: EventDefinition<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
4090
|
+
declare function deleteLabel(httpClient: HttpClient$2): (key: string) => Promise<void>;
|
|
4091
|
+
declare function queryLabels(httpClient: HttpClient$2): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
4092
|
+
declare const onLabelCreated: EventDefinition$1<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
4093
|
+
declare const onLabelUpdated: EventDefinition$1<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
4094
|
+
declare const onLabelDeleted: EventDefinition$1<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
3970
4095
|
|
|
3971
4096
|
type index_d$2_ContactLabel = ContactLabel;
|
|
3972
4097
|
type index_d$2_ContactLabelNamespace = ContactLabelNamespace;
|
|
@@ -4610,10 +4735,41 @@ interface AppendOrCreateContactOptions {
|
|
|
4610
4735
|
contactId?: string | null;
|
|
4611
4736
|
}
|
|
4612
4737
|
|
|
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
|
+
|
|
4613
4769
|
declare const __metadata$1: {
|
|
4614
4770
|
PACKAGE_NAME: string;
|
|
4615
4771
|
};
|
|
4616
|
-
declare function appendOrCreateContact(httpClient: HttpClient): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4772
|
+
declare function appendOrCreateContact(httpClient: HttpClient$1): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4617
4773
|
|
|
4618
4774
|
type index_d$1_ActivityIcon = ActivityIcon;
|
|
4619
4775
|
type index_d$1_Address = Address;
|
|
@@ -5312,6 +5468,45 @@ interface MoveTaskAfterOptions {
|
|
|
5312
5468
|
beforeTaskId?: string | null;
|
|
5313
5469
|
}
|
|
5314
5470
|
|
|
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
|
+
|
|
5315
5510
|
declare const __metadata: {
|
|
5316
5511
|
PACKAGE_NAME: string;
|
|
5317
5512
|
};
|