@wix/crm 1.0.107 → 1.0.108
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/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +2 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +1 -0
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/package.json +3 -2
- package/type-bundles/context.bundle.d.ts +255 -36
- package/type-bundles/index.bundle.d.ts +477 -32
- package/type-bundles/meta.bundle.d.ts +351 -1
|
@@ -1,3 +1,479 @@
|
|
|
1
|
+
interface ContactAttachment extends ContactAttachmentMediaOneOf {
|
|
2
|
+
/** The attachment's image (if the attachment is of type IMAGE) */
|
|
3
|
+
image?: string;
|
|
4
|
+
/** The attachment's document (if the attachment is of type OTHER) */
|
|
5
|
+
document?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The id of the attachment.
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
_id?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Image preview (reduced image size) of the attachment (if the attachment is of type IMAGE).
|
|
13
|
+
* @readonly
|
|
14
|
+
*/
|
|
15
|
+
previewImage?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The file name of the attachment.
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
fileName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The mime type of the attachment.
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
mimeType?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The type of the attachment
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
attachmentType?: AttachmentType;
|
|
31
|
+
}
|
|
32
|
+
/** @oneof */
|
|
33
|
+
interface ContactAttachmentMediaOneOf {
|
|
34
|
+
/** The attachment's image (if the attachment is of type IMAGE) */
|
|
35
|
+
image?: string;
|
|
36
|
+
/** The attachment's document (if the attachment is of type OTHER) */
|
|
37
|
+
document?: string;
|
|
38
|
+
}
|
|
39
|
+
declare enum AttachmentType {
|
|
40
|
+
UNKNOWN = "UNKNOWN",
|
|
41
|
+
IMAGE = "IMAGE",
|
|
42
|
+
OTHER = "OTHER"
|
|
43
|
+
}
|
|
44
|
+
interface DomainEvent$4 extends DomainEventBodyOneOf$4 {
|
|
45
|
+
createdEvent?: EntityCreatedEvent$4;
|
|
46
|
+
updatedEvent?: EntityUpdatedEvent$4;
|
|
47
|
+
deletedEvent?: EntityDeletedEvent$4;
|
|
48
|
+
actionEvent?: ActionEvent$4;
|
|
49
|
+
/**
|
|
50
|
+
* Unique event ID.
|
|
51
|
+
* Allows clients to ignore duplicate webhooks.
|
|
52
|
+
*/
|
|
53
|
+
_id?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Assumes actions are also always typed to an entity_type
|
|
56
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
57
|
+
*/
|
|
58
|
+
entityFqdn?: string;
|
|
59
|
+
/**
|
|
60
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
61
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
62
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
63
|
+
*/
|
|
64
|
+
slug?: string;
|
|
65
|
+
/** ID of the entity associated with the event. */
|
|
66
|
+
entityId?: string;
|
|
67
|
+
/** Event timestamp. */
|
|
68
|
+
eventTime?: Date;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
71
|
+
* (for example, GDPR).
|
|
72
|
+
*/
|
|
73
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
74
|
+
/** If present, indicates the action that triggered the event. */
|
|
75
|
+
originatedFrom?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
78
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
79
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
80
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
81
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
82
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
83
|
+
*/
|
|
84
|
+
entityEventSequence?: string | null;
|
|
85
|
+
}
|
|
86
|
+
/** @oneof */
|
|
87
|
+
interface DomainEventBodyOneOf$4 {
|
|
88
|
+
createdEvent?: EntityCreatedEvent$4;
|
|
89
|
+
updatedEvent?: EntityUpdatedEvent$4;
|
|
90
|
+
deletedEvent?: EntityDeletedEvent$4;
|
|
91
|
+
actionEvent?: ActionEvent$4;
|
|
92
|
+
}
|
|
93
|
+
interface EntityCreatedEvent$4 {
|
|
94
|
+
entity?: string;
|
|
95
|
+
}
|
|
96
|
+
interface EntityUpdatedEvent$4 {
|
|
97
|
+
/**
|
|
98
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
99
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
100
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
101
|
+
*/
|
|
102
|
+
currentEntity?: string;
|
|
103
|
+
}
|
|
104
|
+
interface EntityDeletedEvent$4 {
|
|
105
|
+
/** Entity that was deleted */
|
|
106
|
+
deletedEntity?: string | null;
|
|
107
|
+
}
|
|
108
|
+
interface ActionEvent$4 {
|
|
109
|
+
body?: string;
|
|
110
|
+
}
|
|
111
|
+
interface Empty$1 {
|
|
112
|
+
}
|
|
113
|
+
interface MediaFileUploadedEvent {
|
|
114
|
+
fileId?: string;
|
|
115
|
+
path?: string;
|
|
116
|
+
mimeType?: string;
|
|
117
|
+
acl?: string | null;
|
|
118
|
+
size?: string | null;
|
|
119
|
+
dateCreated?: Date;
|
|
120
|
+
dateUpdated?: Date;
|
|
121
|
+
}
|
|
122
|
+
interface CrmAttachmentUploadedEvent {
|
|
123
|
+
attachment?: CrmAttachment;
|
|
124
|
+
uploadJobId?: string;
|
|
125
|
+
}
|
|
126
|
+
interface CrmAttachment {
|
|
127
|
+
/** @readonly */
|
|
128
|
+
_id?: string | null;
|
|
129
|
+
revision?: string | null;
|
|
130
|
+
/** @readonly */
|
|
131
|
+
_createdDate?: Date;
|
|
132
|
+
/** @readonly */
|
|
133
|
+
_updatedDate?: Date;
|
|
134
|
+
/** @readonly */
|
|
135
|
+
source?: AttachmentSource;
|
|
136
|
+
metadata?: AttachmentMetadata;
|
|
137
|
+
media?: AttachmentMedia;
|
|
138
|
+
/**
|
|
139
|
+
* Inferred by the media type
|
|
140
|
+
* @readonly
|
|
141
|
+
*/
|
|
142
|
+
attachmentType?: CrmAttachmentAttachmentType;
|
|
143
|
+
}
|
|
144
|
+
interface AttachmentSource {
|
|
145
|
+
appId?: string;
|
|
146
|
+
}
|
|
147
|
+
interface AttachmentMetadata {
|
|
148
|
+
/** Entity type e.g: INVOICES */
|
|
149
|
+
entityType?: string | null;
|
|
150
|
+
/** Id of the entity, e.g: invoice id */
|
|
151
|
+
entityId?: string | null;
|
|
152
|
+
contactId?: string | null;
|
|
153
|
+
externalId?: string | null;
|
|
154
|
+
}
|
|
155
|
+
interface AttachmentMedia extends AttachmentMediaMediaOneOf {
|
|
156
|
+
image?: string;
|
|
157
|
+
document?: string;
|
|
158
|
+
/** @readonly */
|
|
159
|
+
previewImage?: string;
|
|
160
|
+
fileName?: string;
|
|
161
|
+
mimeType?: string;
|
|
162
|
+
}
|
|
163
|
+
/** @oneof */
|
|
164
|
+
interface AttachmentMediaMediaOneOf {
|
|
165
|
+
image?: string;
|
|
166
|
+
document?: string;
|
|
167
|
+
}
|
|
168
|
+
declare enum CrmAttachmentAttachmentType {
|
|
169
|
+
UNKNOWN = "UNKNOWN",
|
|
170
|
+
DOCUMENT = "DOCUMENT",
|
|
171
|
+
IMAGE = "IMAGE"
|
|
172
|
+
}
|
|
173
|
+
interface CreateDemoAttachmentRequest {
|
|
174
|
+
/** The contact id whose demo attachment is being created */
|
|
175
|
+
contactId?: string;
|
|
176
|
+
/** The type of the demo contact */
|
|
177
|
+
demoContactType?: DemoContactType;
|
|
178
|
+
}
|
|
179
|
+
declare enum DemoContactType {
|
|
180
|
+
KAT = "KAT",
|
|
181
|
+
DAN = "DAN"
|
|
182
|
+
}
|
|
183
|
+
interface CreateDemoAttachmentResponse {
|
|
184
|
+
/** The created attachment */
|
|
185
|
+
attachment?: ContactAttachment;
|
|
186
|
+
}
|
|
187
|
+
interface GenerateAttachmentUploadUrlRequest {
|
|
188
|
+
/** ID of the contact whose attachment is being uploaded. */
|
|
189
|
+
contactId: string;
|
|
190
|
+
/** File name including the extension e.g: `contact-cv.pdf` */
|
|
191
|
+
fileName: string;
|
|
192
|
+
/** Mime type e.g: `application/pdf` */
|
|
193
|
+
mimeType: string;
|
|
194
|
+
}
|
|
195
|
+
interface GenerateAttachmentUploadUrlResponse {
|
|
196
|
+
/** The URL for uploading a file as an attachment to the contact. */
|
|
197
|
+
uploadUrl?: string;
|
|
198
|
+
}
|
|
199
|
+
interface ListAttachmentsRequest {
|
|
200
|
+
/** Contact ID */
|
|
201
|
+
contactId: string;
|
|
202
|
+
/** Allow paginating, default: limit = 100 and offset = 0 */
|
|
203
|
+
paging?: Paging$4;
|
|
204
|
+
}
|
|
205
|
+
interface Paging$4 {
|
|
206
|
+
/** Number of items to return (default 100, max 100). */
|
|
207
|
+
limit?: number | null;
|
|
208
|
+
/** number of items to skip in the current sort order */
|
|
209
|
+
offset?: number | null;
|
|
210
|
+
}
|
|
211
|
+
interface ListAttachmentsResponse {
|
|
212
|
+
/** The requested attachments */
|
|
213
|
+
attachments?: ContactAttachment[];
|
|
214
|
+
/** Metadata for the page of results. */
|
|
215
|
+
metadata?: PagingMetadata$3;
|
|
216
|
+
}
|
|
217
|
+
interface PagingMetadata$3 {
|
|
218
|
+
/** The number of items returned in this response */
|
|
219
|
+
count?: number | null;
|
|
220
|
+
/** The offset which was requested */
|
|
221
|
+
offset?: number | null;
|
|
222
|
+
/** The total number of items that match the query */
|
|
223
|
+
total?: number | null;
|
|
224
|
+
/** A flag that indicates the server failed to calculate 'total' field */
|
|
225
|
+
tooManyToCount?: boolean | null;
|
|
226
|
+
}
|
|
227
|
+
interface DeleteAttachmentRequest {
|
|
228
|
+
/** Contact ID */
|
|
229
|
+
contactId: string;
|
|
230
|
+
/** Attachment ID. */
|
|
231
|
+
attachmentId: string;
|
|
232
|
+
}
|
|
233
|
+
interface DeleteAttachmentResponse {
|
|
234
|
+
}
|
|
235
|
+
interface GetAttachmentRequest {
|
|
236
|
+
/** Contact ID */
|
|
237
|
+
contactId: string;
|
|
238
|
+
/** Attachment ID. */
|
|
239
|
+
attachmentId: string;
|
|
240
|
+
}
|
|
241
|
+
interface GetAttachmentResponse {
|
|
242
|
+
/** The requested attachment */
|
|
243
|
+
attachment?: ContactAttachment;
|
|
244
|
+
}
|
|
245
|
+
interface MessageEnvelope$5 {
|
|
246
|
+
/** App instance ID. */
|
|
247
|
+
instanceId?: string | null;
|
|
248
|
+
/** Event type. */
|
|
249
|
+
eventType?: string;
|
|
250
|
+
/** The identification type and identity data. */
|
|
251
|
+
identity?: IdentificationData$5;
|
|
252
|
+
/** Stringify payload. */
|
|
253
|
+
data?: string;
|
|
254
|
+
}
|
|
255
|
+
interface IdentificationData$5 extends IdentificationDataIdOneOf$5 {
|
|
256
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
257
|
+
anonymousVisitorId?: string;
|
|
258
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
259
|
+
memberId?: string;
|
|
260
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
261
|
+
wixUserId?: string;
|
|
262
|
+
/** ID of an app. */
|
|
263
|
+
appId?: string;
|
|
264
|
+
/** @readonly */
|
|
265
|
+
identityType?: WebhookIdentityType$5;
|
|
266
|
+
}
|
|
267
|
+
/** @oneof */
|
|
268
|
+
interface IdentificationDataIdOneOf$5 {
|
|
269
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
270
|
+
anonymousVisitorId?: string;
|
|
271
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
272
|
+
memberId?: string;
|
|
273
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
274
|
+
wixUserId?: string;
|
|
275
|
+
/** ID of an app. */
|
|
276
|
+
appId?: string;
|
|
277
|
+
}
|
|
278
|
+
declare enum WebhookIdentityType$5 {
|
|
279
|
+
UNKNOWN = "UNKNOWN",
|
|
280
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
281
|
+
MEMBER = "MEMBER",
|
|
282
|
+
WIX_USER = "WIX_USER",
|
|
283
|
+
APP = "APP"
|
|
284
|
+
}
|
|
285
|
+
interface GenerateAttachmentUploadUrlResponseNonNullableFields {
|
|
286
|
+
uploadUrl: string;
|
|
287
|
+
}
|
|
288
|
+
interface ListAttachmentsResponseNonNullableFields {
|
|
289
|
+
attachments: {
|
|
290
|
+
image: string;
|
|
291
|
+
document: string;
|
|
292
|
+
_id: string;
|
|
293
|
+
previewImage: string;
|
|
294
|
+
fileName: string;
|
|
295
|
+
mimeType: string;
|
|
296
|
+
attachmentType: AttachmentType;
|
|
297
|
+
}[];
|
|
298
|
+
}
|
|
299
|
+
interface GetAttachmentResponseNonNullableFields {
|
|
300
|
+
attachment?: {
|
|
301
|
+
image: string;
|
|
302
|
+
document: string;
|
|
303
|
+
_id: string;
|
|
304
|
+
previewImage: string;
|
|
305
|
+
fileName: string;
|
|
306
|
+
mimeType: string;
|
|
307
|
+
attachmentType: AttachmentType;
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
interface BaseEventMetadata$4 {
|
|
311
|
+
/** App instance ID. */
|
|
312
|
+
instanceId?: string | null;
|
|
313
|
+
/** Event type. */
|
|
314
|
+
eventType?: string;
|
|
315
|
+
/** The identification type and identity data. */
|
|
316
|
+
identity?: IdentificationData$5;
|
|
317
|
+
}
|
|
318
|
+
interface EventMetadata$4 extends BaseEventMetadata$4 {
|
|
319
|
+
/**
|
|
320
|
+
* Unique event ID.
|
|
321
|
+
* Allows clients to ignore duplicate webhooks.
|
|
322
|
+
*/
|
|
323
|
+
_id?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Assumes actions are also always typed to an entity_type
|
|
326
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
327
|
+
*/
|
|
328
|
+
entityFqdn?: string;
|
|
329
|
+
/**
|
|
330
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
331
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
332
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
333
|
+
*/
|
|
334
|
+
slug?: string;
|
|
335
|
+
/** ID of the entity associated with the event. */
|
|
336
|
+
entityId?: string;
|
|
337
|
+
/** Event timestamp. */
|
|
338
|
+
eventTime?: Date;
|
|
339
|
+
/**
|
|
340
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
341
|
+
* (for example, GDPR).
|
|
342
|
+
*/
|
|
343
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
344
|
+
/** If present, indicates the action that triggered the event. */
|
|
345
|
+
originatedFrom?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
348
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
349
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
350
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
351
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
352
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
353
|
+
*/
|
|
354
|
+
entityEventSequence?: string | null;
|
|
355
|
+
}
|
|
356
|
+
interface AttachmentCreatedEnvelope {
|
|
357
|
+
entity: ContactAttachment;
|
|
358
|
+
metadata: EventMetadata$4;
|
|
359
|
+
}
|
|
360
|
+
interface AttachmentDeletedEnvelope {
|
|
361
|
+
metadata: EventMetadata$4;
|
|
362
|
+
}
|
|
363
|
+
interface GenerateAttachmentUploadUrlOptions {
|
|
364
|
+
/** Mime type e.g: `application/pdf` */
|
|
365
|
+
mimeType: string;
|
|
366
|
+
}
|
|
367
|
+
interface ListAttachmentsOptions {
|
|
368
|
+
/** Allow paginating, default: limit = 100 and offset = 0 */
|
|
369
|
+
paging?: Paging$4;
|
|
370
|
+
}
|
|
371
|
+
interface DeleteAttachmentIdentifiers {
|
|
372
|
+
/** Contact ID */
|
|
373
|
+
contactId: string;
|
|
374
|
+
/** Attachment ID. */
|
|
375
|
+
attachmentId: string;
|
|
376
|
+
}
|
|
377
|
+
interface GetAttachmentIdentifiers {
|
|
378
|
+
/** Contact ID */
|
|
379
|
+
contactId: string;
|
|
380
|
+
/** Attachment ID. */
|
|
381
|
+
attachmentId: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
interface HttpClient {
|
|
385
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
386
|
+
}
|
|
387
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
388
|
+
type HttpResponse<T = any> = {
|
|
389
|
+
data: T;
|
|
390
|
+
status: number;
|
|
391
|
+
statusText: string;
|
|
392
|
+
headers: any;
|
|
393
|
+
request?: any;
|
|
394
|
+
};
|
|
395
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
396
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
397
|
+
url: string;
|
|
398
|
+
data?: Data;
|
|
399
|
+
params?: URLSearchParams;
|
|
400
|
+
} & APIMetadata;
|
|
401
|
+
type APIMetadata = {
|
|
402
|
+
methodFqn?: string;
|
|
403
|
+
entityFqdn?: string;
|
|
404
|
+
packageName?: string;
|
|
405
|
+
};
|
|
406
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
407
|
+
__type: 'event-definition';
|
|
408
|
+
type: Type;
|
|
409
|
+
isDomainEvent?: boolean;
|
|
410
|
+
transformations?: unknown;
|
|
411
|
+
__payload: Payload;
|
|
412
|
+
};
|
|
413
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
414
|
+
|
|
415
|
+
declare const __metadata$5: {
|
|
416
|
+
PACKAGE_NAME: string;
|
|
417
|
+
};
|
|
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 & {
|
|
422
|
+
image: string;
|
|
423
|
+
document: string;
|
|
424
|
+
_id: string;
|
|
425
|
+
previewImage: string;
|
|
426
|
+
fileName: string;
|
|
427
|
+
mimeType: string;
|
|
428
|
+
attachmentType: AttachmentType;
|
|
429
|
+
}>;
|
|
430
|
+
declare const onAttachmentCreated: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
431
|
+
declare const onAttachmentDeleted: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
432
|
+
|
|
433
|
+
type index_d$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
|
|
434
|
+
type index_d$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
|
|
435
|
+
type index_d$5_AttachmentMedia = AttachmentMedia;
|
|
436
|
+
type index_d$5_AttachmentMediaMediaOneOf = AttachmentMediaMediaOneOf;
|
|
437
|
+
type index_d$5_AttachmentMetadata = AttachmentMetadata;
|
|
438
|
+
type index_d$5_AttachmentSource = AttachmentSource;
|
|
439
|
+
type index_d$5_AttachmentType = AttachmentType;
|
|
440
|
+
declare const index_d$5_AttachmentType: typeof AttachmentType;
|
|
441
|
+
type index_d$5_ContactAttachment = ContactAttachment;
|
|
442
|
+
type index_d$5_ContactAttachmentMediaOneOf = ContactAttachmentMediaOneOf;
|
|
443
|
+
type index_d$5_CreateDemoAttachmentRequest = CreateDemoAttachmentRequest;
|
|
444
|
+
type index_d$5_CreateDemoAttachmentResponse = CreateDemoAttachmentResponse;
|
|
445
|
+
type index_d$5_CrmAttachment = CrmAttachment;
|
|
446
|
+
type index_d$5_CrmAttachmentAttachmentType = CrmAttachmentAttachmentType;
|
|
447
|
+
declare const index_d$5_CrmAttachmentAttachmentType: typeof CrmAttachmentAttachmentType;
|
|
448
|
+
type index_d$5_CrmAttachmentUploadedEvent = CrmAttachmentUploadedEvent;
|
|
449
|
+
type index_d$5_DeleteAttachmentIdentifiers = DeleteAttachmentIdentifiers;
|
|
450
|
+
type index_d$5_DeleteAttachmentRequest = DeleteAttachmentRequest;
|
|
451
|
+
type index_d$5_DeleteAttachmentResponse = DeleteAttachmentResponse;
|
|
452
|
+
type index_d$5_DemoContactType = DemoContactType;
|
|
453
|
+
declare const index_d$5_DemoContactType: typeof DemoContactType;
|
|
454
|
+
type index_d$5_GenerateAttachmentUploadUrlOptions = GenerateAttachmentUploadUrlOptions;
|
|
455
|
+
type index_d$5_GenerateAttachmentUploadUrlRequest = GenerateAttachmentUploadUrlRequest;
|
|
456
|
+
type index_d$5_GenerateAttachmentUploadUrlResponse = GenerateAttachmentUploadUrlResponse;
|
|
457
|
+
type index_d$5_GenerateAttachmentUploadUrlResponseNonNullableFields = GenerateAttachmentUploadUrlResponseNonNullableFields;
|
|
458
|
+
type index_d$5_GetAttachmentIdentifiers = GetAttachmentIdentifiers;
|
|
459
|
+
type index_d$5_GetAttachmentRequest = GetAttachmentRequest;
|
|
460
|
+
type index_d$5_GetAttachmentResponse = GetAttachmentResponse;
|
|
461
|
+
type index_d$5_GetAttachmentResponseNonNullableFields = GetAttachmentResponseNonNullableFields;
|
|
462
|
+
type index_d$5_ListAttachmentsOptions = ListAttachmentsOptions;
|
|
463
|
+
type index_d$5_ListAttachmentsRequest = ListAttachmentsRequest;
|
|
464
|
+
type index_d$5_ListAttachmentsResponse = ListAttachmentsResponse;
|
|
465
|
+
type index_d$5_ListAttachmentsResponseNonNullableFields = ListAttachmentsResponseNonNullableFields;
|
|
466
|
+
type index_d$5_MediaFileUploadedEvent = MediaFileUploadedEvent;
|
|
467
|
+
declare const index_d$5_deleteAttachment: typeof deleteAttachment;
|
|
468
|
+
declare const index_d$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
|
|
469
|
+
declare const index_d$5_getAttachment: typeof getAttachment;
|
|
470
|
+
declare const index_d$5_listAttachments: typeof listAttachments;
|
|
471
|
+
declare const index_d$5_onAttachmentCreated: typeof onAttachmentCreated;
|
|
472
|
+
declare const index_d$5_onAttachmentDeleted: typeof onAttachmentDeleted;
|
|
473
|
+
declare namespace index_d$5 {
|
|
474
|
+
export { type ActionEvent$4 as ActionEvent, type index_d$5_AttachmentCreatedEnvelope as AttachmentCreatedEnvelope, type index_d$5_AttachmentDeletedEnvelope as AttachmentDeletedEnvelope, type index_d$5_AttachmentMedia as AttachmentMedia, type index_d$5_AttachmentMediaMediaOneOf as AttachmentMediaMediaOneOf, type index_d$5_AttachmentMetadata as AttachmentMetadata, type index_d$5_AttachmentSource as AttachmentSource, index_d$5_AttachmentType as AttachmentType, type BaseEventMetadata$4 as BaseEventMetadata, type index_d$5_ContactAttachment as ContactAttachment, type index_d$5_ContactAttachmentMediaOneOf as ContactAttachmentMediaOneOf, type index_d$5_CreateDemoAttachmentRequest as CreateDemoAttachmentRequest, type index_d$5_CreateDemoAttachmentResponse as CreateDemoAttachmentResponse, type index_d$5_CrmAttachment as CrmAttachment, index_d$5_CrmAttachmentAttachmentType as CrmAttachmentAttachmentType, type index_d$5_CrmAttachmentUploadedEvent as CrmAttachmentUploadedEvent, type index_d$5_DeleteAttachmentIdentifiers as DeleteAttachmentIdentifiers, type index_d$5_DeleteAttachmentRequest as DeleteAttachmentRequest, type index_d$5_DeleteAttachmentResponse as DeleteAttachmentResponse, index_d$5_DemoContactType as DemoContactType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type EventMetadata$4 as EventMetadata, type index_d$5_GenerateAttachmentUploadUrlOptions as GenerateAttachmentUploadUrlOptions, type index_d$5_GenerateAttachmentUploadUrlRequest as GenerateAttachmentUploadUrlRequest, type index_d$5_GenerateAttachmentUploadUrlResponse as GenerateAttachmentUploadUrlResponse, type index_d$5_GenerateAttachmentUploadUrlResponseNonNullableFields as GenerateAttachmentUploadUrlResponseNonNullableFields, type index_d$5_GetAttachmentIdentifiers as GetAttachmentIdentifiers, type index_d$5_GetAttachmentRequest as GetAttachmentRequest, type index_d$5_GetAttachmentResponse as GetAttachmentResponse, type index_d$5_GetAttachmentResponseNonNullableFields as GetAttachmentResponseNonNullableFields, type IdentificationData$5 as IdentificationData, type IdentificationDataIdOneOf$5 as IdentificationDataIdOneOf, type index_d$5_ListAttachmentsOptions as ListAttachmentsOptions, type index_d$5_ListAttachmentsRequest as ListAttachmentsRequest, type index_d$5_ListAttachmentsResponse as ListAttachmentsResponse, type index_d$5_ListAttachmentsResponseNonNullableFields as ListAttachmentsResponseNonNullableFields, type index_d$5_MediaFileUploadedEvent as MediaFileUploadedEvent, type MessageEnvelope$5 as MessageEnvelope, type Paging$4 as Paging, type PagingMetadata$3 as PagingMetadata, WebhookIdentityType$5 as WebhookIdentityType, __metadata$5 as __metadata, index_d$5_deleteAttachment as deleteAttachment, index_d$5_generateAttachmentUploadUrl as generateAttachmentUploadUrl, index_d$5_getAttachment as getAttachment, index_d$5_listAttachments as listAttachments, index_d$5_onAttachmentCreated as onAttachmentCreated, index_d$5_onAttachmentDeleted as onAttachmentDeleted };
|
|
475
|
+
}
|
|
476
|
+
|
|
1
477
|
interface Contact {
|
|
2
478
|
/**
|
|
3
479
|
* Contact ID.
|
|
@@ -2033,37 +2509,6 @@ interface GetContactOptions {
|
|
|
2033
2509
|
fieldsets?: ContactFieldSet[];
|
|
2034
2510
|
}
|
|
2035
2511
|
|
|
2036
|
-
interface HttpClient {
|
|
2037
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2038
|
-
}
|
|
2039
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2040
|
-
type HttpResponse<T = any> = {
|
|
2041
|
-
data: T;
|
|
2042
|
-
status: number;
|
|
2043
|
-
statusText: string;
|
|
2044
|
-
headers: any;
|
|
2045
|
-
request?: any;
|
|
2046
|
-
};
|
|
2047
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2048
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2049
|
-
url: string;
|
|
2050
|
-
data?: Data;
|
|
2051
|
-
params?: URLSearchParams;
|
|
2052
|
-
} & APIMetadata;
|
|
2053
|
-
type APIMetadata = {
|
|
2054
|
-
methodFqn?: string;
|
|
2055
|
-
entityFqdn?: string;
|
|
2056
|
-
packageName?: string;
|
|
2057
|
-
};
|
|
2058
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2059
|
-
__type: 'event-definition';
|
|
2060
|
-
type: Type;
|
|
2061
|
-
isDomainEvent?: boolean;
|
|
2062
|
-
transformations?: unknown;
|
|
2063
|
-
__payload: Payload;
|
|
2064
|
-
};
|
|
2065
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2066
|
-
|
|
2067
2512
|
declare const __metadata$4: {
|
|
2068
2513
|
PACKAGE_NAME: string;
|
|
2069
2514
|
};
|
|
@@ -4983,4 +5428,4 @@ declare namespace index_d {
|
|
|
4983
5428
|
export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_ContactInfo as ContactInfo, type index_d_ContactNotFoundError as ContactNotFoundError, type index_d_CountTasksOptions as CountTasksOptions, type index_d_CountTasksRequest as CountTasksRequest, type index_d_CountTasksResponse as CountTasksResponse, type index_d_CountTasksResponseNonNullableFields as CountTasksResponseNonNullableFields, type index_d_CreateTaskRequest as CreateTaskRequest, type index_d_CreateTaskResponse as CreateTaskResponse, type index_d_CreateTaskResponseNonNullableFields as CreateTaskResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DeleteCompletedTasksRequest as DeleteCompletedTasksRequest, type index_d_DeleteCompletedTasksResponse as DeleteCompletedTasksResponse, type index_d_DeleteTaskRequest as DeleteTaskRequest, type index_d_DeleteTaskResponse as DeleteTaskResponse, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_GetTaskRequest as GetTaskRequest, type index_d_GetTaskResponse as GetTaskResponse, type index_d_GetTaskResponseNonNullableFields as GetTaskResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MoveTaskAfterOptions as MoveTaskAfterOptions, type index_d_MoveTaskAfterRequest as MoveTaskAfterRequest, type index_d_MoveTaskAfterResponse as MoveTaskAfterResponse, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_QueryTasksInternalRequest as QueryTasksInternalRequest, type index_d_QueryTasksInternalResponse as QueryTasksInternalResponse, type index_d_QueryTasksRequest as QueryTasksRequest, type index_d_QueryTasksResponse as QueryTasksResponse, type index_d_QueryTasksResponseNonNullableFields as QueryTasksResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, index_d_ReminderType as ReminderType, type index_d_RepositionTask as RepositionTask, type index_d_SendTasksReminderRequest as SendTasksReminderRequest, type index_d_SendTasksReminderResponse as SendTasksReminderResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_SourceType as SourceType, type index_d_Task as Task, type index_d_TaskAssigned as TaskAssigned, type index_d_TaskCreatedEnvelope as TaskCreatedEnvelope, type index_d_TaskDeletedEnvelope as TaskDeletedEnvelope, type index_d_TaskNotFoundError as TaskNotFoundError, type index_d_TaskOverdue as TaskOverdue, type index_d_TaskOverdueEnvelope as TaskOverdueEnvelope, type index_d_TaskSource as TaskSource, index_d_TaskStatus as TaskStatus, type index_d_TaskUpdatedEnvelope as TaskUpdatedEnvelope, type index_d_TasksQueryBuilder as TasksQueryBuilder, type index_d_TasksQueryResult as TasksQueryResult, type index_d_UpdateTask as UpdateTask, type index_d_UpdateTaskRequest as UpdateTaskRequest, type index_d_UpdateTaskResponse as UpdateTaskResponse, type index_d_UpdateTaskResponseNonNullableFields as UpdateTaskResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, index_d___metadata as __metadata, index_d_countTasks as countTasks, index_d_createTask as createTask, index_d_deleteTask as deleteTask, index_d_getTask as getTask, index_d_moveTaskAfter as moveTaskAfter, index_d_onTaskCreated as onTaskCreated, index_d_onTaskDeleted as onTaskDeleted, index_d_onTaskOverdue as onTaskOverdue, index_d_onTaskUpdated as onTaskUpdated, index_d_queryTasks as queryTasks, index_d_updateTask as updateTask };
|
|
4984
5429
|
}
|
|
4985
5430
|
|
|
4986
|
-
export { index_d$4 as contacts, index_d$3 as extendedFields, index_d$2 as labels, index_d$1 as submittedContact, index_d as tasks };
|
|
5431
|
+
export { index_d$5 as attachments, index_d$4 as contacts, index_d$3 as extendedFields, index_d$2 as labels, index_d$1 as submittedContact, index_d as tasks };
|