@wix/auto_sdk_crm_pipelines 1.0.0 → 1.0.1

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 (41) hide show
  1. package/build/cjs/index.d.ts +76 -130
  2. package/build/cjs/index.js +194 -977
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +998 -15
  5. package/build/cjs/index.typings.js +146 -767
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +133 -1005
  8. package/build/cjs/meta.js +128 -682
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +76 -130
  11. package/build/es/index.mjs +184 -947
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +998 -15
  14. package/build/es/index.typings.mjs +138 -743
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +133 -1005
  17. package/build/es/meta.mjs +121 -659
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +76 -163
  20. package/build/internal/cjs/index.js +194 -977
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +998 -15
  23. package/build/internal/cjs/index.typings.js +146 -767
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +133 -1005
  26. package/build/internal/cjs/meta.js +128 -682
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +76 -163
  29. package/build/internal/es/index.mjs +184 -947
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +998 -15
  32. package/build/internal/es/index.typings.mjs +138 -743
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +133 -1005
  35. package/build/internal/es/meta.mjs +121 -659
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
  38. package/build/cjs/crm-pipelines-v1-card-pipelines.universal-DGtqU_Zb.d.ts +0 -2265
  39. package/build/es/crm-pipelines-v1-card-pipelines.universal-DGtqU_Zb.d.mts +0 -2265
  40. package/build/internal/cjs/crm-pipelines-v1-card-pipelines.universal-BHszxzqA.d.ts +0 -2303
  41. package/build/internal/es/crm-pipelines-v1-card-pipelines.universal-BHszxzqA.d.mts +0 -2303
@@ -1,10 +1,10 @@
1
- // src/crm-pipelines-v1-card-pipelines.public.ts
1
+ // src/crm-pipelines-v1-pipeline-pipelines.public.ts
2
2
  import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
3
3
  import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
4
4
  import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
5
5
  import { EventDefinition } from "@wix/sdk-types";
6
6
 
7
- // src/crm-pipelines-v1-card-pipelines.universal.ts
7
+ // src/crm-pipelines-v1-pipeline-pipelines.universal.ts
8
8
  import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
9
9
  import { queryBuilder } from "@wix/sdk-runtime/query-builder";
10
10
  import {
@@ -12,94 +12,88 @@ import {
12
12
  renameKeysFromRESTResponseToSDKResponse
13
13
  } from "@wix/sdk-runtime/rename-all-nested-keys";
14
14
 
15
- // src/crm-pipelines-v1-card-pipelines.http.ts
15
+ // src/crm-pipelines-v1-pipeline-pipelines.http.ts
16
16
  import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
17
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
18
- import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
19
17
  import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
20
18
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
21
19
  import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
22
20
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
23
21
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
24
- function resolveWixCrmPipelinesCardsV1CardsUrl(opts) {
22
+ function resolveWixCrmPipelinesPipelinesV1PipelinesUrl(opts) {
25
23
  const domainToMappings = {
26
24
  "manage._base_domain_": [
27
25
  {
28
- srcPath: "/_api/cards-app/v1/cards",
29
- destPath: "/v1/cards"
26
+ srcPath: "/_api/pipelines-app/v1/pipelines",
27
+ destPath: "/v1/pipelines"
30
28
  },
31
29
  {
32
- srcPath: "/_api/cards-app/v1/bulk/cards",
33
- destPath: "/v1/bulk/cards"
30
+ srcPath: "/_api/pipelines-app/v1/bulk/pipelines/",
31
+ destPath: "/v1/bulk/pipelines/"
34
32
  },
35
33
  {
36
- srcPath: "/_api/cards/v1/cards",
37
- destPath: "/v1/cards"
34
+ srcPath: "/_api/pipelines/v1/pipelines",
35
+ destPath: "/v1/pipelines"
38
36
  },
39
37
  {
40
- srcPath: "/_api/cards/v1/bulk/cards",
41
- destPath: "/v1/bulk/cards"
38
+ srcPath: "/_api/pipelines/v1/bulk/pipelines",
39
+ destPath: "/v1/bulk/pipelines"
42
40
  }
43
41
  ],
44
42
  _: [
45
43
  {
46
- srcPath: "/_api/cards/v1/cards",
47
- destPath: "/v1/cards"
44
+ srcPath: "/_api/pipelines/v1/pipelines",
45
+ destPath: "/v1/pipelines"
48
46
  },
49
47
  {
50
- srcPath: "/_api/cards/v1/bulk/cards",
51
- destPath: "/v1/bulk/cards"
48
+ srcPath: "/_api/pipelines/v1/bulk/pipelines",
49
+ destPath: "/v1/bulk/pipelines"
52
50
  }
53
51
  ],
54
52
  "*.dev.wix-code.com": [
55
53
  {
56
- srcPath: "/_api/cards/v1/cards",
57
- destPath: "/v1/cards"
54
+ srcPath: "/_api/pipelines/v1/pipelines",
55
+ destPath: "/v1/pipelines"
58
56
  },
59
57
  {
60
- srcPath: "/_api/cards/v1/bulk/cards",
61
- destPath: "/v1/bulk/cards"
58
+ srcPath: "/_api/pipelines/v1/bulk/pipelines",
59
+ destPath: "/v1/bulk/pipelines"
62
60
  }
63
61
  ],
64
62
  "www.wixapis.com": [
65
63
  {
66
- srcPath: "/crm/pipelines/v1/cards",
67
- destPath: "/v1/cards"
64
+ srcPath: "/crm/pipelines/v1/pipelines",
65
+ destPath: "/v1/pipelines"
68
66
  },
69
67
  {
70
- srcPath: "/crm/pipelines/v1/bulk/cards",
71
- destPath: "/v1/bulk/cards"
68
+ srcPath: "/crm/pipelines/v1/bulk/pipelines",
69
+ destPath: "/v1/bulk/pipelines"
72
70
  }
73
71
  ]
74
72
  };
75
73
  return resolveUrl(Object.assign(opts, { domainToMappings }));
76
74
  }
77
75
  var PACKAGE_NAME = "@wix/auto_sdk_crm_pipelines";
78
- function createCard(payload) {
79
- function __createCard({ host }) {
76
+ function createPipeline(payload) {
77
+ function __createPipeline({ host }) {
80
78
  const serializedData = transformPaths(payload, [
81
79
  {
82
80
  transformFn: transformSDKTimestampToRESTTimestamp,
83
81
  paths: [
84
- { path: "card.createdDate" },
85
- { path: "card.updatedDate" },
86
- { path: "card.stageUpdatedDate" },
87
- { path: "card.dueDate" },
88
- { path: "card.staleDate" },
89
- { path: "card.linkedEntities.linkedDate" }
82
+ { path: "pipeline.createdDate" },
83
+ { path: "pipeline.updatedDate" }
90
84
  ]
91
85
  }
92
86
  ]);
93
87
  const metadata = {
94
- entityFqdn: "wix.crm.pipelines.v1.card",
88
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
95
89
  method: "POST",
96
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.CreateCard",
90
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline",
97
91
  packageName: PACKAGE_NAME,
98
92
  migrationOptions: {
99
93
  optInTransformResponse: true
100
94
  },
101
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
102
- protoPath: "/v1/cards",
95
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
96
+ protoPath: "/v1/pipelines",
103
97
  data: serializedData,
104
98
  host
105
99
  }),
@@ -108,32 +102,28 @@ function createCard(payload) {
108
102
  {
109
103
  transformFn: transformRESTTimestampToSDKTimestamp,
110
104
  paths: [
111
- { path: "card.createdDate" },
112
- { path: "card.updatedDate" },
113
- { path: "card.stageUpdatedDate" },
114
- { path: "card.dueDate" },
115
- { path: "card.staleDate" },
116
- { path: "card.linkedEntities.linkedDate" }
105
+ { path: "pipeline.createdDate" },
106
+ { path: "pipeline.updatedDate" }
117
107
  ]
118
108
  }
119
109
  ])
120
110
  };
121
111
  return metadata;
122
112
  }
123
- return __createCard;
113
+ return __createPipeline;
124
114
  }
125
- function getCard(payload) {
126
- function __getCard({ host }) {
115
+ function getPipeline(payload) {
116
+ function __getPipeline({ host }) {
127
117
  const metadata = {
128
- entityFqdn: "wix.crm.pipelines.v1.card",
118
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
129
119
  method: "GET",
130
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.GetCard",
120
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.GetPipeline",
131
121
  packageName: PACKAGE_NAME,
132
122
  migrationOptions: {
133
123
  optInTransformResponse: true
134
124
  },
135
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
136
- protoPath: "/v1/cards/{cardId}",
125
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
126
+ protoPath: "/v1/pipelines/{pipelineId}",
137
127
  data: payload,
138
128
  host
139
129
  }),
@@ -142,22 +132,18 @@ function getCard(payload) {
142
132
  {
143
133
  transformFn: transformRESTTimestampToSDKTimestamp,
144
134
  paths: [
145
- { path: "card.createdDate" },
146
- { path: "card.updatedDate" },
147
- { path: "card.stageUpdatedDate" },
148
- { path: "card.dueDate" },
149
- { path: "card.staleDate" },
150
- { path: "card.linkedEntities.linkedDate" }
135
+ { path: "pipeline.createdDate" },
136
+ { path: "pipeline.updatedDate" }
151
137
  ]
152
138
  }
153
139
  ])
154
140
  };
155
141
  return metadata;
156
142
  }
157
- return __getCard;
143
+ return __getPipeline;
158
144
  }
