@wix/auto_sdk_urls_editor 1.0.9 → 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.
Files changed (29) hide show
  1. package/build/cjs/{editorurls-v2-editor-urls-editor.universal-Che3A1Tl.d.ts → editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.d.ts} +4 -0
  2. package/build/cjs/index.d.ts +2 -2
  3. package/build/cjs/index.js +6 -8
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +3 -1
  6. package/build/cjs/meta.js +0 -6
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/es/{editorurls-v2-editor-urls-editor.universal-Che3A1Tl.d.mts → editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.d.mts} +4 -0
  9. package/build/es/index.d.mts +2 -2
  10. package/build/es/index.mjs +6 -8
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/meta.d.mts +3 -1
  13. package/build/es/meta.mjs +0 -6
  14. package/build/es/meta.mjs.map +1 -1
  15. package/build/internal/cjs/{editorurls-v2-editor-urls-editor.universal-Che3A1Tl.d.ts → editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.d.ts} +4 -0
  16. package/build/internal/cjs/index.d.ts +2 -2
  17. package/build/internal/cjs/index.js +6 -8
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +3 -1
  20. package/build/internal/cjs/meta.js +0 -6
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/{editorurls-v2-editor-urls-editor.universal-Che3A1Tl.d.mts → editorurls-v2-editor-urls-editor.universal-Bk5ypl8G.d.mts} +4 -0
  23. package/build/internal/es/index.d.mts +2 -2
  24. package/build/internal/es/index.mjs +6 -8
  25. package/build/internal/es/index.mjs.map +1 -1
  26. package/build/internal/es/meta.d.mts +3 -1
  27. package/build/internal/es/meta.mjs +0 -6
  28. package/build/internal/es/meta.mjs.map +1 -1
  29. package/package.json +2 -2
@@ -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 {
@@ -51,12 +51,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
51
51
  srcPath: "/editorurls/v2/editor-urls",
52
52
  destPath: "/v2/editor-urls"
53
53
  }
54
- ],
55
- _: [
56
- {
57
- srcPath: "/editorurls/v2/editor-urls",
58
- destPath: "/v2/editor-urls"
59
- }
60
54
  ]
61
55
  };
62
56
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -94,7 +88,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
94
88
  async function getEditorUrls2(options) {
95
89
  const { httpClient, sideEffects } = arguments[1];
96
90
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
97
- branchId: options?.branchId
91
+ branchId: options?.branchId,
92
+ editorType: options?.editorType
98
93
  });
99
94
  const reqOpts = getEditorUrls(payload);
100
95
  sideEffects?.onSiteCall?.();
@@ -107,7 +102,10 @@ async function getEditorUrls2(options) {
107
102
  err,
108
103
  {
109
104
  spreadPathsToArguments: {},
110
- explicitPathsToArguments: { branchId: "$[0].branchId" },
105
+ explicitPathsToArguments: {
106
+ branchId: "$[0].branchId",
107
+ editorType: "$[0].editorType"
108
+ },
111
109
  singleArgumentUnchanged: false
112
110
  },
113
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 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,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA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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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EditorUrls","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. */
package/build/cjs/meta.js CHANGED
@@ -46,12 +46,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
46
46
  srcPath: "/editorurls/v2/editor-urls",
47
47
  destPath: "/v2/editor-urls"
48
48
  }
49
- ],
50
- _: [
51
- {
52
- srcPath: "/editorurls/v2/editor-urls",
53
- destPath: "/v2/editor-urls"
54
- }
55
49
  ]
56
50
  };
57
51
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.meta.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.meta.js';\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 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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,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,IACA,GAAG;AAAA,MACD;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;;;ACtCO,SAASC,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls","import_rest_modules","getEditorUrls"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.meta.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.meta.js';\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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,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;;;AChCO,SAASC,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls","import_rest_modules","getEditorUrls"]}
@@ -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 {
@@ -27,12 +27,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
27
27
  srcPath: "/editorurls/v2/editor-urls",
28
28
  destPath: "/v2/editor-urls"
29
29
  }
