@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
|
@@ -286,6 +286,454 @@ function bulkUpdatePipelineTagsByFilter(payload) {
|
|
|
286
286
|
|
|
287
287
|
// src/crm-pipelines-v1-pipeline-pipelines.universal.ts
|
|
288
288
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
289
|
+
|
|
290
|
+
// src/crm-pipelines-v1-pipeline-pipelines.schemas.ts
|
|
291
|
+
import * as z from "zod";
|
|
292
|
+
var CreatePipelineRequest = z.object({
|
|
293
|
+
pipeline: z.object({
|
|
294
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
295
|
+
/^[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}$/,
|
|
296
|
+
"Must be a valid GUID"
|
|
297
|
+
).optional().nullable(),
|
|
298
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
299
|
+
"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."
|
|
300
|
+
).optional().nullable(),
|
|
301
|
+
_createdDate: z.date().describe(
|
|
302
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
303
|
+
).optional().nullable(),
|
|
304
|
+
_updatedDate: z.date().describe(
|
|
305
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
306
|
+
).optional().nullable(),
|
|
307
|
+
name: z.string().describe("Pipeline name.").min(1).max(60),
|
|
308
|
+
currency: z.string().describe(
|
|
309
|
+
"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."
|
|
310
|
+
).optional().nullable(),
|
|
311
|
+
stages: z.array(
|
|
312
|
+
z.object({
|
|
313
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
314
|
+
/^[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}$/,
|
|
315
|
+
"Must be a valid GUID"
|
|
316
|
+
).optional().nullable(),
|
|
317
|
+
name: z.string().describe("Stage name.").min(1).max(40),
|
|
318
|
+
staleDurationInHours: z.number().int().describe(
|
|
319
|
+
"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."
|
|
320
|
+
).min(1).max(1e5).optional().nullable()
|
|
321
|
+
})
|
|
322
|
+
).min(1).max(30),
|
|
323
|
+
doneStage: z.object({
|
|
324
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
325
|
+
/^[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}$/,
|
|
326
|
+
"Must be a valid GUID"
|
|
327
|
+
).optional().nullable(),
|
|
328
|
+
name: z.string().describe("Done stage name.").min(1).max(40),
|
|
329
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3)
|
|
330
|
+
}).describe(
|
|
331
|
+
"The final pipeline stage where cards receive a final outcome."
|
|
332
|
+
),
|
|
333
|
+
extendedFields: z.object({
|
|
334
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
335
|
+
"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)."
|
|
336
|
+
).optional()
|
|
337
|
+
}).describe("Extended fields data.").optional(),
|
|
338
|
+
tags: z.object({
|
|
339
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
340
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
341
|
+
).optional()
|
|
342
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
343
|
+
}).describe("Pipeline to create.")
|
|
344
|
+
});
|
|
345
|
+
var CreatePipelineResponse = z.object({
|
|
346
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
347
|
+
/^[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}$/,
|
|
348
|
+
"Must be a valid GUID"
|
|
349
|
+
).optional().nullable(),
|
|
350
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
351
|
+
"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."
|
|
352
|
+
).optional().nullable(),
|
|
353
|
+
_createdDate: z.date().describe(
|
|
354
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
355
|
+
).optional().nullable(),
|
|
356
|
+
_updatedDate: z.date().describe(
|
|
357
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
358
|
+
).optional().nullable(),
|
|
359
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
360
|
+
currency: z.string().describe(
|
|
361
|
+
"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."
|
|
362
|
+
).optional().nullable(),
|
|
363
|
+
stages: z.array(
|
|
364
|
+
z.object({
|
|
365
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
366
|
+
/^[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}$/,
|
|
367
|
+
"Must be a valid GUID"
|
|
368
|
+
).optional().nullable(),
|
|
369
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
370
|
+
staleDurationInHours: z.number().int().describe(
|
|
371
|
+
"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."
|
|
372
|
+
).min(1).max(1e5).optional().nullable()
|
|
373
|
+
})
|
|
374
|
+
).min(1).max(30).optional(),
|
|
375
|
+
doneStage: z.object({
|
|
376
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
377
|
+
/^[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}$/,
|
|
378
|
+
"Must be a valid GUID"
|
|
379
|
+
).optional().nullable(),
|
|
380
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
381
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
382
|
+
}).describe("The final pipeline stage where cards receive a final outcome.").optional(),
|
|
383
|
+
extendedFields: z.object({
|
|
384
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
385
|
+
"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)."
|
|
386
|
+
).optional()
|
|
387
|
+
}).describe("Extended fields data.").optional(),
|
|
388
|
+
tags: z.object({
|
|
389
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
390
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
391
|
+
).optional()
|
|
392
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
393
|
+
});
|
|
394
|
+
var GetPipelineRequest = z.object({
|
|
395
|
+
pipelineId: z.string().describe("Pipeline ID to retrieve.").regex(
|
|
396
|
+
/^[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}$/,
|
|
397
|
+
"Must be a valid GUID"
|
|
398
|
+
)
|
|
399
|
+
});
|
|
400
|
+
var GetPipelineResponse = z.object({
|
|
401
|
+
_id: z.string().describe("Pipeline ID.").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
|
+
).optional().nullable(),
|
|
405
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
406
|
+
"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."
|
|
407
|
+
).optional().nullable(),
|
|
408
|
+
_createdDate: z.date().describe(
|
|
409
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
410
|
+
).optional().nullable(),
|
|
411
|
+
_updatedDate: z.date().describe(
|
|
412
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
413
|
+
).optional().nullable(),
|
|
414
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
415
|
+
currency: z.string().describe(
|
|
416
|
+
"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."
|
|
417
|
+
).optional().nullable(),
|
|
418
|
+
stages: z.array(
|
|
419
|
+
z.object({
|
|
420
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
421
|
+
/^[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}$/,
|
|
422
|
+
"Must be a valid GUID"
|
|
423
|
+
).optional().nullable(),
|
|
424
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
425
|
+
staleDurationInHours: z.number().int().describe(
|
|
426
|
+
"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."
|
|
427
|
+
).min(1).max(1e5).optional().nullable()
|
|
428
|
+
})
|
|
429
|
+
).min(1).max(30).optional(),
|
|
430
|
+
doneStage: z.object({
|
|
431
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
432
|
+
/^[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}$/,
|
|
433
|
+
"Must be a valid GUID"
|
|
434
|
+
).optional().nullable(),
|
|
435
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
436
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
437
|
+
}).describe("The final pipeline stage where cards receive a final outcome.").optional(),
|
|
438
|
+
extendedFields: z.object({
|
|
439
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
440
|
+
"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)."
|
|
441
|
+
).optional()
|
|
442
|
+
}).describe("Extended fields data.").optional(),
|
|
443
|
+
tags: z.object({
|
|
444
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
445
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
446
|
+
).optional()
|
|
447
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
448
|
+
});
|
|
449
|
+
var UpdatePipelineRequest = z.object({
|
|
450
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
451
|
+
/^[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}$/,
|
|
452
|
+
"Must be a valid GUID"
|
|
453
|
+
),
|
|
454
|
+
pipeline: z.object({
|
|
455
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
456
|
+
/^[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}$/,
|
|
457
|
+
"Must be a valid GUID"
|
|
458
|
+
).optional().nullable(),
|
|
459
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
460
|
+
"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."
|
|
461
|
+
),
|
|
462
|
+
_createdDate: z.date().describe(
|
|
463
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
464
|
+
).optional().nullable(),
|
|
465
|
+
_updatedDate: z.date().describe(
|
|
466
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
467
|
+
).optional().nullable(),
|
|
468
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
469
|
+
currency: z.string().describe(
|
|
470
|
+
"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."
|
|
471
|
+
).optional().nullable(),
|
|
472
|
+
stages: z.array(
|
|
473
|
+
z.object({
|
|
474
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
475
|
+
/^[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}$/,
|
|
476
|
+
"Must be a valid GUID"
|
|
477
|
+
).optional().nullable(),
|
|
478
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
479
|
+
staleDurationInHours: z.number().int().describe(
|
|
480
|
+
"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."
|
|
481
|
+
).min(1).max(1e5).optional().nullable()
|
|
482
|
+
})
|
|
483
|
+
).min(1).max(30).optional(),
|
|
484
|
+
doneStage: z.object({
|
|
485
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
486
|
+
/^[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}$/,
|
|
487
|
+
"Must be a valid GUID"
|
|
488
|
+
).optional().nullable(),
|
|
489
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
490
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
491
|
+
}).describe(
|
|
492
|
+
"The final pipeline stage where cards receive a final outcome."
|
|
493
|
+
).optional(),
|
|
494
|
+
extendedFields: z.object({
|
|
495
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
496
|
+
"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)."
|
|
497
|
+
).optional()
|
|
498
|
+
}).describe("Extended fields data.").optional(),
|
|
499
|
+
tags: z.object({
|
|
500
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
501
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
502
|
+
).optional()
|
|
503
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
504
|
+
}).describe("Pipeline to update, may be partial.")
|
|
505
|
+
});
|
|
506
|
+
var UpdatePipelineResponse = z.object({
|
|
507
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
508
|
+
/^[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}$/,
|
|
509
|
+
"Must be a valid GUID"
|
|
510
|
+
).optional().nullable(),
|
|
511
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
512
|
+
"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."
|
|
513
|
+
).optional().nullable(),
|
|
514
|
+
_createdDate: z.date().describe(
|
|
515
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
516
|
+
).optional().nullable(),
|
|
517
|
+
_updatedDate: z.date().describe(
|
|
518
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
519
|
+
).optional().nullable(),
|
|
520
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
521
|
+
currency: z.string().describe(
|
|
522
|
+
"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."
|
|
523
|
+
).optional().nullable(),
|
|
524
|
+
stages: z.array(
|
|
525
|
+
z.object({
|
|
526
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
527
|
+
/^[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}$/,
|
|
528
|
+
"Must be a valid GUID"
|
|
529
|
+
).optional().nullable(),
|
|
530
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
531
|
+
staleDurationInHours: z.number().int().describe(
|
|
532
|
+
"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."
|
|
533
|
+
).min(1).max(1e5).optional().nullable()
|
|
534
|
+
})
|
|
535
|
+
).min(1).max(30).optional(),
|
|
536
|
+
doneStage: z.object({
|
|
537
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
538
|
+
/^[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}$/,
|
|
539
|
+
"Must be a valid GUID"
|
|
540
|
+
).optional().nullable(),
|
|
541
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
542
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
543
|
+
}).describe("The final pipeline stage where cards receive a final outcome.").optional(),
|
|
544
|
+
extendedFields: z.object({
|
|
545
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
546
|
+
"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)."
|
|
547
|
+
).optional()
|
|
548
|
+
}).describe("Extended fields data.").optional(),
|
|
549
|
+
tags: z.object({
|
|
550
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
551
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
552
|
+
).optional()
|
|
553
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
554
|
+
});
|
|
555
|
+
var DeletePipelineRequest = z.object({
|
|
556
|
+
pipelineId: z.string().describe("Pipeline ID.").regex(
|
|
557
|
+
/^[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}$/,
|
|
558
|
+
"Must be a valid GUID"
|
|
559
|
+
)
|
|
560
|
+
});
|
|
561
|
+
var DeletePipelineResponse = z.object({});
|
|
562
|
+
var QueryPipelinesRequest = z.object({
|
|
563
|
+
query: z.intersection(
|
|
564
|
+
z.object({
|
|
565
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
566
|
+
"Filter object.\n\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section)."
|
|
567
|
+
).optional().nullable(),
|
|
568
|
+
sort: z.array(
|
|
569
|
+
z.object({
|
|
570
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
571
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
572
|
+
})
|
|
573
|
+
).max(5).optional()
|
|
574
|
+
}),
|
|
575
|
+
z.xor([
|
|
576
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
577
|
+
z.object({
|
|
578
|
+
cursorPaging: z.object({
|
|
579
|
+
limit: z.number().int().describe("Maximum number of items to return.").min(0).max(100).optional().nullable(),
|
|
580
|
+
cursor: z.string().describe(
|
|
581
|
+
"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."
|
|
582
|
+
).max(16e3).optional().nullable()
|
|
583
|
+
}).describe(
|
|
584
|
+
"Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
|
|
585
|
+
)
|
|
586
|
+
})
|
|
587
|
+
])
|
|
588
|
+
).describe("Query options.")
|
|
589
|
+
});
|
|
590
|
+
var QueryPipelinesResponse = z.object({
|
|
591
|
+
pipelines: z.array(
|
|
592
|
+
z.object({
|
|
593
|
+
_id: z.string().describe("Pipeline ID.").regex(
|
|
594
|
+
/^[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}$/,
|
|
595
|
+
"Must be a valid GUID"
|
|
596
|
+
).optional().nullable(),
|
|
597
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
598
|
+
"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."
|
|
599
|
+
).optional().nullable(),
|
|
600
|
+
_createdDate: z.date().describe(
|
|
601
|
+
"Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
602
|
+
).optional().nullable(),
|
|
603
|
+
_updatedDate: z.date().describe(
|
|
604
|
+
"Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
|
|
605
|
+
).optional().nullable(),
|
|
606
|
+
name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
|
|
607
|
+
currency: z.string().describe(
|
|
608
|
+
"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."
|
|
609
|
+
).optional().nullable(),
|
|
610
|
+
stages: z.array(
|
|
611
|
+
z.object({
|
|
612
|
+
_id: z.string().describe("Stage ID.").regex(
|
|
613
|
+
/^[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}$/,
|
|
614
|
+
"Must be a valid GUID"
|
|
615
|
+
).optional().nullable(),
|
|
616
|
+
name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
|
|
617
|
+
staleDurationInHours: z.number().int().describe(
|
|
618
|
+
"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."
|
|
619
|
+
).min(1).max(1e5).optional().nullable()
|
|
620
|
+
})
|
|
621
|
+
).min(1).max(30).optional(),
|
|
622
|
+
doneStage: z.object({
|
|
623
|
+
_id: z.string().describe("Done stage ID.").regex(
|
|
624
|
+
/^[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}$/,
|
|
625
|
+
"Must be a valid GUID"
|
|
626
|
+
).optional().nullable(),
|
|
627
|
+
name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
|
|
628
|
+
allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
|
|
629
|
+
}).describe(
|
|
630
|
+
"The final pipeline stage where cards receive a final outcome."
|
|
631
|
+
).optional(),
|
|
632
|
+
extendedFields: z.object({
|
|
633
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
634
|
+
"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)."
|
|
635
|
+
).optional()
|
|
636
|
+
}).describe("Extended fields data.").optional(),
|
|
637
|
+
tags: z.object({
|
|
638
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
639
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
640
|
+
).optional()
|
|
641
|
+
}).describe("Tags for organizing and categorizing pipelines.").optional()
|
|
642
|
+
})
|
|
643
|
+
).optional(),
|
|
644
|
+
pagingMetadata: z.object({
|
|
645
|
+
count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
|
|
646
|
+
cursors: z.object({
|
|
647
|
+
next: z.string().describe(
|
|
648
|
+
"Cursor string pointing to the next page in the list of results."
|
|
649
|
+
).max(16e3).optional().nullable(),
|
|
650
|
+
prev: z.string().describe(
|
|
651
|
+
"Cursor pointing to the previous page in the list of results."
|
|
652
|
+
).max(16e3).optional().nullable()
|
|
653
|
+
}).describe(
|
|
654
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
655
|
+
).optional(),
|
|
656
|
+
hasNext: z.boolean().describe(
|
|
657
|
+
"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."
|
|
658
|
+
).optional().nullable()
|
|
659
|
+
}).describe("Paging metadata.").optional()
|
|
660
|
+
});
|
|
661
|
+
var BulkUpdatePipelineTagsRequest = z.object({
|
|
662
|
+
pipelineIds: z.array(z.string()).min(1).max(100),
|
|
663
|
+
options: z.object({
|
|
664
|
+
assignTags: z.object({
|
|
665
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
666
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
667
|
+
).optional()
|
|
668
|
+
}).describe("List of tags to assign.").optional(),
|
|
669
|
+
unassignTags: z.object({
|
|
670
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
671
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
672
|
+
).optional()
|
|
673
|
+
}).describe("List of tags to unassign.").optional(),
|
|
674
|
+
returnEntity: z.boolean().describe(
|
|
675
|
+
"Whether to return the updated pipelines in the response.\n\nDefault: `false`"
|
|
676
|
+
).optional()
|
|
677
|
+
}).optional()
|
|
678
|
+
});
|
|
679
|
+
var BulkUpdatePipelineTagsResponse = z.object({
|
|
680
|
+
results: z.array(
|
|
681
|
+
z.object({
|
|
682
|
+
itemMetadata: z.object({
|
|
683
|
+
_id: z.string().describe(
|
|
684
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
685
|
+
).regex(
|
|
686
|
+
/^[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}$/,
|
|
687
|
+
"Must be a valid GUID"
|
|
688
|
+
).optional().nullable(),
|
|
689
|
+
originalIndex: z.number().int().describe(
|
|
690
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
691
|
+
).optional(),
|
|
692
|
+
success: z.boolean().describe(
|
|
693
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
694
|
+
).optional(),
|
|
695
|
+
error: z.object({
|
|
696
|
+
code: z.string().describe("Error code.").optional(),
|
|
697
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
698
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
699
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
700
|
+
}).describe("Metadata about the individual updated pipeline.").optional()
|
|
701
|
+
})
|
|
702
|
+
).min(1).max(100).optional(),
|
|
703
|
+
bulkActionMetadata: z.object({
|
|
704
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
705
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
706
|
+
undetailedFailures: z.number().int().describe(
|
|
707
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
708
|
+
).optional()
|
|
709
|
+
}).describe("Metadata about the bulk update.").optional()
|
|
710
|
+
});
|
|
711
|
+
var BulkUpdatePipelineTagsByFilterRequest = z.object({
|
|
712
|
+
filter: z.record(z.string(), z.any()).describe("Filter to select which pipelines to update."),
|
|
713
|
+
options: z.object({
|
|
714
|
+
assignTags: z.object({
|
|
715
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
716
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
717
|
+
).optional()
|
|
718
|
+
}).describe("List of tags to assign.").optional(),
|
|
719
|
+
unassignTags: z.object({
|
|
720
|
+
privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
|
|
721
|
+
"Tags that are exposed to anyone with access to the entity, including site members and visitors."
|
|
722
|
+
).optional()
|
|
723
|
+
}).describe("List of tags to unassign.").optional(),
|
|
724
|
+
returnEntity: z.boolean().describe(
|
|
725
|
+
"Whether to return the updated pipelines in the response.\n\nDefault: `false`"
|
|
726
|
+
).optional()
|
|
727
|
+
}).optional()
|
|
728
|
+
});
|
|
729
|
+
var BulkUpdatePipelineTagsByFilterResponse = z.object({
|
|
730
|
+
jobId: z.string().describe("Job ID for tracking the asynchronous tag updates.").regex(
|
|
731
|
+
/^[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}$/,
|
|
732
|
+
"Must be a valid GUID"
|
|
733
|
+
).optional()
|
|
734
|
+
});
|
|
735
|
+
|
|
736
|
+
// src/crm-pipelines-v1-pipeline-pipelines.universal.ts
|
|
289
737
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
290
738
|
var Outcome = /* @__PURE__ */ ((Outcome2) => {
|
|
291
739
|
Outcome2["NONE"] = "NONE";
|
|
@@ -312,7 +760,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
312
760
|
return WebhookIdentityType2;
|
|
313
761
|
})(WebhookIdentityType || {});
|
|
314
762
|
async function createPipeline2(pipeline) {
|
|
315
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
763
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
764
|
+
if (validateRequestSchema) {
|
|
765
|
+
CreatePipelineRequest.parse({ pipeline });
|
|
766
|
+
}
|
|
316
767
|
const payload = renameKeysFromSDKRequestToRESTRequest({ pipeline });
|
|
317
768
|
const reqOpts = createPipeline(payload);
|
|
318
769
|
sideEffects?.onSiteCall?.();
|
|
@@ -335,7 +786,10 @@ async function createPipeline2(pipeline) {
|
|
|
335
786
|
}
|
|
336
787
|
}
|
|
337
788
|
async function getPipeline2(pipelineId) {
|
|
338
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
789
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
790
|
+
if (validateRequestSchema) {
|
|
791
|
+
GetPipelineRequest.parse({ pipelineId });
|
|
792
|
+
}
|
|
339
793
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
340
794
|
pipelineId
|
|
341
795
|
});
|
|
@@ -360,7 +814,10 @@ async function getPipeline2(pipelineId) {
|
|
|
360
814
|
}
|
|
361
815
|
}
|
|
362
816
|
async function updatePipeline2(_id, pipeline) {
|
|
363
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
817
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
818
|
+
if (validateRequestSchema) {
|
|
819
|
+
UpdatePipelineRequest.parse({ _id, pipeline });
|
|
820
|
+
}
|
|
364
821
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
365
822
|
pipeline: { ...pipeline, id: _id }
|
|
366
823
|
});
|
|
@@ -385,7 +842,10 @@ async function updatePipeline2(_id, pipeline) {
|
|
|
385
842
|
}
|
|
386
843
|
}
|
|
387
844
|
async function deletePipeline2(pipelineId) {
|
|
388
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
845
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
846
|
+
if (validateRequestSchema) {
|
|
847
|
+
DeletePipelineRequest.parse({ pipelineId });
|
|
848
|
+
}
|
|
389
849
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
390
850
|
pipelineId
|
|
391
851
|
});
|
|
@@ -453,7 +913,10 @@ function queryPipelines2() {
|
|
|
453
913
|
});
|
|
454
914
|
}
|
|
455
915
|
async function typedQueryPipelines(query) {
|
|
456
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
916
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
917
|
+
if (validateRequestSchema) {
|
|
918
|
+
QueryPipelinesRequest.parse({ query });
|
|
919
|
+
}
|
|
457
920
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
458
921
|
const reqOpts = queryPipelines(payload);
|
|
459
922
|
sideEffects?.onSiteCall?.();
|
|
@@ -481,7 +944,10 @@ var utils = {
|
|
|
481
944
|
}
|
|
482
945
|
};
|
|
483
946
|
async function bulkUpdatePipelineTags2(pipelineIds, options) {
|
|
484
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
947
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
948
|
+
if (validateRequestSchema) {
|
|
949
|
+
BulkUpdatePipelineTagsRequest.parse({ pipelineIds, options });
|
|
950
|
+
}
|
|
485
951
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
486
952
|
pipelineIds,
|
|
487
953
|
assignTags: options?.assignTags,
|
|
@@ -514,7 +980,10 @@ async function bulkUpdatePipelineTags2(pipelineIds, options) {
|
|
|
514
980
|
}
|
|
515
981
|
}
|
|
516
982
|
async function bulkUpdatePipelineTagsByFilter2(filter, options) {
|
|
517
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
983
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
984
|
+
if (validateRequestSchema) {
|
|
985
|
+
BulkUpdatePipelineTagsByFilterRequest.parse({ filter, options });
|
|
986
|
+
}
|
|
518
987
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
519
988
|
filter,
|
|
520
989
|
assignTags: options?.assignTags,
|