159
- function updateCard(payload) {
160
- function __updateCard({ host }) {
145
+ function updatePipeline(payload) {
146
+ function __updatePipeline({ host }) {
161
147
  const serializedData = transformPaths(payload, [
162
148
  {
163
149
  transformFn: transformSDKFieldMaskToRESTFieldMask,
@@ -166,25 +152,21 @@ function updateCard(payload) {
166
152
  {
167
153
  transformFn: transformSDKTimestampToRESTTimestamp,
168
154
  paths: [
169
- { path: "card.createdDate" },
170
- { path: "card.updatedDate" },
171
- { path: "card.stageUpdatedDate" },
172
- { path: "card.dueDate" },
173
- { path: "card.staleDate" },
174
- { path: "card.linkedEntities.linkedDate" }
155
+ { path: "pipeline.createdDate" },
156
+ { path: "pipeline.updatedDate" }
175
157
  ]
176
158
  }
177
159
  ]);
178
160
  const metadata = {
179
- entityFqdn: "wix.crm.pipelines.v1.card",
161
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
180
162
  method: "PATCH",
181
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.UpdateCard",
163
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.UpdatePipeline",
182
164
  packageName: PACKAGE_NAME,
183
165
  migrationOptions: {
184
166
  optInTransformResponse: true
185
167
  },
186
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
187
- protoPath: "/v1/cards/{card.id}",
168
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
169
+ protoPath: "/v1/pipelines/{pipeline.id}",
188
170
  data: serializedData,
189
171
  host
190
172
  }),
@@ -193,66 +175,28 @@ function updateCard(payload) {
193
175
  {
194
176
  transformFn: transformRESTTimestampToSDKTimestamp,
195
177
  paths: [
196
- { path: "card.createdDate" },
197
- { path: "card.updatedDate" },
198
- { path: "card.stageUpdatedDate" },
199
- { path: "card.dueDate" },
200
- { path: "card.staleDate" },
201
- { path: "card.linkedEntities.linkedDate" }
178
+ { path: "pipeline.createdDate" },
179
+ { path: "pipeline.updatedDate" }
202
180
  ]
203
181
  }
204
182
  ])
205
183
  };
206
184
  return metadata;
207
185
  }
208
- return __updateCard;
186
+ return __updatePipeline;
209
187
  }
210
- function moveCard(payload) {
211
- function __moveCard({ host }) {
188
+ function deletePipeline(payload) {
189
+ function __deletePipeline({ host }) {
212
190
  const metadata = {
213
- entityFqdn: "wix.crm.pipelines.v1.card",
214
- method: "PATCH",
215
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.MoveCard",
216
- packageName: PACKAGE_NAME,
217
- migrationOptions: {
218
- optInTransformResponse: true
219
- },
220
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
221
- protoPath: "/v1/cards/move/{cardId}",
222
- data: payload,
223
- host
224
- }),
225
- data: payload,
226
- transformResponse: (payload2) => transformPaths(payload2, [
227
- {
228
- transformFn: transformRESTTimestampToSDKTimestamp,
229
- paths: [
230
- { path: "card.createdDate" },
231
- { path: "card.updatedDate" },
232
- { path: "card.stageUpdatedDate" },
233
- { path: "card.dueDate" },
234
- { path: "card.staleDate" },
235
- { path: "card.linkedEntities.linkedDate" }
236
- ]
237
- }
238
- ])
239
- };
240
- return metadata;
241
- }
242
- return __moveCard;
243
- }
244
- function deleteCard(payload) {
245
- function __deleteCard({ host }) {
246
- const metadata = {
247
- entityFqdn: "wix.crm.pipelines.v1.card",
191
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
248
192
  method: "DELETE",
249
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.DeleteCard",
193
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.DeletePipeline",
250
194
  packageName: PACKAGE_NAME,
251
195
  migrationOptions: {
252
196
  optInTransformResponse: true
253
197
  },
254
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
255
- protoPath: "/v1/cards/{cardId}",
198
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
199
+ protoPath: "/v1/pipelines/{pipelineId}",
256
200
  data: payload,
257
201
  host
258
202
  }),
@@ -260,20 +204,20 @@ function deleteCard(payload) {
260
204
  };
261
205
  return metadata;
262
206
  }
263
- return __deleteCard;
207
+ return __deletePipeline;
264
208
  }
