@wix/himalaya-cli 0.2003.0 → 0.2005.0

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 (127) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +33 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +1 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/options.d.ts +4 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/product-details.d.ts +58 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/types.generated.d.ts +2336 -26
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/addOns.generated.d.ts +169 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/attendance.generated.d.ts +150 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/attributeDefinition.generated.d.ts +124 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/attributeValue.generated.d.ts +107 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/availabilityCalendar.generated.d.ts +66 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/availabilityTimeSlots.generated.d.ts +115 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingFees.generated.d.ts +82 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingPolicies.generated.d.ts +174 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingPolicySnapshots.generated.d.ts +54 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookings.generated.d.ts +732 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/bookingsSettings.generated.d.ts +54 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/catalogSearch.generated.d.ts +158 -0
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/categories.generated.d.ts +74 -0
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/categoriesV2.generated.d.ts +122 -0
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/eventTimeSlots.generated.d.ts +76 -0
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/extendedBookings.generated.d.ts +239 -0
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/externalCalendars.generated.d.ts +229 -0
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/index.generated.d.ts +28 -0
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/multiServiceAvailabilityTimeSlots.generated.d.ts +97 -0
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/pricing.generated.d.ts +138 -0
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/relatedProducts.generated.d.ts +78 -0
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/resourceTypes.generated.d.ts +109 -0
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/resources.generated.d.ts +210 -0
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/serviceOptionsAndVariants.generated.d.ts +194 -0
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/services.generated.d.ts +642 -0
  31. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/staffMemberSettings.generated.d.ts +46 -0
  32. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/staffMembers.generated.d.ts +399 -0
  33. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/bookings/timeSlotsConfiguration.generated.d.ts +93 -0
  34. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/conferencing.generated.d.ts +200 -0
  35. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/eventViews.generated.d.ts +20 -0
  36. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/events.generated.d.ts +355 -0
  37. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/index.generated.d.ts +6 -0
  38. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/participations.generated.d.ts +98 -0
  39. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/scheduleTimeFrames.generated.d.ts +45 -0
  40. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/calendar/schedules.generated.d.ts +123 -0
  41. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/categories.generated.d.ts +15 -7
  42. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/comments.generated.d.ts +32 -2
  43. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/contentRevisions.generated.d.ts +27 -2
  44. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/widgets.generated.d.ts +20 -13
  45. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/abandonedCheckouts.generated.d.ts +215 -0
  46. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/backInStockNotifications.generated.d.ts +148 -0
  47. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/backInStockSettings.generated.d.ts +56 -0
  48. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/cart.generated.d.ts +380 -0
  49. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/cartV2.generated.d.ts +529 -0
  50. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkout.generated.d.ts +461 -0
  51. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkoutContent.generated.d.ts +27 -0
  52. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkoutSettings.generated.d.ts +137 -0
  53. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/checkoutTemplates.generated.d.ts +189 -0
  54. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/contactTaxDetails.generated.d.ts +185 -0
  55. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/currencies.generated.d.ts +62 -0
  56. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/currentCart.generated.d.ts +326 -0
  57. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/currentCartV2.generated.d.ts +442 -0
  58. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/deliveryProfile.generated.d.ts +399 -0
  59. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/deliverySolutions.generated.d.ts +110 -0
  60. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/discountRules.generated.d.ts +186 -0
  61. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/discountsCustomTrigger.generated.d.ts +22 -0
  62. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/draftOrders.generated.d.ts +877 -0
  63. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/draftSubscriptionContracts.generated.d.ts +301 -0
  64. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/ecommerceSettings.generated.d.ts +24 -0
  65. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/giftVouchers.generated.d.ts +73 -0
  66. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/index.generated.d.ts +45 -0
  67. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/localDeliveryOptions.generated.d.ts +99 -0
  68. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/manualTaxMappings.generated.d.ts +207 -0
  69. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderBilling.generated.d.ts +399 -0
  70. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderFulfillments.generated.d.ts +137 -0
  71. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderInvoices.generated.d.ts +80 -0
  72. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderPaymentRequests.generated.d.ts +171 -0
  73. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orderTransactions.generated.d.ts +167 -0
  74. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/orders.generated.d.ts +695 -0
  75. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/ordersSettings.generated.d.ts +39 -0
  76. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/recommendations.generated.d.ts +57 -0
  77. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/shippingOptions.generated.d.ts +144 -0
  78. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/shippoConfigurations.generated.d.ts +178 -0
  79. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/subscriptionContracts.generated.d.ts +209 -0
  80. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxCalculation.generated.d.ts +115 -0
  81. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxExemptGroups.generated.d.ts +218 -0
  82. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxGroups.generated.d.ts +140 -0
  83. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxRegions.generated.d.ts +126 -0
  84. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/taxSettings.generated.d.ts +38 -0
  85. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/tipSettings.generated.d.ts +116 -0
  86. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/tippableStaff.generated.d.ts +28 -0
  87. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/tips.generated.d.ts +221 -0
  88. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/totalsCalculator.generated.d.ts +141 -0
  89. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/ecom/wishlists.generated.d.ts +57 -0
  90. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/index.generated.d.ts +7 -0
  91. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/orders.generated.d.ts +368 -0
  92. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/planBenefits.generated.d.ts +94 -0
  93. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/plans.generated.d.ts +235 -0
  94. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/plansV3.generated.d.ts +266 -0
  95. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/pricingPlansSettings.generated.d.ts +48 -0
  96. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/pricing-plans/pricingVariantCategories.generated.d.ts +92 -0
  97. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/brandsV3.generated.d.ts +211 -0
  98. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/catalogImportsV3.generated.d.ts +382 -0
  99. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/catalogVersioning.generated.d.ts +17 -0
  100. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/collections.generated.d.ts +52 -0
  101. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/customizationsV3.generated.d.ts +292 -0
  102. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/index.generated.d.ts +18 -0
  103. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/infoSectionsV3.generated.d.ts +306 -0
  104. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/inventory.generated.d.ts +126 -0
  105. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/inventoryItemsV3.generated.d.ts +389 -0
  106. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/productGroupsV3.generated.d.ts +282 -0
  107. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/products.generated.d.ts +678 -0
  108. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/productsV3.generated.d.ts +1069 -0
  109. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/promotionsV3.generated.d.ts +232 -0
  110. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/readOnlyVariantsV3.generated.d.ts +93 -0
  111. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/ribbonsV3.generated.d.ts +211 -0
  112. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/storesLocationsV3.generated.d.ts +60 -0
  113. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/subscriptionOptions.generated.d.ts +223 -0
  114. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/stores/wishlist.generated.d.ts +37 -0
  115. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2 -2
  116. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +1036 -4
  117. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-calendar.mjs +286 -0
  118. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +23 -2
  119. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +1663 -0
  120. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +336 -0
  121. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +1029 -11
  122. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +8 -4
  123. package/dist/cli.mjs +541 -7
  124. package/guides/importable-sdks.md +1 -0
  125. package/guides/sdk-reference.json +15672 -8927
  126. package/guides/wix-api-usage.md +28 -0
  127. package/package.json +2 -2
