@wix/auto_sdk_crm_pipelines 1.0.7 → 1.0.9

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.
Files changed (45) hide show
  1. package/build/cjs/index.d.ts +12 -22
  2. package/build/cjs/index.js +23 -502
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +42 -7
  5. package/build/cjs/index.typings.js +7 -486
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +25 -2
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.d.ts +18 -0
  10. package/build/cjs/schemas.js +36 -0
  11. package/build/cjs/schemas.js.map +1 -1
  12. package/build/es/index.d.mts +12 -22
  13. package/build/es/index.mjs +23 -492
  14. package/build/es/index.mjs.map +1 -1
  15. package/build/es/index.typings.d.mts +42 -7
  16. package/build/es/index.typings.mjs +7 -476
  17. package/build/es/index.typings.mjs.map +1 -1
  18. package/build/es/meta.d.mts +25 -2
  19. package/build/es/meta.mjs.map +1 -1
  20. package/build/es/schemas.d.mts +18 -0
  21. package/build/es/schemas.mjs +36 -0
  22. package/build/es/schemas.mjs.map +1 -1
  23. package/build/internal/cjs/index.d.ts +12 -22
  24. package/build/internal/cjs/index.js +23 -502
  25. package/build/internal/cjs/index.js.map +1 -1
  26. package/build/internal/cjs/index.typings.d.ts +42 -7
  27. package/build/internal/cjs/index.typings.js +7 -486
  28. package/build/internal/cjs/index.typings.js.map +1 -1
  29. package/build/internal/cjs/meta.d.ts +25 -2
  30. package/build/internal/cjs/meta.js.map +1 -1
  31. package/build/internal/cjs/schemas.d.ts +18 -0
  32. package/build/internal/cjs/schemas.js +36 -0
  33. package/build/internal/cjs/schemas.js.map +1 -1
  34. package/build/internal/es/index.d.mts +12 -22
  35. package/build/internal/es/index.mjs +23 -492
  36. package/build/internal/es/index.mjs.map +1 -1
  37. package/build/internal/es/index.typings.d.mts +42 -7
  38. package/build/internal/es/index.typings.mjs +7 -476
  39. package/build/internal/es/index.typings.mjs.map +1 -1
  40. package/build/internal/es/meta.d.mts +25 -2
  41. package/build/internal/es/meta.mjs.map +1 -1
  42. package/build/internal/es/schemas.d.mts +18 -0
  43. package/build/internal/es/schemas.mjs +36 -0
  44. package/build/internal/es/schemas.mjs.map +1 -1
  45. package/package.json +2 -2
