@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,11 +1,21 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var himalaya: {
|
|
3
3
|
wixApi?: {
|
|
4
|
-
call: (method: string, path: string, body?: unknown) => Promise<unknown>;
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
9
19
|
export interface WixRedirectSession {
|
|
10
20
|
id?: string;
|
|
11
21
|
fullUrl?: string;
|
|
@@ -335,5 +345,5 @@ export interface WixCreateRedirectSessionOptionsIntentOneOf {
|
|
|
335
345
|
}
|
|
336
346
|
export interface WixCreateRedirectSessionSignature {
|
|
337
347
|
}
|
|
338
|
-
export declare function createRedirectSession(req?: WixCreateRedirectSessionRequest): Promise<WixCreateRedirectSessionResponse>;
|
|
348
|
+
export declare function createRedirectSession(req?: WixCreateRedirectSessionRequest, opts?: WixCallOptions): Promise<WixCreateRedirectSessionResponse>;
|
|
339
349
|
export * from "./extensions.js";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var himalaya: {
|
|
3
3
|
wixApi?: {
|
|
4
|
-
call: (method: string, path: string, body?: unknown) => Promise<unknown>;
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
9
19
|
export interface WixPaging {
|
|
10
20
|
limit?: number;
|
|
11
21
|
offset?: number;
|
|
@@ -85,10 +95,10 @@ export interface WixQueryOrdersResponse {
|
|
|
85
95
|
orders: WixOrder[];
|
|
86
96
|
metaData?: WixMetadata;
|
|
87
97
|
}
|
|
88
|
-
export declare function queryMenus(req?: WixMenuQueryRequest): Promise<WixQueryMenusResponse>;
|
|
89
|
-
export declare function getMenu(id: string): Promise<WixMenu>;
|
|
90
|
-
export declare function queryItems(req?: WixItemQueryRequest): Promise<WixQueryItemsResponse>;
|
|
91
|
-
export declare function getItem(id: string): Promise<WixItem>;
|
|
92
|
-
export declare function queryOrders(req?: WixOrderQueryRequest): Promise<WixQueryOrdersResponse>;
|
|
93
|
-
export declare function getOrder(id: string): Promise<WixOrder>;
|
|
98
|
+
export declare function queryMenus(req?: WixMenuQueryRequest, opts?: WixCallOptions): Promise<WixQueryMenusResponse>;
|
|
99
|
+
export declare function getMenu(id: string, opts?: WixCallOptions): Promise<WixMenu>;
|
|
100
|
+
export declare function queryItems(req?: WixItemQueryRequest, opts?: WixCallOptions): Promise<WixQueryItemsResponse>;
|
|
101
|
+
export declare function getItem(id: string, opts?: WixCallOptions): Promise<WixItem>;
|
|
102
|
+
export declare function queryOrders(req?: WixOrderQueryRequest, opts?: WixCallOptions): Promise<WixQueryOrdersResponse>;
|
|
103
|
+
export declare function getOrder(id: string, opts?: WixCallOptions): Promise<WixOrder>;
|
|
94
104
|
export * from "./extensions.js";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var himalaya: {
|
|
3
3
|
wixApi?: {
|
|
4
|
-
call: (method: string, path: string, body?: unknown) => Promise<unknown>;
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
9
19
|
export interface WixSeoTags {
|
|
10
20
|
id?: string;
|
|
11
21
|
tags?: WixTag[];
|
|
@@ -105,7 +115,7 @@ export interface WixResolveStaticPageSeoTagsSignature {
|
|
|
105
115
|
}
|
|
106
116
|
export interface WixResolveItemSeoTagsSignature {
|
|
107
117
|
}
|
|
108
|
-
export declare function resolveSeoTags(req?: WixResolveSeoTagsRequest): Promise<WixResolveSeoTagsResponse>;
|
|
109
|
-
export declare function resolveStaticPageSeoTags(req?: WixResolveStaticPageSeoTagsRequest): Promise<WixResolveStaticPageSeoTagsResponse>;
|
|
110
|
-
export declare function resolveItemSeoTags(req?: WixResolveItemSeoTagsRequest): Promise<WixResolveItemSeoTagsResponse>;
|
|
118
|
+
export declare function resolveSeoTags(req?: WixResolveSeoTagsRequest, opts?: WixCallOptions): Promise<WixResolveSeoTagsResponse>;
|
|
119
|
+
export declare function resolveStaticPageSeoTags(req?: WixResolveStaticPageSeoTagsRequest, opts?: WixCallOptions): Promise<WixResolveStaticPageSeoTagsResponse>;
|
|
120
|
+
export declare function resolveItemSeoTags(req?: WixResolveItemSeoTagsRequest, opts?: WixCallOptions): Promise<WixResolveItemSeoTagsResponse>;
|
|
111
121
|
export * from "./extensions.js";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var himalaya: {
|
|
3
3
|
wixApi?: {
|
|
4
|
-
call: (method: string, path: string, body?: unknown) => Promise<unknown>;
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
9
19
|
export interface WixCursorPaging {
|
|
10
20
|
limit?: number;
|
|
11
21
|
cursor?: string;
|
|
@@ -50,6 +60,6 @@ export interface WixCountSitesRequest {
|
|
|
50
60
|
export interface WixCountSitesResponse {
|
|
51
61
|
count: number;
|
|
52
62
|
}
|
|
53
|
-
export declare function querySites(req?: WixQuerySitesRequest): Promise<WixQuerySitesResponse>;
|
|
54
|
-
export declare function countSites(req?: WixCountSitesRequest): Promise<WixCountSitesResponse>;
|
|
63
|
+
export declare function querySites(req?: WixQuerySitesRequest, opts?: WixCallOptions): Promise<WixQuerySitesResponse>;
|
|
64
|
+
export declare function countSites(req?: WixCountSitesRequest, opts?: WixCallOptions): Promise<WixCountSitesResponse>;
|
|
55
65
|
export * from "./extensions.js";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var himalaya: {
|
|
3
3
|
wixApi?: {
|
|
4
|
-
call: (method: string, path: string, body?: unknown) => Promise<unknown>;
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
9
19
|
export interface WixProductsPaging {
|
|
10
20
|
limit?: number;
|
|
11
21
|
offset?: number;
|
|
@@ -92,5 +102,5 @@ export interface WixProductMediaItem {
|
|
|
92
102
|
}
|
|
93
103
|
export interface WixAddProductMediaResponse {
|
|
94
104
|
}
|
|
95
|
-
export declare function addProductMedia(productId: string): Promise<WixAddProductMediaResponse>;
|
|
105
|
+
export declare function addProductMedia(productId: string, opts?: WixCallOptions): Promise<WixAddProductMediaResponse>;
|
|
96
106
|
export * from "./extensions.js";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var himalaya: {
|
|
3
3
|
wixApi?: {
|
|
4
|
-
call: (method: string, path: string, body?: unknown) => Promise<unknown>;
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
9
19
|
export interface WixWorkflow {
|
|
10
20
|
info?: WixWorkflowInfo;
|
|
11
21
|
winPhase?: WixPhase;
|
|
@@ -121,9 +131,9 @@ export interface WixListWorkflowsOptions {
|
|
|
121
131
|
offset?: number;
|
|
122
132
|
sort?: string[];
|
|
123
133
|
}
|
|
124
|
-
export declare function listWorkflows(req?: WixListWorkflowsRequest): Promise<WixListWorkflowsResponse>;
|
|
125
|
-
export declare function getWorkflow(id: string): Promise<WixGetWorkflowResponse>;
|
|
126
|
-
export declare function updateWorkflow(id: string, req?: WixUpdateWorkflowRequest): Promise<WixUpdateWorkflowResponse>;
|
|
127
|
-
export declare function createWorkflow(req?: WixCreateWorkflowRequest): Promise<WixCreateWorkflowResponse>;
|
|
128
|
-
export declare function deleteWorkflow(id: string): Promise<WixDeleteWorkflowResponse>;
|
|
134
|
+
export declare function listWorkflows(req?: WixListWorkflowsRequest, opts?: WixCallOptions): Promise<WixListWorkflowsResponse>;
|
|
135
|
+
export declare function getWorkflow(id: string, opts?: WixCallOptions): Promise<WixGetWorkflowResponse>;
|
|
136
|
+
export declare function updateWorkflow(id: string, req?: WixUpdateWorkflowRequest, opts?: WixCallOptions): Promise<WixUpdateWorkflowResponse>;
|
|
137
|
+
export declare function createWorkflow(req?: WixCreateWorkflowRequest, opts?: WixCallOptions): Promise<WixCreateWorkflowResponse>;
|
|
138
|
+
export declare function deleteWorkflow(id: string, opts?: WixCallOptions): Promise<WixDeleteWorkflowResponse>;
|
|
129
139
|
export * from "./extensions.js";
|
|
@@ -257,7 +257,11 @@ async function payOrder(req) {
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
// ../../stdlib/wix-sdk/redirects-v1/src/index.ts
|
|
260
|
-
function
|
|
260
|
+
function wixCallHeaders(opts) {
|
|
261
|
+
const site = opts?.site?.trim();
|
|
262
|
+
return site ? { "wix-site-id": site } : void 0;
|
|
263
|
+
}
|
|
264
|
+
function wixCall2(method, path, body, opts) {
|
|
261
265
|
if (!globalThis.himalaya?.wixApi) {
|
|
262
266
|
return Promise.reject(
|
|
263
267
|
new Error(
|
|
@@ -265,13 +269,19 @@ function wixCall2(method, path, body) {
|
|
|
265
269
|
)
|
|
266
270
|
);
|
|
267
271
|
}
|
|
268
|
-
return globalThis.himalaya.wixApi.call(
|
|
272
|
+
return globalThis.himalaya.wixApi.call(
|
|
273
|
+
method,
|
|
274
|
+
path,
|
|
275
|
+
body,
|
|
276
|
+
wixCallHeaders(opts)
|
|
277
|
+
);
|
|
269
278
|
}
|
|
270
|
-
function createRedirectSession(req = {}) {
|
|
279
|
+
function createRedirectSession(req = {}, opts) {
|
|
271
280
|
return wixCall2(
|
|
272
281
|
"POST",
|
|
273
282
|
"/_api/redirects-api/v1/redirect-session",
|
|
274
|
-
req
|
|
283
|
+
req,
|
|
284
|
+
opts
|
|
275
285
|
);
|
|
276
286
|
}
|
|
277
287
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// ../../stdlib/wix-sdk/activity-counters-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,37 +11,47 @@ 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 setActivityCounters(memberId, req = {}) {
|
|
21
|
+
function setActivityCounters(memberId, req = {}, opts) {
|
|
13
22
|
if (!memberId) throw new Error("setActivityCounters: memberId is required");
|
|
14
23
|
return wixCall(
|
|
15
24
|
"PUT",
|
|
16
25
|
`/activity-counters/v1/activity-counters/${encodeURIComponent(memberId)}`,
|
|
17
|
-
req
|
|
26
|
+
req,
|
|
27
|
+
opts
|
|
18
28
|
);
|
|
19
29
|
}
|
|
20
|
-
function incrementActivityCounters(memberId, req = {}) {
|
|
30
|
+
function incrementActivityCounters(memberId, req = {}, opts) {
|
|
21
31
|
if (!memberId)
|
|
22
32
|
throw new Error("incrementActivityCounters: memberId is required");
|
|
23
33
|
return wixCall(
|
|
24
34
|
"PUT",
|
|
25
35
|
`/activity-counters/v1/activity-counters/${encodeURIComponent(memberId)}/increment`,
|
|
26
|
-
req
|
|
36
|
+
req,
|
|
37
|
+
opts
|
|
27
38
|
);
|
|
28
39
|
}
|
|
29
|
-
function getActivityCounters(memberId) {
|
|
40
|
+
function getActivityCounters(memberId, opts) {
|
|
30
41
|
if (!memberId) throw new Error("getActivityCounters: memberId is required");
|
|
31
42
|
return wixCall(
|
|
32
43
|
"GET",
|
|
33
|
-
`/activity-counters/v1/activity-counters/${encodeURIComponent(memberId)}
|
|
44
|
+
`/activity-counters/v1/activity-counters/${encodeURIComponent(memberId)}`,
|
|
45
|
+
void 0,
|
|
46
|
+
opts
|
|
34
47
|
);
|
|
35
48
|
}
|
|
36
|
-
function queryActivityCounters(req = {}) {
|
|
49
|
+
function queryActivityCounters(req = {}, opts) {
|
|
37
50
|
return wixCall(
|
|
38
51
|
"POST",
|
|
39
52
|
"/activity-counters/v1/activity-counters/query",
|
|
40
|
-
req
|
|
53
|
+
req,
|
|
54
|
+
opts
|
|
41
55
|
);
|
|
42
56
|
}
|
|
43
57
|
export {
|