@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
@@ -29,7 +29,7 @@ __export(index_typings_exports, {
29
29
  State: () => State,
30
30
  WebhookIdentityType: () => WebhookIdentityType,
31
31
  bulkCreateSection: () => bulkCreateSection2,
32
- bulkCreateSectionMigration: () => bulkCreateSectionMigration2,
32
+ bulkCreateSections: () => bulkCreateSections2,
33
33
  cloneSection: () => cloneSection2,
34
34
  createSection: () => createSection2,
35
35
  deleteSection: () => deleteSection2,
@@ -144,6 +144,14 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
144
144
  {
145
145
  srcPath: "/program-sections-service",
146
146
  destPath: ""
147
+ },
148
+ {
149
+ srcPath: "/online-programs/v3/sections",
150
+ destPath: "/v3/sections"
151
+ },
152
+ {
153
+ srcPath: "/online-programs/v3/bulk/sections",
154
+ destPath: "/v3/bulk/sections"
147
155
  }
148
156
  ]
149
157
  };
@@ -233,8 +241,8 @@ function createSection(payload) {
233
241
  }
234
242
  return __createSection;
235
243
  }
236
- function bulkCreateSection(payload) {
237
- function __bulkCreateSection({ host }) {
244
+ function bulkCreateSections(payload) {
245
+ function __bulkCreateSections({ host }) {
238
246
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
239
247
  {
240
248
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
@@ -270,7 +278,7 @@ function bulkCreateSection(payload) {
270
278
  const metadata = {
271
279
  entityFqdn: "wix.online_programs.v3.section",
272
280
  method: "POST",
273
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
281
+ methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections",
274
282
  packageName: PACKAGE_NAME,
275
283
  migrationOptions: {
276
284
  optInTransformResponse: true
@@ -320,10 +328,10 @@ function bulkCreateSection(payload) {
320
328
  };
321
329
  return metadata;
322
330
  }
323
- return __bulkCreateSection;
331
+ return __bulkCreateSections;
324
332
  }
325
- function bulkCreateSectionMigration(payload) {
326
- function __bulkCreateSectionMigration({ host }) {
333
+ function bulkCreateSection(payload) {
334
+ function __bulkCreateSection({ host }) {
327
335
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
328
336
  {
329
337
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
@@ -359,13 +367,13 @@ function bulkCreateSectionMigration(payload) {
359
367
  const metadata = {
360
368
  entityFqdn: "wix.online_programs.v3.section",
361
369
  method: "POST",
362
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration",
370
+ methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
363
371
  packageName: PACKAGE_NAME,
364
372
  migrationOptions: {
365
373
  optInTransformResponse: true
366
374
  },
367
375
  url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
368
- protoPath: "/v3/bulk/sections/create/migration",
376
+ protoPath: "/v3/bulk/sections/create-deprecated",
369
377
  data: serializedData,
370
378
  host
371
379
  }),
@@ -409,7 +417,7 @@ function bulkCreateSectionMigration(payload) {
409
417
  };
410
418
  return metadata;
411
419
  }
412
- return __bulkCreateSectionMigration;
420
+ return __bulkCreateSection;
413
421
  }
414
422
  function getSection(payload) {
415
423
  function __getSection({ host }) {
@@ -576,6 +584,15 @@ function deleteSection(payload) {
576
584
  }
577
585
  function querySections(payload) {
578
586
  function __querySections({ host }) {
587
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
588
+ {
589
+ transformFn: import_float.transformSDKFloatToRESTFloat,
590
+ paths: [
591
+ { path: "query.sort.origin.latitude" },
592
+ { path: "query.sort.origin.longitude" }
593
+ ]
594
+ }
595
+ ]);
579
596
  const metadata = {
580
597
  entityFqdn: "wix.online_programs.v3.section",
581
598
  method: "POST",
@@ -586,10 +603,10 @@ function querySections(payload) {
586
603
  },
587
604
  url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
588
605
  protoPath: "/v3/sections/query",
589
- data: payload,
606
+ data: serializedData,
590
607
  host
591
608
  }),
592
- data: payload,
609
+ data: serializedData,
593
610
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
594
611
  {
595
612
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
@@ -955,7 +972,7 @@ async function createSection2(section, options) {
955
972
  throw transformedError;
956
973
  }
957
974
  }
958
- async function bulkCreateSection2(sections, options) {
975
+ async function bulkCreateSections2(sections, options) {
959
976
  const { httpClient, sideEffects } = arguments[2];
960
977
  const payload = (0, import_transform_paths2.transformPaths)(
961
978
  (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -973,7 +990,7 @@ async function bulkCreateSection2(sections, options) {
973
990
  }
974
991
  ]
975
992
  );
976
- const reqOpts = bulkCreateSection(payload);
993
+ const reqOpts = bulkCreateSections(payload);
977
994
  sideEffects?.onSiteCall?.();
978
995
  try {
979
996
  const result = await httpClient.request(reqOpts);
@@ -1004,10 +1021,13 @@ async function bulkCreateSection2(sections, options) {
1004
1021
  throw transformedError;
1005
1022
  }
1006
1023
  }
1007
- async function bulkCreateSectionMigration2(sections) {
1008
- const { httpClient, sideEffects } = arguments[1];
1024
+ async function bulkCreateSection2(sections, options) {
1025
+ const { httpClient, sideEffects } = arguments[2];
1009
1026
  const payload = (0, import_transform_paths2.transformPaths)(
1010
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ sections }),
1027
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1028
+ sections,
1029
+ fields: options?.fields
1030
+ }),
1011
1031
  [
1012
1032
  {
1013
1033
  transformFn: import_image.transformSDKImageToRESTImage,
@@ -1019,7 +1039,7 @@ async function bulkCreateSectionMigration2(sections) {
1019
1039
  }
1020
1040
  ]
1021
1041
  );
1022
- const reqOpts = bulkCreateSectionMigration(payload);
1042
+ const reqOpts = bulkCreateSection(payload);
1023
1043
  sideEffects?.onSiteCall?.();
1024
1044
  try {
1025
1045
  const result = await httpClient.request(reqOpts);
@@ -1041,10 +1061,10 @@ async function bulkCreateSectionMigration2(sections) {
1041
1061
  err,
1042
1062
  {
1043
1063
  spreadPathsToArguments: {},
1044
- explicitPathsToArguments: { sections: "$[0]" },
1064
+ explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
1045
1065
  singleArgumentUnchanged: false
1046
1066
  },
1047
- ["sections"]
1067
+ ["sections", "options"]
1048
1068
  );
1049
1069
  sideEffects?.onError?.(err);
1050
1070
  throw transformedError;
@@ -1441,7 +1461,7 @@ async function publishSection2(options) {
1441
1461
  State,
1442
1462
  WebhookIdentityType,
1443
1463
  bulkCreateSection,
1444
- bulkCreateSectionMigration,
1464
+ bulkCreateSections,
1445
1465
  cloneSection,
1446
1466
  createSection,
1447
1467
  deleteSection,