@@ -56,6 +56,11 @@ interface Pipeline {
56
56
  stages?: Stage[];
57
57
  /** The final pipeline stage where cards receive a final outcome. */
58
58
  doneStage?: DoneStage;
59
+ /**
60
+ * The app that created this pipeline.
61
+ * @readonly
62
+ */
63
+ source?: PipelineSource;
59
64
  /** Extended fields data. */
60
65
  extendedFields?: ExtendedFields;
61
66
  /** Tags for organizing and categorizing pipelines. */
@@ -120,6 +125,14 @@ declare enum PipelineType {
120
125
  }
121
126
  /** @enumType */
122
127
  type PipelineTypeWithLiterals = PipelineType | 'GENERIC' | 'LEAD';
128
+ interface PipelineSource {
129
+ /**
130
+ * ID of the app that created this pipeline.
131
+ * @format GUID
132
+ * @readonly
133
+ */
134
+ appId?: string | null;
135
+ }
123
136
  interface ExtendedFields {
124
137
  /**
125
138
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
@@ -151,6 +164,10 @@ interface CreatePipelineResponse {
151
164
  /** Created pipeline. */
152
165
  pipeline?: Pipeline;
153
166
  }
167
+ interface MaxPipelinesReachedError {
168
+ /** The maximum number of pipelines allowed. */
169
+ limit?: number;
170
+ }
154
171
  interface GetPipelineRequest {
155
172
  /**
156
173
  * Pipeline ID to retrieve.
@@ -386,7 +403,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
386
403
  /** If present, indicates the action that triggered the event. */
387
404
  originatedFrom?: string | null;
388
405
  /**
389
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
406
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
390
407
  * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
391
408
  */
392
409
  entityEventSequence?: string | null;
@@ -511,6 +528,12 @@ interface AccountInfo {
511
528
  siteId?: string | null;
512
529
  }
513
530
  /** @docsIgnore */
531
+ type CreatePipelineApplicationErrors = {
532
+ code?: 'MAX_PIPELINES_REACHED';
533
+ description?: string;
534
+ data?: MaxPipelinesReachedError;
535
+ };
536
+ /** @docsIgnore */
514
537
  type UpdatePipelineApplicationErrors = {
515
538
  code?: 'CANNOT_CHANGE_DURATION_ON_STAGE_WITH_CARDS';
516
539
  description?: string;
@@ -591,7 +614,7 @@ interface EventMetadata extends BaseEventMetadata {
591
614
  /** If present, indicates the action that triggered the event. */
592
615
  originatedFrom?: string | null;
593
616
  /**
594
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
617
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
595
618
  * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
596
619
  */
597
620
  entityEventSequence?: string | null;
@@ -678,7 +701,9 @@ declare function onPipelineUpdated(handler: (event: PipelineUpdatedEnvelope) =>
678
701
  * @returns Created pipeline.
679
702
  * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline
680
703
  */
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>>;
704
+ 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> & {
705
+ __applicationErrorsType?: CreatePipelineApplicationErrors;
706
+ }>;
682
707
  /**
683
708
  * Retrieves a pipeline by ID.
684
709
  * @param pipelineId - Pipeline ID to retrieve.
@@ -762,6 +787,11 @@ interface UpdatePipeline {
762
787
  stages?: Stage[];
763
788
  /** The final pipeline stage where cards receive a final outcome. */
764
789
  doneStage?: DoneStage;
790
+ /**
791
+ * The app that created this pipeline.
792
+ * @readonly
793
+ */
794
+ source?: PipelineSource;
765
795
  /** Extended fields data. */
766
796
  extendedFields?: ExtendedFields;
767
797
  /** Tags for organizing and categorizing pipelines. */
@@ -817,12 +847,12 @@ interface PipelinesQueryBuilder {
817
847
  * @param value - Value to compare against.
818
848
  * @documentationMaturity preview
819
849
  */
820
- eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => PipelinesQueryBuilder;
850
+ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'source.appId', value: any) => PipelinesQueryBuilder;
821
851
  /** @param propertyName - Property whose value is compared with `value`.
822
852
  * @param value - Value to compare against.
823
853
  * @documentationMaturity preview
824
854
  */
825
- ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => PipelinesQueryBuilder;
855
+ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'source.appId', value: any) => PipelinesQueryBuilder;
826
856
  /** @param propertyName - Property whose value is compared with `value`.
827
857
  * @param value - Value to compare against.
828
858
  * @documentationMaturity preview
@@ -849,7 +879,7 @@ interface PipelinesQueryBuilder {
849
879
  */
850
880
  startsWith: (propertyName: 'name', value: string) => PipelinesQueryBuilder;
851
881
  /** @documentationMaturity preview */
852
- in: (propertyName: '_id' | 'name', value: any) => PipelinesQueryBuilder;
882
+ in: (propertyName: '_id' | 'name' | 'source.appId', value: any) => PipelinesQueryBuilder;
853
883
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
854
884
  * @documentationMaturity preview
855
885
  */
@@ -897,6 +927,11 @@ interface PipelineQuerySpec extends QuerySpec {
897
927
  fields: ['name'];
898
928
  operators: ['$eq', '$in', '$ne', '$nin', '$startsWith'];
899
929
  sort: 'ASC';
930
+ },
931
+ {
932
+ fields: ['source.appId'];
933
+ operators: ['$eq', '$in', '$ne', '$nin'];
934
+ sort: 'NONE';
900
935
  }
901
936
  ];
902
937
  }
@@ -1013,4 +1048,4 @@ interface BulkUpdatePipelineTagsByFilterOptions {
1013
1048
  returnEntity?: boolean;
1014
1049
  }
1015
1050
 
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 };
1051
+ 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, type PipelineSource, 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 };