@wix/himalaya-cli 0.817.0 → 0.819.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 +23 -6
  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
@@ -13,7 +13,11 @@ function updateDataCollection(collection) {
13
13
  }
14
14
 
15
15
  // ../../stdlib/wix-sdk/data-collections-v1/src/index.ts
16
- function wixCall(method, path, body) {
16
+ function wixCallHeaders(opts) {
17
+ const site = opts?.site?.trim();
18
+ return site ? { "wix-site-id": site } : void 0;
19
+ }
20
+ function wixCall(method, path, body, opts) {
17
21
  if (!globalThis.himalaya?.wixApi) {
18
22
  return Promise.reject(
19
23
  new Error(
@@ -21,99 +25,117 @@ function wixCall(method, path, body) {
21
25
  )
22
26
  );
23
27
  }
24
- return globalThis.himalaya.wixApi.call(method, path, body);
28
+ return globalThis.himalaya.wixApi.call(
29
+ method,
30
+ path,
31
+ body,
32
+ wixCallHeaders(opts)
33
+ );
25
34
  }
26
- function getDataCollection(dataCollectionId) {
35
+ function getDataCollection(dataCollectionId, opts) {
27
36
  if (!dataCollectionId)
28
37
  throw new Error("getDataCollection: dataCollectionId is required");
29
38
  return wixCall(
30
39
  "GET",
31
- `/data/v2/collections/${encodeURIComponent(dataCollectionId)}`
40
+ `/data/v2/collections/${encodeURIComponent(dataCollectionId)}`,
41
+ void 0,
42
+ opts
32
43
  );
33
44
  }
34
- function listDataCollections(req = {}) {
45
+ function listDataCollections(req = {}, opts) {
35
46
  return wixCall(
36
47
  "GET",
37
48
  "/data/v2/collections",
38
- req
49
+ req,
50
+ opts
39
51
  );
40
52
  }
41
- function deleteDataCollection(dataCollectionId) {
53
+ function deleteDataCollection(dataCollectionId, opts) {
42
54
  if (!dataCollectionId)
43
55
  throw new Error("deleteDataCollection: dataCollectionId is required");
44
56
  return wixCall(
45
57
  "DELETE",
46
- `/data/v2/collections/${encodeURIComponent(dataCollectionId)}`
58
+ `/data/v2/collections/${encodeURIComponent(dataCollectionId)}`,
59
+ void 0,
60
+ opts
47
61
  );
48
62
  }
49
- function restoreDataCollection(dataCollectionId, req = {}) {
63
+ function restoreDataCollection(dataCollectionId, req = {}, opts) {
50
64
  if (!dataCollectionId)
51
65
  throw new Error("restoreDataCollection: dataCollectionId is required");
52
66
  return wixCall(
53
67
  "POST",
54
68
  `/data/v2/collections/restore/${encodeURIComponent(dataCollectionId)}`,
55
- req
69
+ req,
70
+ opts
56
71
  );
57
72
  }
58
- function deleteDataCollectionField(req = {}) {
73
+ function deleteDataCollectionField(req = {}, opts) {
59
74
  return wixCall(
60
75
  "POST",
61
76
  "/data/v2/collections/delete-field",
62
- req
77
+ req,
78
+ opts
63
79
  );
64
80
  }
65
- function addDataCollectionPlugin(req = {}) {
81
+ function addDataCollectionPlugin(req = {}, opts) {
66
82
  return wixCall(
67
83
  "POST",
68
84
  "/data/v2/collections/add-plugin",
69
- req
85
+ req,
86
+ opts
70
87
  );
71
88
  }
72
- function deleteDataCollectionPlugin(req = {}) {
89
+ function deleteDataCollectionPlugin(req = {}, opts) {
73
90
  return wixCall(
74
91
  "POST",
75
92
  "/data/v2/collections/delete-plugin",
76
- req
93
+ req,
94
+ opts
77
95
  );
78
96
  }
79
- function createIndex(req = {}) {
80
- return wixCall("POST", "/data/v2/indexes", req);
97
+ function createIndex(req = {}, opts) {
98
+ return wixCall("POST", "/data/v2/indexes", req, opts);
81
99
  }
82
- function dropIndex(req = {}) {
83
- return wixCall("DELETE", "/data/v2/indexes", req);
100
+ function dropIndex(req = {}, opts) {
101
+ return wixCall("DELETE", "/data/v2/indexes", req, opts);
84
102
  }
85
- function listIndexes(req = {}) {
86
- return wixCall("GET", "/data/v2/indexes", req);
103
+ function listIndexes(req = {}, opts) {
104
+ return wixCall("GET", "/data/v2/indexes", req, opts);
87
105
  }
88
- function listAvailableIndexes(req = {}) {
106
+ function listAvailableIndexes(req = {}, opts) {
89
107
  return wixCall(
90
108
  "GET",
91
109
  "/data/v2/indexes/available",
92
- req
110
+ req,
111
+ opts
93
112
  );
94
113
  }
95
- function getPermissions(req = {}) {
114
+ function getPermissions(req = {}, opts) {
96
115
  return wixCall(
97
116
  "GET",
98
117
  "/wix-data/v1/permissions",
99
- req
118
+ req,
119
+ opts
100
120
  );
101
121
  }
102
- function updatePermissions(req = {}) {
122
+ function updatePermissions(req = {}, opts) {
103
123
  return wixCall(
104
124
  "POST",
105
125
  "/wix-data/v1/permissions",
106
- req
126
+ req,
127
+ opts
107
128
  );
108
129
  }
109
- function addSpecialPermissions(req = {}) {
130
+ function addSpecialPermissions(req = {}, opts) {
110
131
  return wixCall(
111
132
  "POST",
112
133
  "/wix-data/v1/permissions/special",
113
- req
134
+ req,
135
+ opts
114
136
  );
115
137
  }
116
- function updateSpecialPermissions(specialPermissionsId, req = {}) {
138
+ function updateSpecialPermissions(specialPermissionsId, req = {}, opts) {
117
139
  if (!specialPermissionsId)
118
140
  throw new Error(
119
141
  "updateSpecialPermissions: specialPermissionsId is required"
@@ -121,24 +143,28 @@ function updateSpecialPermissions(specialPermissionsId, req = {}) {
121
143
  return wixCall(
122
144
  "POST",
123
145
  `/wix-data/v1/permissions/special/${encodeURIComponent(specialPermissionsId)}`,
124
- req
146
+ req,
147
+ opts
125
148
  );
126
149
  }
127
- function removeSpecialPermissions(specialPermissionsId) {
150
+ function removeSpecialPermissions(specialPermissionsId, opts) {
128
151
  if (!specialPermissionsId)
129
152
  throw new Error(
130
153
  "removeSpecialPermissions: specialPermissionsId is required"
131
154
  );
132
155
  return wixCall(
133
156
  "DELETE",
134
- `/wix-data/v1/permissions/special/${encodeURIComponent(specialPermissionsId)}`
157
+ `/wix-data/v1/permissions/special/${encodeURIComponent(specialPermissionsId)}`,
158
+ void 0,
159
+ opts
135
160
  );
136
161
  }
137
- function getMyPermissions(req = {}) {
162
+ function getMyPermissions(req = {}, opts) {
138
163
  return wixCall(
139
164
  "GET",
140
165
  "/wix-data/v1/permissions/current",
141
- req
166
+ req,
167
+ opts
142
168
  );
143
169
  }
144
170
  export {
@@ -1,5 +1,9 @@
1
1
  // ../../stdlib/wix-sdk/donations/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,68 +11,83 @@ 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 createDonationCampaign(req = {}) {
21
+ function createDonationCampaign(req = {}, opts) {
13
22
  return wixCall(
14
23
  "POST",
15
24
  "/donation-campaigns/v2/donation-campaigns",
16
- req
25
+ req,
26
+ opts
17
27
  );
18
28
  }
19
- function getDonationCampaign(donationCampaignId) {
29
+ function getDonationCampaign(donationCampaignId, opts) {
20
30
  if (!donationCampaignId)
21
31
  throw new Error("getDonationCampaign: donationCampaignId is required");
22
32
  return wixCall(
23
33
  "GET",
24
- `/donation-campaigns/v2/donation-campaigns/${encodeURIComponent(donationCampaignId)}`
34
+ `/donation-campaigns/v2/donation-campaigns/${encodeURIComponent(donationCampaignId)}`,
35
+ void 0,
36
+ opts
25
37
  );
26
38
  }
27
- function updateDonationCampaign(donationCampaignId, req = {}) {
39
+ function updateDonationCampaign(donationCampaignId, req = {}, opts) {
28
40
  if (!donationCampaignId)
29
41
  throw new Error("updateDonationCampaign: donationCampaignId is required");
30
42
  return wixCall(
31
43
  "PATCH",
32
44
  `/donation-campaigns/v2/donation-campaigns/${encodeURIComponent(donationCampaignId)}`,
33
- req
45
+ req,
46
+ opts
34
47
  );
35
48
  }
36
- function queryDonationCampaigns(req = {}) {
49
+ function queryDonationCampaigns(req = {}, opts) {
37
50
  return wixCall(
38
51
  "POST",
39
52
  "/donation-campaigns/v2/donation-campaigns/query",
40
- req
53
+ req,
54
+ opts
41
55
  );
42
56
  }
43
- function getDonationCampaignMetrics(donationCampaignId) {
57
+ function getDonationCampaignMetrics(donationCampaignId, opts) {
44
58
  if (!donationCampaignId)
45
59
  throw new Error(
46
60
  "getDonationCampaignMetrics: donationCampaignId is required"
47
61
  );
48
62
  return wixCall(
49
63
  "GET",
50
- `/donation-campaigns/v2/donation-campaigns/${encodeURIComponent(donationCampaignId)}/metrics`
64
+ `/donation-campaigns/v2/donation-campaigns/${encodeURIComponent(donationCampaignId)}/metrics`,
65
+ void 0,
66
+ opts
51
67
  );
52
68
  }
53
- function bulkCreateDonationCampaigns(req = {}) {
69
+ function bulkCreateDonationCampaigns(req = {}, opts) {
54
70
  return wixCall(
55
71
  "POST",
56
72
  "/donation-campaigns/v2/bulk/donation-campaigns/create",
57
- req
73
+ req,
74
+ opts
58
75
  );
59
76
  }
60
- function bulkUpdateDonationCampaignTags(req = {}) {
77
+ function bulkUpdateDonationCampaignTags(req = {}, opts) {
61
78
  return wixCall(
62
79
  "POST",
63
80
  "/donation-campaigns/v2/bulk/donation-campaigns/update-tags",
64
- req
81
+ req,
82
+ opts
65
83
  );
66
84
  }
67
- function bulkUpdateDonationCampaignTagsByFilter(req = {}) {
85
+ function bulkUpdateDonationCampaignTagsByFilter(req = {}, opts) {
68
86
  return wixCall(
69
87
  "POST",
70
88
  "/donation-campaigns/v2/bulk/donation-campaigns/update-tags-by-filter",
71
- req
89
+ req,
90
+ opts
72
91
  );
73
92
  }
74
93
  export {
@@ -79,19 +79,29 @@ function refundPayments(orderId, items) {
79
79
  }
80
80
 
81
81
  // ../../stdlib/wix-sdk/ecom/src/index.ts
82
- function wixCall(method, path, body) {
82
+ function wixCallHeaders(opts) {
83
+ const site = opts?.site?.trim();
84
+ return site ? { "wix-site-id": site } : void 0;
85
+ }
86
+ function wixCall(method, path, body, opts) {
83
87
  if (!globalThis.himalaya?.wixApi) {
84
88
  return Promise.reject(
85
89
  new Error("@himalaya/wix-ecom: host did not install the wixApi bridge")
86
90
  );
87
91
  }
88
- return globalThis.himalaya.wixApi.call(method, path, body);
92
+ return globalThis.himalaya.wixApi.call(
93
+ method,
94
+ path,
95
+ body,
96
+ wixCallHeaders(opts)
97
+ );
89
98
  }
90
- function searchOrders(req = {}) {
99
+ function searchOrders(req = {}, opts) {
91
100
  return wixCall(
92
101
  "POST",
93
102
  "/ecom/v1/orders/search",
94
- req
103
+ req,
104
+ opts
95
105
  );
96
106
  }
97
107
  export {
@@ -1,5 +1,9 @@
1
1
  // ../../stdlib/wix-sdk/email-marketing-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,129 +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 listStatistics(req = {}) {
21
+ function listStatistics(req = {}, opts) {
13
22
  return wixCall(
14
23
  "GET",
15
24
  "/email-marketing/v1/campaigns/statistics",
16
- req
25
+ req,
26
+ opts
17
27
  );
18
28
  }
19
- function listRecipients(campaignId) {
29
+ function listRecipients(campaignId, opts) {
20
30
  if (!campaignId) throw new Error("listRecipients: campaignId is required");
21
31
  return wixCall(
22
32
  "GET",
23
- `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/statistics/recipients`
33
+ `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/statistics/recipients`,
34
+ void 0,
35
+ opts
24
36
  );
25
37
  }
26
- function get(campaignId) {
38
+ function get(campaignId, opts) {
27
39
  if (!campaignId) throw new Error("get: campaignId is required");
28
40
  return wixCall(
29
41
  "GET",
30
- `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}`
42
+ `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}`,
43
+ void 0,
44
+ opts
31
45
  );
32
46
  }
33
- function list() {
47
+ function list(opts) {
34
48
  return wixCall(
35
49
  "GET",
36
50
  "/email-marketing/v1/campaigns",
37
- void 0
51
+ void 0,
52
+ opts
38
53
  );
39
54
  }
40
- function publish(campaignId) {
55
+ function publish(campaignId, opts) {
41
56
  if (!campaignId) throw new Error("publish: campaignId is required");
42
57
  return wixCall(
43
58
  "POST",
44
- `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/publish`
59
+ `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/publish`,
60
+ void 0,
61
+ opts
45
62
  );
46
63
  }
47
- function sendTest(campaignId, req = {}) {
64
+ function sendTest(campaignId, req = {}, opts) {
48
65
  if (!campaignId) throw new Error("sendTest: campaignId is required");
49
66
  return wixCall(
50
67
  "POST",
51
68
  `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/test`,
52
- req
69
+ req,
70
+ opts
53
71
  );
54
72
  }
55
- function pauseScheduling(campaignId, req = {}) {
73
+ function pauseScheduling(campaignId, req = {}, opts) {
56
74
  if (!campaignId) throw new Error("pauseScheduling: campaignId is required");
57
75
  return wixCall(
58
76
  "POST",
59
77
  `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/pause-scheduling`,
60
- req
78
+ req,
79
+ opts
61
80
  );
62
81
  }
63
- function reschedule(campaignId, req = {}) {
82
+ function reschedule(campaignId, req = {}, opts) {
64
83
  if (!campaignId) throw new Error("reschedule: campaignId is required");
65
84
  return wixCall(
66
85
  "POST",
67
86
  `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/reschedule`,
68
- req
87
+ req,
88
+ opts
69
89
  );
70
90
  }
71
- function reuse(campaignId) {
91
+ function reuse(campaignId, opts) {
72
92
  if (!campaignId) throw new Error("reuse: campaignId is required");
73
93
  return wixCall(
74
94
  "POST",
75
- `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/reuse`
95
+ `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/reuse`,
96
+ void 0,
97
+ opts
76
98
  );
77
99
  }
78
- function getAudience(campaignId, req = {}) {
100
+ function getAudience(campaignId, req = {}, opts) {
79
101
  if (!campaignId) throw new Error("getAudience: campaignId is required");
80
102
  return wixCall(
81
103
  "POST",
82
104
  `/email-marketing/v1/campaigns/${encodeURIComponent(campaignId)}/audience`,
83
- req
105
+ req,
106
+ opts
84
107
  );
85
108
  }
86
- function identifySenderAddress(req = {}) {
109
+ function identifySenderAddress(req = {}, opts) {
87
110
  return wixCall(
88
111
  "POST",
89
112
  "/email-marketing/v1/identify-sender-address",
90
- req
113
+ req,
114
+ opts
91
115
  );
92
116
  }
93
- function validateLink(req = {}) {
117
+ function validateLink(req = {}, opts) {
94
118
  return wixCall(
95
119
  "POST",
96
120
  "/email-marketing/v1/campaign-validation/validate-link",
97
- req
121
+ req,
122
+ opts
98
123
  );
99
124
  }
100
- function validateHtmlLinks(req = {}) {
125
+ function validateHtmlLinks(req = {}, opts) {
101
126
  return wixCall(
102
127
  "POST",
103
128
  "/email-marketing/v1/campaign-validation/validate-html-links",
104
- req
129
+ req,
130
+ opts
105
131
  );
106
132
  }
107
- function getSenderDetails() {
133
+ function getSenderDetails(opts) {
108
134
  return wixCall(
109
135
  "GET",
110
136
  "/email-marketing/v1/sender-details",
111
- void 0
137
+ void 0,
138
+ opts
112
139
  );
113
140
  }
114
- function updateSenderDetails() {
141
+ function updateSenderDetails(opts) {
115
142
  return wixCall(
116
143
  "PATCH",
117
144
  "/email-marketing/v1/sender-details",
118
- void 0
145
+ void 0,
146
+ opts
119
147
  );
120
148
  }
121
- function verifyEmail() {
149
+ function verifyEmail(opts) {
122
150
  return wixCall(
123
151
  "POST",
124
152
  "/email-marketing/v1/sender-details/verify-email",
125
- void 0
153
+ void 0,
154
+ opts
126
155
  );
127
156
  }
128
- function resolveActualFromAddress(req = {}) {
157
+ function resolveActualFromAddress(req = {}, opts) {
129
158
  return wixCall(
130
159
  "POST",
131
160
  "/email-marketing/v1/sender-details/actual-from-address",
132
- req
161
+ req,
162
+ opts
133
163
  );
134
164
  }
135
165
  export {