@wix/auto_sdk_urls_editor 1.0.10 → 1.0.11

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.
@@ -41,6 +41,8 @@ interface GetEditorUrlsRequest {
41
41
  * @format GUID
42
42
  */
43
43
  branchId?: string | null;
44
+ /** Optional editor type override */
45
+ editorType?: EditorTypeWithLiterals;
44
46
  }
45
47
  interface GetEditorUrlsResponse {
46
48
  /** Editor URL. */
@@ -52,6 +54,8 @@ interface GetEditorUrlsOptions {
52
54
  * @format GUID
53
55
  */
54
56
  branchId?: string | null;
57
+ /** Optional editor type override */
58
+ editorType?: EditorTypeWithLiterals;
55
59
  }
56
60
 
57
61
  export { EditorType as E, type GetEditorUrlsOptions as G, type GetEditorUrlsResponse as a, type EditorUrls as b, type GetEditorUrlsRequest as c };
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.js';
3
- export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.js';
2
+ import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.js';
3
+ export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.js';
4
4
 
5
5
  declare function getEditorUrls$1(httpClient: HttpClient): GetEditorUrlsSignature;
6
6
  interface GetEditorUrlsSignature {
@@ -88,7 +88,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
88
88
  async function getEditorUrls2(options) {
89
89
  const { httpClient, sideEffects } = arguments[1];
90
90
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
91
- branchId: options?.branchId
91
+ branchId: options?.branchId,
92
+ editorType: options?.editorType
92
93
  });
93
94
  const reqOpts = getEditorUrls(payload);
94
95
  sideEffects?.onSiteCall?.();
@@ -101,7 +102,10 @@ async function getEditorUrls2(options) {
101
102
  err,
102
103
  {
103
104
  spreadPathsToArguments: {},
104
- explicitPathsToArguments: { branchId: "$[0].branchId" },
105
+ explicitPathsToArguments: {
106
+ branchId: "$[0].branchId",
107
+ editorType: "$[0].editorType"
108
+ },
105
109
  singleArgumentUnchanged: false
106
110
  },
107
111
  ["options"]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/editorurls-v2-editor-urls-editor.universal.ts","../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.public.ts","../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { branchId: '$[0].branchId' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AA+CZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,gBAAgB;AAAA,QACtD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE9GO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,iBAEK,2DAAiBA,cAAmB;","names":["getEditorUrls","import_rest_modules","EditorType","getEditorUrls","sdkTransformError","getEditorUrls","import_rest_modules","getEditorUrls"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/editorurls-v2-editor-urls-editor.universal.ts","../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.public.ts","../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n editorType: options?.editorType,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n branchId: '$[0].branchId',\n editorType: '$[0].editorType',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AAiDZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,IACnB,YAAY,SAAS;AAAA,EACvB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpHO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,iBAEK,2DAAiBA,cAAmB;","names":["getEditorUrls","import_rest_modules","EditorType","getEditorUrls","sdkTransformError","getEditorUrls","import_rest_modules","getEditorUrls"]}
@@ -1,4 +1,4 @@
1
- import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.js';
1
+ import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.js';
2
2
 
3
3
  interface EditorUrls {
4
4
  /**
@@ -43,6 +43,8 @@ interface GetEditorUrlsRequest {
43
43
  * @format GUID
44
44
  */
45
45
  branchId?: string | null;
46
+ /** Optional editor type override */
47
+ editorType?: EditorTypeWithLiterals;
46
48
  }
47
49
  interface GetEditorUrlsResponse {
48
50
  /** Editor URL. */
@@ -41,6 +41,8 @@ interface GetEditorUrlsRequest {
41
41
  * @format GUID
42
42
  */
43
43
  branchId?: string | null;
44
+ /** Optional editor type override */
45
+ editorType?: EditorTypeWithLiterals;
44
46
  }
45
47
  interface GetEditorUrlsResponse {
46
48
  /** Editor URL. */
@@ -52,6 +54,8 @@ interface GetEditorUrlsOptions {
52
54
  * @format GUID
53
55
  */
54
56
  branchId?: string | null;
57
+ /** Optional editor type override */
58
+ editorType?: EditorTypeWithLiterals;
55
59
  }
56
60
 
57
61
  export { EditorType as E, type GetEditorUrlsOptions as G, type GetEditorUrlsResponse as a, type EditorUrls as b, type GetEditorUrlsRequest as c };
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.mjs';
3
- export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.mjs';
2
+ import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.mjs';
3
+ export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.mjs';
4
4
 
5
5
  declare function getEditorUrls$1(httpClient: HttpClient): GetEditorUrlsSignature;
6
6
  interface GetEditorUrlsSignature {
@@ -64,7 +64,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
64
64
  async function getEditorUrls2(options) {
65
65
  const { httpClient, sideEffects } = arguments[1];
66
66
  const payload = renameKeysFromSDKRequestToRESTRequest({
67
- branchId: options?.branchId
67
+ branchId: options?.branchId,
68
+ editorType: options?.editorType
68
69
  });
69
70
  const reqOpts = getEditorUrls(payload);
70
71
  sideEffects?.onSiteCall?.();
@@ -77,7 +78,10 @@ async function getEditorUrls2(options) {
77
78
  err,
78
79
  {
79
80
  spreadPathsToArguments: {},
80
- explicitPathsToArguments: { branchId: "$[0].branchId" },
81
+ explicitPathsToArguments: {
82
+ branchId: "$[0].branchId",
83
+ editorType: "$[0].editorType"
84
+ },
81
85
  singleArgumentUnchanged: false
82
86
  },
83
87
  ["options"]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/editorurls-v2-editor-urls-editor.universal.ts","../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.public.ts","../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { branchId: '$[0].branchId' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AA+CZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,gBAAgB;AAAA,QACtD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE9GO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,iBAEK,iCAAiBA,cAAmB;","names":["EditorType","getEditorUrls","getEditorUrls","getEditorUrls"]}
1
+ {"version":3,"sources":["../../src/editorurls-v2-editor-urls-editor.universal.ts","../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.public.ts","../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n editorType: options?.editorType,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n branchId: '$[0].branchId',\n editorType: '$[0].editorType',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AAiDZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,IACnB,YAAY,SAAS;AAAA,EACvB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpHO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,iBAEK,iCAAiBA,cAAmB;","names":["EditorType","getEditorUrls","getEditorUrls","getEditorUrls"]}
@@ -1,4 +1,4 @@
1
- import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.mjs';
1
+ import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.mjs';
2
2
 
3
3
  interface EditorUrls {
4
4
  /**
@@ -43,6 +43,8 @@ interface GetEditorUrlsRequest {
43
43
  * @format GUID
44
44
  */
45
45
  branchId?: string | null;
46
+ /** Optional editor type override */
47
+ editorType?: EditorTypeWithLiterals;
46
48
  }
47
49
  interface GetEditorUrlsResponse {
48
50
  /** Editor URL. */
@@ -41,6 +41,8 @@ interface GetEditorUrlsRequest {
41
41
  * @format GUID
42
42
  */
43
43
  branchId?: string | null;
44
+ /** Optional editor type override */
45
+ editorType?: EditorTypeWithLiterals;
44
46
  }
45
47
  interface GetEditorUrlsResponse {
46
48
  /** Editor URL. */
@@ -52,6 +54,8 @@ interface GetEditorUrlsOptions {
52
54
  * @format GUID
53
55
  */
54
56
  branchId?: string | null;
57
+ /** Optional editor type override */
58
+ editorType?: EditorTypeWithLiterals;
55
59
  }
56
60
 
57
61
  export { EditorType as E, type GetEditorUrlsOptions as G, type GetEditorUrlsResponse as a, type EditorUrls as b, type GetEditorUrlsRequest as c };
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.js';
3
- export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.js';
2
+ import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.js';
3
+ export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.js';
4
4
 
5
5
  declare function getEditorUrls$1(httpClient: HttpClient): GetEditorUrlsSignature;
6
6
  interface GetEditorUrlsSignature {
@@ -88,7 +88,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
88
88
  async function getEditorUrls2(options) {
89
89
  const { httpClient, sideEffects } = arguments[1];
90
90
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
91
- branchId: options?.branchId
91
+ branchId: options?.branchId,
92
+ editorType: options?.editorType
92
93
  });
93
94
  const reqOpts = getEditorUrls(payload);
94
95
  sideEffects?.onSiteCall?.();
@@ -101,7 +102,10 @@ async function getEditorUrls2(options) {
101
102
  err,
102
103
  {
103
104
  spreadPathsToArguments: {},
104
- explicitPathsToArguments: { branchId: "$[0].branchId" },
105
+ explicitPathsToArguments: {
106
+ branchId: "$[0].branchId",
107
+ editorType: "$[0].editorType"
108
+ },
105
109
  singleArgumentUnchanged: false
106
110
  },
107
111
  ["options"]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.ts","../../../src/editorurls-v2-editor-urls-editor.universal.ts","../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.public.ts","../../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { branchId: '$[0].branchId' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AA+CZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,gBAAgB;AAAA,QACtD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE9GO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,iBAEK,2DAAiBA,cAAmB;","names":["getEditorUrls","import_rest_modules","EditorType","getEditorUrls","sdkTransformError","getEditorUrls","import_rest_modules","getEditorUrls"]}
1
+ {"version":3,"sources":["../../../index.ts","../../../src/editorurls-v2-editor-urls-editor.universal.ts","../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.public.ts","../../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n editorType: options?.editorType,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n branchId: '$[0].branchId',\n editorType: '$[0].editorType',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AAiDZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,IACnB,YAAY,SAAS;AAAA,EACvB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpHO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,iBAEK,2DAAiBA,cAAmB;","names":["getEditorUrls","import_rest_modules","EditorType","getEditorUrls","sdkTransformError","getEditorUrls","import_rest_modules","getEditorUrls"]}
@@ -1,4 +1,4 @@
1
- import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.js';
1
+ import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.js';
2
2
 
3
3
  interface EditorUrls {
4
4
  /**
@@ -43,6 +43,8 @@ interface GetEditorUrlsRequest {
43
43
  * @format GUID
44
44
  */
45
45
  branchId?: string | null;
46
+ /** Optional editor type override */
47
+ editorType?: EditorTypeWithLiterals;
46
48
  }
47
49
  interface GetEditorUrlsResponse {
48
50
  /** Editor URL. */
@@ -41,6 +41,8 @@ interface GetEditorUrlsRequest {
41
41
  * @format GUID
42
42
  */
43
43
  branchId?: string | null;
44
+ /** Optional editor type override */
45
+ editorType?: EditorTypeWithLiterals;
44
46
  }
45
47
  interface GetEditorUrlsResponse {
46
48
  /** Editor URL. */
@@ -52,6 +54,8 @@ interface GetEditorUrlsOptions {
52
54
  * @format GUID
53
55
  */
54
56
  branchId?: string | null;
57
+ /** Optional editor type override */
58
+ editorType?: EditorTypeWithLiterals;
55
59
  }
56
60
 
57
61
  export { EditorType as E, type GetEditorUrlsOptions as G, type GetEditorUrlsResponse as a, type EditorUrls as b, type GetEditorUrlsRequest as c };
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.mjs';
3
- export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.mjs';
2
+ import { G as GetEditorUrlsOptions, a as GetEditorUrlsResponse } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.mjs';
3
+ export { E as EditorType, b as EditorUrls, c as GetEditorUrlsRequest } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.mjs';
4
4
 
5
5
  declare function getEditorUrls$1(httpClient: HttpClient): GetEditorUrlsSignature;
6
6
  interface GetEditorUrlsSignature {
@@ -64,7 +64,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
64
64
  async function getEditorUrls2(options) {
65
65
  const { httpClient, sideEffects } = arguments[1];
66
66
  const payload = renameKeysFromSDKRequestToRESTRequest({
67
- branchId: options?.branchId
67
+ branchId: options?.branchId,
68
+ editorType: options?.editorType
68
69
  });
69
70
  const reqOpts = getEditorUrls(payload);
70
71
  sideEffects?.onSiteCall?.();
@@ -77,7 +78,10 @@ async function getEditorUrls2(options) {
77
78
  err,
78
79
  {
79
80
  spreadPathsToArguments: {},
80
- explicitPathsToArguments: { branchId: "$[0].branchId" },
81
+ explicitPathsToArguments: {
82
+ branchId: "$[0].branchId",
83
+ editorType: "$[0].editorType"
84
+ },
81
85
  singleArgumentUnchanged: false
82
86
  },
83
87
  ["options"]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/editorurls-v2-editor-urls-editor.universal.ts","../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.public.ts","../../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { branchId: '$[0].branchId' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AA+CZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,gBAAgB;AAAA,QACtD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE9GO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,iBAEK,iCAAiBA,cAAmB;","names":["EditorType","getEditorUrls","getEditorUrls","getEditorUrls"]}
1
+ {"version":3,"sources":["../../../src/editorurls-v2-editor-urls-editor.universal.ts","../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.public.ts","../../../src/editorurls-v2-editor-urls-editor.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\n\nexport interface EditorUrls {\n /**\n * Editor type.\n * @readonly\n */\n editorType?: EditorTypeWithLiterals;\n /**\n * Editor URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n editorUrl?: string | null;\n /**\n * Preview URL.\n * @maxLength 2048\n * @format WEB_URL\n * @readonly\n */\n previewUrl?: string | null;\n}\n\nexport enum EditorType {\n /** Unknown editor type. */\n UNKNOWN = 'UNKNOWN',\n /** The classic Wix Editor. */\n WIX_EDITOR = 'WIX_EDITOR',\n /** Deprecated. Expected end-of-life date: July 1, 2024. */\n EDITOR_X = 'EDITOR_X',\n /** Wix's Editor built for agencies and enterprises. */\n WIX_STUDIO = 'WIX_STUDIO',\n /** Editor 3 */\n ODEDITOR = 'ODEDITOR',\n /** Picasso */\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'WIX_EDITOR'\n | 'EDITOR_X'\n | 'WIX_STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport interface GetEditorUrlsRequest {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n\nexport interface GetEditorUrlsResponse {\n /** Editor URL. */\n urls?: EditorUrls;\n}\n\ntype EditorUrlsNonNullablePaths = `editorType`;\n\n/**\n * Retrieves a site's Editor URLs.\n * @public\n * @permissionId MetaSite.Read\n * @applicableIdentity APP\n * @fqn wix.editorurls.v2.EditorUrlsApi.GetEditorUrls\n */\nexport async function getEditorUrls(\n options?: GetEditorUrlsOptions\n): Promise<\n NonNullablePaths<\n GetEditorUrlsResponse,\n {\n [P in EditorUrlsNonNullablePaths]: `urls.${P}`;\n }[EditorUrlsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n branchId: options?.branchId,\n editorType: options?.editorType,\n });\n\n const reqOpts = ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n branchId: '$[0].branchId',\n editorType: '$[0].editorType',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEditorUrlsOptions {\n /**\n * Optional branch ID to include in generated URLs\n * @format GUID\n */\n branchId?: string | null;\n /** Optional editor type override */\n editorType?: EditorTypeWithLiterals;\n}\n","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 resolveWixEditorurlsV2EditorUrlsApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/editor-urls',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/editorurls/v2/editor-urls',\n destPath: '/v2/editor-urls',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_urls_editor';\n\n/** Retrieves a site's Editor URLs. */\nexport function getEditorUrls(payload: object): RequestOptionsFactory<any> {\n function __getEditorUrls({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.editorurls.v2.editor_urls',\n method: 'GET' as any,\n methodFqn: 'wix.editorurls.v2.EditorUrlsApi.GetEditorUrls',\n packageName: PACKAGE_NAME,\n url: resolveWixEditorurlsV2EditorUrlsApiUrl({\n protoPath: '/v2/editor-urls',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getEditorUrls;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetEditorUrlsOptions,\n GetEditorUrlsResponse,\n getEditorUrls as universalGetEditorUrls,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/urls' };\n\nexport function getEditorUrls(httpClient: HttpClient): GetEditorUrlsSignature {\n return (options?: GetEditorUrlsOptions) =>\n universalGetEditorUrls(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEditorUrlsSignature {\n /**\n * Retrieves a site's Editor URLs.\n */\n (options?: GetEditorUrlsOptions | undefined): Promise<GetEditorUrlsResponse>;\n}\n\nexport {\n EditorType,\n EditorUrls,\n GetEditorUrlsOptions,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n","import { getEditorUrls as publicGetEditorUrls } from './editorurls-v2-editor-urls-editor.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getEditorUrls: MaybeContext<\n BuildRESTFunction<typeof publicGetEditorUrls> & typeof publicGetEditorUrls\n> = /*#__PURE__*/ createRESTModule(publicGetEditorUrls);\n\nexport { EditorType } from './editorurls-v2-editor-urls-editor.universal.js';\nexport {\n EditorUrls,\n GetEditorUrlsRequest,\n GetEditorUrlsResponse,\n GetEditorUrlsOptions,\n} from './editorurls-v2-editor-urls-editor.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,uCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,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;AAGd,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,uCAAuC;AAAA,QAC1C,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADxBO,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAEV,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,gBAAa;AAEb,EAAAA,YAAA,cAAW;AAEX,EAAAA,YAAA,aAAU;AAZA,SAAAA;AAAA,GAAA;AAiDZ,eAAsBC,eACpB,SAQA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,IACnB,YAAY,SAAS;AAAA,EACvB,CAAC;AAED,QAAM,UAA8C,cAAc,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpHO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,iBAEK,iCAAiBA,cAAmB;","names":["EditorType","getEditorUrls","getEditorUrls","getEditorUrls"]}
@@ -1,4 +1,4 @@
1
- import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Che3A1Tl.mjs';
1
+ import { c as GetEditorUrlsRequest$1, a as GetEditorUrlsResponse$1 } from './editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.mjs';
2
2
 
3
3
  interface EditorUrls {
4
4
  /**
@@ -43,6 +43,8 @@ interface GetEditorUrlsRequest {
43
43
  * @format GUID
44
44
  */
45
45
  branchId?: string | null;
46
+ /** Optional editor type override */
47
+ editorType?: EditorTypeWithLiterals;
46
48
  }
47
49
  interface GetEditorUrlsResponse {
48
50
  /** Editor URL. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_urls_editor",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -49,5 +49,5 @@
49
49
  "fqdn": "wix.editorurls.v2.editor_urls"
50
50
  }
51
51
  },
52
- "falconPackageHash": "6744fbe7ea34102ff2a1b398234f3d9931a726ae5b9c43d719603a58"
52
+ "falconPackageHash": "d3189f4d1ffa203292c7aa10b41dce89290a050847ba79fa04e782ad"
53
53
  }