@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.
- 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 +23 -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,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/automations-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,24 +11,32 @@ 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 getAutomationRevision(automationId) {
|
|
21
|
+
function getAutomationRevision(automationId, opts) {
|
|
13
22
|
if (!automationId)
|
|
14
23
|
throw new Error("getAutomationRevision: automationId is required");
|
|
15
24
|
return wixCall(
|
|
16
25
|
"GET",
|
|
17
|
-
`/automations/v1/automation-revisions/${encodeURIComponent(automationId)}
|
|
26
|
+
`/automations/v1/automation-revisions/${encodeURIComponent(automationId)}`,
|
|
27
|
+
void 0,
|
|
28
|
+
opts
|
|
18
29
|
);
|
|
19
30
|
}
|
|
20
|
-
function createAutomation(req = {}) {
|
|
31
|
+
function createAutomation(req = {}, opts) {
|
|
21
32
|
return wixCall(
|
|
22
33
|
"POST",
|
|
23
34
|
"/automations/v2/automations",
|
|
24
|
-
req
|
|
35
|
+
req,
|
|
36
|
+
opts
|
|
25
37
|
);
|
|
26
38
|
}
|
|
27
|
-
function createAutomationFromTemplateId(automationTemplateId, req = {}) {
|
|
39
|
+
function createAutomationFromTemplateId(automationTemplateId, req = {}, opts) {
|
|
28
40
|
if (!automationTemplateId)
|
|
29
41
|
throw new Error(
|
|
30
42
|
"createAutomationFromTemplateId: automationTemplateId is required"
|
|
@@ -32,64 +44,74 @@ function createAutomationFromTemplateId(automationTemplateId, req = {}) {
|
|
|
32
44
|
return wixCall(
|
|
33
45
|
"POST",
|
|
34
46
|
`/automations/v2/automations/from-template/${encodeURIComponent(automationTemplateId)}`,
|
|
35
|
-
req
|
|
47
|
+
req,
|
|
48
|
+
opts
|
|
36
49
|
);
|
|
37
50
|
}
|
|
38
|
-
function getAutomation(automationId) {
|
|
51
|
+
function getAutomation(automationId, opts) {
|
|
39
52
|
if (!automationId) throw new Error("getAutomation: automationId is required");
|
|
40
53
|
return wixCall(
|
|
41
54
|
"GET",
|
|
42
|
-
`/automations/v2/automations/${encodeURIComponent(automationId)}
|
|
55
|
+
`/automations/v2/automations/${encodeURIComponent(automationId)}`,
|
|
56
|
+
void 0,
|
|
57
|
+
opts
|
|
43
58
|
);
|
|
44
59
|
}
|
|
45
|
-
function updateAutomation(automationId, req = {}) {
|
|
60
|
+
function updateAutomation(automationId, req = {}, opts) {
|
|
46
61
|
if (!automationId)
|
|
47
62
|
throw new Error("updateAutomation: automationId is required");
|
|
48
63
|
return wixCall(
|
|
49
64
|
"PATCH",
|
|
50
65
|
`/automations/v2/automations/${encodeURIComponent(automationId)}`,
|
|
51
|
-
req
|
|
66
|
+
req,
|
|
67
|
+
opts
|
|
52
68
|
);
|
|
53
69
|
}
|
|
54
|
-
function deleteAutomation(automationId) {
|
|
70
|
+
function deleteAutomation(automationId, opts) {
|
|
55
71
|
if (!automationId)
|
|
56
72
|
throw new Error("deleteAutomation: automationId is required");
|
|
57
73
|
return wixCall(
|
|
58
74
|
"DELETE",
|
|
59
|
-
`/automations/v2/automations/${encodeURIComponent(automationId)}
|
|
75
|
+
`/automations/v2/automations/${encodeURIComponent(automationId)}`,
|
|
76
|
+
void 0,
|
|
77
|
+
opts
|
|
60
78
|
);
|
|
61
79
|
}
|
|
62
|
-
function queryAutomations(req = {}) {
|
|
80
|
+
function queryAutomations(req = {}, opts) {
|
|
63
81
|
return wixCall(
|
|
64
82
|
"POST",
|
|
65
83
|
"/automations/v2/automations/query",
|
|
66
|
-
req
|
|
84
|
+
req,
|
|
85
|
+
opts
|
|
67
86
|
);
|
|
68
87
|
}
|
|
69
|
-
function getAggregatedUsageInfo(req = {}) {
|
|
88
|
+
function getAggregatedUsageInfo(req = {}, opts) {
|
|
70
89
|
return wixCall(
|
|
71
90
|
"GET",
|
|
72
91
|
"/automations/v2/automations/usage",
|
|
73
|
-
req
|
|
92
|
+
req,
|
|
93
|
+
opts
|
|
74
94
|
);
|
|
75
95
|
}
|
|
76
|
-
function copyAutomation(automationId, req = {}) {
|
|
96
|
+
function copyAutomation(automationId, req = {}, opts) {
|
|
77
97
|
if (!automationId)
|
|
78
98
|
throw new Error("copyAutomation: automationId is required");
|
|
79
99
|
return wixCall(
|
|
80
100
|
"POST",
|
|
81
101
|
`/automations/v2/automations/${encodeURIComponent(automationId)}/copy`,
|
|
82
|
-
req
|
|
102
|
+
req,
|
|
103
|
+
opts
|
|
83
104
|
);
|
|
84
105
|
}
|
|
85
|
-
function createDraftAutomation(req = {}) {
|
|
106
|
+
function createDraftAutomation(req = {}, opts) {
|
|
86
107
|
return wixCall(
|
|
87
108
|
"POST",
|
|
88
109
|
"/automations/v2/automations/drafts",
|
|
89
|
-
req
|
|
110
|
+
req,
|
|
111
|
+
opts
|
|
90
112
|
);
|
|
91
113
|
}
|
|
92
|
-
function createDraftAutomationFromTemplateId(automationTemplateId, req = {}) {
|
|
114
|
+
function createDraftAutomationFromTemplateId(automationTemplateId, req = {}, opts) {
|
|
93
115
|
if (!automationTemplateId)
|
|
94
116
|
throw new Error(
|
|
95
117
|
"createDraftAutomationFromTemplateId: automationTemplateId is required"
|
|
@@ -97,10 +119,11 @@ function createDraftAutomationFromTemplateId(automationTemplateId, req = {}) {
|
|
|
97
119
|
return wixCall(
|
|
98
120
|
"POST",
|
|
99
121
|
`/automations/v2/automations/drafts/from-template/${encodeURIComponent(automationTemplateId)}`,
|
|
100
|
-
req
|
|
122
|
+
req,
|
|
123
|
+
opts
|
|
101
124
|
);
|
|
102
125
|
}
|
|
103
|
-
function getOrCreateDraftAutomation(originalAutomationId, req = {}) {
|
|
126
|
+
function getOrCreateDraftAutomation(originalAutomationId, req = {}, opts) {
|
|
104
127
|
if (!originalAutomationId)
|
|
105
128
|
throw new Error(
|
|
106
129
|
"getOrCreateDraftAutomation: originalAutomationId is required"
|
|
@@ -108,127 +131,146 @@ function getOrCreateDraftAutomation(originalAutomationId, req = {}) {
|
|
|
108
131
|
return wixCall(
|
|
109
132
|
"POST",
|
|
110
133
|
`/automations/v2/automations/drafts/get-or-create/original-automation-id/${encodeURIComponent(originalAutomationId)}`,
|
|
111
|
-
req
|
|
134
|
+
req,
|
|
135
|
+
opts
|
|
112
136
|
);
|
|
113
137
|
}
|
|
114
|
-
function updateDraftAutomation(automationId, req = {}) {
|
|
138
|
+
function updateDraftAutomation(automationId, req = {}, opts) {
|
|
115
139
|
if (!automationId)
|
|
116
140
|
throw new Error("updateDraftAutomation: automationId is required");
|
|
117
141
|
return wixCall(
|
|
118
142
|
"PATCH",
|
|
119
143
|
`/automations/v2/automations/drafts/${encodeURIComponent(automationId)}`,
|
|
120
|
-
req
|
|
144
|
+
req,
|
|
145
|
+
opts
|
|
121
146
|
);
|
|
122
147
|
}
|
|
123
|
-
function queryAutomationsWithDrafts(req = {}) {
|
|
148
|
+
function queryAutomationsWithDrafts(req = {}, opts) {
|
|
124
149
|
return wixCall(
|
|
125
150
|
"POST",
|
|
126
151
|
"/automations/v2/automations/query-with-drafts",
|
|
127
|
-
req
|
|
152
|
+
req,
|
|
153
|
+
opts
|
|
128
154
|
);
|
|
129
155
|
}
|
|
130
|
-
function bulkCountAutomationsWithDrafts(req = {}) {
|
|
156
|
+
function bulkCountAutomationsWithDrafts(req = {}, opts) {
|
|
131
157
|
return wixCall(
|
|
132
158
|
"POST",
|
|
133
159
|
"/automations/v2/automations/bulk-count-with-drafts",
|
|
134
|
-
req
|
|
160
|
+
req,
|
|
161
|
+
opts
|
|
135
162
|
);
|
|
136
163
|
}
|
|
137
|
-
function deleteDraftAutomation(automationId) {
|
|
164
|
+
function deleteDraftAutomation(automationId, opts) {
|
|
138
165
|
if (!automationId)
|
|
139
166
|
throw new Error("deleteDraftAutomation: automationId is required");
|
|
140
167
|
return wixCall(
|
|
141
168
|
"DELETE",
|
|
142
|
-
`/automations/v2/automations/drafts/${encodeURIComponent(automationId)}
|
|
169
|
+
`/automations/v2/automations/drafts/${encodeURIComponent(automationId)}`,
|
|
170
|
+
void 0,
|
|
171
|
+
opts
|
|
143
172
|
);
|
|
144
173
|
}
|
|
145
|
-
function publishDraftAutomation(automationId, req = {}) {
|
|
174
|
+
function publishDraftAutomation(automationId, req = {}, opts) {
|
|
146
175
|
if (!automationId)
|
|
147
176
|
throw new Error("publishDraftAutomation: automationId is required");
|
|
148
177
|
return wixCall(
|
|
149
178
|
"POST",
|
|
150
179
|
`/automations/v2/automations/drafts/${encodeURIComponent(automationId)}/publish`,
|
|
151
|
-
req
|
|
180
|
+
req,
|
|
181
|
+
opts
|
|
152
182
|
);
|
|
153
183
|
}
|
|
154
|
-
function validateAutomation(req = {}) {
|
|
184
|
+
function validateAutomation(req = {}, opts) {
|
|
155
185
|
return wixCall(
|
|
156
186
|
"POST",
|
|
157
187
|
"/automations/v2/automations/validate",
|
|
158
|
-
req
|
|
188
|
+
req,
|
|
189
|
+
opts
|
|
159
190
|
);
|
|
160
191
|
}
|
|
161
|
-
function validateAutomationById(automationId, req = {}) {
|
|
192
|
+
function validateAutomationById(automationId, req = {}, opts) {
|
|
162
193
|
if (!automationId)
|
|
163
194
|
throw new Error("validateAutomationById: automationId is required");
|
|
164
195
|
return wixCall(
|
|
165
196
|
"POST",
|
|
166
197
|
`/automations/v2/automations/${encodeURIComponent(automationId)}/validate`,
|
|
167
|
-
req
|
|
198
|
+
req,
|
|
199
|
+
opts
|
|
168
200
|
);
|
|
169
201
|
}
|
|
170
|
-
function getActionsQuotaInfo(req = {}) {
|
|
202
|
+
function getActionsQuotaInfo(req = {}, opts) {
|
|
171
203
|
return wixCall(
|
|
172
204
|
"GET",
|
|
173
205
|
"/automations/v2/automations/actions/quota",
|
|
174
|
-
req
|
|
206
|
+
req,
|
|
207
|
+
opts
|
|
175
208
|
);
|
|
176
209
|
}
|
|
177
|
-
function generateActionInputMappingFromTemplate(req = {}) {
|
|
210
|
+
function generateActionInputMappingFromTemplate(req = {}, opts) {
|
|
178
211
|
return wixCall(
|
|
179
212
|
"POST",
|
|
180
213
|
"/automations/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
181
|
-
req
|
|
214
|
+
req,
|
|
215
|
+
opts
|
|
182
216
|
);
|
|
183
217
|
}
|
|
184
|
-
function bulkDeleteAutomations(req = {}) {
|
|
218
|
+
function bulkDeleteAutomations(req = {}, opts) {
|
|
185
219
|
return wixCall(
|
|
186
220
|
"POST",
|
|
187
221
|
"/automations/v2/bulk/automations/delete",
|
|
188
|
-
req
|
|
222
|
+
req,
|
|
223
|
+
opts
|
|
189
224
|
);
|
|
190
225
|
}
|
|
191
|
-
function createPreinstalledAutomation(req = {}) {
|
|
226
|
+
function createPreinstalledAutomation(req = {}, opts) {
|
|
192
227
|
return wixCall(
|
|
193
228
|
"POST",
|
|
194
229
|
"/automations/v2/preinstalled-automation",
|
|
195
|
-
req
|
|
230
|
+
req,
|
|
231
|
+
opts
|
|
196
232
|
);
|
|
197
233
|
}
|
|
198
|
-
function updatePreinstalledAutomation(req = {}) {
|
|
234
|
+
function updatePreinstalledAutomation(req = {}, opts) {
|
|
199
235
|
return wixCall(
|
|
200
236
|
"PATCH",
|
|
201
237
|
"/automations/v2/preinstalled-automation",
|
|
202
|
-
req
|
|
238
|
+
req,
|
|
239
|
+
opts
|
|
203
240
|
);
|
|
204
241
|
}
|
|
205
|
-
function deletePreinstalledAutomation(componentId) {
|
|
242
|
+
function deletePreinstalledAutomation(componentId, opts) {
|
|
206
243
|
if (!componentId)
|
|
207
244
|
throw new Error("deletePreinstalledAutomation: componentId is required");
|
|
208
245
|
return wixCall(
|
|
209
246
|
"DELETE",
|
|
210
|
-
`/automations/v2/preinstalled-automation/${encodeURIComponent(componentId)}
|
|
247
|
+
`/automations/v2/preinstalled-automation/${encodeURIComponent(componentId)}`,
|
|
248
|
+
void 0,
|
|
249
|
+
opts
|
|
211
250
|
);
|
|
212
251
|
}
|
|
213
|
-
function generatePreinstalledAutomation(req = {}) {
|
|
252
|
+
function generatePreinstalledAutomation(req = {}, opts) {
|
|
214
253
|
return wixCall(
|
|
215
254
|
"POST",
|
|
216
255
|
"/automations/v2/preinstalled-automation/generate",
|
|
217
|
-
req
|
|
256
|
+
req,
|
|
257
|
+
opts
|
|
218
258
|
);
|
|
219
259
|
}
|
|
220
|
-
function queryPreinstalledAutomationsForApp(req = {}) {
|
|
260
|
+
function queryPreinstalledAutomationsForApp(req = {}, opts) {
|
|
221
261
|
return wixCall(
|
|
222
262
|
"POST",
|
|
223
263
|
"/automations/v2/preinstalled-automations/query",
|
|
224
|
-
req
|
|
264
|
+
req,
|
|
265
|
+
opts
|
|
225
266
|
);
|
|
226
267
|
}
|
|
227
|
-
function queryPreinstalledAutomations(req = {}) {
|
|
268
|
+
function queryPreinstalledAutomations(req = {}, opts) {
|
|
228
269
|
return wixCall(
|
|
229
270
|
"POST",
|
|
230
271
|
"/automations/v2/preinstalled-automations/global/query",
|
|
231
|
-
req
|
|
272
|
+
req,
|
|
273
|
+
opts
|
|
232
274
|
);
|
|
233
275
|
}
|
|
234
276
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/badges-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(
|
|
@@ -7,73 +11,99 @@ 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 create(req = {}) {
|
|
13
|
-
return wixCall("POST", "/badges/v4/badges", req);
|
|
21
|
+
function create(req = {}, opts) {
|
|
22
|
+
return wixCall("POST", "/badges/v4/badges", req, opts);
|
|
14
23
|
}
|
|
15
|
-
function update(id, req = {}) {
|
|
24
|
+
function update(id, req = {}, opts) {
|
|
16
25
|
if (!id) throw new Error("update: id is required");
|
|
17
26
|
return wixCall(
|
|
18
27
|
"PATCH",
|
|
19
28
|
`/badges/v4/badges/${encodeURIComponent(id)}`,
|
|
20
|
-
req
|
|
29
|
+
req,
|
|
30
|
+
opts
|
|
21
31
|
);
|
|
22
32
|
}
|
|
23
|
-
function query(req = {}) {
|
|
24
|
-
return wixCall(
|
|
33
|
+
function query(req = {}, opts) {
|
|
34
|
+
return wixCall(
|
|
35
|
+
"POST",
|
|
36
|
+
"/badges/v4/badges/query",
|
|
37
|
+
req,
|
|
38
|
+
opts
|
|
39
|
+
);
|
|
25
40
|
}
|
|
26
|
-
function get(id) {
|
|
41
|
+
function get(id, opts) {
|
|
27
42
|
if (!id) throw new Error("get: id is required");
|
|
28
43
|
return wixCall(
|
|
29
44
|
"GET",
|
|
30
|
-
`/badges/v4/badges/${encodeURIComponent(id)}
|
|
45
|
+
`/badges/v4/badges/${encodeURIComponent(id)}`,
|
|
46
|
+
void 0,
|
|
47
|
+
opts
|
|
31
48
|
);
|
|
32
49
|
}
|
|
33
|
-
function count(req = {}) {
|
|
34
|
-
return wixCall(
|
|
50
|
+
function count(req = {}, opts) {
|
|
51
|
+
return wixCall(
|
|
52
|
+
"POST",
|
|
53
|
+
"/badges/v4/badges/count",
|
|
54
|
+
req,
|
|
55
|
+
opts
|
|
56
|
+
);
|
|
35
57
|
}
|
|
36
|
-
function assignBadge(id, req = {}) {
|
|
58
|
+
function assignBadge(id, req = {}, opts) {
|
|
37
59
|
if (!id) throw new Error("assignBadge: id is required");
|
|
38
60
|
return wixCall(
|
|
39
61
|
"POST",
|
|
40
62
|
`/badges/v4/badges/${encodeURIComponent(id)}/members`,
|
|
41
|
-
req
|
|
63
|
+
req,
|
|
64
|
+
opts
|
|
42
65
|
);
|
|
43
66
|
}
|
|
44
|
-
function unassignBadge(id) {
|
|
67
|
+
function unassignBadge(id, opts) {
|
|
45
68
|
if (!id) throw new Error("unassignBadge: id is required");
|
|
46
69
|
return wixCall(
|
|
47
70
|
"DELETE",
|
|
48
|
-
`/badges/v4/badges/${encodeURIComponent(id)}/members
|
|
71
|
+
`/badges/v4/badges/${encodeURIComponent(id)}/members`,
|
|
72
|
+
void 0,
|
|
73
|
+
opts
|
|
49
74
|
);
|
|
50
75
|
}
|
|
51
|
-
function listMembers(id) {
|
|
76
|
+
function listMembers(id, opts) {
|
|
52
77
|
if (!id) throw new Error("listMembers: id is required");
|
|
53
78
|
return wixCall(
|
|
54
79
|
"GET",
|
|
55
|
-
`/badges/v4/badges/${encodeURIComponent(id)}/members
|
|
80
|
+
`/badges/v4/badges/${encodeURIComponent(id)}/members`,
|
|
81
|
+
void 0,
|
|
82
|
+
opts
|
|
56
83
|
);
|
|
57
84
|
}
|
|
58
|
-
function listMembersBadgeIds(req = {}) {
|
|
85
|
+
function listMembersBadgeIds(req = {}, opts) {
|
|
59
86
|
return wixCall(
|
|
60
87
|
"POST",
|
|
61
88
|
"/badges/v4/badges/members",
|
|
62
|
-
req
|
|
89
|
+
req,
|
|
90
|
+
opts
|
|
63
91
|
);
|
|
64
92
|
}
|
|
65
|
-
function getBadgeCounters(req = {}) {
|
|
93
|
+
function getBadgeCounters(req = {}, opts) {
|
|
66
94
|
return wixCall(
|
|
67
95
|
"GET",
|
|
68
96
|
"/badges/v4/badges/members/count",
|
|
69
|
-
req
|
|
97
|
+
req,
|
|
98
|
+
opts
|
|
70
99
|
);
|
|
71
100
|
}
|
|
72
|
-
function updateBadgesOrder(req = {}) {
|
|
101
|
+
function updateBadgesOrder(req = {}, opts) {
|
|
73
102
|
return wixCall(
|
|
74
103
|
"PATCH",
|
|
75
104
|
"/badges/v4/badges/order",
|
|
76
|
-
req
|
|
105
|
+
req,
|
|
106
|
+
opts
|
|
77
107
|
);
|
|
78
108
|
}
|
|
79
109
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/billing-tax-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,81 +11,98 @@ 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 createManualTaxMapping(req = {}) {
|
|
21
|
+
function createManualTaxMapping(req = {}, opts) {
|
|
13
22
|
return wixCall(
|
|
14
23
|
"POST",
|
|
15
24
|
"/billing/v1/manual-tax-mappings",
|
|
16
|
-
req
|
|
25
|
+
req,
|
|
26
|
+
opts
|
|
17
27
|
);
|
|
18
28
|
}
|
|
19
|
-
function getManualTaxMapping(manualTaxMappingId) {
|
|
29
|
+
function getManualTaxMapping(manualTaxMappingId, opts) {
|
|
20
30
|
if (!manualTaxMappingId)
|
|
21
31
|
throw new Error("getManualTaxMapping: manualTaxMappingId is required");
|
|
22
32
|
return wixCall(
|
|
23
33
|
"GET",
|
|
24
|
-
`/billing/v1/manual-tax-mappings/${encodeURIComponent(manualTaxMappingId)}
|
|
34
|
+
`/billing/v1/manual-tax-mappings/${encodeURIComponent(manualTaxMappingId)}`,
|
|
35
|
+
void 0,
|
|
36
|
+
opts
|
|
25
37
|
);
|
|
26
38
|
}
|
|
27
|
-
function updateManualTaxMapping(manualTaxMappingId, req = {}) {
|
|
39
|
+
function updateManualTaxMapping(manualTaxMappingId, req = {}, opts) {
|
|
28
40
|
if (!manualTaxMappingId)
|
|
29
41
|
throw new Error("updateManualTaxMapping: manualTaxMappingId is required");
|
|
30
42
|
return wixCall(
|
|
31
43
|
"PATCH",
|
|
32
44
|
`/billing/v1/manual-tax-mappings/${encodeURIComponent(manualTaxMappingId)}`,
|
|
33
|
-
req
|
|
45
|
+
req,
|
|
46
|
+
opts
|
|
34
47
|
);
|
|
35
48
|
}
|
|
36
|
-
function deleteManualTaxMapping(manualTaxMappingId) {
|
|
49
|
+
function deleteManualTaxMapping(manualTaxMappingId, opts) {
|
|
37
50
|
if (!manualTaxMappingId)
|
|
38
51
|
throw new Error("deleteManualTaxMapping: manualTaxMappingId is required");
|
|
39
52
|
return wixCall(
|
|
40
53
|
"DELETE",
|
|
41
|
-
`/billing/v1/manual-tax-mappings/${encodeURIComponent(manualTaxMappingId)}
|
|
54
|
+
`/billing/v1/manual-tax-mappings/${encodeURIComponent(manualTaxMappingId)}`,
|
|
55
|
+
void 0,
|
|
56
|
+
opts
|
|
42
57
|
);
|
|
43
58
|
}
|
|
44
|
-
function queryManualTaxMappings(req = {}) {
|
|
59
|
+
function queryManualTaxMappings(req = {}, opts) {
|
|
45
60
|
return wixCall(
|
|
46
61
|
"GET",
|
|
47
62
|
"/billing/v1/manual-tax-mappings/query",
|
|
48
|
-
req
|
|
63
|
+
req,
|
|
64
|
+
opts
|
|
49
65
|
);
|
|
50
66
|
}
|
|
51
|
-
function updateExtendedFields(id, req = {}) {
|
|
67
|
+
function updateExtendedFields(id, req = {}, opts) {
|
|
52
68
|
if (!id) throw new Error("updateExtendedFields: id is required");
|
|
53
69
|
return wixCall(
|
|
54
70
|
"POST",
|
|
55
71
|
`/billing/v1/manual-tax-mappings/${encodeURIComponent(id)}/update-extended-fields`,
|
|
56
|
-
req
|
|
72
|
+
req,
|
|
73
|
+
opts
|
|
57
74
|
);
|
|
58
75
|
}
|
|
59
|
-
function bulkAssignExemptOverrides(req = {}) {
|
|
76
|
+
function bulkAssignExemptOverrides(req = {}, opts) {
|
|
60
77
|
return wixCall(
|
|
61
78
|
"POST",
|
|
62
79
|
"/billing/v1/manual-tax-mappings/bulk-assign-exempt-overrides",
|
|
63
|
-
req
|
|
80
|
+
req,
|
|
81
|
+
opts
|
|
64
82
|
);
|
|
65
83
|
}
|
|
66
|
-
function bulkUnassignExemptOverrides(req = {}) {
|
|
84
|
+
function bulkUnassignExemptOverrides(req = {}, opts) {
|
|
67
85
|
return wixCall(
|
|
68
86
|
"POST",
|
|
69
87
|
"/billing/v1/manual-tax-mappings/bulk-unassign-exempt-overrides",
|
|
70
|
-
req
|
|
88
|
+
req,
|
|
89
|
+
opts
|
|
71
90
|
);
|
|
72
91
|
}
|
|
73
|
-
function listManualTaxMappings(req = {}) {
|
|
92
|
+
function listManualTaxMappings(req = {}, opts) {
|
|
74
93
|
return wixCall(
|
|
75
94
|
"GET",
|
|
76
95
|
"/billing/v1/manual-tax-mappings",
|
|
77
|
-
req
|
|
96
|
+
req,
|
|
97
|
+
opts
|
|
78
98
|
);
|
|
79
99
|
}
|
|
80
|
-
function bulkCreateManualTaxMappings(req = {}) {
|
|
100
|
+
function bulkCreateManualTaxMappings(req = {}, opts) {
|
|
81
101
|
return wixCall(
|
|
82
102
|
"POST",
|
|
83
103
|
"/billing/v1/bulk/manual-tax-mappings/create",
|
|
84
|
-
req
|
|
104
|
+
req,
|
|
105
|
+
opts
|
|
85
106
|
);
|
|
86
107
|
}
|
|
87
108
|
export {
|
|
@@ -55,7 +55,11 @@ function cancelScheduleDraftPost(postId) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
// ../../stdlib/wix-sdk/blog-v3/src/index.ts
|
|
58
|
-
function
|
|
58
|
+
function wixCallHeaders(opts) {
|
|
59
|
+
const site = opts?.site?.trim();
|
|
60
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
61
|
+
}
|
|
62
|
+
function wixCall(method, path, body, opts) {
|
|
59
63
|
if (!globalThis.himalaya?.wixApi) {
|
|
60
64
|
return Promise.reject(
|
|
61
65
|
new Error(
|
|
@@ -63,10 +67,20 @@ function wixCall(method, path, body) {
|
|
|
63
67
|
)
|
|
64
68
|
);
|
|
65
69
|
}
|
|
66
|
-
return globalThis.himalaya.wixApi.call(
|
|
70
|
+
return globalThis.himalaya.wixApi.call(
|
|
71
|
+
method,
|
|
72
|
+
path,
|
|
73
|
+
body,
|
|
74
|
+
wixCallHeaders(opts)
|
|
75
|
+
);
|
|
67
76
|
}
|
|
68
|
-
function queryPosts(req = {}) {
|
|
69
|
-
return wixCall(
|
|
77
|
+
function queryPosts(req = {}, opts) {
|
|
78
|
+
return wixCall(
|
|
79
|
+
"POST",
|
|
80
|
+
"/blog/v3/posts/query",
|
|
81
|
+
req,
|
|
82
|
+
opts
|
|
83
|
+
);
|
|
70
84
|
}
|
|
71
85
|
export {
|
|
72
86
|
cancelScheduleDraftPost,
|