265
- function queryCards(payload) {
266
- function __queryCards({ host }) {
209
+ function queryPipelines(payload) {
210
+ function __queryPipelines({ host }) {
267
211
  const metadata = {
268
- entityFqdn: "wix.crm.pipelines.v1.card",
212
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
269
213
  method: "GET",
270
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.QueryCards",
214
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines",
271
215
  packageName: PACKAGE_NAME,
272
216
  migrationOptions: {
273
217
  optInTransformResponse: true
274
218
  },
275
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
276
- protoPath: "/v1/cards/query",
219
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
220
+ protoPath: "/v1/pipelines/query",
277
221
  data: payload,
278
222
  host
279
223
  }),
@@ -282,20 +226,16 @@ function queryCards(payload) {
282
226
  {
283
227
  transformFn: transformRESTTimestampToSDKTimestamp,
284
228
  paths: [
285
- { path: "cards.createdDate" },
286
- { path: "cards.updatedDate" },
287
- { path: "cards.stageUpdatedDate" },
288
- { path: "cards.dueDate" },
289
- { path: "cards.staleDate" },
290
- { path: "cards.linkedEntities.linkedDate" }
229
+ { path: "pipelines.createdDate" },
230
+ { path: "pipelines.updatedDate" }
291
231
  ]
292
232
  }
293
233
  ]),
294
234
  fallback: [
295
235
  {
296
236
  method: "POST",
297
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
298
- protoPath: "/v1/cards/query",
237
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
238
+ protoPath: "/v1/pipelines/query",
299
239
  data: payload,
300
240
  host
301
241
  }),
@@ -305,311 +245,20 @@ function queryCards(payload) {
305
245
  };
306
246
  return metadata;
307
247
  }
308
- return __queryCards;
309
- }
310
- function searchCards(payload) {
311
- function __searchCards({ host }) {
312
- const serializedData = transformPaths(payload, [
313
- {
314
- transformFn: transformSDKFloatToRESTFloat,
315
- paths: [
316
- { path: "search.aggregations.range.buckets.from" },
317
- { path: "search.aggregations.range.buckets.to" },
318
- {
319
- path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
320
- },
321
- {
322
- path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
323
- }
324
- ]
325
- }
326
- ]);
327
- const metadata = {
328
- entityFqdn: "wix.crm.pipelines.v1.card",
329
- method: "GET",
330
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.SearchCards",
331
- packageName: PACKAGE_NAME,
332
- migrationOptions: {
333
- optInTransformResponse: true
334
- },
335
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
336
- protoPath: "/v1/cards/search",
337
- data: serializedData,
338
- host
339
- }),
340
- params: toURLSearchParams(serializedData, true),
341
- transformResponse: (payload2) => transformPaths(payload2, [
342
- {
343
- transformFn: transformRESTTimestampToSDKTimestamp,
344
- paths: [
345
- { path: "cards.createdDate" },
346
- { path: "cards.updatedDate" },
347
- { path: "cards.stageUpdatedDate" },
348
- { path: "cards.dueDate" },
349
- { path: "cards.staleDate" },
350
- { path: "cards.linkedEntities.linkedDate" }
351
- ]
352
- },
353
- {
354
- transformFn: transformRESTFloatToSDKFloat,
355
- paths: [
356
- { path: "aggregationData.results.ranges.results.from" },
357
- { path: "aggregationData.results.ranges.results.to" },
358
- {
359
- path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
360
- },
361
- {
362
- path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
363
- },
364
- {
365
- path: "aggregationData.results.nested.results.results.*.range.from"
366
- },
367
- {
368
- path: "aggregationData.results.nested.results.results.*.range.to"
369
- },
370
- { path: "aggregationData.results.scalar.value" },
371
- {
372
- path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
373
- },
374
- {
375
- path: "aggregationData.results.nested.results.results.*.scalar.value"
376
- }
377
- ]
378
- }
379
- ]),
380
- fallback: [
381
- {
382
- method: "POST",
383
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
384
- protoPath: "/v1/cards/search",
385
- data: serializedData,
386
- host
387
- }),
388
- data: serializedData
389
- }
390
- ]
391
- };
392
- return metadata;
393
- }
394
- return __searchCards;
395
- }
396
- function searchCardsByStage(payload) {
397
- function __searchCardsByStage({ host }) {
398
- const serializedData = transformPaths(payload, [
399
- {
400
- transformFn: transformSDKFloatToRESTFloat,
401
- paths: [
402
- { path: "search.aggregations.range.buckets.from" },
403
- { path: "search.aggregations.range.buckets.to" },
404
- {
405
- path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
406
- },
407
- {
408
- path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
409
- }
410
- ]
411
- }
412
- ]);
413
- const metadata = {
414
- entityFqdn: "wix.crm.pipelines.v1.card",
415
- method: "GET",
416
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.SearchCardsByStage",
417
- packageName: PACKAGE_NAME,
418
- migrationOptions: {
419
- optInTransformResponse: true
420
- },
421
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
422
- protoPath: "/v1/cards/search-by-stage",
423
- data: serializedData,
424
- host
425
- }),
426
- params: toURLSearchParams(serializedData, true),
427
- transformResponse: (payload2) => transformPaths(payload2, [
428
- {
429
- transformFn: transformRESTTimestampToSDKTimestamp,
430
- paths: [
431
- { path: "results.cards.createdDate" },
432
- { path: "results.cards.updatedDate" },
433
- { path: "results.cards.stageUpdatedDate" },
434
- { path: "results.cards.dueDate" },
435
- { path: "results.cards.staleDate" },
436
- { path: "results.cards.linkedEntities.linkedDate" }
437
- ]
438
- },
439
- {
440
- transformFn: transformRESTFloatToSDKFloat,
441
- paths: [
442
- { path: "results.aggregationData.results.ranges.results.from" },
443
- { path: "results.aggregationData.results.ranges.results.to" },
444
- {
445
- path: "results.aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
446
- },
447
- {
448
- path: "results.aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
449
- },
450
- {
451
- path: "results.aggregationData.results.nested.results.results.*.range.from"
452
- },
453
- {
454
- path: "results.aggregationData.results.nested.results.results.*.range.to"
455
- },
456
- { path: "results.aggregationData.results.scalar.value" },
457
- {
458
- path: "results.aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
459
- },
460
- {
461
- path: "results.aggregationData.results.nested.results.results.*.scalar.value"
462
- }
463
- ]
464
- }
465
- ]),
466
- fallback: [
467
- {
468
- method: "POST",
469
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
470
- protoPath: "/v1/cards/search-by-stage",
471
- data: serializedData,
472
- host
473
- }),
474
- data: serializedData
475
- }
476
- ]
477
- };
478
- return metadata;
479
- }
480
- return __searchCardsByStage;
481
- }
482
- function bulkCreateCards(payload) {
483
- function __bulkCreateCards({ host }) {
484
- const serializedData = transformPaths(payload, [
485
- {
486
- transformFn: transformSDKTimestampToRESTTimestamp,
487
- paths: [
488
- { path: "cards.createdDate" },
489
- { path: "cards.updatedDate" },
490
- { path: "cards.stageUpdatedDate" },
491
- { path: "cards.dueDate" },
492
- { path: "cards.staleDate" },
493
- { path: "cards.linkedEntities.linkedDate" }
494
- ]
495
- }
496
- ]);
497
- const metadata = {
498
- entityFqdn: "wix.crm.pipelines.v1.card",
499
- method: "POST",
500
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.BulkCreateCards",
501
- packageName: PACKAGE_NAME,
502
- migrationOptions: {
503
- optInTransformResponse: true
504
- },
505
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
506
- protoPath: "/v1/bulk/cards/create",
507
- data: serializedData,
508
- host
509
- }),
510
- data: serializedData,
511
- transformResponse: (payload2) => transformPaths(payload2, [
512
- {
513
- transformFn: transformRESTTimestampToSDKTimestamp,
514
- paths: [
515
- { path: "results.item.createdDate" },
516
- { path: "results.item.updatedDate" },
517
- { path: "results.item.stageUpdatedDate" },
518
- { path: "results.item.dueDate" },
519
- { path: "results.item.staleDate" },
520
- { path: "results.item.linkedEntities.linkedDate" }
521
- ]
522
- }
523
- ])
524
- };
525
- return metadata;
526
- }
527
- return __bulkCreateCards;
248
+ return __queryPipelines;
528
249
  }
