@wix/auto_sdk_multilingual_translation-credits 1.0.18 → 1.0.20
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/index.d.mts +28 -0
- package/build/index.d.ts +28 -0
- package/build/index.js +263 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +233 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +28 -0
- package/build/internal/index.d.ts +28 -0
- package/build/internal/index.js +263 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +233 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +61 -0
- package/build/internal/meta.d.ts +61 -0
- package/build/internal/meta.js +154 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +126 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/multilingual-machine-v1-credit-data-translation-credits.types.d.ts → internal/multilingual-machine-v1-credit-data-translation-credits.universal-Di8nBZdQ.d.mts} +61 -49
- package/build/{cjs/src/multilingual-machine-v1-credit-data-translation-credits.universal.d.ts → internal/multilingual-machine-v1-credit-data-translation-credits.universal-Di8nBZdQ.d.ts} +61 -82
- package/build/meta.d.mts +61 -0
- package/build/meta.d.ts +61 -0
- package/build/meta.js +154 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +126 -0
- package/build/meta.mjs.map +1 -0
- package/build/{es/src/multilingual-machine-v1-credit-data-translation-credits.universal.d.ts → multilingual-machine-v1-credit-data-translation-credits.universal-Di8nBZdQ.d.mts} +61 -82
- package/build/{es/src/multilingual-machine-v1-credit-data-translation-credits.types.d.ts → multilingual-machine-v1-credit-data-translation-credits.universal-Di8nBZdQ.d.ts} +61 -49
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.context.d.ts +0 -6
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.context.js +0 -14
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.context.js.map +0 -1
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.http.d.ts +0 -11
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.http.js +0 -94
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.http.js.map +0 -1
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.meta.d.ts +0 -14
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.meta.js +0 -66
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.meta.js.map +0 -1
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.public.d.ts +0 -25
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.public.js +0 -24
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.public.js.map +0 -1
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.types.js +0 -124
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.types.js.map +0 -1
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.universal.js +0 -222
- package/build/cjs/src/multilingual-machine-v1-credit-data-translation-credits.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.context.d.ts +0 -6
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.context.js +0 -6
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.context.js.map +0 -1
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.http.d.ts +0 -11
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.http.js +0 -89
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.http.js.map +0 -1
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.meta.d.ts +0 -14
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.meta.js +0 -38
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.meta.js.map +0 -1
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.public.d.ts +0 -25
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.public.js +0 -14
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.public.js.map +0 -1
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.types.js +0 -121
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.types.js.map +0 -1
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.universal.js +0 -194
- package/build/es/src/multilingual-machine-v1-credit-data-translation-credits.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.context.d.ts +0 -6
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.context.js +0 -14
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.context.js.map +0 -1
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.http.d.ts +0 -11
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.http.js +0 -94
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.http.js.map +0 -1
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.meta.d.ts +0 -14
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.meta.js +0 -66
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.meta.js.map +0 -1
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.public.d.ts +0 -25
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.public.js +0 -24
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.public.js.map +0 -1
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.types.d.ts +0 -509
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.types.js +0 -124
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.types.js.map +0 -1
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.universal.d.ts +0 -542
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.universal.js +0 -222
- package/build/internal/cjs/src/multilingual-machine-v1-credit-data-translation-credits.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.context.d.ts +0 -6
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.context.js +0 -6
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.context.js.map +0 -1
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.http.d.ts +0 -11
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.http.js +0 -89
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.http.js.map +0 -1
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.meta.d.ts +0 -14
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.meta.js +0 -38
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.meta.js.map +0 -1
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.public.d.ts +0 -25
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.public.js +0 -14
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.public.js.map +0 -1
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.types.d.ts +0 -509
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.types.js +0 -121
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.types.js.map +0 -1
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.universal.d.ts +0 -542
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.universal.js +0 -194
- package/build/internal/es/src/multilingual-machine-v1-credit-data-translation-credits.universal.js.map +0 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// src/multilingual-machine-v1-credit-data-translation-credits.http.ts
|
|
2
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
3
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
4
|
+
function resolveWixMultilingualMachineV1TranslationCreditsUrl(opts) {
|
|
5
|
+
const domainToMappings = {
|
|
6
|
+
"editor._base_domain_": [
|
|
7
|
+
{
|
|
8
|
+
srcPath: "/_api/translation-credits/v1",
|
|
9
|
+
destPath: "/v1"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"blocks._base_domain_": [
|
|
13
|
+
{
|
|
14
|
+
srcPath: "/_api/translation-credits/v1",
|
|
15
|
+
destPath: "/v1"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"create.editorx": [
|
|
19
|
+
{
|
|
20
|
+
srcPath: "/_api/translation-credits/v1",
|
|
21
|
+
destPath: "/v1"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"manage._base_domain_": [
|
|
25
|
+
{
|
|
26
|
+
srcPath: "/_api/translation-credits/v1",
|
|
27
|
+
destPath: "/v1"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"www.wixapis.com": [
|
|
31
|
+
{
|
|
32
|
+
srcPath: "/translation-credits/v1",
|
|
33
|
+
destPath: "/v1"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"*.dev.wix-code.com": [
|
|
37
|
+
{
|
|
38
|
+
srcPath: "/_api/translation-credits/v1",
|
|
39
|
+
destPath: "/v1"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
44
|
+
}
|
|
45
|
+
var PACKAGE_NAME = "@wix/auto_sdk_multilingual_translation-credits";
|
|
46
|
+
function getCreditData(payload) {
|
|
47
|
+
function __getCreditData({ host }) {
|
|
48
|
+
const metadata = {
|
|
49
|
+
entityFqdn: "wix.multilingual.machine.v1.credit_data",
|
|
50
|
+
method: "GET",
|
|
51
|
+
methodFqn: "wix.multilingual.machine.v1.TranslationCredits.GetCreditData",
|
|
52
|
+
packageName: PACKAGE_NAME,
|
|
53
|
+
url: resolveWixMultilingualMachineV1TranslationCreditsUrl({
|
|
54
|
+
protoPath: "/v1/credit",
|
|
55
|
+
data: payload,
|
|
56
|
+
host
|
|
57
|
+
}),
|
|
58
|
+
params: toURLSearchParams(payload)
|
|
59
|
+
};
|
|
60
|
+
return metadata;
|
|
61
|
+
}
|
|
62
|
+
return __getCreditData;
|
|
63
|
+
}
|
|
64
|
+
function checkSufficientCredits(payload) {
|
|
65
|
+
function __checkSufficientCredits({ host }) {
|
|
66
|
+
const metadata = {
|
|
67
|
+
entityFqdn: "wix.multilingual.machine.v1.credit_data",
|
|
68
|
+
method: "POST",
|
|
69
|
+
methodFqn: "wix.multilingual.machine.v1.TranslationCredits.CheckSufficientCredits",
|
|
70
|
+
packageName: PACKAGE_NAME,
|
|
71
|
+
url: resolveWixMultilingualMachineV1TranslationCreditsUrl({
|
|
72
|
+
protoPath: "/v1/credit/is-eligible",
|
|
73
|
+
data: payload,
|
|
74
|
+
host
|
|
75
|
+
}),
|
|
76
|
+
data: payload
|
|
77
|
+
};
|
|
78
|
+
return metadata;
|
|
79
|
+
}
|
|
80
|
+
return __checkSufficientCredits;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/multilingual-machine-v1-credit-data-translation-credits.meta.ts
|
|
84
|
+
function getCreditData2() {
|
|
85
|
+
const payload = {};
|
|
86
|
+
const getRequestOptions = getCreditData(payload);
|
|
87
|
+
const getUrl = (context) => {
|
|
88
|
+
const { url } = getRequestOptions(context);
|
|
89
|
+
return url;
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
getUrl,
|
|
93
|
+
httpMethod: "GET",
|
|
94
|
+
path: "/v1/credit",
|
|
95
|
+
pathParams: {},
|
|
96
|
+
__requestType: null,
|
|
97
|
+
__originalRequestType: null,
|
|
98
|
+
__responseType: null,
|
|
99
|
+
__originalResponseType: null
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function checkSufficientCredits2() {
|
|
103
|
+
const payload = {};
|
|
104
|
+
const getRequestOptions = checkSufficientCredits(
|
|
105
|
+
payload
|
|
106
|
+
);
|
|
107
|
+
const getUrl = (context) => {
|
|
108
|
+
const { url } = getRequestOptions(context);
|
|
109
|
+
return url;
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
getUrl,
|
|
113
|
+
httpMethod: "POST",
|
|
114
|
+
path: "/v1/credit/is-eligible",
|
|
115
|
+
pathParams: {},
|
|
116
|
+
__requestType: null,
|
|
117
|
+
__originalRequestType: null,
|
|
118
|
+
__responseType: null,
|
|
119
|
+
__originalResponseType: null
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
checkSufficientCredits2 as checkSufficientCredits,
|
|
124
|
+
getCreditData2 as getCreditData
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/multilingual-machine-v1-credit-data-translation-credits.http.ts","../../src/multilingual-machine-v1-credit-data-translation-credits.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixMultilingualMachineV1TranslationCreditsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/translation-credits/v1',\n destPath: '/v1',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/translation-credits/v1',\n destPath: '/v1',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/translation-credits/v1',\n destPath: '/v1',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/translation-credits/v1',\n destPath: '/v1',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/translation-credits/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/translation-credits/v1',\n destPath: '/v1',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_multilingual_translation-credits';\n\n/**\n * Retrieves a site's word credit data.\n *\n * For sites with a limited quota, you can calculate the available word credits by subtracting the credits used from the quota.\n * For example, if a site has a quota of 100 credits and all credits have been used (`\"creditsUsed\": 100`), the available word credits will be 0.\n * If a Wix user purchases an additional 50 credits, the `quota` will increase to `150`, and the site will have 50 available word credits.\n */\nexport function getCreditData(payload: object): RequestOptionsFactory<any> {\n function __getCreditData({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.multilingual.machine.v1.credit_data',\n method: 'GET' as any,\n methodFqn: 'wix.multilingual.machine.v1.TranslationCredits.GetCreditData',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualMachineV1TranslationCreditsUrl({\n protoPath: '/v1/credit',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getCreditData;\n}\n\n/** Checks whether a site has enough credits to translate the specified number of words. */\nexport function checkSufficientCredits(\n payload: object\n): RequestOptionsFactory<any> {\n function __checkSufficientCredits({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.multilingual.machine.v1.credit_data',\n method: 'POST' as any,\n methodFqn:\n 'wix.multilingual.machine.v1.TranslationCredits.CheckSufficientCredits',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualMachineV1TranslationCreditsUrl({\n protoPath: '/v1/credit/is-eligible',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __checkSufficientCredits;\n}\n","import * as ambassadorWixMultilingualMachineV1CreditData from './multilingual-machine-v1-credit-data-translation-credits.http.js';\nimport * as ambassadorWixMultilingualMachineV1CreditDataTypes from './multilingual-machine-v1-credit-data-translation-credits.types.js';\nimport * as ambassadorWixMultilingualMachineV1CreditDataUniversalTypes from './multilingual-machine-v1-credit-data-translation-credits.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getCreditData(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixMultilingualMachineV1CreditDataUniversalTypes.GetCreditDataRequest,\n ambassadorWixMultilingualMachineV1CreditDataTypes.GetCreditDataRequest,\n ambassadorWixMultilingualMachineV1CreditDataUniversalTypes.GetCreditDataResponse,\n ambassadorWixMultilingualMachineV1CreditDataTypes.GetCreditDataResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMultilingualMachineV1CreditData.getCreditData(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/credit',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function checkSufficientCredits(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMultilingualMachineV1CreditDataUniversalTypes.CheckSufficientCreditsRequest,\n ambassadorWixMultilingualMachineV1CreditDataTypes.CheckSufficientCreditsRequest,\n ambassadorWixMultilingualMachineV1CreditDataUniversalTypes.CheckSufficientCreditsResponse,\n ambassadorWixMultilingualMachineV1CreditDataTypes.CheckSufficientCreditsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMultilingualMachineV1CreditData.checkSufficientCredits(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/credit/is-eligible',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AASd,SAAS,cAAc,SAA6C;AACzE,WAAS,gBAAgB,EAAE,KAAK,GAAQ;AACtC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,KAAK,qDAAqD;AAAA,QACxD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAGO,SAAS,uBACd,SAC4B;AAC5B,WAAS,yBAAyB,EAAE,KAAK,GAAQ;AAC/C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,qDAAqD;AAAA,QACxD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACjFO,SAASA,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC,cAAc,OAAO;AAEpE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,0BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getCreditData","checkSufficientCredits"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface CreditData extends CreditDataTypeOneOf {
|
|
2
2
|
/**
|
|
3
3
|
* Limited word credit quota.
|
|
4
4
|
* @readonly
|
|
@@ -7,56 +7,58 @@ export interface CreditData extends CreditDataTypeOneOf {
|
|
|
7
7
|
/** Total number of word credits consumed by a site. For sites with an unlimited word credit quota, this property still reflects the number of credits used, even though no usage limit applies. */
|
|
8
8
|
creditsUsed?: number | null;
|
|
9
9
|
/** Quota type. */
|
|
10
|
-
quotaType?:
|
|
10
|
+
quotaType?: QuotaWithLiterals;
|
|
11
11
|
}
|
|
12
12
|
/** @oneof */
|
|
13
|
-
|
|
13
|
+
interface CreditDataTypeOneOf {
|
|
14
14
|
/**
|
|
15
15
|
* Limited word credit quota.
|
|
16
16
|
* @readonly
|
|
17
17
|
*/
|
|
18
18
|
limitedQuota?: LimitedQuota;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
declare enum Quota {
|
|
21
21
|
UNKNOWN = "UNKNOWN",
|
|
22
22
|
/** Limited word credit quota. */
|
|
23
23
|
LIMITED = "LIMITED"
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
/** @enumType */
|
|
26
|
+
type QuotaWithLiterals = Quota | 'UNKNOWN' | 'LIMITED';
|
|
27
|
+
interface LimitedQuota {
|
|
26
28
|
/** Total word credit allocation for the site, which includes the initial quota and any additional credits purchased through the [Translation Manager](https://support.wix.com/en/article/wix-multilingual-using-the-translation-manager), regardless of usage. */
|
|
27
29
|
quota?: number | null;
|
|
28
30
|
}
|
|
29
|
-
|
|
31
|
+
interface GetCreditDataRequest {
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
interface GetCreditDataResponse {
|
|
32
34
|
/** Credit data. */
|
|
33
35
|
creditData?: CreditData;
|
|
34
36
|
}
|
|
35
|
-
|
|
37
|
+
interface CheckSufficientCreditsRequest {
|
|
36
38
|
/** Number of words to translate. */
|
|
37
39
|
wordCount: number;
|
|
38
40
|
}
|
|
39
|
-
|
|
41
|
+
interface CheckSufficientCreditsResponse {
|
|
40
42
|
/** Whether the site has enough credits to translate the specified number of words. */
|
|
41
43
|
sufficientCredits?: boolean;
|
|
42
44
|
}
|
|
43
|
-
|
|
45
|
+
interface ReportCreditUsageRequest {
|
|
44
46
|
/** Number of credits used in the translation operation */
|
|
45
47
|
used?: number;
|
|
46
48
|
}
|
|
47
|
-
|
|
49
|
+
interface ReportCreditUsageResponse {
|
|
48
50
|
/** Updated credit status after reporting usage */
|
|
49
51
|
creditData?: CreditData;
|
|
50
52
|
}
|
|
51
|
-
|
|
53
|
+
interface UpdateCreditRequest {
|
|
52
54
|
/** New credit status to be set for the site */
|
|
53
55
|
creditData?: CreditData;
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
interface UpdateCreditResponse {
|
|
56
58
|
/** Updated credit status after the change */
|
|
57
59
|
creditData?: CreditData;
|
|
58
60
|
}
|
|
59
|
-
|
|
61
|
+
interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
60
62
|
/** Emitted on a meta site creation. */
|
|
61
63
|
siteCreated?: SiteCreated;
|
|
62
64
|
/** Emitted on a meta site transfer completion. */
|
|
@@ -122,7 +124,7 @@ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
|
122
124
|
assets?: Asset[];
|
|
123
125
|
}
|
|
124
126
|
/** @oneof */
|
|
125
|
-
|
|
127
|
+
interface MetaSiteSpecialEventPayloadOneOf {
|
|
126
128
|
/** Emitted on a meta site creation. */
|
|
127
129
|
siteCreated?: SiteCreated;
|
|
128
130
|
/** Emitted on a meta site transfer completion. */
|
|
@@ -172,7 +174,7 @@ export interface MetaSiteSpecialEventPayloadOneOf {
|
|
|
172
174
|
/** Emitted when Picasso is detached. */
|
|
173
175
|
picassoUnassigned?: PicassoUnassigned;
|
|
174
176
|
}
|
|
175
|
-
|
|
177
|
+
interface Asset {
|
|
176
178
|
/**
|
|
177
179
|
* An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
|
|
178
180
|
* @maxLength 36
|
|
@@ -184,16 +186,18 @@ export interface Asset {
|
|
|
184
186
|
*/
|
|
185
187
|
instanceId?: string;
|
|
186
188
|
/** An application state. */
|
|
187
|
-
state?:
|
|
189
|
+
state?: StateWithLiterals;
|
|
188
190
|
}
|
|
189
|
-
|
|
191
|
+
declare enum State {
|
|
190
192
|
UNKNOWN = "UNKNOWN",
|
|
191
193
|
ENABLED = "ENABLED",
|
|
192
194
|
DISABLED = "DISABLED",
|
|
193
195
|
PENDING = "PENDING",
|
|
194
196
|
DEMO = "DEMO"
|
|
195
197
|
}
|
|
196
|
-
|
|
198
|
+
/** @enumType */
|
|
199
|
+
type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
|
|
200
|
+
interface SiteCreated {
|
|
197
201
|
/**
|
|
198
202
|
* A template identifier (empty if not created from a template).
|
|
199
203
|
* @maxLength 36
|
|
@@ -205,7 +209,7 @@ export interface SiteCreated {
|
|
|
205
209
|
*/
|
|
206
210
|
ownerId?: string;
|
|
207
211
|
/** A context in which meta site was created. */
|
|
208
|
-
context?:
|
|
212
|
+
context?: SiteCreatedContextWithLiterals;
|
|
209
213
|
/**
|
|
210
214
|
* A meta site id from which this site was created.
|
|
211
215
|
*
|
|
@@ -220,9 +224,9 @@ export interface SiteCreated {
|
|
|
220
224
|
*/
|
|
221
225
|
siteName?: string;
|
|
222
226
|
/** A namespace. */
|
|
223
|
-
namespace?:
|
|
227
|
+
namespace?: NamespaceWithLiterals;
|
|
224
228
|
}
|
|
225
|
-
|
|
229
|
+
declare enum SiteCreatedContext {
|
|
226
230
|
/** A valid option, we don't expose all reasons why site might be created. */
|
|
227
231
|
OTHER = "OTHER",
|
|
228
232
|
/** A meta site was created from template. */
|
|
@@ -236,7 +240,9 @@ export declare enum SiteCreatedContext {
|
|
|
236
240
|
/** deprecated A meta site was created for Flash editor. */
|
|
237
241
|
FLASH = "FLASH"
|
|
238
242
|
}
|
|
239
|
-
|
|
243
|
+
/** @enumType */
|
|
244
|
+
type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
|
|
245
|
+
declare enum Namespace {
|
|
240
246
|
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
241
247
|
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
242
248
|
WIX = "WIX",
|
|
@@ -318,8 +324,10 @@ export declare enum Namespace {
|
|
|
318
324
|
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
319
325
|
MIMIR = "MIMIR"
|
|
320
326
|
}
|
|
327
|
+
/** @enumType */
|
|
328
|
+
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR';
|
|
321
329
|
/** Site transferred to another user. */
|
|
322
|
-
|
|
330
|
+
interface SiteTransferred {
|
|
323
331
|
/**
|
|
324
332
|
* A previous owner id (user that transfers meta site).
|
|
325
333
|
* @format GUID
|
|
@@ -332,15 +340,15 @@ export interface SiteTransferred {
|
|
|
332
340
|
newOwnerId?: string;
|
|
333
341
|
}
|
|
334
342
|
/** Soft deletion of the meta site. Could be restored. */
|
|
335
|
-
|
|
343
|
+
interface SiteDeleted {
|
|
336
344
|
/** A deletion context. */
|
|
337
345
|
deleteContext?: DeleteContext;
|
|
338
346
|
}
|
|
339
|
-
|
|
347
|
+
interface DeleteContext {
|
|
340
348
|
/** When the meta site was deleted. */
|
|
341
349
|
dateDeleted?: Date | null;
|
|
342
350
|
/** A status. */
|
|
343
|
-
deleteStatus?:
|
|
351
|
+
deleteStatus?: DeleteStatusWithLiterals;
|
|
344
352
|
/**
|
|
345
353
|
* A reason (flow).
|
|
346
354
|
* @maxLength 255
|
|
@@ -352,20 +360,22 @@ export interface DeleteContext {
|
|
|
352
360
|
*/
|
|
353
361
|
initiatorId?: string | null;
|
|
354
362
|
}
|
|
355
|
-
|
|
363
|
+
declare enum DeleteStatus {
|
|
356
364
|
UNKNOWN = "UNKNOWN",
|
|
357
365
|
TRASH = "TRASH",
|
|
358
366
|
DELETED = "DELETED",
|
|
359
367
|
PENDING_PURGE = "PENDING_PURGE",
|
|
360
368
|
PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
|
|
361
369
|
}
|
|
370
|
+
/** @enumType */
|
|
371
|
+
type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
|
|
362
372
|
/** Restoration of the meta site. */
|
|
363
|
-
|
|
373
|
+
interface SiteUndeleted {
|
|
364
374
|
}
|
|
365
375
|
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
366
|
-
|
|
376
|
+
interface SitePublished {
|
|
367
377
|
}
|
|
368
|
-
|
|
378
|
+
interface SiteUnpublished {
|
|
369
379
|
/**
|
|
370
380
|
* A list of URLs previously associated with the meta site.
|
|
371
381
|
* @maxLength 4000
|
|
@@ -373,9 +383,9 @@ export interface SiteUnpublished {
|
|
|
373
383
|
*/
|
|
374
384
|
urls?: string[];
|
|
375
385
|
}
|
|
376
|
-
|
|
386
|
+
interface SiteMarkedAsTemplate {
|
|
377
387
|
}
|
|
378
|
-
|
|
388
|
+
interface SiteMarkedAsWixSite {
|
|
379
389
|
}
|
|
380
390
|
/**
|
|
381
391
|
* Represents a service provisioned a site.
|
|
@@ -392,7 +402,7 @@ export interface SiteMarkedAsWixSite {
|
|
|
392
402
|
* changes made to the original template afterward.
|
|
393
403
|
* To ensure this, the TPA on the template gets a new instance_id.
|
|
394
404
|
*/
|
|
395
|
-
|
|
405
|
+
interface ServiceProvisioned {
|
|
396
406
|
/**
|
|
397
407
|
* Either UUID or EmbeddedServiceType.
|
|
398
408
|
* @maxLength 36
|
|
@@ -419,7 +429,7 @@ export interface ServiceProvisioned {
|
|
|
419
429
|
*/
|
|
420
430
|
originMetaSiteId?: string | null;
|
|
421
431
|
}
|
|
422
|
-
|
|
432
|
+
interface ServiceRemoved {
|
|
423
433
|
/**
|
|
424
434
|
* Either UUID or EmbeddedServiceType.
|
|
425
435
|
* @maxLength 36
|
|
@@ -437,7 +447,7 @@ export interface ServiceRemoved {
|
|
|
437
447
|
version?: string | null;
|
|
438
448
|
}
|
|
439
449
|
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
440
|
-
|
|
450
|
+
interface SiteRenamed {
|
|
441
451
|
/**
|
|
442
452
|
* A new meta site name (URL slug).
|
|
443
453
|
* @maxLength 20
|
|
@@ -454,21 +464,21 @@ export interface SiteRenamed {
|
|
|
454
464
|
*
|
|
455
465
|
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
456
466
|
*/
|
|
457
|
-
|
|
467
|
+
interface SiteHardDeleted {
|
|
458
468
|
/** A deletion context. */
|
|
459
469
|
deleteContext?: DeleteContext;
|
|
460
470
|
}
|
|
461
|
-
|
|
471
|
+
interface NamespaceChanged {
|
|
462
472
|
/** A previous namespace. */
|
|
463
|
-
oldNamespace?:
|
|
473
|
+
oldNamespace?: NamespaceWithLiterals;
|
|
464
474
|
/** A new namespace. */
|
|
465
|
-
newNamespace?:
|
|
475
|
+
newNamespace?: NamespaceWithLiterals;
|
|
466
476
|
}
|
|
467
477
|
/** Assigned Studio editor */
|
|
468
|
-
|
|
478
|
+
interface StudioAssigned {
|
|
469
479
|
}
|
|
470
480
|
/** Unassigned Studio editor */
|
|
471
|
-
|
|
481
|
+
interface StudioUnassigned {
|
|
472
482
|
}
|
|
473
483
|
/**
|
|
474
484
|
* Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
|
|
@@ -478,13 +488,13 @@ export interface StudioUnassigned {
|
|
|
478
488
|
*
|
|
479
489
|
* https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
|
|
480
490
|
*/
|
|
481
|
-
|
|
491
|
+
interface SiteUrlChanged {
|
|
482
492
|
}
|
|
483
493
|
/**
|
|
484
494
|
* Used at the end of the deletion flow for both draft sites and when a user deletes a site.
|
|
485
495
|
* Consumed by other teams to remove relevant data.
|
|
486
496
|
*/
|
|
487
|
-
|
|
497
|
+
interface SitePurgedExternally {
|
|
488
498
|
/**
|
|
489
499
|
* @maxLength 2048
|
|
490
500
|
* @maxSize 100
|
|
@@ -494,16 +504,18 @@ export interface SitePurgedExternally {
|
|
|
494
504
|
appDefId?: string[];
|
|
495
505
|
}
|
|
496
506
|
/** Assigned Odeditor */
|
|
497
|
-
|
|
507
|
+
interface OdeditorAssigned {
|
|
498
508
|
}
|
|
499
509
|
/** Unassigned Odeditor */
|
|
500
|
-
|
|
510
|
+
interface OdeditorUnassigned {
|
|
501
511
|
}
|
|
502
512
|
/** Assigned Picasso editor */
|
|
503
|
-
|
|
513
|
+
interface PicassoAssigned {
|
|
504
514
|
}
|
|
505
515
|
/** Unassigned Picasso */
|
|
506
|
-
|
|
516
|
+
interface PicassoUnassigned {
|
|
507
517
|
}
|
|
508
|
-
|
|
518
|
+
interface Empty {
|
|
509
519
|
}
|
|
520
|
+
|
|
521
|
+
export { type Asset as A, type OdeditorUnassigned as B, type CheckSufficientCreditsResponse as C, DeleteStatus as D, type PicassoUnassigned as E, type Empty as F, type GetCreditDataResponse as G, type LimitedQuota as L, type MetaSiteSpecialEvent as M, Namespace as N, type OdeditorAssigned as O, type PicassoAssigned as P, Quota as Q, type ReportCreditUsageRequest as R, State as S, type UpdateCreditRequest as U, SiteCreatedContext as a, type CreditData as b, type CreditDataTypeOneOf as c, type GetCreditDataRequest as d, type CheckSufficientCreditsRequest as e, type ReportCreditUsageResponse as f, type UpdateCreditResponse as g, type MetaSiteSpecialEventPayloadOneOf as h, type SiteCreated as i, type SiteTransferred as j, type SiteDeleted as k, type DeleteContext as l, type SiteUndeleted as m, type SitePublished as n, type SiteUnpublished as o, type SiteMarkedAsTemplate as p, type SiteMarkedAsWixSite as q, type ServiceProvisioned as r, type ServiceRemoved as s, type SiteRenamed as t, type SiteHardDeleted as u, type NamespaceChanged as v, type StudioAssigned as w, type StudioUnassigned as x, type SiteUrlChanged as y, type SitePurgedExternally as z };
|