@wix/auto_sdk_crm_pipelines 1.0.7 → 1.0.8

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.
@@ -151,6 +151,10 @@ interface CreatePipelineResponse {
151
151
  /** Created pipeline. */
152
152
  pipeline?: Pipeline;
153
153
  }
154
+ interface MaxPipelinesReachedError {
155
+ /** The maximum number of pipelines allowed. */
156
+ limit?: number;
157
+ }
154
158
  interface GetPipelineRequest {
155
159
  /**
156
160
  * Pipeline ID to retrieve.
@@ -511,6 +515,12 @@ interface AccountInfo {
511
515
  siteId?: string | null;
512
516
  }
513
517
  /** @docsIgnore */
518
+ type CreatePipelineApplicationErrors = {
519
+ code?: 'MAX_PIPELINES_REACHED';
520
+ description?: string;
521
+ data?: MaxPipelinesReachedError;
522
+ };
523
+ /** @docsIgnore */
514
524
  type UpdatePipelineApplicationErrors = {
515
525
  code?: 'CANNOT_CHANGE_DURATION_ON_STAGE_WITH_CARDS';
516
526
  description?: string;
@@ -678,7 +688,9 @@ declare function onPipelineUpdated(handler: (event: PipelineUpdatedEnvelope) =>
678
688
  * @returns Created pipeline.
679
689
  * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline
680
690
  */
681
- declare function createPipeline(pipeline: NonNullablePaths<Pipeline, `doneStage` | `doneStage.allowedOutcomes` | `doneStage.name` | `name` | `stages` | `stages.${number}.name`, 4>): Promise<NonNullablePaths<Pipeline, `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`, 4>>;
691
+ declare function createPipeline(pipeline: NonNullablePaths<Pipeline, `doneStage` | `doneStage.allowedOutcomes` | `doneStage.name` | `name` | `stages` | `stages.${number}.name`, 4>): Promise<NonNullablePaths<Pipeline, `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`, 4> & {
692
+ __applicationErrorsType?: CreatePipelineApplicationErrors;
693
+ }>;
682
694
  /**
683
695
  * Retrieves a pipeline by ID.
684
696
  * @param pipelineId - Pipeline ID to retrieve.
@@ -1013,4 +1025,4 @@ interface BulkUpdatePipelineTagsByFilterOptions {
1013
1025
  returnEntity?: boolean;
1014
1026
  }
1015
1027
 
1016
- export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdatePipelineTagsApplicationErrors, type BulkUpdatePipelineTagsByFilterApplicationErrors, type BulkUpdatePipelineTagsByFilterOptions, type BulkUpdatePipelineTagsByFilterRequest, type BulkUpdatePipelineTagsByFilterResponse, type BulkUpdatePipelineTagsOptions, type BulkUpdatePipelineTagsRequest, type BulkUpdatePipelineTagsResponse, type BulkUpdatePipelineTagsResult, type CommonQueryWithEntityContext, type CreatePipelineRequest, type CreatePipelineResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeletePipelineApplicationErrors, type DeletePipelineRequest, type DeletePipelineResponse, type DomainEvent, type DomainEventBodyOneOf, type DoneStage, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetPipelineRequest, type GetPipelineResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, Outcome, type OutcomeWithLiterals, type Pipeline, type PipelineCreatedEnvelope, type PipelineDeletedEnvelope, type PipelineQuery, type PipelineQuerySpec, PipelineType, type PipelineTypeWithLiterals, type PipelineUpdatedEnvelope, type PipelinesQueryBuilder, type PipelinesQueryResult, type PrivateTags, type QueryPipelinesRequest, type QueryPipelinesResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Stage, type TagList, type UpdatePipeline, type UpdatePipelineApplicationErrors, type UpdatePipelineRequest, type UpdatePipelineResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkUpdatePipelineTags, bulkUpdatePipelineTagsByFilter, createPipeline, deletePipeline, getPipeline, onPipelineCreated, onPipelineDeleted, onPipelineUpdated, queryPipelines, typedQueryPipelines, updatePipeline, utils };
1028
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdatePipelineTagsApplicationErrors, type BulkUpdatePipelineTagsByFilterApplicationErrors, type BulkUpdatePipelineTagsByFilterOptions, type BulkUpdatePipelineTagsByFilterRequest, type BulkUpdatePipelineTagsByFilterResponse, type BulkUpdatePipelineTagsOptions, type BulkUpdatePipelineTagsRequest, type BulkUpdatePipelineTagsResponse, type BulkUpdatePipelineTagsResult, type CommonQueryWithEntityContext, type CreatePipelineApplicationErrors, type CreatePipelineRequest, type CreatePipelineResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeletePipelineApplicationErrors, type DeletePipelineRequest, type DeletePipelineResponse, type DomainEvent, type DomainEventBodyOneOf, type DoneStage, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetPipelineRequest, type GetPipelineResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MaxPipelinesReachedError, type MessageEnvelope, Outcome, type OutcomeWithLiterals, type Pipeline, type PipelineCreatedEnvelope, type PipelineDeletedEnvelope, type PipelineQuery, type PipelineQuerySpec, PipelineType, type PipelineTypeWithLiterals, type PipelineUpdatedEnvelope, type PipelinesQueryBuilder, type PipelinesQueryResult, type PrivateTags, type QueryPipelinesRequest, type QueryPipelinesResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Stage, type TagList, type UpdatePipeline, type UpdatePipelineApplicationErrors, type UpdatePipelineRequest, type UpdatePipelineResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkUpdatePipelineTags, bulkUpdatePipelineTagsByFilter, createPipeline, deletePipeline, getPipeline, onPipelineCreated, onPipelineDeleted, onPipelineUpdated, queryPipelines, typedQueryPipelines, updatePipeline, utils };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.typings.ts
@@ -331,454 +321,6 @@ function bulkUpdatePipelineTagsByFilter(payload) {
331
321
 
332
322
  // src/crm-pipelines-v1-pipeline-pipelines.universal.ts
333
323
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
334
-
335
- // src/crm-pipelines-v1-pipeline-pipelines.schemas.ts
336
- var z = __toESM(require("zod"));
337
- var CreatePipelineRequest = z.object({
338
- pipeline: z.object({
339
- _id: z.string().describe("Pipeline ID.").regex(
340
- /^[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}$/,
341
- "Must be a valid GUID"
342
- ).optional().nullable(),
343
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
344
- "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."
345
- ).optional().nullable(),
346
- _createdDate: z.date().describe(
347
- "Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
348
- ).optional().nullable(),
349
- _updatedDate: z.date().describe(
350
- "Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
351
- ).optional().nullable(),
352
- name: z.string().describe("Pipeline name.").min(1).max(60),
353
- currency: z.string().describe(
354
- "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."
355
- ).optional().nullable(),
356
- stages: z.array(
357
- z.object({
358
- _id: z.string().describe("Stage ID.").regex(
359
- /^[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}$/,
360
- "Must be a valid GUID"
361
- ).optional().nullable(),
362
- name: z.string().describe("Stage name.").min(1).max(40),
363
- staleDurationInHours: z.number().int().describe(
364
- "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."
365
- ).min(1).max(1e5).optional().nullable()
366
- })
367
- ).min(1).max(30),
368
- doneStage: z.object({
369
- _id: z.string().describe("Done stage ID.").regex(
370
- /^[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}$/,
371
- "Must be a valid GUID"
372
- ).optional().nullable(),
373
- name: z.string().describe("Done stage name.").min(1).max(40),
374
- allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3)
375
- }).describe(
376
- "The final pipeline stage where cards receive a final outcome."
377
- ),
378
- extendedFields: z.object({
379
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
380
- "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)."
381
- ).optional()
382
- }).describe("Extended fields data.").optional(),
383
- tags: z.object({
384
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
385
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
386
- ).optional()
387
- }).describe("Tags for organizing and categorizing pipelines.").optional()
388
- }).describe("Pipeline to create.")
389
- });
390
- var CreatePipelineResponse = z.object({
391
- _id: z.string().describe("Pipeline ID.").regex(
392
- /^[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}$/,
393
- "Must be a valid GUID"
394
- ).optional().nullable(),
395
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
396
- "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."
397
- ).optional().nullable(),
398
- _createdDate: z.date().describe(
399
- "Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
400
- ).optional().nullable(),
401
- _updatedDate: z.date().describe(
402
- "Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
403
- ).optional().nullable(),
404
- name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
405
- currency: z.string().describe(
406
- "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."
407
- ).optional().nullable(),
408
- stages: z.array(
409
- z.object({
410
- _id: z.string().describe("Stage ID.").regex(
411
- /^[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}$/,
412
- "Must be a valid GUID"
413
- ).optional().nullable(),
414
- name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
415
- staleDurationInHours: z.number().int().describe(
416
- "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."
417
- ).min(1).max(1e5).optional().nullable()
418
- })
419
- ).min(1).max(30).optional(),
420
- doneStage: z.object({
421
- _id: z.string().describe("Done stage ID.").regex(
422
- /^[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}$/,
423
- "Must be a valid GUID"
424
- ).optional().nullable(),
425
- name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
426
- allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
427
- }).describe("The final pipeline stage where cards receive a final outcome.").optional(),
428
- extendedFields: z.object({
429
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
430
- "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)."
431
- ).optional()
432
- }).describe("Extended fields data.").optional(),
433
- tags: z.object({
434
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
435
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
436
- ).optional()
437
- }).describe("Tags for organizing and categorizing pipelines.").optional()
438
- });
439
- var GetPipelineRequest = z.object({
440
- pipelineId: z.string().describe("Pipeline ID to retrieve.").regex(
441
- /^[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}$/,
442
- "Must be a valid GUID"
443
- )
444
- });
445
- var GetPipelineResponse = z.object({
446
- _id: z.string().describe("Pipeline ID.").regex(
447
- /^[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}$/,
448
- "Must be a valid GUID"
449
- ).optional().nullable(),
450
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
451
- "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."
452
- ).optional().nullable(),
453
- _createdDate: z.date().describe(
454
- "Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
455
- ).optional().nullable(),
456
- _updatedDate: z.date().describe(
457
- "Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
458
- ).optional().nullable(),
459
- name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
460
- currency: z.string().describe(
461
- "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."
462
- ).optional().nullable(),
463
- stages: z.array(
464
- z.object({
465
- _id: z.string().describe("Stage ID.").regex(
466
- /^[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}$/,
467
- "Must be a valid GUID"
468
- ).optional().nullable(),
469
- name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
470
- staleDurationInHours: z.number().int().describe(
471
- "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."
472
- ).min(1).max(1e5).optional().nullable()
473
- })
474
- ).min(1).max(30).optional(),
475
- doneStage: z.object({
476
- _id: z.string().describe("Done stage ID.").regex(
477
- /^[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}$/,
478
- "Must be a valid GUID"
479
- ).optional().nullable(),
480
- name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
481
- allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
482
- }).describe("The final pipeline stage where cards receive a final outcome.").optional(),
483
- extendedFields: z.object({
484
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
485
- "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)."
486
- ).optional()
487
- }).describe("Extended fields data.").optional(),
488
- tags: z.object({
489
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
490
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
491
- ).optional()
492
- }).describe("Tags for organizing and categorizing pipelines.").optional()
493
- });
494
- var UpdatePipelineRequest = z.object({
495
- _id: z.string().describe("Pipeline ID.").regex(
496
- /^[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}$/,
497
- "Must be a valid GUID"
498
- ),
499
- pipeline: z.object({
500
- _id: z.string().describe("Pipeline ID.").regex(
501
- /^[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}$/,
502
- "Must be a valid GUID"
503
- ).optional().nullable(),
504
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
505
- "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."
506
- ),
507
- _createdDate: z.date().describe(
508
- "Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
509
- ).optional().nullable(),
510
- _updatedDate: z.date().describe(
511
- "Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
512
- ).optional().nullable(),
513
- name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
514
- currency: z.string().describe(
515
- "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."
516
- ).optional().nullable(),
517
- stages: z.array(
518
- z.object({
519
- _id: z.string().describe("Stage ID.").regex(
520
- /^[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}$/,
521
- "Must be a valid GUID"
522
- ).optional().nullable(),
523
- name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
524
- staleDurationInHours: z.number().int().describe(
525
- "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."
526
- ).min(1).max(1e5).optional().nullable()
527
- })
528
- ).min(1).max(30).optional(),
529
- doneStage: z.object({
530
- _id: z.string().describe("Done stage ID.").regex(
531
- /^[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}$/,
532
- "Must be a valid GUID"
533
- ).optional().nullable(),
534
- name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
535
- allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
536
- }).describe(
537
- "The final pipeline stage where cards receive a final outcome."
538
- ).optional(),
539
- extendedFields: z.object({
540
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
541
- "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)."
542
- ).optional()
543
- }).describe("Extended fields data.").optional(),
544
- tags: z.object({
545
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
546
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
547
- ).optional()
548
- }).describe("Tags for organizing and categorizing pipelines.").optional()
549
- }).describe("Pipeline to update, may be partial.")
550
- });
551
- var UpdatePipelineResponse = z.object({
552
- _id: z.string().describe("Pipeline ID.").regex(
553
- /^[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}$/,
554
- "Must be a valid GUID"
555
- ).optional().nullable(),
556
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
557
- "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."
558
- ).optional().nullable(),
559
- _createdDate: z.date().describe(
560
- "Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
561
- ).optional().nullable(),
562
- _updatedDate: z.date().describe(
563
- "Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
564
- ).optional().nullable(),
565
- name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
566
- currency: z.string().describe(
567
- "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."
568
- ).optional().nullable(),
569
- stages: z.array(
570
- z.object({
571
- _id: z.string().describe("Stage ID.").regex(
572
- /^[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}$/,
573
- "Must be a valid GUID"
574
- ).optional().nullable(),
575
- name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
576
- staleDurationInHours: z.number().int().describe(
577
- "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."
578
- ).min(1).max(1e5).optional().nullable()
579
- })
580
- ).min(1).max(30).optional(),
581
- doneStage: z.object({
582
- _id: z.string().describe("Done stage ID.").regex(
583
- /^[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}$/,
584
- "Must be a valid GUID"
585
- ).optional().nullable(),
586
- name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
587
- allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
588
- }).describe("The final pipeline stage where cards receive a final outcome.").optional(),
589
- extendedFields: z.object({
590
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
591
- "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)."
592
- ).optional()
593
- }).describe("Extended fields data.").optional(),
594
- tags: z.object({
595
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
596
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
597
- ).optional()
598
- }).describe("Tags for organizing and categorizing pipelines.").optional()
599
- });
600
- var DeletePipelineRequest = z.object({
601
- pipelineId: z.string().describe("Pipeline ID.").regex(
602
- /^[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}$/,
603
- "Must be a valid GUID"
604
- )
605
- });
606
- var DeletePipelineResponse = z.object({});
607
- var QueryPipelinesRequest = z.object({
608
- query: z.intersection(
609
- z.object({
610
- filter: z.record(z.string(), z.any()).describe(
611
- "Filter object.\n\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section)."
612
- ).optional().nullable(),
613
- sort: z.array(
614
- z.object({
615
- fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
616
- order: z.enum(["ASC", "DESC"]).optional()
617
- })
618
- ).max(5).optional()
619
- }),
620
- z.xor([
621
- z.object({ cursorPaging: z.never().optional() }),
622
- z.object({
623
- cursorPaging: z.object({
624
- limit: z.number().int().describe("Maximum number of items to return.").min(0).max(100).optional().nullable(),
625
- cursor: z.string().describe(
626
- "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."
627
- ).max(16e3).optional().nullable()
628
- }).describe(
629
- "Cursor paging options.\n\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging)."
630
- )
631
- })
632
- ])
633
- ).describe("Query options.")
634
- });
635
- var QueryPipelinesResponse = z.object({
636
- pipelines: z.array(
637
- z.object({
638
- _id: z.string().describe("Pipeline ID.").regex(
639
- /^[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}$/,
640
- "Must be a valid GUID"
641
- ).optional().nullable(),
642
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
643
- "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."
644
- ).optional().nullable(),
645
- _createdDate: z.date().describe(
646
- "Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
647
- ).optional().nullable(),
648
- _updatedDate: z.date().describe(
649
- "Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format."
650
- ).optional().nullable(),
651
- name: z.string().describe("Pipeline name.").min(1).max(60).optional().nullable(),
652
- currency: z.string().describe(
653
- "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."
654
- ).optional().nullable(),
655
- stages: z.array(
656
- z.object({
657
- _id: z.string().describe("Stage ID.").regex(
658
- /^[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}$/,
659
- "Must be a valid GUID"
660
- ).optional().nullable(),
661
- name: z.string().describe("Stage name.").min(1).max(40).optional().nullable(),
662
- staleDurationInHours: z.number().int().describe(
663
- "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."
664
- ).min(1).max(1e5).optional().nullable()
665
- })
666
- ).min(1).max(30).optional(),
667
- doneStage: z.object({
668
- _id: z.string().describe("Done stage ID.").regex(
669
- /^[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}$/,
670
- "Must be a valid GUID"
671
- ).optional().nullable(),
672
- name: z.string().describe("Done stage name.").min(1).max(40).optional().nullable(),
673
- allowedOutcomes: z.array(z.enum(["NONE", "WON", "LOST"])).min(1).max(3).optional()
674
- }).describe(
675
- "The final pipeline stage where cards receive a final outcome."
676
- ).optional(),
677
- extendedFields: z.object({
678
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
679
- "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)."
680
- ).optional()
681
- }).describe("Extended fields data.").optional(),
682
- tags: z.object({
683
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
684
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
685
- ).optional()
686
- }).describe("Tags for organizing and categorizing pipelines.").optional()
687
- })
688
- ).optional(),
689
- pagingMetadata: z.object({
690
- count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
691
- cursors: z.object({
692
- next: z.string().describe(
693
- "Cursor string pointing to the next page in the list of results."
694
- ).max(16e3).optional().nullable(),
695
- prev: z.string().describe(
696
- "Cursor pointing to the previous page in the list of results."
697
- ).max(16e3).optional().nullable()
698
- }).describe(
699
- "Cursor strings that point to the next page, previous page, or both."
700
- ).optional(),
701
- hasNext: z.boolean().describe(
702
- "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."
703
- ).optional().nullable()
704
- }).describe("Paging metadata.").optional()
705
- });
706
- var BulkUpdatePipelineTagsRequest = z.object({
707
- pipelineIds: z.array(z.string()).min(1).max(100),
708
- options: z.object({
709
- assignTags: z.object({
710
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
711
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
712
- ).optional()
713
- }).describe("List of tags to assign.").optional(),
714
- unassignTags: 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 unassign.").optional(),
719
- returnEntity: z.boolean().describe(
720
- "Whether to return the updated pipelines in the response.\n\nDefault: `false`"
721
- ).optional()
722
- }).optional()
723
- });
724
- var BulkUpdatePipelineTagsResponse = z.object({
725
- results: z.array(
726
- z.object({
727
- itemMetadata: z.object({
728
- _id: z.string().describe(
729
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
730
- ).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().nullable(),
734
- originalIndex: z.number().int().describe(
735
- "Index of the item within the request array. Allows for correlation between request and response items."
736
- ).optional(),
737
- success: z.boolean().describe(
738
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
739
- ).optional(),
740
- error: z.object({
741
- code: z.string().describe("Error code.").optional(),
742
- description: z.string().describe("Description of the error.").optional(),
743
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
744
- }).describe("Details about the error in case of failure.").optional()
745
- }).describe("Metadata about the individual updated pipeline.").optional()
746
- })
747
- ).min(1).max(100).optional(),
748
- bulkActionMetadata: z.object({
749
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
750
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
751
- undetailedFailures: z.number().int().describe(
752
- "Number of failures without details because detailed failure threshold was exceeded."
753
- ).optional()
754
- }).describe("Metadata about the bulk update.").optional()
755
- });
756
- var BulkUpdatePipelineTagsByFilterRequest = z.object({
757
- filter: z.record(z.string(), z.any()).describe("Filter to select which pipelines to update."),
758
- options: z.object({
759
- assignTags: z.object({
760
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
761
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
762
- ).optional()
763
- }).describe("List of tags to assign.").optional(),
764
- unassignTags: z.object({
765
- privateTags: z.object({ tagIds: z.array(z.string()).max(100).optional() }).describe(
766
- "Tags that are exposed to anyone with access to the entity, including site members and visitors."
767
- ).optional()
768
- }).describe("List of tags to unassign.").optional(),
769
- returnEntity: z.boolean().describe(
770
- "Whether to return the updated pipelines in the response.\n\nDefault: `false`"
771
- ).optional()
772
- }).optional()
773
- });
774
- var BulkUpdatePipelineTagsByFilterResponse = z.object({
775
- jobId: z.string().describe("Job ID for tracking the asynchronous tag updates.").regex(
776
- /^[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}$/,
777
- "Must be a valid GUID"
778
- ).optional()
779
- });
780
-
781
- // src/crm-pipelines-v1-pipeline-pipelines.universal.ts
782
324
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
783
325
  var Outcome = /* @__PURE__ */ ((Outcome2) => {
784
326
  Outcome2["NONE"] = "NONE";
@@ -805,10 +347,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
805
347
  return WebhookIdentityType2;
806
348
  })(WebhookIdentityType || {});
807
349
  async function createPipeline2(pipeline) {
808
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
809
- if (validateRequestSchema) {
810
- CreatePipelineRequest.parse({ pipeline });
811
- }
350
+ const { httpClient, sideEffects } = arguments[1];
812
351
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ pipeline });
813
352
  const reqOpts = createPipeline(payload);
814
353
  sideEffects?.onSiteCall?.();
@@ -831,10 +370,7 @@ async function createPipeline2(pipeline) {
831
370
  }
832
371
  }
833
372
  async function getPipeline2(pipelineId) {
834
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
835
- if (validateRequestSchema) {
836
- GetPipelineRequest.parse({ pipelineId });
837
- }
373
+ const { httpClient, sideEffects } = arguments[1];
838
374
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
839
375
  pipelineId
840
376
  });