@@ -0,0 +1,286 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // ../../stdlib/wix-sdk-auto/calendar/conferencing.generated.ts
8
+ var conferencing_generated_exports = {};
9
+ __export(conferencing_generated_exports, {
10
+ connect: () => connect,
11
+ createConference: () => createConference,
12
+ deleteConference: () => deleteConference,
13
+ getConference: () => getConference,
14
+ listConnections: () => listConnections,
15
+ listProviders: () => listProviders,
16
+ markConnectionAsDisconnected: () => markConnectionAsDisconnected,
17
+ updateConference: () => updateConference
18
+ });
19
+
20
+ // ../../stdlib/wix-sdk-auto/_shared/runtime.generated.ts
21
+ function wixQueryPath(path, req) {
22
+ const parts = [];
23
+ const pair = (key, value) => {
24
+ parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
25
+ };
26
+ const add = (key, value) => {
27
+ if (value === void 0 || value === null) return;
28
+ if (Array.isArray(value)) {
29
+ for (const item of value) {
30
+ if (item === void 0 || item === null || typeof item === "object") continue;
31
+ pair(key, item);
32
+ }
33
+ return;
34
+ }
35
+ if (typeof value === "object") {
36
+ for (const [k, v] of Object.entries(value)) add(`${key}.${k}`, v);
37
+ return;
38
+ }
39
+ pair(key, value);
40
+ };
41
+ for (const [key, value] of Object.entries(req ?? {})) add(key, value);
42
+ return parts.length > 0 ? `${path}?${parts.join("&")}` : path;
43
+ }
44
+ function readField(req, field) {
45
+ let value = req;
46
+ for (const key of field.split(".")) {
47
+ if (value === null || typeof value !== "object") return void 0;
48
+ value = value[key];
49
+ }
50
+ return value;
51
+ }
52
+ function restFieldMasks(req) {
53
+ if (req === null || typeof req !== "object") return req;
54
+ if (Array.isArray(req)) {
55
+ let changed = false;
56
+ const items = req.map((item) => {
57
+ const next = restFieldMasks(item);
58
+ if (next !== item) changed = true;
59
+ return next;
60
+ });
61
+ return changed ? items : req;
62
+ }
63
+ let out;
64
+ for (const [key, value] of Object.entries(req)) {
65
+ let next = value;
66
+ if ((key === "fieldMask" || key === "mask") && Array.isArray(value) && value.every((v) => typeof v === "string")) next = value.join(",");
67
+ else if (value !== null && typeof value === "object") next = restFieldMasks(value);
68
+ if (next !== value) (out ?? (out = { ...req }))[key] = next;
69
+ }
70
+ return out ?? req;
71
+ }
72
+ function withoutFields(req, fields) {
73
+ if (fields.length === 0 || req === null || typeof req !== "object") return req;
74
+ const out = { ...req };
75
+ for (const field of fields) {
76
+ const dot = field.indexOf(".");
77
+ const head = dot < 0 ? field : field.slice(0, dot);
78
+ if (!(head in out)) continue;
79
+ if (dot < 0) delete out[head];
80
+ else out[head] = withoutFields(out[head], [field.slice(dot + 1)]);
81
+ }
82
+ return out;
83
+ }
84
+ function wixCall(verb, template, req, opts, route = {}) {
85
+ return send(verb, template, req, opts, route, false);
86
+ }
87
+ function send(verb, template, req, opts, route, queue) {
88
+ const api = globalThis.himalaya?.wixApi;
89
+ if (!api) return Promise.reject(new Error("@himalaya/wix-*: host did not install the wixApi bridge"));
90
+ const fields = route.pathFields ?? [];
91
+ let path;
92
+ try {
93
+ let i = 0;
94
+ path = template.replace(/\{[^}]+\}/g, () => {
95
+ const field = fields[i++];
96
+ const value = field === void 0 ? void 0 : readField(req, field);
97
+ if (value === void 0 || value === null || value === "") {
98
+ throw new Error(`${verb} ${template}: request field ${field ?? "(unmapped)"} is required`);
99
+ }
100
+ return encodeURIComponent(String(value));
101
+ });
102
+ } catch (err) {
103
+ return Promise.reject(err);
104
+ }
105
+ const site = opts?.site?.trim();
106
+ const headers = site ? { "wix-site-id": site } : void 0;
107
+ const wire = restFieldMasks(req);
108
+ const target = route.query ? wixQueryPath(path, withoutFields(wire, fields)) : path;
109
+ const body = route.query ? void 0 : wire;
110
+ const readShaped = verb === "GET" || verb === "HEAD" || verb === "POST" && /\/(query|query-cursor|search|list|count)(?:\?|$)/i.test(target.split("#")[0]);
111
+ if (readShaped && (opts?.cache || opts?.onCacheResult)) {
112
+ if (!api.read) return Promise.reject(new Error("READ_LIFECYCLE_UNSUPPORTED: update the Himalaya runtime"));
113
+ return api.read(verb, target, body, headers, { cache: opts.cache ?? "default" }).then((result) => {
114
+ opts.onCacheResult?.(result.cache);
115
+ return result.data;
116
+ });
117
+ }
118
+ if (opts?.cache === "only-if-cached") return Promise.reject(new Error("OFFLINE_CACHE_MISS"));
119
+ if (!queue) return api.call(verb, target, body, headers);
120
+ if (!api.offline) return api.call(verb, target, body, headers).then((value) => ({ status: "sent", value }));
121
+ return api.call(verb, target, body, headers, { offline: "queue" });
122
+ }
123
+
124
+ // ../../stdlib/wix-sdk-auto/calendar/conferencing.generated.ts
125
+ function connect(req = {}, opts) {
126
+ return wixCall("POST", "/calendar/v3/conferences/v1/connections/connect", req, opts);
127
+ }
128
+ function createConference(req = {}, opts) {
129
+ return wixCall("POST", "/calendar/v3/conferences/v1/conferences", req, opts);
130
+ }
131
+ function deleteConference(req, opts) {
132
+ return wixCall("DELETE", "/calendar/v3/conferences/v1/conferences/{conferenceId}", req, opts, { pathFields: ["conferenceId"], query: true });
133
+ }
134
+ function getConference(req, opts) {
135
+ return wixCall("GET", "/calendar/v3/conferences/v1/conferences/{conferenceId}", req, opts, { pathFields: ["conferenceId"], query: true });
136
+ }
137
+ function listConnections(req = {}, opts) {
138
+ return wixCall("GET", "/calendar/v3/conferences/v1/connections", req, opts, { query: true });
139
+ }
140
+ function listProviders(req = {}, opts) {
141
+ return wixCall("GET", "/calendar/v3/conferences/v1/providers", req, opts, { query: true });
142
+ }
143
+ function markConnectionAsDisconnected(req = {}, opts) {
144
+ return wixCall("POST", "/calendar/v3/conferences/v1/connections/mark-as-disconnected", req, opts);
145
+ }
146
+ function updateConference(req, opts) {
147
+ return wixCall("PATCH", "/calendar/v3/conferences/v1/conferences/{conferenceId}", req, opts, { pathFields: ["conference.id"] });
148
+ }
149
+
150
+ // ../../stdlib/wix-sdk-auto/calendar/eventViews.generated.ts
151
+ var eventViews_generated_exports = {};
152
+ __export(eventViews_generated_exports, {
153
+ getEventsView: () => getEventsView
154
+ });
155
+ function getEventsView(req = {}, opts) {
156
+ return wixCall("GET", "/calendar/v3/events/view", req, opts, { query: true });
157
+ }
158
+
159
+ // ../../stdlib/wix-sdk-auto/calendar/events.generated.ts
160
+ var events_generated_exports = {};
161
+ __export(events_generated_exports, {
162
+ bulkCancelEvent: () => bulkCancelEvent,
163
+ bulkCreateEvent: () => bulkCreateEvent,
164
+ bulkUpdateEvent: () => bulkUpdateEvent,
165
+ cancelEvent: () => cancelEvent,
166
+ createEvent: () => createEvent,
167
+ getEvent: () => getEvent,
168
+ listEvents: () => listEvents,
169
+ listEventsByContactId: () => listEventsByContactId,
170
+ listEventsByMemberId: () => listEventsByMemberId,
171
+ queryEvents: () => queryEvents,
172
+ restoreEventDefaults: () => restoreEventDefaults,
173
+ splitRecurringEvent: () => splitRecurringEvent,
174
+ updateEvent: () => updateEvent
175
+ });
176
+ function bulkCancelEvent(req = {}, opts) {
177
+ return wixCall("POST", "/calendar/v3/bulk/events/cancel", req, opts);
178
+ }
179
+ function bulkCreateEvent(req = {}, opts) {
180
+ return wixCall("POST", "/calendar/v3/bulk/events/create", req, opts);
181
+ }
182
+ function bulkUpdateEvent(req = {}, opts) {
183
+ return wixCall("POST", "/calendar/v3/bulk/events/update", req, opts);
184
+ }
185
+ function cancelEvent(req, opts) {
186
+ return wixCall("POST", "/calendar/v3/events/{eventId}/cancel", req, opts, { pathFields: ["eventId"] });
187
+ }
188
+ function createEvent(req = {}, opts) {
189
+ return wixCall("POST", "/calendar/v3/events", req, opts);
190
+ }
191
+ function getEvent(req, opts) {
192
+ return wixCall("GET", "/calendar/v3/events/{eventId}", req, opts, { pathFields: ["eventId"], query: true });
193
+ }
194
+ function listEvents(req = {}, opts) {
195
+ return wixCall("GET", "/calendar/v3/events", req, opts, { query: true });
196
+ }
197
+ function listEventsByContactId(req, opts) {
198
+ return wixCall("GET", "/calendar/v3/events/contactId/{contactId}", req, opts, { pathFields: ["contactId"], query: true });
199
+ }
200
+ function listEventsByMemberId(req, opts) {
201
+ return wixCall("GET", "/calendar/v3/events/memberId/{memberId}", req, opts, { pathFields: ["memberId"], query: true });
202
+ }
203
+ function queryEvents(req = {}, opts) {
204
+ return wixCall("POST", "/calendar/v3/events/query", req, opts);
205
+ }
206
+ function restoreEventDefaults(req, opts) {
207
+ return wixCall("POST", "/calendar/v3/events/{eventId}/restore-defaults", req, opts, { pathFields: ["eventId"] });
208
+ }
209
+ function splitRecurringEvent(req, opts) {
210
+ return wixCall("POST", "/calendar/v3/events/{recurringEventId}/split", req, opts, { pathFields: ["recurringEventId"] });
211
+ }
212
+ function updateEvent(req, opts) {
213
+ return wixCall("PATCH", "/calendar/v3/events/{eventId}", req, opts, { pathFields: ["event.id"] });
214
+ }
215
+
216
+ // ../../stdlib/wix-sdk-auto/calendar/participations.generated.ts
217
+ var participations_generated_exports = {};
218
+ __export(participations_generated_exports, {
219
+ createParticipation: () => createParticipation,
220
+ deleteParticipation: () => deleteParticipation,
221
+ getParticipation: () => getParticipation,
222
+ queryParticipations: () => queryParticipations,
223
+ updateParticipation: () => updateParticipation
224
+ });
225
+ function createParticipation(req = {}, opts) {
226
+ return wixCall("POST", "/calendar/v3/participations", req, opts);
227
+ }
228
+ function deleteParticipation(req, opts) {
229
+ return wixCall("DELETE", "/calendar/v3/participations/{participationId}", req, opts, { pathFields: ["participationId"], query: true });
230
+ }
231
+ function getParticipation(req, opts) {
232
+ return wixCall("GET", "/calendar/v3/participations/{participationId}", req, opts, { pathFields: ["participationId"], query: true });
233
+ }
234
+ function queryParticipations(req = {}, opts) {
235
+ return wixCall("POST", "/calendar/v3/participations/query", req, opts);
236
+ }
237
+ function updateParticipation(req, opts) {
238
+ return wixCall("PATCH", "/calendar/v3/participations/{participationId}", req, opts, { pathFields: ["participation.id"] });
239
+ }
240
+
241
+ // ../../stdlib/wix-sdk-auto/calendar/scheduleTimeFrames.generated.ts
242
+ var scheduleTimeFrames_generated_exports = {};
243
+ __export(scheduleTimeFrames_generated_exports, {
244
+ getScheduleTimeFrame: () => getScheduleTimeFrame,
245
+ listScheduleTimeFrames: () => listScheduleTimeFrames
246
+ });
247
+ function getScheduleTimeFrame(req, opts) {
248
+ return wixCall("GET", "/calendar/v3/schedules/timeframe/{id}", req, opts, { pathFields: ["id"], query: true });
249
+ }
250
+ function listScheduleTimeFrames(req = {}, opts) {
251
+ return wixCall("GET", "/calendar/v3/schedules/timeframe", req, opts, { query: true });
252
+ }
253
+
254
+ // ../../stdlib/wix-sdk-auto/calendar/schedules.generated.ts
255
+ var schedules_generated_exports = {};
256
+ __export(schedules_generated_exports, {
257
+ cancelSchedule: () => cancelSchedule,
258
+ createSchedule: () => createSchedule,
259
+ getSchedule: () => getSchedule,
260
+ querySchedules: () => querySchedules,
261
+ updateSchedule: () => updateSchedule
262
+ });
263
+ function cancelSchedule(req, opts) {
264
+ return wixCall("POST", "/calendar/v3/schedules/{scheduleId}/cancel", req, opts, { pathFields: ["scheduleId"] });
265
+ }
266
+ function createSchedule(req = {}, opts) {
267
+ return wixCall("POST", "/calendar/v3/schedules", req, opts);
268
+ }
269
+ function getSchedule(req, opts) {
270
+ return wixCall("GET", "/calendar/v3/schedules/{scheduleId}", req, opts, { pathFields: ["scheduleId"], query: true });
271
+ }
272
+ function querySchedules(req = {}, opts) {
273
+ return wixCall("POST", "/calendar/v3/schedules/query", req, opts);
274
+ }
275
+ function updateSchedule(req, opts) {
276
+ return wixCall("PATCH", "/calendar/v3/schedules/{scheduleId}", req, opts, { pathFields: ["schedule.id"] });
277
+ }
278
+ export {
279
+ conferencing_generated_exports as conferencing,
280
+ eventViews_generated_exports as eventViews,
281
+ events_generated_exports as events,
282
+ participations_generated_exports as participations,
283
+ scheduleTimeFrames_generated_exports as scheduleTimeFrames,
284
+ schedules_generated_exports as schedules
285
+ };
286
+ //# sourceMappingURL=wix-calendar.mjs.map
@@ -572,6 +572,26 @@ function readField(req, field) {
572
572
  }
