@wix/himalaya-cli 0.817.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 +21 -6
- 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,114 +1,150 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/faq-v2/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-faq-v2: 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 createCategory(req = {}) {
|
|
11
|
-
return wixCall(
|
|
19
|
+
function createCategory(req = {}, opts) {
|
|
20
|
+
return wixCall(
|
|
21
|
+
"POST",
|
|
22
|
+
"/faq/v2/categories",
|
|
23
|
+
req,
|
|
24
|
+
opts
|
|
25
|
+
);
|
|
12
26
|
}
|
|
13
|
-
function getCategory(categoryId) {
|
|
27
|
+
function getCategory(categoryId, opts) {
|
|
14
28
|
if (!categoryId) throw new Error("getCategory: categoryId is required");
|
|
15
29
|
return wixCall(
|
|
16
30
|
"GET",
|
|
17
|
-
`/faq/v2/categories/${encodeURIComponent(categoryId)}
|
|
31
|
+
`/faq/v2/categories/${encodeURIComponent(categoryId)}`,
|
|
32
|
+
void 0,
|
|
33
|
+
opts
|
|
18
34
|
);
|
|
19
35
|
}
|
|
20
|
-
function updateCategory(categoryId, req = {}) {
|
|
36
|
+
function updateCategory(categoryId, req = {}, opts) {
|
|
21
37
|
if (!categoryId) throw new Error("updateCategory: categoryId is required");
|
|
22
38
|
return wixCall(
|
|
23
39
|
"PATCH",
|
|
24
40
|
`/faq/v2/categories/${encodeURIComponent(categoryId)}`,
|
|
25
|
-
req
|
|
41
|
+
req,
|
|
42
|
+
opts
|
|
26
43
|
);
|
|
27
44
|
}
|
|
28
|
-
function deleteCategory(categoryId) {
|
|
45
|
+
function deleteCategory(categoryId, opts) {
|
|
29
46
|
if (!categoryId) throw new Error("deleteCategory: categoryId is required");
|
|
30
47
|
return wixCall(
|
|
31
48
|
"DELETE",
|
|
32
|
-
`/faq/v2/categories/${encodeURIComponent(categoryId)}
|
|
49
|
+
`/faq/v2/categories/${encodeURIComponent(categoryId)}`,
|
|
50
|
+
void 0,
|
|
51
|
+
opts
|
|
33
52
|
);
|
|
34
53
|
}
|
|
35
|
-
function listCategories(req = {}) {
|
|
36
|
-
return wixCall(
|
|
54
|
+
function listCategories(req = {}, opts) {
|
|
55
|
+
return wixCall(
|
|
56
|
+
"GET",
|
|
57
|
+
"/faq/v2/categories",
|
|
58
|
+
req,
|
|
59
|
+
opts
|
|
60
|
+
);
|
|
37
61
|
}
|
|
38
|
-
function queryCategories(req = {}) {
|
|
62
|
+
function queryCategories(req = {}, opts) {
|
|
39
63
|
return wixCall(
|
|
40
64
|
"POST",
|
|
41
65
|
"/faq/v2/categories/query",
|
|
42
|
-
req
|
|
66
|
+
req,
|
|
67
|
+
opts
|
|
43
68
|
);
|
|
44
69
|
}
|
|
45
|
-
function createQuestionEntry(req = {}) {
|
|
70
|
+
function createQuestionEntry(req = {}, opts) {
|
|
46
71
|
return wixCall(
|
|
47
72
|
"POST",
|
|
48
73
|
"/faq/v2/question-entries",
|
|
49
|
-
req
|
|
74
|
+
req,
|
|
75
|
+
opts
|
|
50
76
|
);
|
|
51
77
|
}
|
|
52
|
-
function getQuestionEntry(questionEntryId) {
|
|
78
|
+
function getQuestionEntry(questionEntryId, opts) {
|
|
53
79
|
if (!questionEntryId)
|
|
54
80
|
throw new Error("getQuestionEntry: questionEntryId is required");
|
|
55
81
|
return wixCall(
|
|
56
82
|
"GET",
|
|
57
|
-
`/faq/v2/question-entries/${encodeURIComponent(questionEntryId)}
|
|
83
|
+
`/faq/v2/question-entries/${encodeURIComponent(questionEntryId)}`,
|
|
84
|
+
void 0,
|
|
85
|
+
opts
|
|
58
86
|
);
|
|
59
87
|
}
|
|
60
|
-
function updateQuestionEntry(questionEntryId, req = {}) {
|
|
88
|
+
function updateQuestionEntry(questionEntryId, req = {}, opts) {
|
|
61
89
|
if (!questionEntryId)
|
|
62
90
|
throw new Error("updateQuestionEntry: questionEntryId is required");
|
|
63
91
|
return wixCall(
|
|
64
92
|
"PATCH",
|
|
65
93
|
`/faq/v2/question-entries/${encodeURIComponent(questionEntryId)}`,
|
|
66
|
-
req
|
|
94
|
+
req,
|
|
95
|
+
opts
|
|
67
96
|
);
|
|
68
97
|
}
|
|
69
|
-
function deleteQuestionEntry(questionEntryId) {
|
|
98
|
+
function deleteQuestionEntry(questionEntryId, opts) {
|
|
70
99
|
if (!questionEntryId)
|
|
71
100
|
throw new Error("deleteQuestionEntry: questionEntryId is required");
|
|
72
101
|
return wixCall(
|
|
73
102
|
"DELETE",
|
|
74
|
-
`/faq/v2/question-entries/${encodeURIComponent(questionEntryId)}
|
|
103
|
+
`/faq/v2/question-entries/${encodeURIComponent(questionEntryId)}`,
|
|
104
|
+
void 0,
|
|
105
|
+
opts
|
|
75
106
|
);
|
|
76
107
|
}
|
|
77
|
-
function listQuestionEntries(req = {}) {
|
|
108
|
+
function listQuestionEntries(req = {}, opts) {
|
|
78
109
|
return wixCall(
|
|
79
110
|
"GET",
|
|
80
111
|
"/faq/v2/question-entries",
|
|
81
|
-
req
|
|
112
|
+
req,
|
|
113
|
+
opts
|
|
82
114
|
);
|
|
83
115
|
}
|
|
84
|
-
function queryQuestionEntries(req = {}) {
|
|
116
|
+
function queryQuestionEntries(req = {}, opts) {
|
|
85
117
|
return wixCall(
|
|
86
118
|
"POST",
|
|
87
119
|
"/faq/v2/question-entries/query",
|
|
88
|
-
req
|
|
120
|
+
req,
|
|
121
|
+
opts
|
|
89
122
|
);
|
|
90
123
|
}
|
|
91
|
-
function setQuestionEntryLabels(questionEntryId, req = {}) {
|
|
124
|
+
function setQuestionEntryLabels(questionEntryId, req = {}, opts) {
|
|
92
125
|
if (!questionEntryId)
|
|
93
126
|
throw new Error("setQuestionEntryLabels: questionEntryId is required");
|
|
94
127
|
return wixCall(
|
|
95
128
|
"PATCH",
|
|
96
129
|
`/faq/v2/question-entries/${encodeURIComponent(questionEntryId)}/labels`,
|
|
97
|
-
req
|
|
130
|
+
req,
|
|
131
|
+
opts
|
|
98
132
|
);
|
|
99
133
|
}
|
|
100
|
-
function bulkDeleteQuestionEntries(req = {}) {
|
|
134
|
+
function bulkDeleteQuestionEntries(req = {}, opts) {
|
|
101
135
|
return wixCall(
|
|
102
136
|
"POST",
|
|
103
137
|
"/faq/v2/bulk/question-entries/delete",
|
|
104
|
-
req
|
|
138
|
+
req,
|
|
139
|
+
opts
|
|
105
140
|
);
|
|
106
141
|
}
|
|
107
|
-
function bulkUpdateQuestionEntry(req = {}) {
|
|
142
|
+
function bulkUpdateQuestionEntry(req = {}, opts) {
|
|
108
143
|
return wixCall(
|
|
109
144
|
"POST",
|
|
110
145
|
"/faq/v2/bulk/question-entries/update",
|
|
111
|
-
req
|
|
146
|
+
req,
|
|
147
|
+
opts
|
|
112
148
|
);
|
|
113
149
|
}
|
|
114
150
|
export {
|
|
@@ -1,38 +1,53 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/forms/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-forms: 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 queryForms(req = {}) {
|
|
19
|
+
function queryForms(req = {}, opts) {
|
|
11
20
|
return wixCall(
|
|
12
21
|
"POST",
|
|
13
22
|
"/form-schema-service/v4/forms/query",
|
|
14
|
-
{ query: req }
|
|
23
|
+
{ query: req },
|
|
24
|
+
opts
|
|
15
25
|
);
|
|
16
26
|
}
|
|
17
|
-
function getForm(id) {
|
|
27
|
+
function getForm(id, opts) {
|
|
18
28
|
if (!id) throw new Error("getForm: id is required");
|
|
19
29
|
return wixCall(
|
|
20
30
|
"GET",
|
|
21
|
-
`/form-schema-service/v4/forms/${encodeURIComponent(id)}
|
|
31
|
+
`/form-schema-service/v4/forms/${encodeURIComponent(id)}`,
|
|
32
|
+
void 0,
|
|
33
|
+
opts
|
|
22
34
|
);
|
|
23
35
|
}
|
|
24
|
-
function querySubmissions(req = {}) {
|
|
36
|
+
function querySubmissions(req = {}, opts) {
|
|
25
37
|
return wixCall(
|
|
26
38
|
"POST",
|
|
27
39
|
"/_api/form-app/v1/submissions/query",
|
|
28
|
-
{ query: req }
|
|
40
|
+
{ query: req },
|
|
41
|
+
opts
|
|
29
42
|
);
|
|
30
43
|
}
|
|
31
|
-
function getSubmission(id) {
|
|
44
|
+
function getSubmission(id, opts) {
|
|
32
45
|
if (!id) throw new Error("getSubmission: id is required");
|
|
33
46
|
return wixCall(
|
|
34
47
|
"GET",
|
|
35
|
-
`/_api/form-app/v1/submissions/${encodeURIComponent(id)}
|
|
48
|
+
`/_api/form-app/v1/submissions/${encodeURIComponent(id)}`,
|
|
49
|
+
void 0,
|
|
50
|
+
opts
|
|
36
51
|
);
|
|
37
52
|
}
|
|
38
53
|
export {
|
|
@@ -70,33 +70,55 @@ function movePostToCategory(postId, categoryId) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// ../../stdlib/wix-sdk/forum/src/index.ts
|
|
73
|
-
function
|
|
73
|
+
function wixCallHeaders(opts) {
|
|
74
|
+
const site = opts?.site?.trim();
|
|
75
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
76
|
+
}
|
|
77
|
+
function wixCall(method, path, body, opts) {
|
|
74
78
|
if (!globalThis.himalaya?.wixApi) {
|
|
75
79
|
return Promise.reject(
|
|
76
80
|
new Error("@himalaya/wix-forum: host did not install the wixApi bridge")
|
|
77
81
|
);
|
|
78
82
|
}
|
|
79
|
-
return globalThis.himalaya.wixApi.call(
|
|
83
|
+
return globalThis.himalaya.wixApi.call(
|
|
84
|
+
method,
|
|
85
|
+
path,
|
|
86
|
+
body,
|
|
87
|
+
wixCallHeaders(opts)
|
|
88
|
+
);
|
|
80
89
|
}
|
|
81
|
-
function queryPosts(req = {}) {
|
|
82
|
-
return wixCall(
|
|
90
|
+
function queryPosts(req = {}, opts) {
|
|
91
|
+
return wixCall(
|
|
92
|
+
"POST",
|
|
93
|
+
"/forum/v1/posts/query",
|
|
94
|
+
req,
|
|
95
|
+
opts
|
|
96
|
+
);
|
|
83
97
|
}
|
|
84
|
-
function getPost(id) {
|
|
98
|
+
function getPost(id, opts) {
|
|
85
99
|
if (!id) throw new Error("getPost: id is required");
|
|
86
|
-
return wixCall(
|
|
100
|
+
return wixCall(
|
|
101
|
+
"GET",
|
|
102
|
+
`/forum/v1/posts/${encodeURIComponent(id)}`,
|
|
103
|
+
void 0,
|
|
104
|
+
opts
|
|
105
|
+
);
|
|
87
106
|
}
|
|
88
|
-
function queryCategories(req = {}) {
|
|
107
|
+
function queryCategories(req = {}, opts) {
|
|
89
108
|
return wixCall(
|
|
90
109
|
"POST",
|
|
91
110
|
"/forum/v1/categories/query",
|
|
92
|
-
req
|
|
111
|
+
req,
|
|
112
|
+
opts
|
|
93
113
|
);
|
|
94
114
|
}
|
|
95
|
-
function getCategory(id) {
|
|
115
|
+
function getCategory(id, opts) {
|
|
96
116
|
if (!id) throw new Error("getCategory: id is required");
|
|
97
117
|
return wixCall(
|
|
98
118
|
"GET",
|
|
99
|
-
`/forum/v1/categories/${encodeURIComponent(id)}
|
|
119
|
+
`/forum/v1/categories/${encodeURIComponent(id)}`,
|
|
120
|
+
void 0,
|
|
121
|
+
opts
|
|
100
122
|
);
|
|
101
123
|
}
|
|
102
124
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/gift-cards/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,71 +11,86 @@ 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 createGiftCard(req = {}) {
|
|
21
|
+
function createGiftCard(req = {}, opts) {
|
|
13
22
|
return wixCall(
|
|
14
23
|
"POST",
|
|
15
24
|
"/gift-cards/v1/gift-cards",
|
|
16
|
-
req
|
|
25
|
+
req,
|
|
26
|
+
opts
|
|
17
27
|
);
|
|
18
28
|
}
|
|
19
|
-
function getGiftCard(giftCardId) {
|
|
29
|
+
function getGiftCard(giftCardId, opts) {
|
|
20
30
|
if (!giftCardId) throw new Error("getGiftCard: giftCardId is required");
|
|
21
31
|
return wixCall(
|
|
22
32
|
"GET",
|
|
23
|
-
`/gift-cards/v1/gift-cards/${encodeURIComponent(giftCardId)}
|
|
33
|
+
`/gift-cards/v1/gift-cards/${encodeURIComponent(giftCardId)}`,
|
|
34
|
+
void 0,
|
|
35
|
+
opts
|
|
24
36
|
);
|
|
25
37
|
}
|
|
26
|
-
function queryGiftCards(req = {}) {
|
|
38
|
+
function queryGiftCards(req = {}, opts) {
|
|
27
39
|
return wixCall(
|
|
28
40
|
"POST",
|
|
29
41
|
"/gift-cards/v1/gift-cards/query",
|
|
30
|
-
req
|
|
42
|
+
req,
|
|
43
|
+
opts
|
|
31
44
|
);
|
|
32
45
|
}
|
|
33
|
-
function searchGiftCards(req = {}) {
|
|
46
|
+
function searchGiftCards(req = {}, opts) {
|
|
34
47
|
return wixCall(
|
|
35
48
|
"POST",
|
|
36
49
|
"/gift-cards/v1/gift-cards/search",
|
|
37
|
-
req
|
|
50
|
+
req,
|
|
51
|
+
opts
|
|
38
52
|
);
|
|
39
53
|
}
|
|
40
|
-
function sendGiftCardEmail(giftCardId, req = {}) {
|
|
54
|
+
function sendGiftCardEmail(giftCardId, req = {}, opts) {
|
|
41
55
|
if (!giftCardId) throw new Error("sendGiftCardEmail: giftCardId is required");
|
|
42
56
|
return wixCall(
|
|
43
57
|
"POST",
|
|
44
58
|
`/gift-cards/v1/gift-cards/${encodeURIComponent(giftCardId)}/send-email`,
|
|
45
|
-
req
|
|
59
|
+
req,
|
|
60
|
+
opts
|
|
46
61
|
);
|
|
47
62
|
}
|
|
48
|
-
function disableGiftCard(giftCardId, req = {}) {
|
|
63
|
+
function disableGiftCard(giftCardId, req = {}, opts) {
|
|
49
64
|
if (!giftCardId) throw new Error("disableGiftCard: giftCardId is required");
|
|
50
65
|
return wixCall(
|
|
51
66
|
"POST",
|
|
52
67
|
`/gift-cards/v1/gift-cards/${encodeURIComponent(giftCardId)}/disable`,
|
|
53
|
-
req
|
|
68
|
+
req,
|
|
69
|
+
opts
|
|
54
70
|
);
|
|
55
71
|
}
|
|
56
|
-
function listGiftCardsByEmail(req = {}) {
|
|
72
|
+
function listGiftCardsByEmail(req = {}, opts) {
|
|
57
73
|
return wixCall(
|
|
58
74
|
"GET",
|
|
59
75
|
"/gift-cards/v1/gift-cards",
|
|
60
|
-
req
|
|
76
|
+
req,
|
|
77
|
+
opts
|
|
61
78
|
);
|
|
62
79
|
}
|
|
63
|
-
function listGiftCardsByContactDetails(req = {}) {
|
|
80
|
+
function listGiftCardsByContactDetails(req = {}, opts) {
|
|
64
81
|
return wixCall(
|
|
65
82
|
"POST",
|
|
66
83
|
"/gift-cards/v1/gift-cards/list-by-contact-details",
|
|
67
|
-
req
|
|
84
|
+
req,
|
|
85
|
+
opts
|
|
68
86
|
);
|
|
69
87
|
}
|
|
70
|
-
function countGiftCards(req = {}) {
|
|
88
|
+
function countGiftCards(req = {}, opts) {
|
|
71
89
|
return wixCall(
|
|
72
90
|
"POST",
|
|
73
91
|
"/gift-cards/v1/gift-cards/count",
|
|
74
|
-
req
|
|
92
|
+
req,
|
|
93
|
+
opts
|
|
75
94
|
);
|
|
76
95
|
}
|
|
77
96
|
export {
|
|
@@ -24,26 +24,38 @@ function queryMembers(groupId, limit = 30) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// ../../stdlib/wix-sdk/groups/src/index.ts
|
|
27
|
-
function
|
|
27
|
+
function wixCallHeaders(opts) {
|
|
28
|
+
const site = opts?.site?.trim();
|
|
29
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
30
|
+
}
|
|
31
|
+
function wixCall(method, path, body, opts) {
|
|
28
32
|
if (!globalThis.himalaya?.wixApi) {
|
|
29
33
|
return Promise.reject(
|
|
30
34
|
new Error("@himalaya/wix-groups: host did not install the wixApi bridge")
|
|
31
35
|
);
|
|
32
36
|
}
|
|
33
|
-
return globalThis.himalaya.wixApi.call(
|
|
37
|
+
return globalThis.himalaya.wixApi.call(
|
|
38
|
+
method,
|
|
39
|
+
path,
|
|
40
|
+
body,
|
|
41
|
+
wixCallHeaders(opts)
|
|
42
|
+
);
|
|
34
43
|
}
|
|
35
|
-
function queryGroups(req = {}) {
|
|
44
|
+
function queryGroups(req = {}, opts) {
|
|
36
45
|
return wixCall(
|
|
37
46
|
"POST",
|
|
38
47
|
"/social-groups-proxy/groups/v2/groups/query",
|
|
39
|
-
{ query: req }
|
|
48
|
+
{ query: req },
|
|
49
|
+
opts
|
|
40
50
|
);
|
|
41
51
|
}
|
|
42
|
-
function getGroup(id) {
|
|
52
|
+
function getGroup(id, opts) {
|
|
43
53
|
if (!id) throw new Error("getGroup: id is required");
|
|
44
54
|
return wixCall(
|
|
45
55
|
"GET",
|
|
46
|
-
`/social-groups-proxy/groups/v2/groups/${encodeURIComponent(id)}
|
|
56
|
+
`/social-groups-proxy/groups/v2/groups/${encodeURIComponent(id)}`,
|
|
57
|
+
void 0,
|
|
58
|
+
opts
|
|
47
59
|
);
|
|
48
60
|
}
|
|
49
61
|
export {
|
|
@@ -6,33 +6,47 @@ function listConversations(req = {}) {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
// ../../stdlib/wix-sdk/inbox/src/index.ts
|
|
9
|
-
function
|
|
9
|
+
function wixCallHeaders(opts) {
|
|
10
|
+
const site = opts?.site?.trim();
|
|
11
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
12
|
+
}
|
|
13
|
+
function wixCall(method, path, body, opts) {
|
|
10
14
|
if (!globalThis.himalaya?.wixApi) {
|
|
11
15
|
return Promise.reject(
|
|
12
16
|
new Error("@himalaya/wix-inbox: host did not install the wixApi bridge")
|
|
13
17
|
);
|
|
14
18
|
}
|
|
15
|
-
return globalThis.himalaya.wixApi.call(
|
|
19
|
+
return globalThis.himalaya.wixApi.call(
|
|
20
|
+
method,
|
|
21
|
+
path,
|
|
22
|
+
body,
|
|
23
|
+
wixCallHeaders(opts)
|
|
24
|
+
);
|
|
16
25
|
}
|
|
17
|
-
function getOrCreateConversation(req = {}) {
|
|
26
|
+
function getOrCreateConversation(req = {}, opts) {
|
|
18
27
|
return wixCall(
|
|
19
28
|
"POST",
|
|
20
29
|
"/inbox/v2/conversations",
|
|
21
|
-
req
|
|
30
|
+
req,
|
|
31
|
+
opts
|
|
22
32
|
);
|
|
23
33
|
}
|
|
24
|
-
function getConversation(id) {
|
|
34
|
+
function getConversation(id, opts) {
|
|
25
35
|
if (!id) throw new Error("getConversation: id is required");
|
|
26
36
|
return wixCall(
|
|
27
37
|
"GET",
|
|
28
|
-
`/inbox/v2/conversations/${encodeURIComponent(id)}
|
|
38
|
+
`/inbox/v2/conversations/${encodeURIComponent(id)}`,
|
|
39
|
+
void 0,
|
|
40
|
+
opts
|
|
29
41
|
);
|
|
30
42
|
}
|
|
31
|
-
function getMessage(id) {
|
|
43
|
+
function getMessage(id, opts) {
|
|
32
44
|
if (!id) throw new Error("getMessage: id is required");
|
|
33
45
|
return wixCall(
|
|
34
46
|
"GET",
|
|
35
|
-
`/inbox/v2/messages/${encodeURIComponent(id)}
|
|
47
|
+
`/inbox/v2/messages/${encodeURIComponent(id)}`,
|
|
48
|
+
void 0,
|
|
49
|
+
opts
|
|
36
50
|
);
|
|
37
51
|
}
|
|
38
52
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/marketing-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,34 +11,43 @@ 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 upsertMarketingTag(req = {}) {
|
|
21
|
+
function upsertMarketingTag(req = {}, opts) {
|
|
13
22
|
return wixCall(
|
|
14
23
|
"POST",
|
|
15
24
|
"/marketing/v1/tags",
|
|
16
|
-
req
|
|
25
|
+
req,
|
|
26
|
+
opts
|
|
17
27
|
);
|
|
18
28
|
}
|
|
19
|
-
function listMarketingTags(req = {}) {
|
|
29
|
+
function listMarketingTags(req = {}, opts) {
|
|
20
30
|
return wixCall(
|
|
21
31
|
"GET",
|
|
22
32
|
"/marketing/v1/tags",
|
|
23
|
-
req
|
|
33
|
+
req,
|
|
34
|
+
opts
|
|
24
35
|
);
|
|
25
36
|
}
|
|
26
|
-
function deleteMarketingTag(req = {}) {
|
|
37
|
+
function deleteMarketingTag(req = {}, opts) {
|
|
27
38
|
return wixCall(
|
|
28
39
|
"DELETE",
|
|
29
40
|
"/marketing/v1/tags",
|
|
30
|
-
req
|
|
41
|
+
req,
|
|
42
|
+
opts
|
|
31
43
|
);
|
|
32
44
|
}
|
|
33
|
-
function deleteMarketingTagV2(req = {}) {
|
|
45
|
+
function deleteMarketingTagV2(req = {}, opts) {
|
|
34
46
|
return wixCall(
|
|
35
47
|
"DELETE",
|
|
36
48
|
"/marketing/v2/tags",
|
|
37
|
-
req
|
|
49
|
+
req,
|
|
50
|
+
opts
|
|
38
51
|
);
|
|
39
52
|
}
|
|
40
53
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/notifications-v3/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,10 +11,20 @@ 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 notify(req = {}) {
|
|
13
|
-
return wixCall(
|
|
21
|
+
function notify(req = {}, opts) {
|
|
22
|
+
return wixCall(
|
|
23
|
+
"POST",
|
|
24
|
+
"/notifications/v3/notify",
|
|
25
|
+
req,
|
|
26
|
+
opts
|
|
27
|
+
);
|
|
14
28
|
}
|
|
15
29
|
export {
|
|
16
30
|
notify,
|
|
@@ -359,6 +359,36 @@ var site = {
|
|
|
359
359
|
} catch {
|
|
360
360
|
return null;
|
|
361
361
|
}
|
|
362
|
+
},
|
|
363
|
+
/** A handle that runs calls against ONE business, without moving the active site.
|
|
364
|
+
*
|
|
365
|
+
* `setActiveSite` re-scopes the whole process — every later call, every worker, the
|
|
366
|
+
* conducted cache and the entity cache all move with it. That is right for "the owner
|
|
367
|
+
* picked a business to manage", and wrong for "show me tonight's covers across all
|
|
368
|
+
* three restaurants": a rollup needs N businesses readable AT ONCE, and switching
|
|
369
|
+
* between them to read each one serially is both slow and destructive of the scope the
|
|
370
|
+
* user is actually in.
|
|
371
|
+
*
|
|
372
|
+
* The returned object IS a `WixSiteScope`, so it can be handed straight to a generated
|
|
373
|
+
* client as its options bag — `searchOrders(req, site.forSite(msid))` — and it also
|
|
374
|
+
* carries `call` for a raw path the typed clients do not cover. Fan several out with
|
|
375
|
+
* `Promise.all` and each one keeps its own business.
|
|
376
|
+
*
|
|
377
|
+
* Only reaches businesses the signed-in user owns: the header names a business, and
|
|
378
|
+
* Wix refuses to mint an instance for one they do not. A consumer app (one Headless
|
|
379
|
+
* clientId, one site) does not mint per-site at all, so this is inert there — see
|
|
380
|
+
* docs/branded-lite-site-binding.md. */
|
|
381
|
+
forSite(msid) {
|
|
382
|
+
const scoped = (msid ?? "").trim();
|
|
383
|
+
return {
|
|
384
|
+
site: scoped,
|
|
385
|
+
async call(method, path, body) {
|
|
386
|
+
const api = wpHost().wixApi;
|
|
387
|
+
if (!api) throw new Error("wixApi bridge unavailable");
|
|
388
|
+
if (!scoped) throw new Error("site.forSite: a metaSiteId is required");
|
|
389
|
+
return await api.call(method, path, body, { "wix-site-id": scoped });
|
|
390
|
+
}
|
|
391
|
+
};
|
|
362
392
|
}
|
|
363
393
|
};
|
|
364
394
|
var monitoring = {
|