30
- ],
31
- _: [
32
- {
33
- srcPath: "/editorurls/v2/editor-urls",
34
- destPath: "/v2/editor-urls"
35
- }
36
30
  ]
37
31
  };
38
32
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -70,7 +64,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
70
64
  async function getEditorUrls2(options) {
71
65
  const { httpClient, sideEffects } = arguments[1];
72
66
  const payload = renameKeysFromSDKRequestToRESTRequest({
73
- branchId: options?.branchId
67
+ branchId: options?.branchId,
68
+ editorType: options?.editorType
74
69
  });
75
70
  const reqOpts = getEditorUrls(payload);
76
71
  sideEffects?.onSiteCall?.();
@@ -83,7 +78,10 @@ async function getEditorUrls2(options) {
83
78
  err,
84
79
  {
85
80
  spreadPathsToArguments: {},
86
- explicitPathsToArguments: { branchId: "$[0].branchId" },
81
+ explicitPathsToArguments: {
82
+ branchId: "$[0].branchId",
83
+ editorType: "$[0].editorType"
84
+ },
87
85
  singleArgumentUnchanged: false
88
86
  },
89
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 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,IACA,GAAG;AAAA,MACD;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;AA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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/build/es/meta.mjs CHANGED
@@ -20,12 +20,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
20
20
  srcPath: "/editorurls/v2/editor-urls",
21
21
  destPath: "/v2/editor-urls"
22
22
  }
23
- ],
24
- _: [
25
- {
26
- srcPath: "/editorurls/v2/editor-urls",
27
- destPath: "/v2/editor-urls"
28
- }
29
23
  ]
30
24
  };
31
25
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.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 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 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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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,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,IACA,GAAG;AAAA,MACD;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;;;ACtCO,SAASA,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls"]}
1
+ {"version":3,"sources":["../../src/editorurls-v2-editor-urls-editor.http.ts","../../src/editorurls-v2-editor-urls-editor.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 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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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,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;;;AChCO,SAASA,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls"]}
@@ -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 {
@@ -51,12 +51,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
51
51
  srcPath: "/editorurls/v2/editor-urls",
52
52
  destPath: "/v2/editor-urls"
53
53
  }
54
- ],
55
- _: [
56
- {
57
- srcPath: "/editorurls/v2/editor-urls",
58
- destPath: "/v2/editor-urls"
59
- }
60
54
  ]
61
55
  };
62
56
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -94,7 +88,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
94
88
  async function getEditorUrls2(options) {
95
89
  const { httpClient, sideEffects } = arguments[1];
96
90
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
97
- branchId: options?.branchId
91
+ branchId: options?.branchId,
92
+ editorType: options?.editorType
98
93
  });
99
94
  const reqOpts = getEditorUrls(payload);
100
95
  sideEffects?.onSiteCall?.();
@@ -107,7 +102,10 @@ async function getEditorUrls2(options) {
107
102
  err,
108
103
  {
109
104
  spreadPathsToArguments: {},
110
- explicitPathsToArguments: { branchId: "$[0].branchId" },
105
+ explicitPathsToArguments: {
106
+ branchId: "$[0].branchId",
107
+ editorType: "$[0].editorType"
108
+ },
111
109
  singleArgumentUnchanged: false
112
110
  },
113
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 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;AACl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EzE,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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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. */
@@ -46,12 +46,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
46
46
  srcPath: "/editorurls/v2/editor-urls",
47
47
  destPath: "/v2/editor-urls"
48
48
  }
49
- ],
50
- _: [
51
- {
52
- srcPath: "/editorurls/v2/editor-urls",
53
- destPath: "/v2/editor-urls"
54
- }
55
49
  ]
56
50
  };