573
573
  return value;
574
574
  }
575
+ function restFieldMasks(req) {
576
+ if (req === null || typeof req !== "object") return req;
577
+ if (Array.isArray(req)) {
578
+ let changed = false;
579
+ const items = req.map((item) => {
580
+ const next = restFieldMasks(item);
581
+ if (next !== item) changed = true;
582
+ return next;
583
+ });
584
+ return changed ? items : req;
585
+ }
586
+ let out;
587
+ for (const [key, value] of Object.entries(req)) {
588
+ let next = value;
589
+ if ((key === "fieldMask" || key === "mask") && Array.isArray(value) && value.every((v) => typeof v === "string")) next = value.join(",");
590
+ else if (value !== null && typeof value === "object") next = restFieldMasks(value);
591
+ if (next !== value) (out ?? (out = { ...req }))[key] = next;
592
+ }
593
+ return out ?? req;
594
+ }
575
595
  function withoutFields(req, fields) {
576
596
  if (fields.length === 0 || req === null || typeof req !== "object") return req;
577
597
  const out = { ...req };
@@ -607,8 +627,9 @@ function send(verb, template, req, opts, route, queue) {
607
627
  }
608
628
  const site = opts?.site?.trim();
609
629
  const headers = site ? { "wix-site-id": site } : void 0;
610
- const target = route.query ? wixQueryPath2(path, withoutFields(req, fields)) : path;
611
- const body = route.query ? void 0 : req;
630
+ const wire = restFieldMasks(req);
631
+ const target = route.query ? wixQueryPath2(path, withoutFields(wire, fields)) : path;
632
+ const body = route.query ? void 0 : wire;
612
633
  const readShaped = verb === "GET" || verb === "HEAD" || verb === "POST" && /\/(query|query-cursor|search|list|count)(?:\?|$)/i.test(target.split("#")[0]);
613
634
  if (readShaped && (opts?.cache || opts?.onCacheResult)) {
614
635
  if (!api.read) return Promise.reject(new Error("READ_LIFECYCLE_UNSUPPORTED: update the Himalaya runtime"));