@wix/auto_sdk_crm_pipelines 1.0.6 → 1.0.7
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/index.d.ts +18 -6
- package/build/cjs/index.js +502 -23
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +486 -7
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +18 -6
- package/build/es/index.mjs +492 -23
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +476 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -6
- package/build/internal/cjs/index.js +502 -23
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +486 -7
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -6
- package/build/internal/es/index.mjs +492 -23
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +476 -7
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -292,6 +292,454 @@ function bulkUpdatePipelineTagsByFilter(payload) {
|
|
|
292
292
|
|
|
293
293
|
// src/crm-pipelines-v1-pipeline-pipelines.universal.ts
|
|
294
294
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
295
|
+
|
|
296
|
+
// src/crm-pipelines-v1-pipeline-pipelines.schemas.ts
|
|
297
|
+
import * as z from "zod";
|
|
298
|
+
var CreatePipelineRequest = z.object({
|
|
299
|
+
pipeline: z.object({
|
|
300
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
301
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
302
|
+
"Must be a valid GUID"
|
|
303
|
+
).optional().nullable(),
|
|
304
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
305
|
+
"Revision number, which increments by 1 each time the pipeline is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\n\nIgnored when creating a pipeline."
|
|
306
|
+
).optional().nullable(),
|
|
307
|
+
_createdDate: z.date().describe(
|
|
308
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
309
|
+
).optional().nullable(),
|
|
310
|
+
_updatedDate: z.date().describe(
|
|
311
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
312
|
+
).optional().nullable(),
|
|
313
|
+
name: z.string().describe("Pipeline name.").min(1).max(60),
|
|
314
|
+
currency: z.string().describe(
|
|
315
|
+
"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n\nDefault: Based on the site's currency settings."
|
|
316
|
+
).optional().nullable(),
|
|
317
|
+
stages: z.array(
|
|
318
|
+
z.object({
|
|
319
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
320
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
321
|
+
"Must be a valid GUID"
|
|
322
|
+
).optional().nullable(),
|
|
323
|
+
name: z.string().describe("Stage name.").min(1).max(40),
|
|
324
|
+
staleDurationInHours: z.number().int().describe(
|
|
325
|
+
"The duration (in hours) a card can remain in this stage before becoming stale.\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays."
|
|
326
|
+
).min(1).max(1e5).optional().nullable()
|
|
327
|
+
})
|
|
328
|
+
).min(1).max(30),
|
|
329
|
+
doneStage: z.object({
|
|
330
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
331
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
332
|
+
"Must be a valid GUID"
|
|
333
|
+
).optional().nullable(),
|
|
334
|
+
name: z.string().describe("Done stage name.").min(1).max(40),
|
|
335
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3)
|
|
336
|
+
}).describe(
|
|
337
|
+
"The final pipeline stage where cards receive a final outcome."
|
|
338
|
+
),
|
|
339
|
+
extendedFields: z.object({
|
|
340
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
341
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
342
|
+
).optional()
|
|
343
|
+
}).describe("Extended fields data.").optional(),
|
|
344
|
+
tags: z.object({
|
|
345
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
346
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
347
|
+
).optional()
|
|
348
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
349
|
+
}).describe("Pipeline to create.")
|
|
350
|
+
});
|
|
351
|
+
var CreatePipelineResponse = z.object({
|
|
352
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
353
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
354
|
+
"Must be a valid GUID"
|
|
355
|
+
).optional().nullable(),
|
|
356
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
357
|
+
"Revision number, which increments by 1 each time the pipeline is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\n\nIgnored when creating a pipeline."
|
|
358
|
+
).optional().nullable(),
|
|
359
|
+
_createdDate: z.date().describe(
|
|
360
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
361
|
+
).optional().nullable(),
|
|
362
|
+
_updatedDate: z.date().describe(
|
|
363
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
364
|
+
).optional().nullable(),
|
|
365
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
366
|
+
currency: z.string().describe(
|
|
367
|
+
"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n\nDefault: Based on the site's currency settings."
|
|
368
|
+
).optional().nullable(),
|
|
369
|
+
stages: z.array(
|
|
370
|
+
z.object({
|
|
371
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
372
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
373
|
+
"Must be a valid GUID"
|
|
374
|
+
).optional().nullable(),
|
|
375
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
376
|
+
staleDurationInHours: z.number().int().describe(
|
|
377
|
+
"The duration (in hours) a card can remain in this stage before becoming stale.\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays."
|
|
378
|
+
).min(1).max(1e5).optional().nullable()
|
|
379
|
+
})
|
|
380
|
+
).min(1).max(30).optional(),
|
|
381
|
+
doneStage: z.object({
|
|
382
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
383
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
384
|
+
"Must be a valid GUID"
|
|
385
|
+
).optional().nullable(),
|
|
386
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
387
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
388
|
+
}).describe("The final pipeline stage where cards receive a final outcome.").optional(),
|
|
389
|
+
extendedFields: z.object({
|
|
390
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
391
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
392
|
+
).optional()
|
|
393
|
+
}).describe("Extended fields data.").optional(),
|
|
394
|
+
tags: z.object({
|
|
395
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
396
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
397
|
+
).optional()
|
|
398
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
399
|
+
});
|
|
400
|
+
var GetPipelineRequest = z.object({
|
|
401
|
+
pipelineId: z.string().describe("Pipeline ID to retrieve.").regex(
|
|
402
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
403
|
+
"Must be a valid GUID"
|
|
404
|
+
)
|
|
405
|
+
});
|
|
406
|
+
var GetPipelineResponse = z.object({
|
|
407
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
408
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
409
|
+
"Must be a valid GUID"
|
|
410
|
+
).optional().nullable(),
|
|
411
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
412
|
+
"Revision number, which increments by 1 each time the pipeline is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\n\nIgnored when creating a pipeline."
|
|
413
|
+
).optional().nullable(),
|
|
414
|
+
_createdDate: z.date().describe(
|
|
415
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
416
|
+
).optional().nullable(),
|
|
417
|
+
_updatedDate: z.date().describe(
|
|
418
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
419
|
+
).optional().nullable(),
|
|
420
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
421
|
+
currency: z.string().describe(
|
|
422
|
+
"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n\nDefault: Based on the site's currency settings."
|
|
423
|
+
).optional().nullable(),
|
|
424
|
+
stages: z.array(
|
|
425
|
+
z.object({
|
|
426
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
427
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
428
|
+
"Must be a valid GUID"
|
|
429
|
+
).optional().nullable(),
|
|
430
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
431
|
+
staleDurationInHours: z.number().int().describe(
|
|
432
|
+
"The duration (in hours) a card can remain in this stage before becoming stale.\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays."
|
|
433
|
+
).min(1).max(1e5).optional().nullable()
|
|
434
|
+
})
|
|
435
|
+
).min(1).max(30).optional(),
|
|
436
|
+
doneStage: z.object({
|
|
437
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
438
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
439
|
+
"Must be a valid GUID"
|
|
440
|
+
).optional().nullable(),
|
|
441
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
442
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
443
|
+
}).describe("The final pipeline stage where cards receive a final outcome.").optional(),
|
|
444
|
+
extendedFields: z.object({
|
|
445
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
446
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
447
|
+
).optional()
|
|
448
|
+
}).describe("Extended fields data.").optional(),
|
|
449
|
+
tags: z.object({
|
|
450
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
451
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
452
|
+
).optional()
|
|
453
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
454
|
+
});
|
|
455
|
+
var UpdatePipelineRequest = z.object({
|
|
456
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
457
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
458
|
+
"Must be a valid GUID"
|
|
459
|
+
),
|
|
460
|
+
pipeline: z.object({
|
|
461
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
462
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
463
|
+
"Must be a valid GUID"
|
|
464
|
+
).optional().nullable(),
|
|
465
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
466
|
+
"Revision number, which increments by 1 each time the pipeline is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\n\nIgnored when creating a pipeline."
|
|
467
|
+
),
|
|
468
|
+
_createdDate: z.date().describe(
|
|
469
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
470
|
+
).optional().nullable(),
|
|
471
|
+
_updatedDate: z.date().describe(
|
|
472
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
473
|
+
).optional().nullable(),
|
|
474
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
475
|
+
currency: z.string().describe(
|
|
476
|
+
"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n\nDefault: Based on the site's currency settings."
|
|
477
|
+
).optional().nullable(),
|
|
478
|
+
stages: z.array(
|
|
479
|
+
z.object({
|
|
480
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
481
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
482
|
+
"Must be a valid GUID"
|
|
483
|
+
).optional().nullable(),
|
|
484
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
485
|
+
staleDurationInHours: z.number().int().describe(
|
|
486
|
+
"The duration (in hours) a card can remain in this stage before becoming stale.\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays."
|
|
487
|
+
).min(1).max(1e5).optional().nullable()
|
|
488
|
+
})
|
|
489
|
+
).min(1).max(30).optional(),
|
|
490
|
+
doneStage: z.object({
|
|
491
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
492
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
493
|
+
"Must be a valid GUID"
|
|
494
|
+
).optional().nullable(),
|
|
495
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
496
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
497
|
+
}).describe(
|
|
498
|
+
"The final pipeline stage where cards receive a final outcome."
|
|
499
|
+
).optional(),
|
|
500
|
+
extendedFields: z.object({
|
|
501
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
502
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
503
|
+
).optional()
|
|
504
|
+
}).describe("Extended fields data.").optional(),
|
|
505
|
+
tags: z.object({
|
|
506
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
507
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
508
|
+
).optional()
|
|
509
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
510
|
+
}).describe("Pipeline to update, may be partial.")
|
|
511
|
+
});
|
|
512
|
+
var UpdatePipelineResponse = z.object({
|
|
513
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
514
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
515
|
+
"Must be a valid GUID"
|
|
516
|
+
).optional().nullable(),
|
|
517
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
518
|
+
"Revision number, which increments by 1 each time the pipeline is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\n\nIgnored when creating a pipeline."
|
|
519
|
+
).optional().nullable(),
|
|
520
|
+
_createdDate: z.date().describe(
|
|
521
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
522
|
+
).optional().nullable(),
|
|
523
|
+
_updatedDate: z.date().describe(
|
|
524
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
525
|
+
).optional().nullable(),
|
|
526
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
527
|
+
currency: z.string().describe(
|
|
528
|
+
"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n\nDefault: Based on the site's currency settings."
|
|
529
|
+
).optional().nullable(),
|
|
530
|
+
stages: z.array(
|
|
531
|
+
z.object({
|
|
532
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
533
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
534
|
+
"Must be a valid GUID"
|
|
535
|
+
).optional().nullable(),
|
|
536
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
537
|
+
staleDurationInHours: z.number().int().describe(
|
|
538
|
+
"The duration (in hours) a card can remain in this stage before becoming stale.\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays."
|
|
539
|
+
).min(1).max(1e5).optional().nullable()
|
|
540
|
+
})
|
|
541
|
+
).min(1).max(30).optional(),
|
|
542
|
+
doneStage: z.object({
|
|
543
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
544
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
545
|
+
"Must be a valid GUID"
|
|
546
|
+
).optional().nullable(),
|
|
547
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
548
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
549
|
+
}).describe("The final pipeline stage where cards receive a final outcome.").optional(),
|
|
550
|
+
extendedFields: z.object({
|
|
551
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
552
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
553
|
+
).optional()
|
|
554
|
+
}).describe("Extended fields data.").optional(),
|
|
555
|
+
tags: z.object({
|
|
556
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
557
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
558
|
+
).optional()
|
|
559
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
560
|
+
});
|
|
561
|
+
var DeletePipelineRequest = z.object({
|
|
562
|
+
pipelineId: z.string().describe("Pipeline ID.").regex(
|
|
563
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
564
|
+
"Must be a valid GUID"
|
|
565
|
+
)
|
|
566
|
+
});
|
|
567
|
+
var DeletePipelineResponse = z.object({});
|
|
568
|
+
var QueryPipelinesRequest = z.object({
|
|
569
|
+
query: z.intersection(
|
|
570
|
+
z.object({
|
|
571
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
572
|
+
"Filter object.\n\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section)."
|
|
573
|
+
).optional().nullable(),
|
|
574
|
+
sort: z.array(
|
|
575
|
+
z.object({
|
|
576
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
577
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
578
|
+
})
|
|
579
|
+
).max(5).optional()
|
|
580
|
+
}),
|
|
581
|
+
z.xor([
|
|
582
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
583
|
+
z.object({
|
|
584
|
+
cursorPaging: z.object({
|
|
585
|
+
limit: z.number().int().describe("Maximum number of items to return.").min(0).max(100).optional().nullable(),
|
|
586
|
+
cursor: z.string().describe(
|
|
587
|
+
"Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
|
|
588
|
+
).max(16e3).optional().nullable()
|
|
589
|
+
}).describe(
|
|
590
|
+
"Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
|
|
591
|
+
)
|
|
592
|
+
})
|
|
593
|
+
])
|
|
594
|
+
).describe("Query options.")
|
|
595
|
+
});
|
|
596
|
+
var QueryPipelinesResponse = z.object({
|
|
597
|
+
pipelines: z.array(
|
|
598
|
+
z.object({
|
|
599
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
600
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
601
|
+
"Must be a valid GUID"
|
|
602
|
+
).optional().nullable(),
|
|
603
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
604
|
+
"Revision number, which increments by 1 each time the pipeline is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\n\nIgnored when creating a pipeline."
|
|
605
|
+
).optional().nullable(),
|
|
606
|
+
_createdDate: z.date().describe(
|
|
607
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
608
|
+
).optional().nullable(),
|
|
609
|
+
_updatedDate: z.date().describe(
|
|
610
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
611
|
+
).optional().nullable(),
|
|
612
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
613
|
+
currency: z.string().describe(
|
|
614
|
+
"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n\nDefault: Based on the site's currency settings."
|
|
615
|
+
).optional().nullable(),
|
|
616
|
+
stages: z.array(
|
|
617
|
+
z.object({
|
|
618
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
619
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
620
|
+
"Must be a valid GUID"
|
|
621
|
+
).optional().nullable(),
|
|
622
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
623
|
+
staleDurationInHours: z.number().int().describe(
|
|
624
|
+
"The duration (in hours) a card can remain in this stage before becoming stale.\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays."
|
|
625
|
+
).min(1).max(1e5).optional().nullable()
|
|
626
|
+
})
|
|
627
|
+
).min(1).max(30).optional(),
|
|
628
|
+
doneStage: z.object({
|
|
629
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
630
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
631
|
+
"Must be a valid GUID"
|
|
632
|
+
).optional().nullable(),
|
|
633
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
634
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
635
|
+
}).describe(
|
|
636
|
+
"The final pipeline stage where cards receive a final outcome."
|
|
637
|
+
).optional(),
|
|
638
|
+
extendedFields: z.object({
|
|
639
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
640
|
+
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
641
|
+
).optional()
|
|
642
|
+
}).describe("Extended fields data.").optional(),
|
|
643
|
+
tags: z.object({
|
|
644
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
645
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
646
|
+
).optional()
|
|
647
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
648
|
+
})
|
|
649
|
+
).optional(),
|
|
650
|
+
pagingMetadata: z.object({
|
|
651
|
+
count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
|
|
652
|
+
cursors: z.object({
|
|
653
|
+
next: z.string().describe(
|
|
654
|
+
"Cursor string pointing to the next page in the list of results."
|
|
655
|
+
).max(16e3).optional().nullable(),
|
|
656
|
+
prev: z.string().describe(
|
|
657
|
+
"Cursor pointing to the previous page in the list of results."
|
|
658
|
+
).max(16e3).optional().nullable()
|
|
659
|
+
}).describe(
|
|
660
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
661
|
+
).optional(),
|
|
662
|
+
hasNext: z.boolean().describe(
|
|
663
|
+
"Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
|
|
664
|
+
).optional().nullable()
|
|
665
|
+
}).describe("Paging metadata.").optional()
|
|
666
|
+
});
|
|
667
|
+
var BulkUpdatePipelineTagsRequest = z.object({
|
|
668
|
+
pipelineIds: z.array(z.string()).min(1).max(100),
|
|
669
|
+
options: z.object({
|
|
670
|
+
assignTags: z.object({
|
|
671
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
672
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
673
|
+
).optional()
|
|
674
|
+
}).describe("List of tags to assign.").optional(),
|
|
675
|
+
unassignTags: z.object({
|
|
676
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
677
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
678
|
+
).optional()
|
|
679
|
+
}).describe("List of tags to unassign.").optional(),
|
|
680
|
+
returnEntity: z.boolean().describe(
|
|
681
|
+
"Whether to return the updated pipelines in the response.\n\nDefault: `false`"
|
|
682
|
+
).optional()
|
|
683
|
+
}).optional()
|
|
684
|
+
});
|
|
685
|
+
var BulkUpdatePipelineTagsResponse = z.object({
|
|
686
|
+
results: z.array(
|
|
687
|
+
z.object({
|
|
688
|
+
itemMetadata: z.object({
|
|
689
|
+
_id: z.string().describe(
|
|
690
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
691
|
+
).regex(
|
|
692
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
693
|
+
"Must be a valid GUID"
|
|
694
|
+
).optional().nullable(),
|
|
695
|
+
originalIndex: z.number().int().describe(
|
|
696
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
697
|
+
).optional(),
|
|
698
|
+
success: z.boolean().describe(
|
|
699
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
700
|
+
).optional(),
|
|
701
|
+
error: z.object({
|
|
702
|
+
code: z.string().describe("Error code.").optional(),
|
|
703
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
704
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
705
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
706
|
+
}).describe("Metadata about the individual updated pipeline.").optional()
|
|
707
|
+
})
|
|
708
|
+
).min(1).max(100).optional(),
|
|
709
|
+
bulkActionMetadata: z.object({
|
|
710
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
711
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
712
|
+
undetailedFailures: z.number().int().describe(
|
|
713
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
714
|
+
).optional()
|
|
715
|
+
}).describe("Metadata about the bulk update.").optional()
|
|
716
|
+
});
|
|
717
|
+
var BulkUpdatePipelineTagsByFilterRequest = z.object({
|
|
718
|
+
filter: z.record(z.string(), z.any()).describe("Filter to select which pipelines to update."),
|
|
719
|
+
options: z.object({
|
|
720
|
+
assignTags: z.object({
|
|
721
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
722
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
723
|
+
).optional()
|
|
724
|
+
}).describe("List of tags to assign.").optional(),
|
|
725
|
+
unassignTags: z.object({
|
|
726
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
727
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
728
|
+
).optional()
|
|
729
|
+
}).describe("List of tags to unassign.").optional(),
|
|
730
|
+
returnEntity: z.boolean().describe(
|
|
731
|
+
"Whether to return the updated pipelines in the response.\n\nDefault: `false`"
|
|
732
|
+
).optional()
|
|
733
|
+
}).optional()
|
|
734
|
+
});
|
|
735
|
+
var BulkUpdatePipelineTagsByFilterResponse = z.object({
|
|
736
|
+
jobId: z.string().describe("Job ID for tracking the asynchronous tag updates.").regex(
|
|
737
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
738
|
+
"Must be a valid GUID"
|
|
739
|
+
).optional()
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
// src/crm-pipelines-v1-pipeline-pipelines.universal.ts
|
|
295
743
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
296
744
|
var Outcome = /* @__PURE__ */ ((Outcome2) => {
|
|
297
745
|
Outcome2["NONE"] = "NONE";
|
|
@@ -318,7 +766,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
318
766
|
return WebhookIdentityType2;
|
|
319
767
|
})(WebhookIdentityType || {});
|
|
320
768
|
async function createPipeline2(pipeline) {
|
|
321
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
769
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
770
|
+
if (validateRequestSchema) {
|
|
771
|
+
CreatePipelineRequest.parse({ pipeline });
|
|
772
|
+
}
|
|
322
773
|
const payload = renameKeysFromSDKRequestToRESTRequest({ pipeline });
|
|
323
774
|
const reqOpts = createPipeline(payload);
|
|
324
775
|
sideEffects?.onSiteCall?.();
|
|
@@ -341,7 +792,10 @@ async function createPipeline2(pipeline) {
|
|
|
341
792
|
}
|
|
342
793
|
}
|
|
343
794
|
async function getPipeline2(pipelineId) {
|
|
344
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
795
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
796
|
+
if (validateRequestSchema) {
|
|
797
|
+
GetPipelineRequest.parse({ pipelineId });
|
|
798
|
+
}
|
|
345
799
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
346
800
|
pipelineId
|
|
347
801
|
});
|
|
@@ -366,7 +820,10 @@ async function getPipeline2(pipelineId) {
|
|
|
366
820
|
}
|
|
367
821
|
}
|
|
368
822
|
async function updatePipeline2(_id, pipeline) {
|
|
369
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
823
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
824
|
+
if (validateRequestSchema) {
|
|
825
|
+
UpdatePipelineRequest.parse({ _id, pipeline });
|
|
826
|
+
}
|
|
370
827
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
371
828
|
pipeline: { ...pipeline, id: _id }
|
|
372
829
|
});
|
|
@@ -391,7 +848,10 @@ async function updatePipeline2(_id, pipeline) {
|
|
|
391
848
|
}
|
|
392
849
|
}
|
|
393
850
|
async function deletePipeline2(pipelineId) {
|
|
394
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
851
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
852
|
+
if (validateRequestSchema) {
|
|
853
|
+
DeletePipelineRequest.parse({ pipelineId });
|
|
854
|
+
}
|
|
395
855
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
396
856
|
pipelineId
|
|
397
857
|
});
|
|
@@ -459,7 +919,10 @@ function queryPipelines2() {
|
|
|
459
919
|
});
|
|
460
920
|
}
|
|
461
921
|
async function typedQueryPipelines(query) {
|
|
462
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
922
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
923
|
+
if (validateRequestSchema) {
|
|
924
|
+
QueryPipelinesRequest.parse({ query });
|
|
925
|
+
}
|
|
463
926
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
464
927
|
const reqOpts = queryPipelines(payload);
|
|
465
928
|
sideEffects?.onSiteCall?.();
|
|
@@ -487,7 +950,10 @@ var utils = {
|
|
|
487
950
|
}
|
|
488
951
|
};
|
|
489
952
|
async function bulkUpdatePipelineTags2(pipelineIds, options) {
|
|
490
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
953
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
954
|
+
if (validateRequestSchema) {
|
|
955
|
+
BulkUpdatePipelineTagsRequest.parse({ pipelineIds, options });
|
|
956
|
+
}
|
|
491
957
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
492
958
|
pipelineIds,
|
|
493
959
|
assignTags: options?.assignTags,
|
|
@@ -520,7 +986,10 @@ async function bulkUpdatePipelineTags2(pipelineIds, options) {
|
|
|
520
986
|
}
|
|
521
987
|
}
|
|
522
988
|
async function bulkUpdatePipelineTagsByFilter2(filter, options) {
|
|
523
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
989
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
990
|
+
if (validateRequestSchema) {
|
|
991
|
+
BulkUpdatePipelineTagsByFilterRequest.parse({ filter, options });
|
|
992
|
+
}
|
|
524
993
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
525
994
|
filter,
|
|
526
995
|
assignTags: options?.assignTags,
|
|
@@ -554,62 +1023,62 @@ async function bulkUpdatePipelineTagsByFilter2(filter, options) {
|
|
|
554
1023
|
}
|
|
555
1024
|
|
|
556
1025
|
// src/crm-pipelines-v1-pipeline-pipelines.public.ts
|
|
557
|
-
function createPipeline3(httpClient) {
|
|
1026
|
+
function createPipeline3(httpClient, __options) {
|
|
558
1027
|
return (pipeline) => createPipeline2(
|
|
559
1028
|
pipeline,
|
|
560
1029
|
// @ts-ignore
|
|
561
|
-
{ httpClient }
|
|
1030
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
562
1031
|
);
|
|
563
1032
|
}
|
|
564
|
-
function getPipeline3(httpClient) {
|
|
1033
|
+
function getPipeline3(httpClient, __options) {
|
|
565
1034
|
return (pipelineId) => getPipeline2(
|
|
566
1035
|
pipelineId,
|
|
567
1036
|
// @ts-ignore
|
|
568
|
-
{ httpClient }
|
|
1037
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
569
1038
|
);
|
|
570
1039
|
}
|
|
571
|
-
function updatePipeline3(httpClient) {
|
|
1040
|
+
function updatePipeline3(httpClient, __options) {
|
|
572
1041
|
return (_id, pipeline) => updatePipeline2(
|
|
573
1042
|
_id,
|
|
574
1043
|
pipeline,
|
|
575
1044
|
// @ts-ignore
|
|
576
|
-
{ httpClient }
|
|
1045
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
577
1046
|
);
|
|
578
1047
|
}
|
|
579
|
-
function deletePipeline3(httpClient) {
|
|
1048
|
+
function deletePipeline3(httpClient, __options) {
|
|
580
1049
|
return (pipelineId) => deletePipeline2(
|
|
581
1050
|
pipelineId,
|
|
582
1051
|
// @ts-ignore
|
|
583
|
-
{ httpClient }
|
|
1052
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
584
1053
|
);
|
|
585
1054
|
}
|
|
586
|
-
function queryPipelines3(httpClient) {
|
|
1055
|
+
function queryPipelines3(httpClient, __options) {
|
|
587
1056
|
return () => queryPipelines2(
|
|
588
1057
|
// @ts-ignore
|
|
589
|
-
{ httpClient }
|
|
1058
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
590
1059
|
);
|
|
591
1060
|
}
|
|
592
|
-
function typedQueryPipelines2(httpClient) {
|
|
1061
|
+
function typedQueryPipelines2(httpClient, __options) {
|
|
593
1062
|
return (query) => typedQueryPipelines(
|
|
594
1063
|
query,
|
|
595
1064
|
// @ts-ignore
|
|
596
|
-
{ httpClient }
|
|
1065
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
597
1066
|
);
|
|
598
1067
|
}
|
|
599
|
-
function bulkUpdatePipelineTags3(httpClient) {
|
|
1068
|
+
function bulkUpdatePipelineTags3(httpClient, __options) {
|
|
600
1069
|
return (pipelineIds, options) => bulkUpdatePipelineTags2(
|
|
601
1070
|
pipelineIds,
|
|
602
1071
|
options,
|
|
603
1072
|
// @ts-ignore
|
|
604
|
-
{ httpClient }
|
|
1073
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
605
1074
|
);
|
|
606
1075
|
}
|
|
607
|
-
function bulkUpdatePipelineTagsByFilter3(httpClient) {
|
|
1076
|
+
function bulkUpdatePipelineTagsByFilter3(httpClient, __options) {
|
|
608
1077
|
return (filter, options) => bulkUpdatePipelineTagsByFilter2(
|
|
609
1078
|
filter,
|
|
610
1079
|
options,
|
|
611
1080
|
// @ts-ignore
|
|
612
|
-
{ httpClient }
|
|
1081
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
613
1082
|
);
|
|
614
1083
|
}
|
|
615
1084
|
var onPipelineCreated = EventDefinition(
|