57
51
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../meta.ts","../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.meta.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.meta.js';\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 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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,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,IACA,GAAG;AAAA,MACD;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;;;ACtCO,SAASC,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls","import_rest_modules","getEditorUrls"]}
1
+ {"version":3,"sources":["../../../meta.ts","../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.meta.ts"],"sourcesContent":["export * from './src/editorurls-v2-editor-urls-editor.meta.js';\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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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;AAAA;AAAA,uBAAAA;AAAA;AAAA;;;ACAA,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;;;AChCO,SAASC,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls","import_rest_modules","getEditorUrls"]}
@@ -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 {
@@ -27,12 +27,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
27
27
  srcPath: "/editorurls/v2/editor-urls",
28
28
  destPath: "/v2/editor-urls"
29
29
  }
30
- ],
31
- _: [
32
- {
33
- srcPath: "/editorurls/v2/editor-urls",
34
- destPath: "/v2/editor-urls"
35
- }
36
30
  ]
37
31
  };
38
32
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -70,7 +64,8 @@ var EditorType = /* @__PURE__ */ ((EditorType2) => {
70
64
  async function getEditorUrls2(options) {
71
65
  const { httpClient, sideEffects } = arguments[1];
72
66
  const payload = renameKeysFromSDKRequestToRESTRequest({
73
- branchId: options?.branchId
67
+ branchId: options?.branchId,
68
+ editorType: options?.editorType
74
69
  });
75
70
  const reqOpts = getEditorUrls(payload);
76
71
  sideEffects?.onSiteCall?.();
@@ -83,7 +78,10 @@ async function getEditorUrls2(options) {
83
78
  err,
84
79
  {
85
80
  spreadPathsToArguments: {},
86
- explicitPathsToArguments: { branchId: "$[0].branchId" },
81
+ explicitPathsToArguments: {
82
+ branchId: "$[0].branchId",
83
+ editorType: "$[0].editorType"
84
+ },
87
85
  singleArgumentUnchanged: false
88
86
  },
89
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 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;A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BAAgB;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;AAA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ditorUrls","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. */
@@ -20,12 +20,6 @@ function resolveWixEditorurlsV2EditorUrlsApiUrl(opts) {
20
20
  srcPath: "/editorurls/v2/editor-urls",
21
21
  destPath: "/v2/editor-urls"
22
22
  }
23
- ],
24
- _: [
25
- {
26
- srcPath: "/editorurls/v2/editor-urls",
27
- destPath: "/v2/editor-urls"
28
- }
29
23
  ]
30
24
  };
31
25
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.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 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 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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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,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,IACA,GAAG;AAAA,MACD;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;;;ACtCO,SAASA,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls"]}
1
+ {"version":3,"sources":["../../../src/editorurls-v2-editor-urls-editor.http.ts","../../../src/editorurls-v2-editor-urls-editor.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 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 * as ambassadorWixEditorurlsV2EditorUrls from './editorurls-v2-editor-urls-editor.http.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsTypes from './editorurls-v2-editor-urls-editor.types.js';\nimport * as ambassadorWixEditorurlsV2EditorUrlsUniversalTypes from './editorurls-v2-editor-urls-editor.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 getEditorUrls(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsRequest,\n ambassadorWixEditorurlsV2EditorUrlsUniversalTypes.GetEditorUrlsResponse,\n ambassadorWixEditorurlsV2EditorUrlsTypes.GetEditorUrlsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEditorurlsV2EditorUrls.getEditorUrls(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: '/v2/editor-urls',\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,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;;;AChCO,SAASA,iBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACgC,cAAc,OAAO;AAE3D,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":["getEditorUrls"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_urls_editor",
3
- "version": "1.0.9",
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": "4ae339a494b38a1231b5ba454d265a14744a837bca6053b74d1793cc"
52
+ "falconPackageHash": "d3189f4d1ffa203292c7aa10b41dce89290a050847ba79fa04e782ad"
53
53
  }