@wix/auto_sdk_online-programs_sections 1.0.13 → 1.0.15

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 (49) hide show
  1. package/build/cjs/index.d.ts +61 -31
  2. package/build/cjs/index.js +47 -26
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +220 -120
  5. package/build/cjs/index.typings.js +41 -21
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +117 -72
  8. package/build/cjs/meta.js +35 -18
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +14 -5
  11. package/build/cjs/schemas.js +335 -212
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +61 -31
  14. package/build/es/index.mjs +46 -25
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +220 -120
  17. package/build/es/index.typings.mjs +40 -20
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +117 -72
  20. package/build/es/meta.mjs +34 -17
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +14 -5
  23. package/build/es/schemas.mjs +333 -210
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +61 -31
  26. package/build/internal/cjs/index.js +47 -26
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +220 -120
  29. package/build/internal/cjs/index.typings.js +41 -21
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +117 -72
  32. package/build/internal/cjs/meta.js +35 -18
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +14 -5
  35. package/build/internal/cjs/schemas.js +335 -212
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +61 -31
  38. package/build/internal/es/index.mjs +46 -25
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +220 -120
  41. package/build/internal/es/index.typings.mjs +40 -20
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +117 -72
  44. package/build/internal/es/meta.mjs +34 -17
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +14 -5
  47. package/build/internal/es/schemas.mjs +333 -210
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -101,6 +101,14 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
101
101
  {
102
102
  srcPath: "/program-sections-service",
103
103
  destPath: ""
104
+ },
105
+ {
106
+ srcPath: "/online-programs/v3/sections",
107
+ destPath: "/v3/sections"
108
+ },
109
+ {
110
+ srcPath: "/online-programs/v3/bulk/sections",
111
+ destPath: "/v3/bulk/sections"
104
112
  }
105
113
  ]
106
114
  };
@@ -190,8 +198,8 @@ function createSection(payload) {
190
198
  }
191
199
  return __createSection;
192
200
  }
