@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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +32 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/activity-counters-v1/src/index.d.ts +16 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +40 -30
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/badges-v2/src/index.d.ts +23 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +22 -12
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/index.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +18 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-feed/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +29 -19
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +28 -18
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/contacts/src/index.d.ts +18 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/coupons/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/crm-tasks/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/dashboard-setup/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +29 -19
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +20 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/index.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +29 -19
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +27 -17
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/index.d.ts +16 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forum/src/index.d.ts +16 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +21 -11
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +14 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/index.d.ts +15 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/invoices/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/marketing-v1/src/index.d.ts +16 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/new-releases/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notifications-v3/src/index.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/index.d.ts +18 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/reviews/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +15 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-list/src/index.d.ts +14 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/index.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/table-reservations/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/users/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/wix-data/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +14 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-activity-counters.mjs +24 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-automations.mjs +100 -58
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-badges.mjs +54 -24
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-billing-tax.mjs +43 -22
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +18 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +36 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +63 -36
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +62 -34
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-contacts.mjs +35 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +62 -36
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +37 -18
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +14 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +66 -36
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +68 -32
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +25 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forum.mjs +32 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-gift-cards.mjs +39 -20
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +18 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-inbox.mjs +22 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-marketing.mjs +23 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notifications.mjs +18 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +30 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-redirects.mjs +14 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-restaurants.mjs +32 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-seo.mjs +20 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-list.mjs +17 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +15 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-workflows.mjs +28 -12
- package/dist/cli.mjs +58 -14
- package/guides/branded-lite-site-binding.md +14 -6
- package/guides/sdk-reference.json +398 -230
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +1 -181
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/beauty-salon-owner/dev/index.ts +564 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/branded-lite/dev/index.ts +1 -181
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/community-club/dev/index.ts +1 -181
- package/templates/community-club/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/community-club-owner/dev/index.ts +564 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/events-meetups/dev/index.ts +1 -181
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/events-meetups-owner/dev/index.ts +564 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/gym-fitness/dev/index.ts +1 -181
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/gym-fitness-owner/dev/index.ts +564 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/nonprofit-cause/dev/index.ts +1 -181
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/nonprofit-cause-owner/dev/index.ts +564 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/owner-lite/dev/index.ts +564 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/podcast-creator/dev/index.ts +1 -181
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/podcast-creator-owner/dev/index.ts +564 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/portfolio-creative/dev/index.ts +1 -181
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/portfolio-creative-owner/dev/index.ts +564 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/restaurant/dev/index.ts +1 -181
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/restaurant-owner/dev/index.ts +564 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/retail-store/dev/index.ts +1 -181
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/retail-store-owner/dev/index.ts +564 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
- package/templates/yoga-studio/dev/index.ts +1 -181
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +9 -141
- package/templates/yoga-studio-owner/dev/index.ts +564 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-overview/index.ts +220 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/redirects-v1/src/index.ts
|
|
2
|
-
function
|
|
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,13 +11,19 @@ function wixCall(method, path, body) {
|
|
|
7
11
|
)
|
|
8
12
|
);
|
|
9
13
|
}
|
|
10
|
-
return globalThis.himalaya.wixApi.call(
|
|
14
|
+
return globalThis.himalaya.wixApi.call(
|
|
15
|
+
method,
|
|
16
|
+
path,
|
|
17
|
+
body,
|
|
18
|
+
wixCallHeaders(opts)
|
|
19
|
+
);
|
|
11
20
|
}
|
|
12
|
-
function createRedirectSession(req = {}) {
|
|
21
|
+
function createRedirectSession(req = {}, opts) {
|
|
13
22
|
return wixCall(
|
|
14
23
|
"POST",
|
|
15
24
|
"/_api/redirects-api/v1/redirect-session",
|
|
16
|
-
req
|
|
25
|
+
req,
|
|
26
|
+
opts
|
|
17
27
|
);
|
|
18
28
|
}
|
|
19
29
|
export {
|
|
@@ -8,7 +8,11 @@ function querySections(req = {}) {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
// ../../stdlib/wix-sdk/restaurants/src/index.ts
|
|
11
|
-
function
|
|
11
|
+
function wixCallHeaders(opts) {
|
|
12
|
+
const site = opts?.site?.trim();
|
|
13
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
14
|
+
}
|
|
15
|
+
function wixCall(method, path, body, opts) {
|
|
12
16
|
if (!globalThis.himalaya?.wixApi) {
|
|
13
17
|
return Promise.reject(
|
|
14
18
|
new Error(
|
|
@@ -16,48 +20,62 @@ function wixCall(method, path, body) {
|
|
|
16
20
|
)
|
|
17
21
|
);
|
|
18
22
|
}
|
|
19
|
-
return globalThis.himalaya.wixApi.call(
|
|
23
|
+
return globalThis.himalaya.wixApi.call(
|
|
24
|
+
method,
|
|
25
|
+
path,
|
|
26
|
+
body,
|
|
27
|
+
wixCallHeaders(opts)
|
|
28
|
+
);
|
|
20
29
|
}
|
|
21
|
-
function queryMenus(req = {}) {
|
|
30
|
+
function queryMenus(req = {}, opts) {
|
|
22
31
|
return wixCall(
|
|
23
32
|
"POST",
|
|
24
33
|
"/restaurants/menus/v1/menus/query",
|
|
25
|
-
req
|
|
34
|
+
req,
|
|
35
|
+
opts
|
|
26
36
|
);
|
|
27
37
|
}
|
|
28
|
-
function getMenu(id) {
|
|
38
|
+
function getMenu(id, opts) {
|
|
29
39
|
if (!id) throw new Error("getMenu: id is required");
|
|
30
40
|
return wixCall(
|
|
31
41
|
"GET",
|
|
32
|
-
`/restaurants/menus/v1/menus/${encodeURIComponent(id)}
|
|
42
|
+
`/restaurants/menus/v1/menus/${encodeURIComponent(id)}`,
|
|
43
|
+
void 0,
|
|
44
|
+
opts
|
|
33
45
|
);
|
|
34
46
|
}
|
|
35
|
-
function queryItems(req = {}) {
|
|
47
|
+
function queryItems(req = {}, opts) {
|
|
36
48
|
return wixCall(
|
|
37
49
|
"POST",
|
|
38
50
|
"/restaurants/menus/v1/items/query",
|
|
39
|
-
req
|
|
51
|
+
req,
|
|
52
|
+
opts
|
|
40
53
|
);
|
|
41
54
|
}
|
|
42
|
-
function getItem(id) {
|
|
55
|
+
function getItem(id, opts) {
|
|
43
56
|
if (!id) throw new Error("getItem: id is required");
|
|
44
57
|
return wixCall(
|
|
45
58
|
"GET",
|
|
46
|
-
`/restaurants/menus/v1/items/${encodeURIComponent(id)}
|
|
59
|
+
`/restaurants/menus/v1/items/${encodeURIComponent(id)}`,
|
|
60
|
+
void 0,
|
|
61
|
+
opts
|
|
47
62
|
);
|
|
48
63
|
}
|
|
49
|
-
function queryOrders(req = {}) {
|
|
64
|
+
function queryOrders(req = {}, opts) {
|
|
50
65
|
return wixCall(
|
|
51
66
|
"POST",
|
|
52
67
|
"/restaurants/orders/v1/orders/query",
|
|
53
|
-
req
|
|
68
|
+
req,
|
|
69
|
+
opts
|
|
54
70
|
);
|
|
55
71
|
}
|
|
56
|
-
function getOrder(id) {
|
|
72
|
+
function getOrder(id, opts) {
|
|
57
73
|
if (!id) throw new Error("getOrder: id is required");
|
|
58
74
|
return wixCall(
|
|
59
75
|
"GET",
|
|
60
|
-
`/restaurants/orders/v1/orders/${encodeURIComponent(id)}
|
|
76
|
+
`/restaurants/orders/v1/orders/${encodeURIComponent(id)}`,
|
|
77
|
+
void 0,
|
|
78
|
+
opts
|
|
61
79
|
);
|
|
62
80
|
}
|
|
63
81
|
export {
|
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/seo-v1/src/index.ts
|
|
2
|
-
function
|
|
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("@himalaya/wix-seo-v1: host did not install the wixApi bridge")
|
|
6
10
|
);
|
|
7
11
|
}
|
|
8
|
-
return globalThis.himalaya.wixApi.call(
|
|
12
|
+
return globalThis.himalaya.wixApi.call(
|
|
13
|
+
method,
|
|
14
|
+
path,
|
|
15
|
+
body,
|
|
16
|
+
wixCallHeaders(opts)
|
|
17
|
+
);
|
|
9
18
|
}
|
|
10
|
-
function resolveSeoTags(req = {}) {
|
|
19
|
+
function resolveSeoTags(req = {}, opts) {
|
|
11
20
|
return wixCall(
|
|
12
21
|
"GET",
|
|
13
22
|
"/promote/seo/v1/resolve-seo-tags",
|
|
14
|
-
req
|
|
23
|
+
req,
|
|
24
|
+
opts
|
|
15
25
|
);
|
|
16
26
|
}
|
|
17
|
-
function resolveStaticPageSeoTags(req = {}) {
|
|
27
|
+
function resolveStaticPageSeoTags(req = {}, opts) {
|
|
18
28
|
return wixCall(
|
|
19
29
|
"GET",
|
|
20
30
|
"/promote/seo/v1/resolve-static-page-seo-tags",
|
|
21
|
-
req
|
|
31
|
+
req,
|
|
32
|
+
opts
|
|
22
33
|
);
|
|
23
34
|
}
|
|
24
|
-
function resolveItemSeoTags(req = {}) {
|
|
35
|
+
function resolveItemSeoTags(req = {}, opts) {
|
|
25
36
|
return wixCall(
|
|
26
37
|
"GET",
|
|
27
38
|
"/promote/seo/v1/resolve-item-seo-tags",
|
|
28
|
-
req
|
|
39
|
+
req,
|
|
40
|
+
opts
|
|
29
41
|
);
|
|
30
42
|
}
|
|
31
43
|
export {
|
|
@@ -10,7 +10,11 @@ function removeSiteFromTrash(metaSiteId) {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// ../../stdlib/wix-sdk/site-list/src/index.ts
|
|
13
|
-
function
|
|
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,20 +22,27 @@ function wixCall(method, path, body) {
|
|
|
18
22
|
)
|
|
19
23
|
);
|
|
20
24
|
}
|
|
21
|
-
return globalThis.himalaya.wixApi.call(
|
|
25
|
+
return globalThis.himalaya.wixApi.call(
|
|
26
|
+
method,
|
|
27
|
+
path,
|
|
28
|
+
body,
|
|
29
|
+
wixCallHeaders(opts)
|
|
30
|
+
);
|
|
22
31
|
}
|
|
23
|
-
function querySites(req = {}) {
|
|
32
|
+
function querySites(req = {}, opts) {
|
|
24
33
|
return wixCall(
|
|
25
34
|
"POST",
|
|
26
35
|
"/site-list/v2/sites/query",
|
|
27
|
-
req
|
|
36
|
+
req,
|
|
37
|
+
opts
|
|
28
38
|
);
|
|
29
39
|
}
|
|
30
|
-
function countSites(req = {}) {
|
|
40
|
+
function countSites(req = {}, opts) {
|
|
31
41
|
return wixCall(
|
|
32
42
|
"POST",
|
|
33
43
|
"/site-list/v2/sites/count",
|
|
34
|
-
req
|
|
44
|
+
req,
|
|
45
|
+
opts
|
|
35
46
|
);
|
|
36
47
|
}
|
|
37
48
|
export {
|
|
@@ -513,7 +513,11 @@ function forgetCatalogVersion2() {
|
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
// ../../stdlib/wix-sdk/stores-v1/src/index.ts
|
|
516
|
-
function
|
|
516
|
+
function wixCallHeaders(opts) {
|
|
517
|
+
const site = opts?.site?.trim();
|
|
518
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
519
|
+
}
|
|
520
|
+
function wixCall(method, path, body, opts) {
|
|
517
521
|
if (!globalThis.himalaya?.wixApi) {
|
|
518
522
|
return Promise.reject(
|
|
519
523
|
new Error(
|
|
@@ -521,13 +525,20 @@ function wixCall(method, path, body) {
|
|
|
521
525
|
)
|
|
522
526
|
);
|
|
523
527
|
}
|
|
524
|
-
return globalThis.himalaya.wixApi.call(
|
|
528
|
+
return globalThis.himalaya.wixApi.call(
|
|
529
|
+
method,
|
|
530
|
+
path,
|
|
531
|
+
body,
|
|
532
|
+
wixCallHeaders(opts)
|
|
533
|
+
);
|
|
525
534
|
}
|
|
526
|
-
function addProductMedia(productId) {
|
|
535
|
+
function addProductMedia(productId, opts) {
|
|
527
536
|
if (!productId) throw new Error("addProductMedia: productId is required");
|
|
528
537
|
return wixCall(
|
|
529
538
|
"POST",
|
|
530
|
-
`/stores/v1/products/${encodeURIComponent(productId)}/media
|
|
539
|
+
`/stores/v1/products/${encodeURIComponent(productId)}/media`,
|
|
540
|
+
void 0,
|
|
541
|
+
opts
|
|
531
542
|
);
|
|
532
543
|
}
|
|
533
544
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/workflows-v1/src/index.ts
|
|
2
|
-
function
|
|
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,42 +11,54 @@ function wixCall(method, path, body) {
|
|
|
7
11
|
)
|
|
8
12
|
);
|
|
9
13
|
}
|
|
10
|
-
return globalThis.himalaya.wixApi.call(
|
|
14
|
+
return globalThis.himalaya.wixApi.call(
|
|
15
|
+
method,
|
|
16
|
+
path,
|
|
17
|
+
body,
|
|
18
|
+
wixCallHeaders(opts)
|
|
19
|
+
);
|
|
11
20
|
}
|
|
12
|
-
function listWorkflows(req = {}) {
|
|
21
|
+
function listWorkflows(req = {}, opts) {
|
|
13
22
|
return wixCall(
|
|
14
23
|
"GET",
|
|
15
24
|
"/workflows/v1/workflows",
|
|
16
|
-
req
|
|
25
|
+
req,
|
|
26
|
+
opts
|
|
17
27
|
);
|
|
18
28
|
}
|
|
19
|
-
function getWorkflow(id) {
|
|
29
|
+
function getWorkflow(id, opts) {
|
|
20
30
|
if (!id) throw new Error("getWorkflow: id is required");
|
|
21
31
|
return wixCall(
|
|
22
32
|
"GET",
|
|
23
|
-
`/workflows/v1/workflows/${encodeURIComponent(id)}
|
|
33
|
+
`/workflows/v1/workflows/${encodeURIComponent(id)}`,
|
|
34
|
+
void 0,
|
|
35
|
+
opts
|
|
24
36
|
);
|
|
25
37
|
}
|
|
26
|
-
function updateWorkflow(id, req = {}) {
|
|
38
|
+
function updateWorkflow(id, req = {}, opts) {
|
|
27
39
|
if (!id) throw new Error("updateWorkflow: id is required");
|
|
28
40
|
return wixCall(
|
|
29
41
|
"PATCH",
|
|
30
42
|
`/workflows/v1/workflows/${encodeURIComponent(id)}`,
|
|
31
|
-
req
|
|
43
|
+
req,
|
|
44
|
+
opts
|
|
32
45
|
);
|
|
33
46
|
}
|
|
34
|
-
function createWorkflow(req = {}) {
|
|
47
|
+
function createWorkflow(req = {}, opts) {
|
|
35
48
|
return wixCall(
|
|
36
49
|
"POST",
|
|
37
50
|
"/workflows/v1/workflows",
|
|
38
|
-
req
|
|
51
|
+
req,
|
|
52
|
+
opts
|
|
39
53
|
);
|
|
40
54
|
}
|
|
41
|
-
function deleteWorkflow(id) {
|
|
55
|
+
function deleteWorkflow(id, opts) {
|
|
42
56
|
if (!id) throw new Error("deleteWorkflow: id is required");
|
|
43
57
|
return wixCall(
|
|
44
58
|
"DELETE",
|
|
45
|
-
`/workflows/v1/workflows/${encodeURIComponent(id)}
|
|
59
|
+
`/workflows/v1/workflows/${encodeURIComponent(id)}`,
|
|
60
|
+
void 0,
|
|
61
|
+
opts
|
|
46
62
|
);
|
|
47
63
|
}
|
|
48
64
|
export {
|