@@ -859,10 +395,7 @@ async function getPipeline2(pipelineId) {
859
395
  }
860
396
  }
861
397
  async function updatePipeline2(_id, pipeline) {
862
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
863
- if (validateRequestSchema) {
864
- UpdatePipelineRequest.parse({ _id, pipeline });
865
- }
398
+ const { httpClient, sideEffects } = arguments[2];
866
399
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
867
400
  pipeline: { ...pipeline, id: _id }
868
401
  });
@@ -887,10 +420,7 @@ async function updatePipeline2(_id, pipeline) {
887
420
  }
888
421
  }
889
422
  async function deletePipeline2(pipelineId) {
890
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
891
- if (validateRequestSchema) {
892
- DeletePipelineRequest.parse({ pipelineId });
893
- }
423
+ const { httpClient, sideEffects } = arguments[1];
894
424
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
895
425
  pipelineId
896
426
  });
@@ -958,10 +488,7 @@ function queryPipelines2() {
958
488
  });
959
489
  }
960
490
  async function typedQueryPipelines(query) {
961
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
962
- if (validateRequestSchema) {
963
- QueryPipelinesRequest.parse({ query });
964
- }
491
+ const { httpClient, sideEffects } = arguments[1];
965
492
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
966
493
  const reqOpts = queryPipelines(payload);
967
494
  sideEffects?.onSiteCall?.();
@@ -989,10 +516,7 @@ var utils = {
989
516
  }
990
517
  };
991
518
  async function bulkUpdatePipelineTags2(pipelineIds, options) {
992
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
993
- if (validateRequestSchema) {
994
- BulkUpdatePipelineTagsRequest.parse({ pipelineIds, options });
995
- }
519
+ const { httpClient, sideEffects } = arguments[2];
996
520
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
997
521
  pipelineIds,
998
522
  assignTags: options?.assignTags,
@@ -1025,10 +549,7 @@ async function bulkUpdatePipelineTags2(pipelineIds, options) {
1025
549
  }
1026
550
  }
1027
551
  async function bulkUpdatePipelineTagsByFilter2(filter, options) {
1028
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1029
- if (validateRequestSchema) {
1030
- BulkUpdatePipelineTagsByFilterRequest.parse({ filter, options });
1031
- }
552
+ const { httpClient, sideEffects } = arguments[2];
1032
553
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1033
554
  filter,
1034
555
  assignTags: options?.assignTags,