@wix/himalaya-cli 0.816.0 → 0.818.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 (126) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +32 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/activity-counters-v1/src/index.d.ts +16 -6
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts +1 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +40 -30
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/badges-v2/src/index.d.ts +23 -13
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +22 -12
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/index.d.ts +13 -3
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +18 -8
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-feed/src/index.d.ts +1 -1
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +29 -19
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +28 -18
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/contacts/src/index.d.ts +18 -8
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/coupons/src/index.d.ts +1 -1
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/crm-tasks/src/index.d.ts +1 -1
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/dashboard-setup/src/index.d.ts +1 -1
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +29 -19
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +20 -10
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/index.d.ts +13 -3
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +29 -19
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +1 -1
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +27 -17
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/index.d.ts +16 -6
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forum/src/index.d.ts +16 -6
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +1 -1
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +21 -11
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +14 -4
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/index.d.ts +15 -5
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/invoices/src/index.d.ts +1 -1
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +1 -1
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/marketing-v1/src/index.d.ts +16 -6
  31. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +1 -1
  32. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/new-releases/src/index.d.ts +1 -1
  33. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notifications-v3/src/index.d.ts +13 -3
  34. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +1 -1
  35. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +1 -1
  36. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +1 -1
  37. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +13 -3
  38. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/index.d.ts +18 -8
  39. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/reviews/src/index.d.ts +1 -1
  40. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +15 -5
  41. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-list/src/index.d.ts +14 -4
  42. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +1 -1
  43. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +1 -1
  44. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/index.d.ts +1 -1
  45. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/index.d.ts +13 -3
  46. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/table-reservations/src/index.d.ts +1 -1
  47. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/users/src/index.d.ts +1 -1
  48. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/wix-data/src/index.d.ts +1 -1
  49. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +17 -7
  50. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +14 -4
  51. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-activity-counters.mjs +24 -10
  52. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-automations.mjs +100 -58
  53. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-badges.mjs +54 -24
  54. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-billing-tax.mjs +43 -22
  55. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +18 -4
  56. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +36 -14
  57. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +63 -36
  58. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +62 -34
  59. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-contacts.mjs +35 -14
  60. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +62 -36
  61. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +37 -18
  62. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +14 -4
  63. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +66 -36
  64. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +68 -32
  65. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +25 -10
  66. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forum.mjs +32 -10
  67. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-gift-cards.mjs +39 -20
  68. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +18 -6
  69. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-inbox.mjs +22 -8
  70. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-marketing.mjs +23 -10
  71. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notifications.mjs +18 -4
  72. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +30 -0
  73. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-redirects.mjs +14 -4
  74. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-restaurants.mjs +32 -14
  75. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-seo.mjs +20 -8
  76. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-list.mjs +17 -6
  77. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +15 -4
  78. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-workflows.mjs +28 -12
  79. package/dist/cli.mjs +58 -14
  80. package/guides/branded-lite-site-binding.md +14 -6
  81. package/guides/sdk-reference.json +398 -230
  82. package/package.json +2 -2
  83. package/templates/beauty-salon/dev/index.ts +1 -181
  84. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +9 -141
  85. package/templates/beauty-salon-owner/dev/index.ts +564 -0
  86. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  87. package/templates/branded-lite/dev/index.ts +1 -181
  88. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +9 -141
  89. package/templates/community-club/dev/index.ts +1 -181
  90. package/templates/community-club/tier5-src/himi-store-account/index.ts +9 -141
  91. package/templates/community-club-owner/dev/index.ts +564 -0
  92. package/templates/community-club-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  93. package/templates/events-meetups/dev/index.ts +1 -181
  94. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +9 -141
  95. package/templates/events-meetups-owner/dev/index.ts +564 -0
  96. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  97. package/templates/gym-fitness/dev/index.ts +1 -181
  98. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +9 -141
  99. package/templates/gym-fitness-owner/dev/index.ts +564 -0
  100. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  101. package/templates/nonprofit-cause/dev/index.ts +1 -181
  102. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +9 -141
  103. package/templates/nonprofit-cause-owner/dev/index.ts +564 -0
  104. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  105. package/templates/owner-lite/dev/index.ts +564 -0
  106. package/templates/owner-lite/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  107. package/templates/podcast-creator/dev/index.ts +1 -181
  108. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +9 -141
  109. package/templates/podcast-creator-owner/dev/index.ts +564 -0
  110. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  111. package/templates/portfolio-creative/dev/index.ts +1 -181
  112. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +9 -141
  113. package/templates/portfolio-creative-owner/dev/index.ts +564 -0
  114. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  115. package/templates/restaurant/dev/index.ts +1 -181
  116. package/templates/restaurant/tier5-src/himi-store-account/index.ts +9 -141
  117. package/templates/restaurant-owner/dev/index.ts +564 -0
  118. package/templates/restaurant-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  119. package/templates/retail-store/dev/index.ts +1 -181
  120. package/templates/retail-store/tier5-src/himi-store-account/index.ts +9 -141
  121. package/templates/retail-store-owner/dev/index.ts +564 -0
  122. package/templates/retail-store-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
  123. package/templates/yoga-studio/dev/index.ts +1 -181
  124. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +9 -141
  125. package/templates/yoga-studio-owner/dev/index.ts +564 -0
  126. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