193
- function bulkCreateSection(payload) {
194
- function __bulkCreateSection({ host }) {
201
+ function bulkCreateSections(payload) {
202
+ function __bulkCreateSections({ host }) {
195
203
  const serializedData = transformPaths(payload, [
196
204
  {
197
205
  transformFn: transformSDKTimestampToRESTTimestamp,
@@ -227,7 +235,7 @@ function bulkCreateSection(payload) {
227
235
  const metadata = {
228
236
  entityFqdn: "wix.online_programs.v3.section",
229
237
  method: "POST",
230
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
238
+ methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections",
231
239
  packageName: PACKAGE_NAME,
232
240
  migrationOptions: {
233
241
  optInTransformResponse: true
@@ -277,10 +285,10 @@ function bulkCreateSection(payload) {
277
285
  };
278
286
  return metadata;
279
287
  }
280
- return __bulkCreateSection;
288
+ return __bulkCreateSections;
281
289
  }
282
- function bulkCreateSectionMigration(payload) {
283
- function __bulkCreateSectionMigration({ host }) {
290
+ function bulkCreateSection(payload) {
291
+ function __bulkCreateSection({ host }) {
284
292
  const serializedData = transformPaths(payload, [
285
293
  {
286
294
  transformFn: transformSDKTimestampToRESTTimestamp,
@@ -316,13 +324,13 @@ function bulkCreateSectionMigration(payload) {
316
324
  const metadata = {
317
325
  entityFqdn: "wix.online_programs.v3.section",
318
326
  method: "POST",
319
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration",
327
+ methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
320
328
  packageName: PACKAGE_NAME,
321
329
  migrationOptions: {
322
330
  optInTransformResponse: true
323
331
  },
324
332
  url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
325
- protoPath: "/v3/bulk/sections/create/migration",
333
+ protoPath: "/v3/bulk/sections/create-deprecated",
326
334
  data: serializedData,
327
335
  host
328
336
  }),
@@ -366,7 +374,7 @@ function bulkCreateSectionMigration(payload) {
366
374
  };
367
375
  return metadata;
368
376
  }
369
- return __bulkCreateSectionMigration;
377
+ return __bulkCreateSection;
370
378
  }
371
379
  function getSection(payload) {
372
380
  function __getSection({ host }) {
@@ -533,6 +541,15 @@ function deleteSection(payload) {
533
541
  }
534
542
  function querySections(payload) {
535
543
  function __querySections({ host }) {
544
+ const serializedData = transformPaths(payload, [
545
+ {
546
+ transformFn: transformSDKFloatToRESTFloat,
547
+ paths: [
548
+ { path: "query.sort.origin.latitude" },
549
+ { path: "query.sort.origin.longitude" }
550
+ ]
551
+ }
552
+ ]);
536
553
  const metadata = {
537
554
  entityFqdn: "wix.online_programs.v3.section",
538
555
  method: "POST",
@@ -543,10 +560,10 @@ function querySections(payload) {
543
560
  },
544
561
  url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
545
562
  protoPath: "/v3/sections/query",
546
- data: payload,
563
+ data: serializedData,
547
564
  host
548
565
  }),
549
- data: payload,
566
+ data: serializedData,
550
567
  transformResponse: (payload2) => transformPaths(payload2, [
551
568
  {
552
569
  transformFn: transformRESTTimestampToSDKTimestamp,
@@ -912,7 +929,7 @@ async function createSection2(section, options) {
912
929
  throw transformedError;
913
930
  }
914
931
  }
915
- async function bulkCreateSection2(sections, options) {
932
+ async function bulkCreateSections2(sections, options) {
916
933
  const { httpClient, sideEffects } = arguments[2];
917
934
  const payload = transformPaths2(
918
935
  renameKeysFromSDKRequestToRESTRequest({
@@ -930,7 +947,7 @@ async function bulkCreateSection2(sections, options) {
930
947
  }
931
948
  ]
932
949
  );
933
- const reqOpts = bulkCreateSection(payload);
950
+ const reqOpts = bulkCreateSections(payload);
934
951
  sideEffects?.onSiteCall?.();
935
952
  try {
936
953
  const result = await httpClient.request(reqOpts);
@@ -961,10 +978,13 @@ async function bulkCreateSection2(sections, options) {
961
978
  throw transformedError;
962
979
  }
963
980
  }
964
- async function bulkCreateSectionMigration2(sections) {
965
- const { httpClient, sideEffects } = arguments[1];
981
+ async function bulkCreateSection2(sections, options) {
982
+ const { httpClient, sideEffects } = arguments[2];
966
983
  const payload = transformPaths2(
967
- renameKeysFromSDKRequestToRESTRequest({ sections }),
984
+ renameKeysFromSDKRequestToRESTRequest({
985
+ sections,
986
+ fields: options?.fields
987
+ }),
968
988
  [
969
989
  {
970
990
  transformFn: transformSDKImageToRESTImage,
@@ -976,7 +996,7 @@ async function bulkCreateSectionMigration2(sections) {
976
996
  }
977
997
  ]
978
998
  );
979
- const reqOpts = bulkCreateSectionMigration(payload);
999
+ const reqOpts = bulkCreateSection(payload);
980
1000
  sideEffects?.onSiteCall?.();
981
1001
  try {
982
1002
  const result = await httpClient.request(reqOpts);
@@ -998,10 +1018,10 @@ async function bulkCreateSectionMigration2(sections) {
998
1018
  err,
999
1019
  {
1000
1020
  spreadPathsToArguments: {},
1001
- explicitPathsToArguments: { sections: "$[0]" },
1021
+ explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
1002
1022
  singleArgumentUnchanged: false
1003
1023
  },
1004
- ["sections"]
1024
+ ["sections", "options"]
1005
1025
  );
1006
1026
  sideEffects?.onError?.(err);
1007
1027
  throw transformedError;
@@ -1397,7 +1417,7 @@ export {
1397
1417
  State,
1398
1418
  WebhookIdentityType,
1399
1419
  bulkCreateSection2 as bulkCreateSection,
1400
- bulkCreateSectionMigration2 as bulkCreateSectionMigration,
1420
+ bulkCreateSections2 as bulkCreateSections,
1401
1421
  cloneSection2 as cloneSection,
1402
1422
  createSection2 as createSection,
1403
1423
  deleteSection2 as deleteSection,