@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.
@@ -1,3 +1,353 @@
1
+ interface ContactAttachment$1 extends ContactAttachmentMediaOneOf$1 {
2
+ /** The attachment's image (if the attachment is of type IMAGE) */
3
+ image?: Image$2;
4
+ /** The attachment's document (if the attachment is of type OTHER) */
5
+ document?: Document;
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?: Image$2;
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$1;
31
+ }
32
+ /** @oneof */
33
+ interface ContactAttachmentMediaOneOf$1 {
34
+ /** The attachment's image (if the attachment is of type IMAGE) */
35
+ image?: Image$2;
36
+ /** The attachment's document (if the attachment is of type OTHER) */
37
+ document?: Document;
38
+ }
39
+ interface Image$2 {
40
+ /** WixMedia image ID. */
41
+ id?: string;
42
+ /** Image URL. */
43
+ url?: string;
44
+ /**
45
+ * Original image height.
46
+ * @readonly
47
+ */
48
+ height?: number;
49
+ /**
50
+ * Original image width.
51
+ * @readonly
52
+ */
53
+ width?: number;
54
+ /** Image alt text. Optional. */
55
+ altText?: string | null;
56
+ /**
57
+ * Image URL expiration date (when relevant). Optional
58
+ * @readonly
59
+ */
60
+ urlExpirationDate?: Date;
61
+ }
62
+ interface Document {
63
+ /** WixMedia ID. */
64
+ id?: string;
65
+ /** Document URL. */
66
+ url?: string;
67
+ /**
68
+ * Document URL expiration date (when relevant). Optional
69
+ * @readonly
70
+ */
71
+ urlExpirationDate?: Date;
72
+ }
73
+ declare enum AttachmentType$1 {
74
+ UNKNOWN = "UNKNOWN",
75
+ IMAGE = "IMAGE",
76
+ OTHER = "OTHER"
77
+ }
78
+ interface GenerateAttachmentUploadUrlRequest$1 {
79
+ /** ID of the contact whose attachment is being uploaded. */
80
+ contactId: string;
81
+ /** File name including the extension e.g: `contact-cv.pdf` */
82
+ fileName: string;
83
+ /** Mime type e.g: `application/pdf` */
84
+ mimeType: string;
85
+ }
86
+ interface GenerateAttachmentUploadUrlResponse$1 {
87
+ /** The URL for uploading a file as an attachment to the contact. */
88
+ uploadUrl?: string;
89
+ }
90
+ interface ListAttachmentsRequest$1 {
91
+ /** Contact ID */
92
+ contactId: string;
93
+ /** Allow paginating, default: limit = 100 and offset = 0 */
94
+ paging?: Paging$7;
95
+ }
96
+ interface Paging$7 {
97
+ /** Number of items to return (default 100, max 100). */
98
+ limit?: number | null;
99
+ /** number of items to skip in the current sort order */
100
+ offset?: number | null;
101
+ }
102
+ interface ListAttachmentsResponse$1 {
103
+ /** The requested attachments */
104
+ attachments?: ContactAttachment$1[];
105
+ /** Metadata for the page of results. */
106
+ metadata?: PagingMetadata$7;
107
+ }
108
+ interface PagingMetadata$7 {
109
+ /** The number of items returned in this response */
110
+ count?: number | null;
111
+ /** The offset which was requested */
112
+ offset?: number | null;
113
+ /** The total number of items that match the query */
114
+ total?: number | null;
115
+ /** A flag that indicates the server failed to calculate 'total' field */
116
+ tooManyToCount?: boolean | null;
117
+ }
118
+ interface DeleteAttachmentRequest$1 {
119
+ /** Contact ID */
120
+ contactId: string;
121
+ /** Attachment ID. */
122
+ attachmentId: string;
123
+ }
124
+ interface DeleteAttachmentResponse$1 {
125
+ }
126
+ interface GetAttachmentRequest$1 {
127
+ /** Contact ID */
128
+ contactId: string;
129
+ /** Attachment ID. */
130
+ attachmentId: string;
131
+ }
132
+ interface GetAttachmentResponse$1 {
133
+ /** The requested attachment */
134
+ attachment?: ContactAttachment$1;
135
+ }
136
+ interface GenerateAttachmentUploadUrlResponseNonNullableFields$1 {
137
+ uploadUrl: string;
138
+ uploadId: string;
139
+ }
140
+ interface ListAttachmentsResponseNonNullableFields$1 {
141
+ attachments: {
142
+ image?: {
143
+ id: string;
144
+ url: string;
145
+ height: number;
146
+ width: number;
147
+ };
148
+ document?: {
149
+ id: string;
150
+ url: string;
151
+ };
152
+ id: string;
153
+ previewImage?: {
154
+ id: string;
155
+ url: string;
156
+ height: number;
157
+ width: number;
158
+ };
159
+ fileName: string;
160
+ mimeType: string;
161
+ attachmentType: AttachmentType$1;
162
+ mediaPath: string;
163
+ }[];
164
+ }
165
+ interface GetAttachmentResponseNonNullableFields$1 {
166
+ attachment?: {
167
+ image?: {
168
+ id: string;
169
+ url: string;
170
+ height: number;
171
+ width: number;
172
+ };
173
+ document?: {
174
+ id: string;
175
+ url: string;
176
+ };
177
+ id: string;
178
+ previewImage?: {
179
+ id: string;
180
+ url: string;
181
+ height: number;
182
+ width: number;
183
+ };
184
+ fileName: string;
185
+ mimeType: string;
186
+ attachmentType: AttachmentType$1;
187
+ mediaPath: string;
188
+ };
189
+ }
190
+
191
+ interface ContactAttachment extends ContactAttachmentMediaOneOf {
192
+ /** The attachment's image (if the attachment is of type IMAGE) */
193
+ image?: string;
194
+ /** The attachment's document (if the attachment is of type OTHER) */
195
+ document?: string;
196
+ /**
197
+ * The id of the attachment.
198
+ * @readonly
199
+ */
200
+ _id?: string;
201
+ /**
202
+ * Image preview (reduced image size) of the attachment (if the attachment is of type IMAGE).
203
+ * @readonly
204
+ */
205
+ previewImage?: string;
206
+ /**
207
+ * The file name of the attachment.
208
+ * @readonly
209
+ */
210
+ fileName?: string;
211
+ /**
212
+ * The mime type of the attachment.
213
+ * @readonly
214
+ */
215
+ mimeType?: string;
216
+ /**
217
+ * The type of the attachment
218
+ * @readonly
219
+ */
220
+ attachmentType?: AttachmentType;
221
+ }
222
+ /** @oneof */
223
+ interface ContactAttachmentMediaOneOf {
224
+ /** The attachment's image (if the attachment is of type IMAGE) */
225
+ image?: string;
226
+ /** The attachment's document (if the attachment is of type OTHER) */
227
+ document?: string;
228
+ }
229
+ declare enum AttachmentType {
230
+ UNKNOWN = "UNKNOWN",
231
+ IMAGE = "IMAGE",
232
+ OTHER = "OTHER"
233
+ }
234
+ interface GenerateAttachmentUploadUrlRequest {
235
+ /** ID of the contact whose attachment is being uploaded. */
236
+ contactId: string;
237
+ /** File name including the extension e.g: `contact-cv.pdf` */
238
+ fileName: string;
239
+ /** Mime type e.g: `application/pdf` */
240
+ mimeType: string;
241
+ }
242
+ interface GenerateAttachmentUploadUrlResponse {
243
+ /** The URL for uploading a file as an attachment to the contact. */
244
+ uploadUrl?: string;
245
+ }
246
+ interface ListAttachmentsRequest {
247
+ /** Contact ID */
248
+ contactId: string;
249
+ /** Allow paginating, default: limit = 100 and offset = 0 */
250
+ paging?: Paging$6;
251
+ }
252
+ interface Paging$6 {
253
+ /** Number of items to return (default 100, max 100). */
254
+ limit?: number | null;
255
+ /** number of items to skip in the current sort order */
256
+ offset?: number | null;
257
+ }
258
+ interface ListAttachmentsResponse {
259
+ /** The requested attachments */
260
+ attachments?: ContactAttachment[];
261
+ /** Metadata for the page of results. */
262
+ metadata?: PagingMetadata$6;
263
+ }
264
+ interface PagingMetadata$6 {
265
+ /** The number of items returned in this response */
266
+ count?: number | null;
267
+ /** The offset which was requested */
268
+ offset?: number | null;
269
+ /** The total number of items that match the query */
270
+ total?: number | null;
271
+ /** A flag that indicates the server failed to calculate 'total' field */
272
+ tooManyToCount?: boolean | null;
273
+ }
274
+ interface DeleteAttachmentRequest {
275
+ /** Contact ID */
276
+ contactId: string;
277
+ /** Attachment ID. */
278
+ attachmentId: string;
279
+ }
280
+ interface DeleteAttachmentResponse {
281
+ }
282
+ interface GetAttachmentRequest {
283
+ /** Contact ID */
284
+ contactId: string;
285
+ /** Attachment ID. */
286
+ attachmentId: string;
287
+ }
288
+ interface GetAttachmentResponse {
289
+ /** The requested attachment */
290
+ attachment?: ContactAttachment;
291
+ }
292
+ interface GenerateAttachmentUploadUrlResponseNonNullableFields {
293
+ uploadUrl: string;
294
+ }
295
+ interface ListAttachmentsResponseNonNullableFields {
296
+ attachments: {
297
+ image: string;
298
+ document: string;
299
+ _id: string;
300
+ previewImage: string;
301
+ fileName: string;
302
+ mimeType: string;
303
+ attachmentType: AttachmentType;
304
+ }[];
305
+ }
306
+ interface GetAttachmentResponseNonNullableFields {
307
+ attachment?: {
308
+ image: string;
309
+ document: string;
310
+ _id: string;
311
+ previewImage: string;
312
+ fileName: string;
313
+ mimeType: string;
314
+ attachmentType: AttachmentType;
315
+ };
316
+ }
317
+
318
+ type __PublicMethodMetaInfo$5<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
319
+ getUrl: (context: any) => string;
320
+ httpMethod: K;
321
+ path: string;
322
+ pathParams: M;
323
+ __requestType: T;
324
+ __originalRequestType: S;
325
+ __responseType: Q;
326
+ __originalResponseType: R;
327
+ };
328
+ declare function generateAttachmentUploadUrl(): __PublicMethodMetaInfo$5<'POST', {
329
+ contactId: string;
330
+ }, GenerateAttachmentUploadUrlRequest, GenerateAttachmentUploadUrlRequest$1, GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields, GenerateAttachmentUploadUrlResponse$1 & GenerateAttachmentUploadUrlResponseNonNullableFields$1>;
331
+ declare function listAttachments(): __PublicMethodMetaInfo$5<'GET', {
332
+ contactId: string;
333
+ }, ListAttachmentsRequest, ListAttachmentsRequest$1, ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields, ListAttachmentsResponse$1 & ListAttachmentsResponseNonNullableFields$1>;
334
+ declare function deleteAttachment(): __PublicMethodMetaInfo$5<'DELETE', {
335
+ contactId: string;
336
+ attachmentId: string;
337
+ }, DeleteAttachmentRequest, DeleteAttachmentRequest$1, DeleteAttachmentResponse, DeleteAttachmentResponse$1>;
338
+ declare function getAttachment(): __PublicMethodMetaInfo$5<'GET', {
339
+ contactId: string;
340
+ attachmentId: string;
341
+ }, GetAttachmentRequest, GetAttachmentRequest$1, GetAttachmentResponse & GetAttachmentResponseNonNullableFields, GetAttachmentResponse$1 & GetAttachmentResponseNonNullableFields$1>;
342
+
343
+ declare const meta$5_deleteAttachment: typeof deleteAttachment;
344
+ declare const meta$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
345
+ declare const meta$5_getAttachment: typeof getAttachment;
346
+ declare const meta$5_listAttachments: typeof listAttachments;
347
+ declare namespace meta$5 {
348
+ export { type __PublicMethodMetaInfo$5 as __PublicMethodMetaInfo, meta$5_deleteAttachment as deleteAttachment, meta$5_generateAttachmentUploadUrl as generateAttachmentUploadUrl, meta$5_getAttachment as getAttachment, meta$5_listAttachments as listAttachments };
349
+ }
350
+
1
351
  interface Contact$1 {
2
352
  /**
3
353
  * Contact ID.
@@ -4624,4 +4974,4 @@ declare namespace meta {
4624
4974
  export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_countTasks as countTasks, meta_createTask as createTask, meta_deleteTask as deleteTask, meta_getTask as getTask, meta_moveTaskAfter as moveTaskAfter, meta_queryTasks as queryTasks, meta_updateTask as updateTask };
4625
4975
  }
4626
4976
 
4627
- export { meta$4 as contacts, meta$3 as extendedFields, meta$2 as labels, meta$1 as submittedContact, meta as tasks };
4977
+ export { meta$5 as attachments, meta$4 as contacts, meta$3 as extendedFields, meta$2 as labels, meta$1 as submittedContact, meta as tasks };