@@ -96,7 +96,11 @@ function setBookingAttendance(bookingId, attended, numberOfAttendees = 1) {
96
96
  }
97
97
 
98
98
  // ../../stdlib/wix-sdk/bookings-v2/src/index.ts
99
- function wixCall(method, path, body) {
99
+ function wixCallHeaders(opts) {
100
+ const site = opts?.site?.trim();
101
+ return site ? { "wix-site-id": site } : void 0;
102
+ }
103
+ function wixCall(method, path, body, opts) {
100
104
  if (!globalThis.himalaya?.wixApi) {
101
105
  return Promise.reject(
102
106
  new Error(
@@ -104,44 +108,62 @@ function wixCall(method, path, body) {
104
108
  )
105
109
  );
106
110
  }
107
- return globalThis.himalaya.wixApi.call(method, path, body);
111
+ return globalThis.himalaya.wixApi.call(
112
+ method,
113
+ path,
114
+ body,
115
+ wixCallHeaders(opts)
116
+ );
108
117
  }
109
- function queryBookings(req = {}) {
118
+ function queryBookings(req = {}, opts) {
110
119
  return wixCall(
111
120
  "POST",
112
121
  "/bookings/v2/bookings/query",
113
- req
122
+ req,
123
+ opts
114
124
  );
115
125
  }
116
- function listBookings(req = {}) {
117
- return wixCall("GET", "/bookings/v1/bookings", req);
126
+ function listBookings(req = {}, opts) {
127
+ return wixCall(
128
+ "GET",
129
+ "/bookings/v1/bookings",
130
+ req,
131
+ opts
132
+ );
118
133
  }
119
- function getBooking(bookingId) {
134
+ function getBooking(bookingId, opts) {
120
135
  if (!bookingId) throw new Error("getBooking: bookingId is required");
121
136
  return wixCall(
122
137
  "GET",
123
- `/bookings/v1/bookings/${encodeURIComponent(bookingId)}`
138
+ `/bookings/v1/bookings/${encodeURIComponent(bookingId)}`,
139
+ void 0,
140
+ opts
124
141
  );
125
142
  }
126
- function createBooking(req = {}) {
143
+ function createBooking(req = {}, opts) {
127
144
  return wixCall(
128
145
  "POST",
129
146
  "/bookings/v1/bookings",
130
- req
147
+ req,
148
+ opts
131
149
  );
132
150
  }
133
- function setBookingAction(bookingId) {
151
+ function setBookingAction(bookingId, opts) {
134
152
  if (!bookingId) throw new Error("setBookingAction: bookingId is required");
135
153
  return wixCall(
136
154
  "PUT",
137
- `/bookings/v1/bookings/${encodeURIComponent(bookingId)}`
155
+ `/bookings/v1/bookings/${encodeURIComponent(bookingId)}`,
156
+ void 0,
157
+ opts
138
158
  );
139
159
  }
140
- function deleteService(serviceId) {
160
+ function deleteService(serviceId, opts) {
141
161
  if (!serviceId) throw new Error("deleteService: serviceId is required");
142
162
  return wixCall(
143
163
  "DELETE",
144
- `/bookings/v1/services/${encodeURIComponent(serviceId)}`
164
+ `/bookings/v1/services/${encodeURIComponent(serviceId)}`,
165
+ void 0,
166
+ opts
145
167
  );
146
168
  }
147
169
  export {
@@ -1,5 +1,9 @@
1
1
  // ../../stdlib/wix-sdk/business-tools-v1/src/index.ts
2
- function wixCall(method, path, body) {
2
+ function wixCallHeaders(opts) {
3
+ const site = opts?.site?.trim();
4
+ return site ? { "wix-site-id": site } : void 0;
5
+ }
6
+ function wixCall(method, path, body, opts) {
3
7
  if (!globalThis.himalaya?.wixApi) {
4
8
  return Promise.reject(
5
9
  new Error(
@@ -7,132 +11,155 @@ function wixCall(method, path, body) {
7
11
  )
8
12
  );
9
13
  }
10
- return globalThis.himalaya.wixApi.call(method, path, body);
14
+ return globalThis.himalaya.wixApi.call(
15
+ method,
16
+ path,
17
+ body,
18
+ wixCallHeaders(opts)
19
+ );
11
20
  }
12
- function createLocation(req = {}) {
21
+ function createLocation(req = {}, opts) {
13
22
  return wixCall(
14
23
  "POST",
15
24
  "/locations/v1/locations",
16
- req
25
+ req,
26
+ opts
17
27
  );
18
28
  }
19
- function bulkCreateLocation(req = {}) {
29
+ function bulkCreateLocation(req = {}, opts) {
20
30
  return wixCall(
21
31
  "POST",
22
32
  "/locations/v1/locations/bulk-create",
23
- req
33
+ req,
34
+ opts
24
35
  );
25
36
  }
26
- function getLocation(id) {
37
+ function getLocation(id, opts) {
27
38
  if (!id) throw new Error("getLocation: id is required");
28
39
  return wixCall(
29
40
  "GET",
30
- `/locations/v1/locations/${encodeURIComponent(id)}`
41
+ `/locations/v1/locations/${encodeURIComponent(id)}`,
42
+ void 0,
43
+ opts
31
44
  );
32
45
  }
33
- function listLocations(req = {}) {
46
+ function listLocations(req = {}, opts) {
34
47
  return wixCall(
35
48
  "GET",
36
49
  "/locations/v1/locations",
37
- req
50
+ req,
51
+ opts
38
52
  );
39
53
  }
40
- function updateLocation(locationId, req = {}) {
54
+ function updateLocation(locationId, req = {}, opts) {
41
55
  if (!locationId) throw new Error("updateLocation: locationId is required");
42
56
  return wixCall(
43
57
  "PUT",
44
58
  `/locations/v1/locations/${encodeURIComponent(locationId)}`,
45
- req
59
+ req,
60
+ opts
46
61
  );
47
62
  }
48
- function queryLocations(req = {}) {
63
+ function queryLocations(req = {}, opts) {
49
64
  return wixCall(
50
65
  "POST",
51
66
  "/locations/v1/locations/query",
52
- req
67
+ req,
68
+ opts
53
69
  );
54
70
  }
55
- function setDefaultLocation(id, req = {}) {
71
+ function setDefaultLocation(id, req = {}, opts) {
56
72
  if (!id) throw new Error("setDefaultLocation: id is required");
57
73
  return wixCall(
58
74
  "POST",
59
75
  `/locations/v1/locations/${encodeURIComponent(id)}/set-default`,
60
- req
76
+ req,
77
+ opts
61
78
  );
62
79
  }
63
- function archiveLocation(id, req = {}) {
80
+ function archiveLocation(id, req = {}, opts) {
64
81
  if (!id) throw new Error("archiveLocation: id is required");
65
82
  return wixCall(
66
83
  "POST",
67
84
  `/locations/v1/locations/${encodeURIComponent(id)}/archive`,
68
- req
85
+ req,
86
+ opts
69
87
  );
70
88
  }
71
- function addTypeToLocation(id, req = {}) {
89
+ function addTypeToLocation(id, req = {}, opts) {
72
90
  if (!id) throw new Error("addTypeToLocation: id is required");
73
91
  return wixCall(
74
92
  "PATCH",
75
93
  `/locations/v1/locations/${encodeURIComponent(id)}/add-type`,
76
- req
94
+ req,
95
+ opts
77
96
  );
78
97
  }
79
- function removeTypeFromLocation(id, req = {}) {
98
+ function removeTypeFromLocation(id, req = {}, opts) {
80
99
  if (!id) throw new Error("removeTypeFromLocation: id is required");
81
100
  return wixCall(
82
101
  "PATCH",
83
102
  `/locations/v1/locations/${encodeURIComponent(id)}/remove-type`,
84
- req
103
+ req,
104
+ opts
85
105
  );
86
106
  }
87
- function addLocationType(id, req = {}) {
107
+ function addLocationType(id, req = {}, opts) {
88
108
  if (!id) throw new Error("addLocationType: id is required");
89
109
  return wixCall(
90
110
  "PATCH",
91
111
  `/locations/v1/locations/${encodeURIComponent(id)}/add-location-type`,
92
- req
112
+ req,
113
+ opts
93
114
  );
94
115
  }
95
- function removeLocationType(id, req = {}) {
116
+ function removeLocationType(id, req = {}, opts) {
96
117
  if (!id) throw new Error("removeLocationType: id is required");
97
118
  return wixCall(
98
119
  "PATCH",
99
120
  `/locations/v1/locations/${encodeURIComponent(id)}/remove-location-type`,
100
- req
121
+ req,
122
+ opts
101
123
  );
102
124
  }
103
- function read() {
125
+ function read(opts) {
104
126
  return wixCall(
105
127
  "GET",
106
128
  "/site-properties/v4/properties",
107
- void 0
129
+ void 0,
130
+ opts
108
131
  );
109
132
  }
110
- function updateBusinessProfile(req = {}) {
133
+ function updateBusinessProfile(req = {}, opts) {
111
134
  return wixCall(
112
135
  "POST",
113
136
  "/site-properties/v4/properties/business-profile",
114
- req
137
+ req,
138
+ opts
115
139
  );
116
140
  }
117
- function updateBusinessContact(req = {}) {
141
+ function updateBusinessContact(req = {}, opts) {
118
142
  return wixCall(
119
143
  "POST",
120
144
  "/site-properties/v4/properties/business-contact",
121
- req
145
+ req,
146
+ opts
122
147
  );
123
148
  }
124
- function updateBusinessSchedule(req = {}) {
149
+ function updateBusinessSchedule(req = {}, opts) {
125
150
  return wixCall(
126
151
  "POST",
127
152
  "/site-properties/v4/properties/business-schedule",
128
- req
153
+ req,
154
+ opts
129
155
  );
130
156
  }
131
- function updateConsentPolicy(req = {}) {
157
+ function updateConsentPolicy(req = {}, opts) {
132
158
  return wixCall(
133
159
  "POST",
134
160
  "/site-properties/v4/properties/policy",
135
- req
161
+ req,
162
+ opts
136
163
  );
137
164
  }
138
165
  export {
@@ -76,7 +76,11 @@ async function listBlogComments(postId) {
76
76
  }
77
77
 
78
78
  // ../../stdlib/wix-sdk/comments-v1/src/index.ts
79
- function wixCall(method, path, body) {
79
+ function wixCallHeaders(opts) {
80
+ const site = opts?.site?.trim();
81
+ return site ? { "wix-site-id": site } : void 0;
82
+ }
83
+ function wixCall(method, path, body, opts) {
80
84
  if (!globalThis.himalaya?.wixApi) {
81
85
  return Promise.reject(
82
86
  new Error(
@@ -84,124 +88,148 @@ function wixCall(method, path, body) {
84
88
  )
85
89
  );
86
90
  }
87
- return globalThis.himalaya.wixApi.call(method, path, body);
91
+ return globalThis.himalaya.wixApi.call(
92
+ method,
93
+ path,
94
+ body,
95
+ wixCallHeaders(opts)
96
+ );
88
97
  }
89
- function getComment(commentId) {
98
+ function getComment(commentId, opts) {
90
99
  if (!commentId) throw new Error("getComment: commentId is required");
91
100
  return wixCall(
92
101
  "GET",
93
- `/comments/v1/comments/${encodeURIComponent(commentId)}`
102
+ `/comments/v1/comments/${encodeURIComponent(commentId)}`,
103
+ void 0,
104
+ opts
94
105
  );
95
106
  }
96
- function deleteComment(commentId) {
107
+ function deleteComment(commentId, opts) {
97
108
  if (!commentId) throw new Error("deleteComment: commentId is required");
98
109
  return wixCall(
99
110
  "DELETE",
100
- `/comments/v1/comments/${encodeURIComponent(commentId)}`
111
+ `/comments/v1/comments/${encodeURIComponent(commentId)}`,
112
+ void 0,
113
+ opts
101
114
  );
102
115
  }
103
- function moderateDraftContent(commentId, req = {}) {
116
+ function moderateDraftContent(commentId, req = {}, opts) {
104
117
  if (!commentId)
105
118
  throw new Error("moderateDraftContent: commentId is required");
106
119
  return wixCall(
107
120
  "POST",
108
121
  `/comments/v1/comments/${encodeURIComponent(commentId)}/moderate`,
109
- req
122
+ req,
123
+ opts
110
124
  );
111
125
  }
112
- function queryComments(req = {}) {
126
+ function queryComments(req = {}, opts) {
113
127
  return wixCall(
114
128
  "POST",
115
129
  "/comments/v1/comments/query-cursor",
116
- req
130
+ req,
131
+ opts
117
132
  );
118
133
  }
119
- function markComment(commentId, req = {}) {
134
+ function markComment(commentId, req = {}, opts) {
120
135
  if (!commentId) throw new Error("markComment: commentId is required");
121
136
  return wixCall(
122
137
  "PUT",
123
138
  `/comments/v1/comments/${encodeURIComponent(commentId)}/mark`,
124
- req
139
+ req,
140
+ opts
125
141
  );
126
142
  }
127
- function unmarkComment(commentId, req = {}) {
143
+ function unmarkComment(commentId, req = {}, opts) {
128
144
  if (!commentId) throw new Error("unmarkComment: commentId is required");
129
145
  return wixCall(
130
146
  "PUT",
131
147
  `/comments/v1/comments/${encodeURIComponent(commentId)}/unmark`,
132
- req
148
+ req,
149
+ opts
133
150
  );
134
151
  }
135
- function hideComment(commentId, req = {}) {
152
+ function hideComment(commentId, req = {}, opts) {
136
153
  if (!commentId) throw new Error("hideComment: commentId is required");
137
154
  return wixCall(
138
155
  "PUT",
139
156
  `/comments/v1/comments/${encodeURIComponent(commentId)}/hide`,
140
- req
157
+ req,
158
+ opts
141
159
  );
142
160
  }
143
- function publishComment(commentId, req = {}) {
161
+ function publishComment(commentId, req = {}, opts) {
144
162
  if (!commentId) throw new Error("publishComment: commentId is required");
145
163
  return wixCall(
146
164
  "PUT",
147
165
  `/comments/v1/comments/${encodeURIComponent(commentId)}/publish`,
148
- req
166
+ req,
167
+ opts
149
168
  );
150
169
  }
151
- function countComments(req = {}) {
170
+ function countComments(req = {}, opts) {
152
171
  return wixCall(
153
172
  "POST",
154
173
  "/comments/v1/comments/count",
155
- req
174
+ req,
175
+ opts
156
176
  );
157
177
  }
158
- function listCommentsByResource(req = {}) {
178
+ function listCommentsByResource(req = {}, opts) {
159
179
  return wixCall(
160
180
  "GET",
161
181
  "/comments/v1/comments/list-by-resource",
162
- req
182
+ req,
183
+ opts
163
184
  );
164
185
  }
165
- function getCommentThread(commentId) {
186
+ function getCommentThread(commentId, opts) {
166
187
  if (!commentId) throw new Error("getCommentThread: commentId is required");
167
188
  return wixCall(
168
189
  "GET",
169
- `/comments/v1/comments/${encodeURIComponent(commentId)}/thread`
190
+ `/comments/v1/comments/${encodeURIComponent(commentId)}/thread`,
191
+ void 0,
192
+ opts
170
193
  );
171
194
  }
172
- function bulkPublishComment(req = {}) {
195
+ function bulkPublishComment(req = {}, opts) {
173
196
  return wixCall(
174
197
  "POST",
175
198
  "/comments/v1/bulk/comments/publish-by-filter",
176
- req
199
+ req,
200
+ opts
177
201
  );
178
202
  }
179
- function bulkHideComment(req = {}) {
203
+ function bulkHideComment(req = {}, opts) {
180
204
  return wixCall(
181
205
  "PUT",
182
206
  "/comments/v1/bulk/comments/hide-by-filter",
183
- req
207
+ req,
208
+ opts
184
209
  );
185
210
  }
186
- function bulkDeleteComment(req = {}) {
211
+ function bulkDeleteComment(req = {}, opts) {
187
212
  return wixCall(
188
213
  "PUT",
189
214
  "/comments/v1/bulk/comments/delete-by-filter",
190
- req
215
+ req,
216
+ opts
191
217
  );
192
218
  }
193
- function bulkModerateDraftContent(req = {}) {
219
+ function bulkModerateDraftContent(req = {}, opts) {
194
220
  return wixCall(
195
221
  "POST",
196
222
  "/comments/v1/bulk/comments/moderate-by-filter",
197
- req
223
+ req,
224
+ opts
198
225
  );
199
226
  }
200
- function bulkMoveCommentByFilter(req = {}) {
227
+ function bulkMoveCommentByFilter(req = {}, opts) {
201
228
  return wixCall(
202
229
  "PUT",
203
230
  "/comments/v1/bulk/comments/move-by-filter",
204
- req
231
+ req,
232
+ opts
205
233
  );
206
234
  }
207
235
  export {
@@ -10,7 +10,11 @@ function unlabelContact(contactId, labelKeys) {
10
10
  }
11
11
 
12
12
  // ../../stdlib/wix-sdk/contacts/src/index.ts
13
- function wixCall(method, path, body) {
13
+ function wixCallHeaders(opts) {
14
+ const site = opts?.site?.trim();
15
+ return site ? { "wix-site-id": site } : void 0;
16
+ }
17
+ function wixCall(method, path, body, opts) {
14
18
  if (!globalThis.himalaya?.wixApi) {
15
19
  return Promise.reject(
16
20
  new Error(
@@ -18,45 +22,62 @@ function wixCall(method, path, body) {
18
22
  )
19
23
  );
20
24
  }
21
- return globalThis.himalaya.wixApi.call(method, path, body);
25
+ return globalThis.himalaya.wixApi.call(
26
+ method,
27
+ path,
28
+ body,
29
+ wixCallHeaders(opts)
30
+ );
22
31
  }
23
- function queryContacts(req = {}) {
32
+ function queryContacts(req = {}, opts) {
24
33
  return wixCall(
25
34
  "POST",
26
35
  "/contacts/v4/contacts/query",
27
- req
36
+ req,
37
+ opts
28
38
  );
29
39
  }
30
- function listContacts(req = {}) {
31
- return wixCall("GET", "/contacts/v4/contacts", req);
40
+ function listContacts(req = {}, opts) {
41
+ return wixCall(
42
+ "GET",
43
+ "/contacts/v4/contacts",
44
+ req,
45
+ opts
46
+ );
32
47
  }
33
- function getContact(contactId) {
48
+ function getContact(contactId, opts) {
34
49
  if (!contactId) throw new Error("getContact: contactId is required");
35
50
  return wixCall(
36
51
  "GET",
37
- `/contacts/v4/contacts/${encodeURIComponent(contactId)}`
52
+ `/contacts/v4/contacts/${encodeURIComponent(contactId)}`,
53
+ void 0,
54
+ opts
38
55
  );
39
56
  }
40
- function createContact(req = {}) {
57
+ function createContact(req = {}, opts) {
41
58
  return wixCall(
42
59
  "POST",
43
60
  "/contacts/v4/contacts",
44
- req
61
+ req,
62
+ opts
45
63
  );
46
64
  }
47
- function updateContact(contactId, req = {}) {
65
+ function updateContact(contactId, req = {}, opts) {
48
66
  if (!contactId) throw new Error("updateContact: contactId is required");
49
67
  return wixCall(
50
68
  "PATCH",
51
69
  `/contacts/v4/contacts/${encodeURIComponent(contactId)}`,
52
- req
70
+ req,
71
+ opts
53
72
  );
54
73
  }
55
- function deleteContact(contactId) {
74
+ function deleteContact(contactId, opts) {
56
75
  if (!contactId) throw new Error("deleteContact: contactId is required");
57
76
  return wixCall(
58
77
  "DELETE",
59
- `/contacts/v4/contacts/${encodeURIComponent(contactId)}`
78
+ `/contacts/v4/contacts/${encodeURIComponent(contactId)}`,
79
+ void 0,
80
+ opts
60
81
  );
61
82
  }
62
83
  export {