529
- function bulkUpdateCards(payload) {
530
- function __bulkUpdateCards({ host }) {
531
- const serializedData = transformPaths(payload, [
532
- {
533
- transformFn: transformSDKFieldMaskToRESTFieldMask,
534
- paths: [{ path: "cards.fieldMask" }]
535
- },
536
- {
537
- transformFn: transformSDKTimestampToRESTTimestamp,
538
- paths: [
539
- { path: "cards.card.createdDate" },
540
- { path: "cards.card.updatedDate" },
541
- { path: "cards.card.stageUpdatedDate" },
542
- { path: "cards.card.dueDate" },
543
- { path: "cards.card.staleDate" },
544
- { path: "cards.card.linkedEntities.linkedDate" }
545
- ]
546
- }
547
- ]);
250
+ function bulkUpdatePipelineTags(payload) {
251
+ function __bulkUpdatePipelineTags({ host }) {
548
252
  const metadata = {
549
- entityFqdn: "wix.crm.pipelines.v1.card",
253
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
550
254
  method: "POST",
551
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.BulkUpdateCards",
255
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTags",
552
256
  packageName: PACKAGE_NAME,
553
257
  migrationOptions: {
554
258
  optInTransformResponse: true
555
259
  },
556
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
557
- protoPath: "/v1/bulk/cards/update",
558
- data: serializedData,
559
- host
560
- }),
561
- data: serializedData,
562
- transformResponse: (payload2) => transformPaths(payload2, [
563
- {
564
- transformFn: transformRESTTimestampToSDKTimestamp,
565
- paths: [
566
- { path: "results.item.createdDate" },
567
- { path: "results.item.updatedDate" },
568
- { path: "results.item.stageUpdatedDate" },
569
- { path: "results.item.dueDate" },
570
- { path: "results.item.staleDate" },
571
- { path: "results.item.linkedEntities.linkedDate" }
572
- ]
573
- }
574
- ])
575
- };
576
- return metadata;
577
- }
578
- return __bulkUpdateCards;
579
- }
580
- function bulkDeleteCards(payload) {
581
- function __bulkDeleteCards({ host }) {
582
- const metadata = {
583
- entityFqdn: "wix.crm.pipelines.v1.card",
584
- method: "POST",
585
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.BulkDeleteCards",
586
- packageName: PACKAGE_NAME,
587
- migrationOptions: {
588
- optInTransformResponse: true
589
- },
590
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
591
- protoPath: "/v1/bulk/cards/delete",
592
- data: payload,
593
- host
594
- }),
595
- data: payload
596
- };
597
- return metadata;
598
- }
599
- return __bulkDeleteCards;
600
- }
601
- function bulkUpdateCardTags(payload) {
602
- function __bulkUpdateCardTags({ host }) {
603
- const metadata = {
604
- entityFqdn: "wix.crm.pipelines.v1.card",
605
- method: "POST",
606
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTags",
607
- packageName: PACKAGE_NAME,
608
- migrationOptions: {
609
- optInTransformResponse: true
610
- },
611
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
612
- protoPath: "/v1/bulk/cards/update-tags",
260
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
261
+ protoPath: "/v1/bulk/pipelines/update-tags",
613
262
  data: payload,
614
263
  host
615
264
  }),
@@ -617,20 +266,20 @@ function bulkUpdateCardTags(payload) {
617
266
  };
618
267
  return metadata;
619
268
  }
620
- return __bulkUpdateCardTags;
269
+ return __bulkUpdatePipelineTags;
621
270
  }
622
- function bulkUpdateCardTagsByFilter(payload) {
623
- function __bulkUpdateCardTagsByFilter({ host }) {
271
+ function bulkUpdatePipelineTagsByFilter(payload) {
272
+ function __bulkUpdatePipelineTagsByFilter({ host }) {
624
273
  const metadata = {
625
- entityFqdn: "wix.crm.pipelines.v1.card",
274
+ entityFqdn: "wix.crm.pipelines.v1.pipeline",
626
275
  method: "POST",
627
- methodFqn: "wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTagsByFilter",
276
+ methodFqn: "wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTagsByFilter",
628
277
  packageName: PACKAGE_NAME,
629
278
  migrationOptions: {
630
279
  optInTransformResponse: true
631
280
  },
632
- url: resolveWixCrmPipelinesCardsV1CardsUrl({
633
- protoPath: "/v1/bulk/cards/update-tags-by-filter",
281
+ url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({
282
+ protoPath: "/v1/bulk/pipelines/update-tags-by-filter",
634
283
  data: payload,
635
284
  host
636
285
  }),
@@ -638,20 +287,12 @@ function bulkUpdateCardTagsByFilter(payload) {
638
287
  };
639
288
  return metadata;
640
289
  }
641
- return __bulkUpdateCardTagsByFilter;
290
+ return __bulkUpdatePipelineTagsByFilter;
642
291
  }
643
292
 
644
- // src/crm-pipelines-v1-card-pipelines.universal.ts
293
+ // src/crm-pipelines-v1-pipeline-pipelines.universal.ts
645
294
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
646
295
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
647
- import { createSearchUtils } from "@wix/sdk-runtime/search-builder-utils";
648
- var Priority = /* @__PURE__ */ ((Priority2) => {
649
- Priority2["P1_URGENT"] = "P1_URGENT";
650
- Priority2["P2_HIGH"] = "P2_HIGH";
651
- Priority2["P3_MEDIUM"] = "P3_MEDIUM";
652
- Priority2["P4_LOW"] = "P4_LOW";
653
- return Priority2;
654
- })(Priority || {});
655
296
  var Outcome = /* @__PURE__ */ ((Outcome2) => {
656
297
  Outcome2["NONE"] = "NONE";
657
298
  Outcome2["WON"] = "WON";
@@ -663,62 +304,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
663
304
  SortOrder2["DESC"] = "DESC";
664
305
  return SortOrder2;
665
306
  })(SortOrder || {});
666
- var SortType = /* @__PURE__ */ ((SortType2) => {
667
- SortType2["COUNT"] = "COUNT";
668
- SortType2["VALUE"] = "VALUE";
669
- return SortType2;
670
- })(SortType || {});
671
- var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
672
- SortDirection2["DESC"] = "DESC";
673
- SortDirection2["ASC"] = "ASC";
674
- return SortDirection2;
675
- })(SortDirection || {});
676
- var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
677
- MissingValues2["EXCLUDE"] = "EXCLUDE";
678
- MissingValues2["INCLUDE"] = "INCLUDE";
679
- return MissingValues2;
680
- })(MissingValues || {});
681
- var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
682
- ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
683
- ScalarType2["MIN"] = "MIN";
684
- ScalarType2["MAX"] = "MAX";
685
- return ScalarType2;
686
- })(ScalarType || {});
687
- var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
688
- NestedAggregationType2["VALUE"] = "VALUE";
689
- NestedAggregationType2["RANGE"] = "RANGE";
690
- NestedAggregationType2["SCALAR"] = "SCALAR";
691
- NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
692
- return NestedAggregationType2;
693
- })(NestedAggregationType || {});
694
- var Interval = /* @__PURE__ */ ((Interval2) => {
695
- Interval2["YEAR"] = "YEAR";
696
- Interval2["MONTH"] = "MONTH";
697
- Interval2["WEEK"] = "WEEK";
698
- Interval2["DAY"] = "DAY";
699
- Interval2["HOUR"] = "HOUR";
700
- Interval2["MINUTE"] = "MINUTE";
701
- Interval2["SECOND"] = "SECOND";
702
- return Interval2;
703
- })(Interval || {});
704
- var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
705
- AggregationType2["VALUE"] = "VALUE";
706
- AggregationType2["RANGE"] = "RANGE";
707
- AggregationType2["SCALAR"] = "SCALAR";
708
- AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
709
- AggregationType2["NESTED"] = "NESTED";
710
- return AggregationType2;
711
- })(AggregationType || {});
712
- var Mode = /* @__PURE__ */ ((Mode2) => {
713
- Mode2["OR"] = "OR";
714
- Mode2["AND"] = "AND";
715
- return Mode2;
716
- })(Mode || {});
717
- var NameFormat = /* @__PURE__ */ ((NameFormat2) => {
718
- NameFormat2["BY_FIRST_NAME"] = "BY_FIRST_NAME";
719
- NameFormat2["BY_LAST_NAME"] = "BY_LAST_NAME";
720
- return NameFormat2;
721
- })(NameFormat || {});
722
307
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
723
308
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
724
309
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -727,88 +312,85 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
727
312
  WebhookIdentityType2["APP"] = "APP";
728
313
  return WebhookIdentityType2;
729
314
  })(WebhookIdentityType || {});
