@wix/auto_sdk_dynamic-context_dynamic-context 0.0.0-stage → 1.0.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/build/cjs/index.d.ts +62 -0
- package/build/cjs/index.js +499 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1022 -0
- package/build/cjs/index.typings.js +464 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +906 -0
- package/build/cjs/meta.js +422 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +62 -0
- package/build/es/index.mjs +464 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1022 -0
- package/build/es/index.typings.mjs +429 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +906 -0
- package/build/es/meta.mjs +384 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +62 -0
- package/build/internal/cjs/index.typings.d.ts +1022 -0
- package/build/internal/cjs/meta.d.ts +906 -0
- package/build/internal/es/index.d.mts +62 -0
- package/build/internal/es/index.typings.d.mts +1022 -0
- package/build/internal/es/meta.d.mts +906 -0
- package/meta/package.json +3 -0
- package/package.json +51 -3
- package/README.md +0 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { GetDynamicContextOptions, GetDynamicContextResponse, GetDynamicContextMarkdownOptions, GetDynamicContextMarkdownResponse, GetVisitorSiteContextResponse, GetVisitorSiteContextMarkdownResponse } from './index.typings.js';
|
|
3
|
+
export { Account, AccountStatus, AccountStatusWithLiterals, CmsCollection, CmsField, CmsFieldType, CmsFieldTypeWithLiterals, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomApp, DynamicContext, EditorType, EditorTypeWithLiterals, GetDynamicContextMarkdownOptionsSiteFilterOneOf, GetDynamicContextMarkdownRequest, GetDynamicContextMarkdownRequestSiteFilterOneOf, GetDynamicContextOptionsSiteFilterOneOf, GetDynamicContextRequest, GetDynamicContextRequestSiteFilterOneOf, GetVisitorSiteContextMarkdownRequest, GetVisitorSiteContextRequest, InstalledApp, PartnerContext, RequiredAction, RequiredActionWithLiterals, Site, SiteAddress, SiteLocale, SiteNamespace, SiteNamespaceWithLiterals, SiteOAuthApp, SitePaymentProvider, SiteProperties, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, VisitorApp, VisitorAppWithLiterals, VisitorBusinessInfo, VisitorInstalledApp, VisitorSite } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function getDynamicContext$1(httpClient: HttpClient): GetDynamicContextSignature;
|
|
6
|
+
interface GetDynamicContextSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves aggregated context for the caller's sites and account.
|
|
9
|
+
*
|
|
10
|
+
* Returns enriched site information including installed apps, editor type,
|
|
11
|
+
* Velo status, and account details. Results are paginated using cursor-based paging.
|
|
12
|
+
*
|
|
13
|
+
* You can optionally filter by a single site ID or site display name.
|
|
14
|
+
* When no filter is provided, all of the caller's sites are returned.
|
|
15
|
+
* @returns Response containing the caller's account and site context.
|
|
16
|
+
*/
|
|
17
|
+
(options?: GetDynamicContextOptions): Promise<NonNullablePaths<GetDynamicContextResponse, `account._id` | `account.status` | `sites` | `sites.${number}._id` | `sites.${number}.published` | `sites.${number}.premium` | `sites.${number}.ownerAccountId` | `sites.${number}.editorType` | `sites.${number}.namespace` | `sites.${number}.domainConnected` | `sites.${number}.properties.locale.languageCode` | `sites.${number}.properties.locale.country` | `sites.${number}.properties.language` | `sites.${number}.properties.paymentCurrency` | `sites.${number}.properties.timeZone` | `sites.${number}.properties.email` | `sites.${number}.properties.phone` | `sites.${number}.properties.address.country` | `partnerContext.partner`, 4>>;
|
|
18
|
+
}
|
|
19
|
+
declare function getDynamicContextMarkdown$1(httpClient: HttpClient): GetDynamicContextMarkdownSignature;
|
|
20
|
+
interface GetDynamicContextMarkdownSignature {
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the same aggregated context as `GetDynamicContext`, rendered as a
|
|
23
|
+
* markdown report. The markdown is byte-identical to the output of the
|
|
24
|
+
* `@wix/dynamic-context-enricher` package used by the Wix MCP.
|
|
25
|
+
* @returns Response containing the rendered markdown report.
|
|
26
|
+
*/
|
|
27
|
+
(options?: GetDynamicContextMarkdownOptions): Promise<NonNullablePaths<GetDynamicContextMarkdownResponse, `markdown`, 0>>;
|
|
28
|
+
}
|
|
29
|
+
declare function getVisitorSiteContext$1(httpClient: HttpClient): GetVisitorSiteContextSignature;
|
|
30
|
+
interface GetVisitorSiteContextSignature {
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the public context of the site the calling token is scoped to,
|
|
33
|
+
* as any site visitor may see it: site basics, public business info, and
|
|
34
|
+
* visitor-relevant installed apps. Callable with visitor and member tokens
|
|
35
|
+
* (headless OAuth `anonymous` grant), as well as app-instance and user tokens.
|
|
36
|
+
*
|
|
37
|
+
* The token determines the site — the request takes no parameters.
|
|
38
|
+
* Unpublished or deleted sites return NOT_FOUND.
|
|
39
|
+
*
|
|
40
|
+
* > **Note:** This method is not yet enabled and currently returns an empty response.
|
|
41
|
+
* @returns The public context of a single site, as any visitor may see it.
|
|
42
|
+
*/
|
|
43
|
+
(): Promise<NonNullablePaths<GetVisitorSiteContextResponse, `site._id` | `site.language` | `site.country` | `site.paymentCurrency` | `site.timeZone` | `installedApps` | `installedApps.${number}.app` | `installedApps.${number}.appId`, 2>>;
|
|
44
|
+
}
|
|
45
|
+
declare function getVisitorSiteContextMarkdown$1(httpClient: HttpClient): GetVisitorSiteContextMarkdownSignature;
|
|
46
|
+
interface GetVisitorSiteContextMarkdownSignature {
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves the same public site context as `GetVisitorSiteContext`,
|
|
49
|
+
* rendered as a markdown report ready to be passed directly to an LLM.
|
|
50
|
+
*
|
|
51
|
+
* > **Note:** This method is not yet enabled and currently returns an empty response.
|
|
52
|
+
* @returns Response containing the rendered markdown report of the visitor site context.
|
|
53
|
+
*/
|
|
54
|
+
(): Promise<NonNullablePaths<GetVisitorSiteContextMarkdownResponse, `markdown`, 0>>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const getDynamicContext: MaybeContext<BuildRESTFunction<typeof getDynamicContext$1> & typeof getDynamicContext$1>;
|
|
58
|
+
declare const getDynamicContextMarkdown: MaybeContext<BuildRESTFunction<typeof getDynamicContextMarkdown$1> & typeof getDynamicContextMarkdown$1>;
|
|
59
|
+
declare const getVisitorSiteContext: MaybeContext<BuildRESTFunction<typeof getVisitorSiteContext$1> & typeof getVisitorSiteContext$1>;
|
|
60
|
+
declare const getVisitorSiteContextMarkdown: MaybeContext<BuildRESTFunction<typeof getVisitorSiteContextMarkdown$1> & typeof getVisitorSiteContextMarkdown$1>;
|
|
61
|
+
|
|
62
|
+
export { GetDynamicContextMarkdownOptions, GetDynamicContextMarkdownResponse, GetDynamicContextOptions, GetDynamicContextResponse, GetVisitorSiteContextMarkdownResponse, GetVisitorSiteContextResponse, getDynamicContext, getDynamicContextMarkdown, getVisitorSiteContext, getVisitorSiteContextMarkdown };
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AccountStatus: () => AccountStatus,
|
|
24
|
+
CmsFieldType: () => CmsFieldType,
|
|
25
|
+
EditorType: () => EditorType,
|
|
26
|
+
RequiredAction: () => RequiredAction,
|
|
27
|
+
SiteNamespace: () => SiteNamespace,
|
|
28
|
+
SortOrder: () => SortOrder,
|
|
29
|
+
Status: () => Status,
|
|
30
|
+
VisitorApp: () => VisitorApp,
|
|
31
|
+
getDynamicContext: () => getDynamicContext4,
|
|
32
|
+
getDynamicContextMarkdown: () => getDynamicContextMarkdown4,
|
|
33
|
+
getVisitorSiteContext: () => getVisitorSiteContext4,
|
|
34
|
+
getVisitorSiteContextMarkdown: () => getVisitorSiteContextMarkdown4
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
|
|
38
|
+
// src/dynamic-context-v1-dynamic-context-dynamic-context.universal.ts
|
|
39
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
40
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
41
|
+
|
|
42
|
+
// src/dynamic-context-v1-dynamic-context-dynamic-context.http.ts
|
|
43
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
44
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
45
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
46
|
+
var TRANSFORM_PATHS_0 = [
|
|
47
|
+
{ path: "account.createdDate" },
|
|
48
|
+
{ path: "account.updatedDate" },
|
|
49
|
+
{ path: "sites.createdDate" },
|
|
50
|
+
{ path: "sites.updatedDate" },
|
|
51
|
+
{ path: "sites.oauthApps.createdDate" }
|
|
52
|
+
];
|
|
53
|
+
function resolveWixDynamicContextV1DynamicContextServiceUrl(opts) {
|
|
54
|
+
const domainToMappings = {
|
|
55
|
+
"dev._base_domain_": [
|
|
56
|
+
{
|
|
57
|
+
srcPath: "/_api/dynamic-context",
|
|
58
|
+
destPath: ""
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"api._api_base_domain_": [
|
|
62
|
+
{
|
|
63
|
+
srcPath: "/dynamic-context",
|
|
64
|
+
destPath: ""
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"manage._base_domain_": [
|
|
68
|
+
{
|
|
69
|
+
srcPath: "/_api/dynamic-context",
|
|
70
|
+
destPath: ""
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
_: [
|
|
74
|
+
{
|
|
75
|
+
srcPath: "/_api/dynamic-context",
|
|
76
|
+
destPath: ""
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"*.dev.wix-code.com": [
|
|
80
|
+
{
|
|
81
|
+
srcPath: "/_api/dynamic-context",
|
|
82
|
+
destPath: ""
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"bo._base_domain_": [
|
|
86
|
+
{
|
|
87
|
+
srcPath: "/_api/dynamic-context",
|
|
88
|
+
destPath: ""
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"wixbo.ai": [
|
|
92
|
+
{
|
|
93
|
+
srcPath: "/_api/dynamic-context",
|
|
94
|
+
destPath: ""
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"wix-bo.com": [
|
|
98
|
+
{
|
|
99
|
+
srcPath: "/_api/dynamic-context",
|
|
100
|
+
destPath: ""
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"www.wixapis.com": [
|
|
104
|
+
{
|
|
105
|
+
srcPath: "/_api/dynamic-context",
|
|
106
|
+
destPath: ""
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
111
|
+
}
|
|
112
|
+
var PACKAGE_NAME = "@wix/auto_sdk_dynamic-context_dynamic-context";
|
|
113
|
+
function getDynamicContext(payload) {
|
|
114
|
+
function __getDynamicContext({ host }) {
|
|
115
|
+
const metadata = {
|
|
116
|
+
entityFqdn: "wix.dynamic.context.v1.dynamic_context",
|
|
117
|
+
method: "POST",
|
|
118
|
+
methodFqn: "wix.dynamic.context.v1.DynamicContextService.GetDynamicContext",
|
|
119
|
+
packageName: PACKAGE_NAME,
|
|
120
|
+
migrationOptions: {
|
|
121
|
+
optInTransformResponse: true
|
|
122
|
+
},
|
|
123
|
+
url: resolveWixDynamicContextV1DynamicContextServiceUrl({
|
|
124
|
+
protoPath: "/v1/dynamic-context",
|
|
125
|
+
data: payload,
|
|
126
|
+
host
|
|
127
|
+
}),
|
|
128
|
+
data: payload,
|
|
129
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
130
|
+
{
|
|
131
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
132
|
+
paths: TRANSFORM_PATHS_0
|
|
133
|
+
}
|
|
134
|
+
])
|
|
135
|
+
};
|
|
136
|
+
return metadata;
|
|
137
|
+
}
|
|
138
|
+
return __getDynamicContext;
|
|
139
|
+
}
|
|
140
|
+
function getDynamicContextMarkdown(payload) {
|
|
141
|
+
function __getDynamicContextMarkdown({ host }) {
|
|
142
|
+
const metadata = {
|
|
143
|
+
entityFqdn: "wix.dynamic.context.v1.dynamic_context",
|
|
144
|
+
method: "POST",
|
|
145
|
+
methodFqn: "wix.dynamic.context.v1.DynamicContextService.GetDynamicContextMarkdown",
|
|
146
|
+
packageName: PACKAGE_NAME,
|
|
147
|
+
migrationOptions: {
|
|
148
|
+
optInTransformResponse: true
|
|
149
|
+
},
|
|
150
|
+
url: resolveWixDynamicContextV1DynamicContextServiceUrl({
|
|
151
|
+
protoPath: "/v1/dynamic-context/markdown",
|
|
152
|
+
data: payload,
|
|
153
|
+
host
|
|
154
|
+
}),
|
|
155
|
+
data: payload
|
|
156
|
+
};
|
|
157
|
+
return metadata;
|
|
158
|
+
}
|
|
159
|
+
return __getDynamicContextMarkdown;
|
|
160
|
+
}
|
|
161
|
+
function getVisitorSiteContext(payload) {
|
|
162
|
+
function __getVisitorSiteContext({ host }) {
|
|
163
|
+
const metadata = {
|
|
164
|
+
entityFqdn: "wix.dynamic.context.v1.dynamic_context",
|
|
165
|
+
method: "POST",
|
|
166
|
+
methodFqn: "wix.dynamic.context.v1.DynamicContextService.GetVisitorSiteContext",
|
|
167
|
+
packageName: PACKAGE_NAME,
|
|
168
|
+
migrationOptions: {
|
|
169
|
+
optInTransformResponse: true
|
|
170
|
+
},
|
|
171
|
+
url: resolveWixDynamicContextV1DynamicContextServiceUrl({
|
|
172
|
+
protoPath: "/v1/visitor-site-context",
|
|
173
|
+
data: payload,
|
|
174
|
+
host
|
|
175
|
+
}),
|
|
176
|
+
data: payload
|
|
177
|
+
};
|
|
178
|
+
return metadata;
|
|
179
|
+
}
|
|
180
|
+
return __getVisitorSiteContext;
|
|
181
|
+
}
|
|
182
|
+
function getVisitorSiteContextMarkdown(payload) {
|
|
183
|
+
function __getVisitorSiteContextMarkdown({ host }) {
|
|
184
|
+
const metadata = {
|
|
185
|
+
entityFqdn: "wix.dynamic.context.v1.dynamic_context",
|
|
186
|
+
method: "POST",
|
|
187
|
+
methodFqn: "wix.dynamic.context.v1.DynamicContextService.GetVisitorSiteContextMarkdown",
|
|
188
|
+
packageName: PACKAGE_NAME,
|
|
189
|
+
migrationOptions: {
|
|
190
|
+
optInTransformResponse: true
|
|
191
|
+
},
|
|
192
|
+
url: resolveWixDynamicContextV1DynamicContextServiceUrl({
|
|
193
|
+
protoPath: "/v1/visitor-site-context/markdown",
|
|
194
|
+
data: payload,
|
|
195
|
+
host
|
|
196
|
+
}),
|
|
197
|
+
data: payload
|
|
198
|
+
};
|
|
199
|
+
return metadata;
|
|
200
|
+
}
|
|
201
|
+
return __getVisitorSiteContextMarkdown;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// src/dynamic-context-v1-dynamic-context-dynamic-context.universal.ts
|
|
205
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
206
|
+
SortOrder2["ASC"] = "ASC";
|
|
207
|
+
SortOrder2["DESC"] = "DESC";
|
|
208
|
+
return SortOrder2;
|
|
209
|
+
})(SortOrder || {});
|
|
210
|
+
var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
211
|
+
AccountStatus2["ACCOUNT_STATUS_UNSPECIFIED"] = "ACCOUNT_STATUS_UNSPECIFIED";
|
|
212
|
+
AccountStatus2["ACTIVE"] = "ACTIVE";
|
|
213
|
+
AccountStatus2["BLOCKED"] = "BLOCKED";
|
|
214
|
+
AccountStatus2["DELETED"] = "DELETED";
|
|
215
|
+
return AccountStatus2;
|
|
216
|
+
})(AccountStatus || {});
|
|
217
|
+
var EditorType = /* @__PURE__ */ ((EditorType2) => {
|
|
218
|
+
EditorType2["EDITOR_TYPE_UNSPECIFIED"] = "EDITOR_TYPE_UNSPECIFIED";
|
|
219
|
+
EditorType2["WIX"] = "WIX";
|
|
220
|
+
EditorType2["STUDIO"] = "STUDIO";
|
|
221
|
+
EditorType2["EDITOR_X"] = "EDITOR_X";
|
|
222
|
+
EditorType2["EDITOR_3"] = "EDITOR_3";
|
|
223
|
+
EditorType2["WIX_VIBE"] = "WIX_VIBE";
|
|
224
|
+
EditorType2["BLOCKS"] = "BLOCKS";
|
|
225
|
+
EditorType2["MOBILE_WIDGET_BUILDER"] = "MOBILE_WIDGET_BUILDER";
|
|
226
|
+
EditorType2["EDITOR"] = "EDITOR";
|
|
227
|
+
EditorType2["STUDIO_TWO"] = "STUDIO_TWO";
|
|
228
|
+
EditorType2["ADI"] = "ADI";
|
|
229
|
+
EditorType2["WIXEL"] = "WIXEL";
|
|
230
|
+
EditorType2["PICASSO"] = "PICASSO";
|
|
231
|
+
EditorType2["EDITORLESS"] = "EDITORLESS";
|
|
232
|
+
EditorType2["ODEDITOR"] = "ODEDITOR";
|
|
233
|
+
EditorType2["UNKNOWN"] = "UNKNOWN";
|
|
234
|
+
return EditorType2;
|
|
235
|
+
})(EditorType || {});
|
|
236
|
+
var SiteNamespace = /* @__PURE__ */ ((SiteNamespace2) => {
|
|
237
|
+
SiteNamespace2["SITE_NAMESPACE_UNSPECIFIED"] = "SITE_NAMESPACE_UNSPECIFIED";
|
|
238
|
+
SiteNamespace2["WIX"] = "WIX";
|
|
239
|
+
SiteNamespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
240
|
+
SiteNamespace2["ALBUMS"] = "ALBUMS";
|
|
241
|
+
SiteNamespace2["WIX_STORES_TEST_DRIVES"] = "WIX_STORES_TEST_DRIVES";
|
|
242
|
+
SiteNamespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
243
|
+
SiteNamespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
244
|
+
SiteNamespace2["HOTELS"] = "HOTELS";
|
|
245
|
+
SiteNamespace2["CLUBS"] = "CLUBS";
|
|
246
|
+
SiteNamespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
247
|
+
SiteNamespace2["DEV_SITE"] = "DEV_SITE";
|
|
248
|
+
SiteNamespace2["LOGOS"] = "LOGOS";
|
|
249
|
+
SiteNamespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
250
|
+
SiteNamespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
251
|
+
SiteNamespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
252
|
+
SiteNamespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
253
|
+
SiteNamespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
254
|
+
SiteNamespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
255
|
+
SiteNamespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
256
|
+
SiteNamespace2["ANYWHERE"] = "ANYWHERE";
|
|
257
|
+
SiteNamespace2["HEADLESS"] = "HEADLESS";
|
|
258
|
+
SiteNamespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
259
|
+
SiteNamespace2["RISE"] = "RISE";
|
|
260
|
+
SiteNamespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
261
|
+
SiteNamespace2["NOWNIA"] = "NOWNIA";
|
|
262
|
+
SiteNamespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
263
|
+
SiteNamespace2["CODUX"] = "CODUX";
|
|
264
|
+
SiteNamespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
265
|
+
SiteNamespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
266
|
+
SiteNamespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
267
|
+
SiteNamespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
268
|
+
SiteNamespace2["MIMIR"] = "MIMIR";
|
|
269
|
+
SiteNamespace2["TWINS"] = "TWINS";
|
|
270
|
+
SiteNamespace2["NANO"] = "NANO";
|
|
271
|
+
SiteNamespace2["BASE44"] = "BASE44";
|
|
272
|
+
SiteNamespace2["CHANNELS"] = "CHANNELS";
|
|
273
|
+
return SiteNamespace2;
|
|
274
|
+
})(SiteNamespace || {});
|
|
275
|
+
var CmsFieldType = /* @__PURE__ */ ((CmsFieldType2) => {
|
|
276
|
+
CmsFieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
|
|
277
|
+
CmsFieldType2["TEXT"] = "TEXT";
|
|
278
|
+
CmsFieldType2["NUMBER"] = "NUMBER";
|
|
279
|
+
CmsFieldType2["DATE"] = "DATE";
|
|
280
|
+
CmsFieldType2["DATETIME"] = "DATETIME";
|
|
281
|
+
CmsFieldType2["IMAGE"] = "IMAGE";
|
|
282
|
+
CmsFieldType2["BOOLEAN"] = "BOOLEAN";
|
|
283
|
+
CmsFieldType2["DOCUMENT"] = "DOCUMENT";
|
|
284
|
+
CmsFieldType2["URL"] = "URL";
|
|
285
|
+
CmsFieldType2["RICH_TEXT"] = "RICH_TEXT";
|
|
286
|
+
CmsFieldType2["VIDEO"] = "VIDEO";
|
|
287
|
+
CmsFieldType2["ANY"] = "ANY";
|
|
288
|
+
CmsFieldType2["ARRAY_STRING"] = "ARRAY_STRING";
|
|
289
|
+
CmsFieldType2["ARRAY_DOCUMENT"] = "ARRAY_DOCUMENT";
|
|
290
|
+
CmsFieldType2["AUDIO"] = "AUDIO";
|
|
291
|
+
CmsFieldType2["TIME"] = "TIME";
|
|
292
|
+
CmsFieldType2["LANGUAGE"] = "LANGUAGE";
|
|
293
|
+
CmsFieldType2["RICH_CONTENT"] = "RICH_CONTENT";
|
|
294
|
+
CmsFieldType2["MEDIA_GALLERY"] = "MEDIA_GALLERY";
|
|
295
|
+
CmsFieldType2["ADDRESS"] = "ADDRESS";
|
|
296
|
+
CmsFieldType2["PAGE_LINK"] = "PAGE_LINK";
|
|
297
|
+
CmsFieldType2["REFERENCE"] = "REFERENCE";
|
|
298
|
+
CmsFieldType2["MULTI_REFERENCE"] = "MULTI_REFERENCE";
|
|
299
|
+
CmsFieldType2["OBJECT"] = "OBJECT";
|
|
300
|
+
CmsFieldType2["ARRAY"] = "ARRAY";
|
|
301
|
+
return CmsFieldType2;
|
|
302
|
+
})(CmsFieldType || {});
|
|
303
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
304
|
+
Status2["OK"] = "OK";
|
|
305
|
+
Status2["ACCEPTING_PAYINS_ONLY"] = "ACCEPTING_PAYINS_ONLY";
|
|
306
|
+
Status2["PAYMENTS_BLOCKED"] = "PAYMENTS_BLOCKED";
|
|
307
|
+
Status2["ACCOUNT_CREATION_PENDING"] = "ACCOUNT_CREATION_PENDING";
|
|
308
|
+
Status2["BLOCKED"] = "BLOCKED";
|
|
309
|
+
Status2["SUSPENDED"] = "SUSPENDED";
|
|
310
|
+
Status2["ACCOUNT_CREATION_FAILED"] = "ACCOUNT_CREATION_FAILED";
|
|
311
|
+
return Status2;
|
|
312
|
+
})(Status || {});
|
|
313
|
+
var RequiredAction = /* @__PURE__ */ ((RequiredAction2) => {
|
|
314
|
+
RequiredAction2["NONE"] = "NONE";
|
|
315
|
+
RequiredAction2["CLAIM_ACCOUNT_TO_ENABLE_PAYOUT"] = "CLAIM_ACCOUNT_TO_ENABLE_PAYOUT";
|
|
316
|
+
RequiredAction2["CLAIM_ACCOUNT_TO_ENABLE_PAYOUT_AND_AVOID_SUSPENSION"] = "CLAIM_ACCOUNT_TO_ENABLE_PAYOUT_AND_AVOID_SUSPENSION";
|
|
317
|
+
RequiredAction2["CLAIM_ACCOUNT_TO_ENABLE_PAYIN"] = "CLAIM_ACCOUNT_TO_ENABLE_PAYIN";
|
|
318
|
+
return RequiredAction2;
|
|
319
|
+
})(RequiredAction || {});
|
|
320
|
+
var VisitorApp = /* @__PURE__ */ ((VisitorApp2) => {
|
|
321
|
+
VisitorApp2["VISITOR_APP_UNSPECIFIED"] = "VISITOR_APP_UNSPECIFIED";
|
|
322
|
+
VisitorApp2["STORES"] = "STORES";
|
|
323
|
+
VisitorApp2["BOOKINGS"] = "BOOKINGS";
|
|
324
|
+
VisitorApp2["EVENTS"] = "EVENTS";
|
|
325
|
+
VisitorApp2["BLOG"] = "BLOG";
|
|
326
|
+
VisitorApp2["PRICING_PLANS"] = "PRICING_PLANS";
|
|
327
|
+
VisitorApp2["RESTAURANTS_MENUS"] = "RESTAURANTS_MENUS";
|
|
328
|
+
VisitorApp2["TABLE_RESERVATIONS"] = "TABLE_RESERVATIONS";
|
|
329
|
+
VisitorApp2["REVIEWS"] = "REVIEWS";
|
|
330
|
+
VisitorApp2["ECOM"] = "ECOM";
|
|
331
|
+
return VisitorApp2;
|
|
332
|
+
})(VisitorApp || {});
|
|
333
|
+
async function getDynamicContext2(options) {
|
|
334
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
335
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
336
|
+
siteId: options?.siteId,
|
|
337
|
+
siteName: options?.siteName,
|
|
338
|
+
query: options?.query
|
|
339
|
+
});
|
|
340
|
+
const reqOpts = getDynamicContext(payload);
|
|
341
|
+
sideEffects?.onSiteCall?.();
|
|
342
|
+
try {
|
|
343
|
+
const result = await httpClient.request(reqOpts);
|
|
344
|
+
sideEffects?.onSuccess?.(result);
|
|
345
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
346
|
+
} catch (err) {
|
|
347
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
348
|
+
err,
|
|
349
|
+
{
|
|
350
|
+
spreadPathsToArguments: {},
|
|
351
|
+
explicitPathsToArguments: {
|
|
352
|
+
siteId: "$[0].siteId",
|
|
353
|
+
siteName: "$[0].siteName",
|
|
354
|
+
query: "$[0].query"
|
|
355
|
+
},
|
|
356
|
+
singleArgumentUnchanged: false
|
|
357
|
+
},
|
|
358
|
+
["options"]
|
|
359
|
+
);
|
|
360
|
+
sideEffects?.onError?.(err);
|
|
361
|
+
throw transformedError;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
async function getDynamicContextMarkdown2(options) {
|
|
365
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
366
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
367
|
+
siteId: options?.siteId,
|
|
368
|
+
siteName: options?.siteName,
|
|
369
|
+
query: options?.query,
|
|
370
|
+
includePartnerContext: options?.includePartnerContext,
|
|
371
|
+
includeAccountContext: options?.includeAccountContext
|
|
372
|
+
});
|
|
373
|
+
const reqOpts = getDynamicContextMarkdown(
|
|
374
|
+
payload
|
|
375
|
+
);
|
|
376
|
+
sideEffects?.onSiteCall?.();
|
|
377
|
+
try {
|
|
378
|
+
const result = await httpClient.request(reqOpts);
|
|
379
|
+
sideEffects?.onSuccess?.(result);
|
|
380
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
381
|
+
} catch (err) {
|
|
382
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
383
|
+
err,
|
|
384
|
+
{
|
|
385
|
+
spreadPathsToArguments: {},
|
|
386
|
+
explicitPathsToArguments: {
|
|
387
|
+
siteId: "$[0].siteId",
|
|
388
|
+
siteName: "$[0].siteName",
|
|
389
|
+
query: "$[0].query",
|
|
390
|
+
includePartnerContext: "$[0].includePartnerContext",
|
|
391
|
+
includeAccountContext: "$[0].includeAccountContext"
|
|
392
|
+
},
|
|
393
|
+
singleArgumentUnchanged: false
|
|
394
|
+
},
|
|
395
|
+
["options"]
|
|
396
|
+
);
|
|
397
|
+
sideEffects?.onError?.(err);
|
|
398
|
+
throw transformedError;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
async function getVisitorSiteContext2() {
|
|
402
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
403
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
404
|
+
const reqOpts = getVisitorSiteContext(payload);
|
|
405
|
+
sideEffects?.onSiteCall?.();
|
|
406
|
+
try {
|
|
407
|
+
const result = await httpClient.request(reqOpts);
|
|
408
|
+
sideEffects?.onSuccess?.(result);
|
|
409
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
410
|
+
} catch (err) {
|
|
411
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
412
|
+
err,
|
|
413
|
+
{
|
|
414
|
+
spreadPathsToArguments: {},
|
|
415
|
+
explicitPathsToArguments: {},
|
|
416
|
+
singleArgumentUnchanged: false
|
|
417
|
+
},
|
|
418
|
+
[]
|
|
419
|
+
);
|
|
420
|
+
sideEffects?.onError?.(err);
|
|
421
|
+
throw transformedError;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
async function getVisitorSiteContextMarkdown2() {
|
|
425
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
426
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
427
|
+
const reqOpts = getVisitorSiteContextMarkdown(
|
|
428
|
+
payload
|
|
429
|
+
);
|
|
430
|
+
sideEffects?.onSiteCall?.();
|
|
431
|
+
try {
|
|
432
|
+
const result = await httpClient.request(reqOpts);
|
|
433
|
+
sideEffects?.onSuccess?.(result);
|
|
434
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
435
|
+
} catch (err) {
|
|
436
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
437
|
+
err,
|
|
438
|
+
{
|
|
439
|
+
spreadPathsToArguments: {},
|
|
440
|
+
explicitPathsToArguments: {},
|
|
441
|
+
singleArgumentUnchanged: false
|
|
442
|
+
},
|
|
443
|
+
[]
|
|
444
|
+
);
|
|
445
|
+
sideEffects?.onError?.(err);
|
|
446
|
+
throw transformedError;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// src/dynamic-context-v1-dynamic-context-dynamic-context.public.ts
|
|
451
|
+
function getDynamicContext3(httpClient) {
|
|
452
|
+
return (options) => getDynamicContext2(
|
|
453
|
+
options,
|
|
454
|
+
// @ts-ignore
|
|
455
|
+
{ httpClient }
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
function getDynamicContextMarkdown3(httpClient) {
|
|
459
|
+
return (options) => getDynamicContextMarkdown2(
|
|
460
|
+
options,
|
|
461
|
+
// @ts-ignore
|
|
462
|
+
{ httpClient }
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
function getVisitorSiteContext3(httpClient) {
|
|
466
|
+
return () => getVisitorSiteContext2(
|
|
467
|
+
// @ts-ignore
|
|
468
|
+
{ httpClient }
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
function getVisitorSiteContextMarkdown3(httpClient) {
|
|
472
|
+
return () => getVisitorSiteContextMarkdown2(
|
|
473
|
+
// @ts-ignore
|
|
474
|
+
{ httpClient }
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// src/dynamic-context-v1-dynamic-context-dynamic-context.context.ts
|
|
479
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
480
|
+
var getDynamicContext4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(getDynamicContext3);
|
|
481
|
+
var getDynamicContextMarkdown4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(getDynamicContextMarkdown3);
|
|
482
|
+
var getVisitorSiteContext4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(getVisitorSiteContext3);
|
|
483
|
+
var getVisitorSiteContextMarkdown4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(getVisitorSiteContextMarkdown3);
|
|
484
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
485
|
+
0 && (module.exports = {
|
|
486
|
+
AccountStatus,
|
|
487
|
+
CmsFieldType,
|
|
488
|
+
EditorType,
|
|
489
|
+
RequiredAction,
|
|
490
|
+
SiteNamespace,
|
|
491
|
+
SortOrder,
|
|
492
|
+
Status,
|
|
493
|
+
VisitorApp,
|
|
494
|
+
getDynamicContext,
|
|
495
|
+
getDynamicContextMarkdown,
|
|
496
|
+
getVisitorSiteContext,
|
|
497
|
+
getVisitorSiteContextMarkdown
|
|
498
|
+
});
|
|
499
|
+
//# sourceMappingURL=index.js.map
|