730
- async function createCard2(options) {
315
+ async function createPipeline2(pipeline) {
731
316
  const { httpClient, sideEffects } = arguments[1];
732
- const payload = renameKeysFromSDKRequestToRESTRequest({
733
- card: options?.card
734
- });
735
- const reqOpts = createCard(payload);
317
+ const payload = renameKeysFromSDKRequestToRESTRequest({ pipeline });
318
+ const reqOpts = createPipeline(payload);
736
319
  sideEffects?.onSiteCall?.();
737
320
  try {
738
321
  const result = await httpClient.request(reqOpts);
739
322
  sideEffects?.onSuccess?.(result);
740
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.card;
323
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline;
741
324
  } catch (err) {
742
325
  const transformedError = sdkTransformError(
743
326
  err,
744
327
  {
745
328
  spreadPathsToArguments: {},
746
- explicitPathsToArguments: { card: "$[0].card" },
329
+ explicitPathsToArguments: { pipeline: "$[0]" },
747
330
  singleArgumentUnchanged: false
748
331
  },
749
- ["options"]
332
+ ["pipeline"]
750
333
  );
751
334
  sideEffects?.onError?.(err);
752
335
  throw transformedError;
753
336
  }
754
337
  }
755
- async function getCard2(cardId) {
338
+ async function getPipeline2(pipelineId) {
756
339
  const { httpClient, sideEffects } = arguments[1];
757
- const payload = renameKeysFromSDKRequestToRESTRequest({ cardId });
758
- const reqOpts = getCard(payload);
340
+ const payload = renameKeysFromSDKRequestToRESTRequest({
341
+ pipelineId
342
+ });
343
+ const reqOpts = getPipeline(payload);
759
344
  sideEffects?.onSiteCall?.();
760
345
  try {
761
346
  const result = await httpClient.request(reqOpts);
762
347
  sideEffects?.onSuccess?.(result);
763
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.card;
348
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline;
764
349
  } catch (err) {
765
350
  const transformedError = sdkTransformError(
766
351
  err,
767
352
  {
768
353
  spreadPathsToArguments: {},
769
- explicitPathsToArguments: { cardId: "$[0]" },
354
+ explicitPathsToArguments: { pipelineId: "$[0]" },
770
355
  singleArgumentUnchanged: false
771
356
  },
772
- ["cardId"]
357
+ ["pipelineId"]
773
358
  );
774
359
  sideEffects?.onError?.(err);
775
360
  throw transformedError;
776
361
  }
777
362
  }
778
- async function updateCard2(_id, options) {
363
+ async function updatePipeline2(_id, pipeline) {
779
364
  const { httpClient, sideEffects } = arguments[2];
780
365
  const payload = renameKeysFromSDKRequestToRESTRequest({
781
- card: { ...options?.card, id: _id }
366
+ pipeline: { ...pipeline, id: _id }
782
367
  });
783
- const reqOpts = updateCard(payload);
368
+ const reqOpts = updatePipeline(payload);
784
369
  sideEffects?.onSiteCall?.();
785
370
  try {
786
371
  const result = await httpClient.request(reqOpts);
787
372
  sideEffects?.onSuccess?.(result);
788
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.card;
373
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline;
789
374
  } catch (err) {
790
375
  const transformedError = sdkTransformError(
791
376
  err,
792
377
  {
793
- spreadPathsToArguments: { card: "$[1].card" },
794
- explicitPathsToArguments: { "card.id": "$[0]" },
378
+ spreadPathsToArguments: { pipeline: "$[1]" },
379
+ explicitPathsToArguments: { "pipeline.id": "$[0]" },
795
380
  singleArgumentUnchanged: false
796
381
  },
797
- ["_id", "options"]
382
+ ["_id", "pipeline"]
798
383
  );
799
384
  sideEffects?.onError?.(err);
800
385
  throw transformedError;
801
386
  }
802
387
  }
803
- async function moveCard2(cardId, stageId, options) {
804
- const { httpClient, sideEffects } = arguments[3];
388
+ async function deletePipeline2(pipelineId) {
389
+ const { httpClient, sideEffects } = arguments[1];
805
390
  const payload = renameKeysFromSDKRequestToRESTRequest({
806
- cardId,
807
- stageId,
808
- revision: options?.revision,
809
- outcome: options?.outcome
391
+ pipelineId
810
392
  });
811
- const reqOpts = moveCard(payload);
393
+ const reqOpts = deletePipeline(payload);
812
394
  sideEffects?.onSiteCall?.();
813
395
  try {
814
396
  const result = await httpClient.request(reqOpts);
@@ -819,47 +401,20 @@ async function moveCard2(cardId, stageId, options) {
819
401
  err,
820
402
  {
821
403
  spreadPathsToArguments: {},
822
- explicitPathsToArguments: {
823
- cardId: "$[0]",
824
- stageId: "$[1]",
825
- revision: "$[2].revision",
826
- outcome: "$[2].outcome"
827
- },
828
- singleArgumentUnchanged: false
829
- },
830
- ["cardId", "stageId", "options"]
831
- );
832
- sideEffects?.onError?.(err);
833
- throw transformedError;
834
- }
835
- }
836
- async function deleteCard2(cardId) {
837
- const { httpClient, sideEffects } = arguments[1];
838
- const payload = renameKeysFromSDKRequestToRESTRequest({ cardId });
839
- const reqOpts = deleteCard(payload);
840
- sideEffects?.onSiteCall?.();
841
- try {
842
- const result = await httpClient.request(reqOpts);
843
- sideEffects?.onSuccess?.(result);
844
- } catch (err) {
845
- const transformedError = sdkTransformError(
846
- err,
847
- {
848
- spreadPathsToArguments: {},
849
- explicitPathsToArguments: { cardId: "$[0]" },
404
+ explicitPathsToArguments: { pipelineId: "$[0]" },
850
405
  singleArgumentUnchanged: false
851
406
  },
852
- ["cardId"]
407
+ ["pipelineId"]
853
408
  );
854
409
  sideEffects?.onError?.(err);
855
410
  throw transformedError;
856
411
  }
857
412
  }
858
- function queryCards2() {
413
+ function queryPipelines2() {
859
414
  const { httpClient, sideEffects } = arguments[0];
860
415
  return queryBuilder({
861
416
  func: async (payload) => {
862
- const reqOpts = queryCards(payload);
417
+ const reqOpts = queryPipelines(payload);
863
418
  sideEffects?.onSiteCall?.();
864
419
  try {
865
420
  const result = await httpClient.request(reqOpts);
@@ -882,7 +437,7 @@ function queryCards2() {
882
437
  transformPaths2(data, [])
883
438
  );
884
439
  return {
885
- items: transformedData?.cards,
440
+ items: transformedData?.pipelines,
886
441
  pagingMetadata: transformedData?.pagingMetadata
887
442
  };
888
443
  },
@@ -898,10 +453,10 @@ function queryCards2() {
898
453
  transformationPaths: {}
899
454
  });
900
455
  }
901
- async function typedQueryCards(query) {
456
+ async function typedQueryPipelines(query) {
902
457
  const { httpClient, sideEffects } = arguments[1];
903
458
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
904
- const reqOpts = queryCards(payload);
459
+ const reqOpts = queryPipelines(payload);
905
460
  sideEffects?.onSiteCall?.();
906
461
  try {
907
462
  const result = await httpClient.request(reqOpts);
@@ -924,163 +479,17 @@ async function typedQueryCards(query) {
924
479
  var utils = {
925
480
  query: {
926
481
  ...createQueryUtils()
927
- },
928
- search: {
929
- ...createSearchUtils()
930
482
  }
931
483
  };
932
- async function searchCards2(search, options) {
933
- const { httpClient, sideEffects } = arguments[2];
934
- const payload = renameKeysFromSDKRequestToRESTRequest({
935
- search,
936
- nameFormat: options?.nameFormat
937
- });
938
- const reqOpts = searchCards(payload);
939
- sideEffects?.onSiteCall?.();
940
- try {
941
- const result = await httpClient.request(reqOpts);
942
- sideEffects?.onSuccess?.(result);
943
- return renameKeysFromRESTResponseToSDKResponse(result.data);
944
- } catch (err) {
945
- const transformedError = sdkTransformError(
946
- err,
947
- {
948
- spreadPathsToArguments: {},
949
- explicitPathsToArguments: {
950
- search: "$[0]",
951
- nameFormat: "$[1].nameFormat"
952
- },
953
- singleArgumentUnchanged: false
954
- },
955
- ["search", "options"]
956
- );
957
- sideEffects?.onError?.(err);
958
- throw transformedError;
959
- }
960
- }
961
- async function searchCardsByStage2(pipelineId, options) {
962
- const { httpClient, sideEffects } = arguments[2];
963
- const payload = renameKeysFromSDKRequestToRESTRequest({
964
- pipelineId,
965
- stageIds: options?.stageIds,
966
- search: options?.search,
967
- nameFormat: options?.nameFormat
968
- });
969
- const reqOpts = searchCardsByStage(payload);
970
- sideEffects?.onSiteCall?.();
971
- try {
972
- const result = await httpClient.request(reqOpts);
973
- sideEffects?.onSuccess?.(result);
974
- return renameKeysFromRESTResponseToSDKResponse(result.data);
975
- } catch (err) {
976
- const transformedError = sdkTransformError(
977
- err,
978
- {
979
- spreadPathsToArguments: {},
980
- explicitPathsToArguments: {
981
- pipelineId: "$[0]",
982
- stageIds: "$[1].stageIds",
983
- search: "$[1].search",
984
- nameFormat: "$[1].nameFormat"
985
- },
986
- singleArgumentUnchanged: false
987
- },
988
- ["pipelineId", "options"]
989
- );
990
- sideEffects?.onError?.(err);
991
- throw transformedError;
992
- }
993
- }
994
- async function bulkCreateCards2(cards, options) {
995
- const { httpClient, sideEffects } = arguments[2];
996
- const payload = renameKeysFromSDKRequestToRESTRequest({
997
- cards,
998
- returnEntity: options?.returnEntity
999
- });
1000
- const reqOpts = bulkCreateCards(payload);
1001
- sideEffects?.onSiteCall?.();
1002
- try {
1003
- const result = await httpClient.request(reqOpts);
1004
- sideEffects?.onSuccess?.(result);
1005
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1006
- } catch (err) {
1007
- const transformedError = sdkTransformError(
1008
- err,
1009
- {
1010
- spreadPathsToArguments: {},
1011
- explicitPathsToArguments: {
1012
- cards: "$[0]",
1013
- returnEntity: "$[1].returnEntity"
1014
- },
1015
- singleArgumentUnchanged: false
1016
- },
1017
- ["cards", "options"]
1018
- );
1019
- sideEffects?.onError?.(err);
1020
- throw transformedError;
1021
- }
1022
- }
1023
- async function bulkUpdateCards2(cards, options) {
1024
- const { httpClient, sideEffects } = arguments[2];
1025
- const payload = renameKeysFromSDKRequestToRESTRequest({
1026
- cards,
1027
- returnEntity: options?.returnEntity
1028
- });
1029
- const reqOpts = bulkUpdateCards(payload);
1030
- sideEffects?.onSiteCall?.();
1031
- try {
1032
- const result = await httpClient.request(reqOpts);
1033
- sideEffects?.onSuccess?.(result);
1034
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1035
- } catch (err) {
1036
- const transformedError = sdkTransformError(
1037
- err,
1038
- {
1039
- spreadPathsToArguments: {},
1040
- explicitPathsToArguments: {
1041
- cards: "$[0]",
1042
- returnEntity: "$[1].returnEntity"
1043
- },
1044
- singleArgumentUnchanged: false
1045
- },
1046
- ["cards", "options"]
1047
- );
1048
- sideEffects?.onError?.(err);
1049
- throw transformedError;
1050
- }
1051
- }
1052
- async function bulkDeleteCards2(cardIds) {
1053
- const { httpClient, sideEffects } = arguments[1];
1054
- const payload = renameKeysFromSDKRequestToRESTRequest({ cardIds });
1055
- const reqOpts = bulkDeleteCards(payload);
1056
- sideEffects?.onSiteCall?.();
1057
- try {
1058
- const result = await httpClient.request(reqOpts);
1059
- sideEffects?.onSuccess?.(result);
1060
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1061
- } catch (err) {
1062
- const transformedError = sdkTransformError(
1063
- err,
1064
- {
1065
- spreadPathsToArguments: {},
1066
- explicitPathsToArguments: { cardIds: "$[0]" },
1067
- singleArgumentUnchanged: false
1068
- },
1069
- ["cardIds"]
1070
- );
1071
- sideEffects?.onError?.(err);
1072
- throw transformedError;
1073
- }
1074
- }
1075
- async function bulkUpdateCardTags2(cardIds, options) {
484
+ async function bulkUpdatePipelineTags2(pipelineIds, options) {
1076
485
  const { httpClient, sideEffects } = arguments[2];
1077
486
  const payload = renameKeysFromSDKRequestToRESTRequest({
1078
- cardIds,
487
+ pipelineIds,
1079
488
  assignTags: options?.assignTags,
1080
489
  unassignTags: options?.unassignTags,
1081
490
  returnEntity: options?.returnEntity
1082
491
  });
1083
- const reqOpts = bulkUpdateCardTags(payload);
492
+ const reqOpts = bulkUpdatePipelineTags(payload);
1084
493
  sideEffects?.onSiteCall?.();
1085
494
  try {
1086
495
  const result = await httpClient.request(reqOpts);
@@ -1092,27 +501,28 @@ async function bulkUpdateCardTags2(cardIds, options) {
1092
501
  {
1093
502
  spreadPathsToArguments: {},
1094
503
  explicitPathsToArguments: {
1095
- cardIds: "$[0]",
504
+ pipelineIds: "$[0]",
1096
505
  assignTags: "$[1].assignTags",
1097
506
  unassignTags: "$[1].unassignTags",
1098
507
  returnEntity: "$[1].returnEntity"
1099
508
  },
1100
509
  singleArgumentUnchanged: false
1101
510
  },
1102
- ["cardIds", "options"]
511
+ ["pipelineIds", "options"]
1103
512
  );
1104
513
  sideEffects?.onError?.(err);
1105
514
  throw transformedError;
1106
515
  }
1107
516
  }
1108
- async function bulkUpdateCardTagsByFilter2(filter, options) {
517
+ async function bulkUpdatePipelineTagsByFilter2(filter, options) {
1109
518
  const { httpClient, sideEffects } = arguments[2];
1110
519
  const payload = renameKeysFromSDKRequestToRESTRequest({
1111
520
  filter,
1112
521
  assignTags: options?.assignTags,
1113
- unassignTags: options?.unassignTags
522
+ unassignTags: options?.unassignTags,
523
+ returnEntity: options?.returnEntity
1114
524
  });
1115
- const reqOpts = bulkUpdateCardTagsByFilter(payload);
525
+ const reqOpts = bulkUpdatePipelineTagsByFilter(payload);
1116
526
  sideEffects?.onSiteCall?.();
1117
527
  try {
1118
528
  const result = await httpClient.request(reqOpts);
@@ -1126,7 +536,8 @@ async function bulkUpdateCardTagsByFilter2(filter, options) {
1126
536
  explicitPathsToArguments: {
1127
537
  filter: "$[0]",
1128
538
  assignTags: "$[1].assignTags",
1129
- unassignTags: "$[1].unassignTags"
539
+ unassignTags: "$[1].unassignTags",
540
+ returnEntity: "$[1].returnEntity"
1130
541
  },
1131
542
  singleArgumentUnchanged: false
1132
543
  },
@@ -1137,135 +548,67 @@ async function bulkUpdateCardTagsByFilter2(filter, options) {
1137
548
  }
1138
549
  }
1139
550
 
1140
- // src/crm-pipelines-v1-card-pipelines.public.ts
1141
- function createCard3(httpClient) {
1142
- return (options) => createCard2(
1143
- options,
551
+ // src/crm-pipelines-v1-pipeline-pipelines.public.ts
552
+ function createPipeline3(httpClient) {
553
+ return (pipeline) => createPipeline2(
554
+ pipeline,
1144
555
  // @ts-ignore
1145
556
  { httpClient }
1146
557
  );
1147
558
  }
1148
- function getCard3(httpClient) {
1149
- return (cardId) => getCard2(
1150
- cardId,
559
+ function getPipeline3(httpClient) {
560
+ return (pipelineId) => getPipeline2(
561
+ pipelineId,
1151
562
  // @ts-ignore
1152
563
  { httpClient }
1153
564
  );
1154
565
  }
1155
- function updateCard3(httpClient) {
1156
- return (_id, options) => updateCard2(
566
+ function updatePipeline3(httpClient) {
567
+ return (_id, pipeline) => updatePipeline2(
1157
568
  _id,
1158
- options,
1159
- // @ts-ignore
1160
- { httpClient }
1161
- );
1162
- }
1163
- function moveCard3(httpClient) {
1164
- return (cardId, stageId, options) => moveCard2(
1165
- cardId,
1166
- stageId,
1167
- options,
569
+ pipeline,
1168
570
  // @ts-ignore
1169
571
  { httpClient }
1170
572
  );
1171
573
  }
1172
- function deleteCard3(httpClient) {
1173
- return (cardId) => deleteCard2(
1174
- cardId,
1175
- // @ts-ignore
1176
- { httpClient }
1177
- );
1178
- }
1179
- function queryCards3(httpClient) {
1180
- return () => queryCards2(
1181
- // @ts-ignore
1182
- { httpClient }
1183
- );
1184
- }
1185
- function typedQueryCards2(httpClient) {
1186
- return (query) => typedQueryCards(
1187
- query,
1188
- // @ts-ignore
1189
- { httpClient }
1190
- );
1191
- }
1192
- function searchCards3(httpClient) {
1193
- return (search, options) => searchCards2(
1194
- search,
1195
- options,
1196
- // @ts-ignore
1197
- { httpClient }
1198
- );
1199
- }
1200
- function searchCardsByStage3(httpClient) {
1201
- return (pipelineId, options) => searchCardsByStage2(
574
+ function deletePipeline3(httpClient) {
575
+ return (pipelineId) => deletePipeline2(
1202
576
  pipelineId,
1203
- options,
1204
- // @ts-ignore
1205
- { httpClient }
1206
- );
1207
- }
1208
- function bulkCreateCards3(httpClient) {
1209
- return (cards, options) => bulkCreateCards2(
1210
- cards,
1211
- options,
1212
577
  // @ts-ignore
1213
578
  { httpClient }
1214
579
  );
1215
580
  }
1216
- function bulkUpdateCards3(httpClient) {
1217
- return (cards, options) => bulkUpdateCards2(
1218
- cards,
1219
- options,
581
+ function queryPipelines3(httpClient) {
582
+ return () => queryPipelines2(
1220
583
  // @ts-ignore
1221
584
  { httpClient }
1222
585
  );
1223
586
  }
1224
- function bulkDeleteCards3(httpClient) {
1225
- return (cardIds) => bulkDeleteCards2(
1226
- cardIds,
587
+ function typedQueryPipelines2(httpClient) {
588
+ return (query) => typedQueryPipelines(
589
+ query,
1227
590
  // @ts-ignore
1228
591
  { httpClient }
1229
592
  );
1230
593
  }
1231
- function bulkUpdateCardTags3(httpClient) {
1232
- return (cardIds, options) => bulkUpdateCardTags2(
1233
- cardIds,
594
+ function bulkUpdatePipelineTags3(httpClient) {
595
+ return (pipelineIds, options) => bulkUpdatePipelineTags2(
596
+ pipelineIds,
1234
597
  options,
1235
598
  // @ts-ignore
1236
599
  { httpClient }
1237
600
  );
1238
601
  }
1239
- function bulkUpdateCardTagsByFilter3(httpClient) {
1240
- return (filter, options) => bulkUpdateCardTagsByFilter2(
602
+ function bulkUpdatePipelineTagsByFilter3(httpClient) {
603
+ return (filter, options) => bulkUpdatePipelineTagsByFilter2(
1241
604
  filter,
1242
605
  options,
1243
606
  // @ts-ignore
1244
607
  { httpClient }
1245
608
  );
1246
609
  }
1247
- var onCardAssigned = EventDefinition(
1248
- "wix.crm.pipelines.v1.card_assigned",
1249
- true,
1250
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1251
- transformPaths3(event, [
1252
- {
1253
- transformFn: transformRESTTimestampToSDKTimestamp2,
1254
- paths: [
1255
- { path: "data.card.createdDate" },
1256
- { path: "data.card.updatedDate" },
1257
- { path: "data.card.stageUpdatedDate" },
1258
- { path: "data.card.dueDate" },
1259
- { path: "data.card.staleDate" },
1260
- { path: "data.card.linkedEntities.linkedDate" },
1261
- { path: "metadata.eventTime" }
1262
- ]
1263
- }
1264
- ])
1265
- )
1266
- )();
1267
- var onCardCreated = EventDefinition(
1268
- "wix.crm.pipelines.v1.card_created",
610
+ var onPipelineCreated = EventDefinition(
611
+ "wix.crm.pipelines.v1.pipeline_created",
1269
612
  true,
1270
613
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1271
614
  transformPaths3(event, [
@@ -1274,18 +617,14 @@ var onCardCreated = EventDefinition(
1274
617
  paths: [
1275
618
  { path: "entity.createdDate" },
1276
619
  { path: "entity.updatedDate" },
1277
- { path: "entity.stageUpdatedDate" },
1278
- { path: "entity.dueDate" },
1279
- { path: "entity.staleDate" },
1280
- { path: "entity.linkedEntities.linkedDate" },
1281
620
  { path: "metadata.eventTime" }
1282
621
  ]
1283
622
  }
1284
623
  ])
1285
624
  )
1286
625
  )();
1287
- var onCardDeleted = EventDefinition(
1288
- "wix.crm.pipelines.v1.card_deleted",
626
+ var onPipelineDeleted = EventDefinition(
627
+ "wix.crm.pipelines.v1.pipeline_deleted",
1289
628
  true,
1290
629
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1291
630
  transformPaths3(event, [
@@ -1294,78 +633,14 @@ var onCardDeleted = EventDefinition(
1294
633
  paths: [
1295
634
  { path: "entity.createdDate" },
1296
635
  { path: "entity.updatedDate" },
1297
- { path: "entity.stageUpdatedDate" },
1298
- { path: "entity.dueDate" },
1299
- { path: "entity.staleDate" },
1300
- { path: "entity.linkedEntities.linkedDate" },
1301
- { path: "metadata.eventTime" }
1302
- ]
1303
- }
1304
- ])
1305
- )
1306
- )();
1307
- var onCardMoved = EventDefinition(
1308
- "wix.crm.pipelines.v1.card_moved",
1309
- true,
1310
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1311
- transformPaths3(event, [
1312
- {
1313
- transformFn: transformRESTTimestampToSDKTimestamp2,
1314
- paths: [
1315
- { path: "data.card.createdDate" },
1316
- { path: "data.card.updatedDate" },
1317
- { path: "data.card.stageUpdatedDate" },
1318
- { path: "data.card.dueDate" },
1319
- { path: "data.card.staleDate" },
1320
- { path: "data.card.linkedEntities.linkedDate" },
1321
- { path: "metadata.eventTime" }
1322
- ]
1323
- }
1324
- ])
1325
- )
1326
- )();
1327
- var onCardOverdue = EventDefinition(
1328
- "wix.crm.pipelines.v1.card_overdue",
1329
- true,
1330
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1331
- transformPaths3(event, [
1332
- {
1333
- transformFn: transformRESTTimestampToSDKTimestamp2,
1334
- paths: [
1335
- { path: "data.card.createdDate" },
1336
- { path: "data.card.updatedDate" },
1337
- { path: "data.card.stageUpdatedDate" },
1338
- { path: "data.card.dueDate" },
1339
- { path: "data.card.staleDate" },
1340
- { path: "data.card.linkedEntities.linkedDate" },
1341
- { path: "metadata.eventTime" }
1342
- ]
1343
- }
1344
- ])
1345
- )
1346
- )();
1347
- var onCardStale = EventDefinition(
1348
- "wix.crm.pipelines.v1.card_stale",
1349
- true,
1350
- (event) => renameKeysFromRESTResponseToSDKResponse2(
1351
- transformPaths3(event, [
1352
- {
1353
- transformFn: transformRESTTimestampToSDKTimestamp2,
1354
- paths: [
1355
- { path: "data.card.createdDate" },
1356
- { path: "data.card.updatedDate" },
1357
- { path: "data.card.stageUpdatedDate" },
1358
- { path: "data.card.dueDate" },
1359
- { path: "data.card.staleDate" },
1360
- { path: "data.card.linkedEntities.linkedDate" },
1361
636
  { path: "metadata.eventTime" }
1362
637
  ]
1363
638
  }
1364
639
  ])
1365
640
  )
1366
641
  )();
1367
- var onCardUpdated = EventDefinition(
1368
- "wix.crm.pipelines.v1.card_updated",
642
+ var onPipelineUpdated = EventDefinition(
643
+ "wix.crm.pipelines.v1.pipeline_updated",
1369
644
  true,
1370
645
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1371
646
  transformPaths3(event, [
@@ -1374,31 +649,23 @@ var onCardUpdated = EventDefinition(
1374
649
  paths: [
1375
650
  { path: "entity.createdDate" },
1376
651
  { path: "entity.updatedDate" },
1377
- { path: "entity.stageUpdatedDate" },
1378
- { path: "entity.dueDate" },
1379
- { path: "entity.staleDate" },
1380
- { path: "entity.linkedEntities.linkedDate" },
1381
652
  { path: "metadata.eventTime" },
1382
653
  { path: "modifiedFields.createdDate" },
1383
- { path: "modifiedFields.updatedDate" },
1384
- { path: "modifiedFields.stageUpdatedDate" },
1385
- { path: "modifiedFields.dueDate" },
1386
- { path: "modifiedFields.staleDate" },
1387
- { path: "modifiedFields.linkedEntities.linkedDate" }
654
+ { path: "modifiedFields.updatedDate" }
1388
655
  ]
1389
656
  }
1390
657
  ])
1391
658
  )
1392
659
  )();
1393
660
 
1394
- // src/crm-pipelines-v1-card-pipelines.context.ts
661
+ // src/crm-pipelines-v1-pipeline-pipelines.context.ts
1395
662
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1396
663
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1397
664
  import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
1398
- function customQueryCards(httpClient) {
665
+ function customQueryPipelines(httpClient) {
1399
666
  const router = createQueryOverloadRouter({
1400
- builderQueryFunction: () => queryCards3(httpClient)(),
1401
- typedQueryFunction: (query) => typedQueryCards2(httpClient)(query),
667
+ builderQueryFunction: () => queryPipelines3(httpClient)(),
668
+ typedQueryFunction: (query) => typedQueryPipelines2(httpClient)(query),
1402
669
  hasOptionsParameter: false
1403
670
  });
1404
671
  function overloadedQuery(query) {
@@ -1406,60 +673,30 @@ function customQueryCards(httpClient) {
1406
673
  }
1407
674
  return overloadedQuery;
1408
675
  }
1409
- var createCard4 = /* @__PURE__ */ createRESTModule(createCard3);
1410
- var getCard4 = /* @__PURE__ */ createRESTModule(getCard3);
1411
- var updateCard4 = /* @__PURE__ */ createRESTModule(updateCard3);
1412
- var moveCard4 = /* @__PURE__ */ createRESTModule(moveCard3);
1413
- var deleteCard4 = /* @__PURE__ */ createRESTModule(deleteCard3);
1414
- var searchCards4 = /* @__PURE__ */ createRESTModule(searchCards3);
1415
- var searchCardsByStage4 = /* @__PURE__ */ createRESTModule(searchCardsByStage3);
1416
- var bulkCreateCards4 = /* @__PURE__ */ createRESTModule(bulkCreateCards3);
1417
- var bulkUpdateCards4 = /* @__PURE__ */ createRESTModule(bulkUpdateCards3);
1418
- var bulkDeleteCards4 = /* @__PURE__ */ createRESTModule(bulkDeleteCards3);
1419
- var bulkUpdateCardTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateCardTags3);
1420
- var bulkUpdateCardTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateCardTagsByFilter3);
1421
- var queryCards4 = /* @__PURE__ */ createRESTModule(customQueryCards);
1422
- var onCardAssigned2 = createEventModule(onCardAssigned);
1423
- var onCardCreated2 = createEventModule(onCardCreated);
1424
- var onCardDeleted2 = createEventModule(onCardDeleted);
1425
- var onCardMoved2 = createEventModule(onCardMoved);
1426
- var onCardOverdue2 = createEventModule(onCardOverdue);
1427
- var onCardStale2 = createEventModule(onCardStale);
1428
- var onCardUpdated2 = createEventModule(onCardUpdated);
676
+ var createPipeline4 = /* @__PURE__ */ createRESTModule(createPipeline3);
677
+ var getPipeline4 = /* @__PURE__ */ createRESTModule(getPipeline3);
678
+ var updatePipeline4 = /* @__PURE__ */ createRESTModule(updatePipeline3);
679
+ var deletePipeline4 = /* @__PURE__ */ createRESTModule(deletePipeline3);
680
+ var bulkUpdatePipelineTags4 = /* @__PURE__ */ createRESTModule(bulkUpdatePipelineTags3);
681
+ var bulkUpdatePipelineTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdatePipelineTagsByFilter3);
682
+ var queryPipelines4 = /* @__PURE__ */ createRESTModule(customQueryPipelines);
683
+ var onPipelineCreated2 = createEventModule(onPipelineCreated);
684
+ var onPipelineDeleted2 = createEventModule(onPipelineDeleted);
685
+ var onPipelineUpdated2 = createEventModule(onPipelineUpdated);
1429
686
  export {
1430
- AggregationType,
1431
- Interval,
1432
- MissingValues,
1433
- Mode,
1434
- NameFormat,
1435
- NestedAggregationType,
1436
687
  Outcome,
1437
- Priority,
1438
- ScalarType,
1439
- SortDirection,
1440
688
  SortOrder,
1441
- SortType,
1442
689
  WebhookIdentityType,
1443
- bulkCreateCards4 as bulkCreateCards,
1444
- bulkDeleteCards4 as bulkDeleteCards,
1445
- bulkUpdateCardTags4 as bulkUpdateCardTags,
1446
- bulkUpdateCardTagsByFilter4 as bulkUpdateCardTagsByFilter,
1447
- bulkUpdateCards4 as bulkUpdateCards,
1448
- createCard4 as createCard,
1449
- deleteCard4 as deleteCard,
1450
- getCard4 as getCard,
1451
- moveCard4 as moveCard,
1452
- onCardAssigned2 as onCardAssigned,
1453
- onCardCreated2 as onCardCreated,
1454
- onCardDeleted2 as onCardDeleted,
1455
- onCardMoved2 as onCardMoved,
1456
- onCardOverdue2 as onCardOverdue,
1457
- onCardStale2 as onCardStale,
1458
- onCardUpdated2 as onCardUpdated,
1459
- queryCards4 as queryCards,
1460
- searchCards4 as searchCards,
1461
- searchCardsByStage4 as searchCardsByStage,
1462
- updateCard4 as updateCard,
690
+ bulkUpdatePipelineTags4 as bulkUpdatePipelineTags,
691
+ bulkUpdatePipelineTagsByFilter4 as bulkUpdatePipelineTagsByFilter,
692
+ createPipeline4 as createPipeline,
693
+ deletePipeline4 as deletePipeline,
694
+ getPipeline4 as getPipeline,
695
+ onPipelineCreated2 as onPipelineCreated,
696
+ onPipelineDeleted2 as onPipelineDeleted,
697
+ onPipelineUpdated2 as onPipelineUpdated,
698
+ queryPipelines4 as queryPipelines,
699
+ updatePipeline4 as updatePipeline,
1463
700
  utils
1464
701
  };
1465
702
  //# sourceMappingURL=index.mjs.map