@wix/workspace 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/namespaces/apps/apps.js +27 -0
- package/dist/cjs/namespaces/apps/apps.js.map +1 -0
- package/dist/cjs/namespaces/apps/index.js +16 -0
- package/dist/cjs/namespaces/apps/index.js.map +1 -0
- package/dist/cjs/namespaces/{apps.js → apps/types.js} +1 -1
- package/dist/cjs/namespaces/apps/types.js.map +1 -0
- package/dist/cjs/namespaces/index.js +10 -0
- package/dist/cjs/namespaces/index.js.map +1 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/namespaces/apps/apps.js +23 -0
- package/dist/esm/namespaces/apps/apps.js.map +1 -0
- package/dist/esm/namespaces/apps/index.js +3 -0
- package/dist/esm/namespaces/apps/index.js.map +1 -0
- package/dist/esm/namespaces/apps/types.js +2 -0
- package/dist/esm/namespaces/apps/types.js.map +1 -0
- package/dist/esm/namespaces/index.js +2 -0
- package/dist/esm/namespaces/index.js.map +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/namespaces/apps/apps.d.ts +4 -0
- package/dist/types/namespaces/apps/apps.d.ts.map +1 -0
- package/dist/types/namespaces/apps/index.d.ts +3 -0
- package/dist/types/namespaces/apps/index.d.ts.map +1 -0
- package/dist/types/namespaces/{apps.d.ts → apps/types.d.ts} +13 -13
- package/dist/types/namespaces/apps/types.d.ts.map +1 -0
- package/dist/types/namespaces/index.d.ts +2 -0
- package/dist/types/namespaces/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/namespaces/apps.js.map +0 -1
- package/dist/esm/namespaces/apps.js +0 -2
- package/dist/esm/namespaces/apps.js.map +0 -1
- package/dist/types/namespaces/apps.d.ts.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
+
var _exportNames = {
|
|
5
|
+
itemSelector: true,
|
|
6
|
+
legacy: true
|
|
7
|
+
};
|
|
4
8
|
exports.legacy = exports.itemSelector = void 0;
|
|
5
9
|
var _legacy2 = require("./legacy.js");
|
|
6
10
|
var _itemSelector2 = require("./items-selection/itemSelector.js");
|
|
11
|
+
var _namespaces = require("./namespaces");
|
|
12
|
+
Object.keys(_namespaces).forEach(function (key) {
|
|
13
|
+
if (key === "default" || key === "__esModule") return;
|
|
14
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
15
|
+
if (key in exports && exports[key] === _namespaces[key]) return;
|
|
16
|
+
exports[key] = _namespaces[key];
|
|
17
|
+
});
|
|
7
18
|
const itemSelector = exports.itemSelector = _itemSelector2.itemSelector;
|
|
8
19
|
const legacy = exports.legacy = _legacy2.legacy;
|
|
9
20
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_legacy2","require","_itemSelector2","
|
|
1
|
+
{"version":3,"names":["_legacy2","require","_itemSelector2","_namespaces","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","itemSelector","_itemSelector","legacy","_legacy"],"sources":["../../src/index.ts"],"sourcesContent":["import { legacy as _legacy } from './legacy.js';\nimport { itemSelector as _itemSelector } from './items-selection/itemSelector.js';\nimport type { ExposeFieldsBasedOnToggle } from '@wix/sdk-types';\n\nexport const itemSelector = _itemSelector;\n\nexport const legacy: ExposeFieldsBasedOnToggle<\n typeof _legacy,\n { getContextIds: 'alpha' }\n> = _legacy;\n\nexport type { WorkspaceHost } from './types.js';\n\nexport * from './namespaces';\n\nexport type {\n ItemSelection,\n ItemSelectionOptions,\n ItemSelectionResult,\n Item,\n} from './items-selection/types.js';\n"],"mappings":";;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAYA,IAAAE,WAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAK,OAAA,CAAAL,GAAA,IAAAJ,WAAA,CAAAI,GAAA;AAAA;AATO,MAAMM,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAGC,2BAAa;AAElC,MAAMC,MAGZ,GAAAH,OAAA,CAAAG,MAAA,GAAGC,eAAO","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.apps = void 0;
|
|
5
|
+
var _hostModules = require("@wix/sdk-runtime/host-modules");
|
|
6
|
+
function createAppsMethod(methodName) {
|
|
7
|
+
return host => {
|
|
8
|
+
if (!host.workspace) {
|
|
9
|
+
throw new Error('workspace is not available on the current host. Make sure to use an updated version of the host initialization package.');
|
|
10
|
+
}
|
|
11
|
+
if (!host.workspace.apps) {
|
|
12
|
+
throw new Error('apps is not available on the current host. Make sure to use an updated version of the host initialization package.');
|
|
13
|
+
}
|
|
14
|
+
const method = host.workspace.apps[methodName];
|
|
15
|
+
if (!method) {
|
|
16
|
+
throw new Error(`${String(methodName)} is not available on the current host. Make sure to use an updated version of the host initialization package.`);
|
|
17
|
+
}
|
|
18
|
+
return method;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const apps = exports.apps = (0, _hostModules.createHostModule)({
|
|
22
|
+
startInstallFlow: createAppsMethod('startInstallFlow'),
|
|
23
|
+
startPurchasePlanFlow: createAppsMethod('startPurchasePlanFlow'),
|
|
24
|
+
startUpdateFlow: createAppsMethod('startUpdateFlow'),
|
|
25
|
+
openContactSupport: createAppsMethod('openContactSupport')
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hostModules","require","createAppsMethod","methodName","host","workspace","Error","apps","method","String","exports","createHostModule","startInstallFlow","startPurchasePlanFlow","startUpdateFlow","openContactSupport"],"sources":["../../../../src/namespaces/apps/apps.ts"],"sourcesContent":["import { createHostModule } from '@wix/sdk-runtime/host-modules';\nimport { WorkspaceHost } from '../../types.js';\nimport type { AppsNamespace } from './types.js';\n\nfunction createAppsMethod<K extends keyof AppsNamespace>(\n methodName: K,\n): (host: WorkspaceHost) => AppsNamespace[K] {\n return (host) => {\n if (!host.workspace) {\n throw new Error(\n 'workspace is not available on the current host. Make sure to use an updated version of the host initialization package.',\n );\n }\n\n if (!host.workspace.apps) {\n throw new Error(\n 'apps is not available on the current host. Make sure to use an updated version of the host initialization package.',\n );\n }\n\n const method = host.workspace.apps[methodName];\n if (!method) {\n throw new Error(\n `${String(\n methodName,\n )} is not available on the current host. Make sure to use an updated version of the host initialization package.`,\n );\n }\n\n return method as AppsNamespace[K];\n };\n}\n\nexport const apps = createHostModule<WorkspaceHost, AppsNamespace>({\n startInstallFlow: createAppsMethod('startInstallFlow'),\n startPurchasePlanFlow: createAppsMethod('startPurchasePlanFlow'),\n startUpdateFlow: createAppsMethod('startUpdateFlow'),\n openContactSupport: createAppsMethod('openContactSupport'),\n});\n"],"mappings":";;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,SAASC,gBAAgBA,CACvBC,UAAa,EAC8B;EAC3C,OAAQC,IAAI,IAAK;IACf,IAAI,CAACA,IAAI,CAACC,SAAS,EAAE;MACnB,MAAM,IAAIC,KAAK,CACb,yHACF,CAAC;IACH;IAEA,IAAI,CAACF,IAAI,CAACC,SAAS,CAACE,IAAI,EAAE;MACxB,MAAM,IAAID,KAAK,CACb,oHACF,CAAC;IACH;IAEA,MAAME,MAAM,GAAGJ,IAAI,CAACC,SAAS,CAACE,IAAI,CAACJ,UAAU,CAAC;IAC9C,IAAI,CAACK,MAAM,EAAE;MACX,MAAM,IAAIF,KAAK,CACb,GAAGG,MAAM,CACPN,UACF,CAAC,gHACH,CAAC;IACH;IAEA,OAAOK,MAAM;EACf,CAAC;AACH;AAEO,MAAMD,IAAI,GAAAG,OAAA,CAAAH,IAAA,GAAG,IAAAI,6BAAgB,EAA+B;EACjEC,gBAAgB,EAAEV,gBAAgB,CAAC,kBAAkB,CAAC;EACtDW,qBAAqB,EAAEX,gBAAgB,CAAC,uBAAuB,CAAC;EAChEY,eAAe,EAAEZ,gBAAgB,CAAC,iBAAiB,CAAC;EACpDa,kBAAkB,EAAEb,gBAAgB,CAAC,oBAAoB;AAC3D,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var _apps = require("./apps.js");
|
|
5
|
+
Object.keys(_apps).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _apps[key]) return;
|
|
8
|
+
exports[key] = _apps[key];
|
|
9
|
+
});
|
|
10
|
+
var _types = require("./types.js");
|
|
11
|
+
Object.keys(_types).forEach(function (key) {
|
|
12
|
+
if (key === "default" || key === "__esModule") return;
|
|
13
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
14
|
+
exports[key] = _types[key];
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_apps","require","Object","keys","forEach","key","exports","_types"],"sources":["../../../../src/namespaces/apps/index.ts"],"sourcesContent":["export * from './apps.js';\nexport * from './types.js';\n"],"mappings":";;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,KAAA,CAAAK,GAAA;AAAA;AACA,IAAAE,MAAA,GAAAN,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAI,MAAA,EAAAH,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAE,MAAA,CAAAF,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAE,MAAA,CAAAF,GAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/namespaces/apps/types.ts"],"sourcesContent":["type ResponseStatus = 'SUCCESS' | 'CANCELED';\n\ntype InstallFlowRequest = {\n appId: string;\n enablePostInstallNavigation?: boolean;\n};\n\ntype InstallFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\ntype PurchasePlanFlowRequest = {\n appId: string;\n};\n\ntype PurchasePlanFlowResponse = {\n appId: string;\n status: 'DISPATCHED' | 'NOT_INSTALLED';\n};\n\ntype UpdateFlowRequest = {\n appId: string;\n};\n\ntype UpdateFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\ntype ContactSupportRequest = {\n appId: string;\n};\n\ntype ContactSupportResponse = {\n status: 'DISPATCHED' | 'CANCELED';\n};\n\nexport type AppsNamespace = {\n startInstallFlow: (args: InstallFlowRequest) => Promise<InstallFlowResponse>;\n startPurchasePlanFlow: (\n args: PurchasePlanFlowRequest,\n ) => Promise<PurchasePlanFlowResponse>;\n startUpdateFlow: (args: UpdateFlowRequest) => Promise<UpdateFlowResponse>;\n openContactSupport: (\n args: ContactSupportRequest,\n ) => Promise<ContactSupportResponse>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var _apps = require("./apps");
|
|
5
|
+
Object.keys(_apps).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _apps[key]) return;
|
|
8
|
+
exports[key] = _apps[key];
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_apps","require","Object","keys","forEach","key","exports"],"sources":["../../../src/namespaces/index.ts"],"sourcesContent":["export * from './apps';\n"],"mappings":";;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,KAAA,CAAAK,GAAA;AAAA","ignoreList":[]}
|
package/dist/cjs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { Host } from '@wix/sdk-types';\n\nimport type { AppsNamespace } from './namespaces/apps';\n\ntype ContextIds = {\n accountId: string;\n userId: string;\n siteId?: string;\n appId?: string;\n};\n\nexport type WorkspaceHost = Host & {\n workspace?: {\n getContextIds?: () => ContextIds;\n openItemSelector?: (...args: any[]) => any;\n apps: AppsNamespace;\n };\n};\n\nexport type InternalSDK = {\n getContextIds?: () => ContextIds;\n};\n\nexport type ItemSelectorSDK = {\n openItemSelector?: (...args: any[]) => any;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { Host } from '@wix/sdk-types';\n\nimport type { AppsNamespace } from './namespaces/apps/types';\n\ntype ContextIds = {\n accountId: string;\n userId: string;\n siteId?: string;\n appId?: string;\n};\n\nexport type WorkspaceHost = Host & {\n workspace?: {\n getContextIds?: () => ContextIds;\n openItemSelector?: (...args: any[]) => any;\n apps: AppsNamespace;\n };\n};\n\nexport type InternalSDK = {\n getContextIds?: () => ContextIds;\n};\n\nexport type ItemSelectorSDK = {\n openItemSelector?: (...args: any[]) => any;\n};\n"],"mappings":"","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,4 +2,5 @@ import { legacy as _legacy } from './legacy.js';
|
|
|
2
2
|
import { itemSelector as _itemSelector } from './items-selection/itemSelector.js';
|
|
3
3
|
export const itemSelector = _itemSelector;
|
|
4
4
|
export const legacy = _legacy;
|
|
5
|
+
export * from './namespaces';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["legacy","_legacy","itemSelector","_itemSelector"],"sources":["../../src/index.ts"],"sourcesContent":["import { legacy as _legacy } from './legacy.js';\nimport { itemSelector as _itemSelector } from './items-selection/itemSelector.js';\nimport type { ExposeFieldsBasedOnToggle } from '@wix/sdk-types';\n\nexport const itemSelector = _itemSelector;\n\nexport const legacy: ExposeFieldsBasedOnToggle<\n typeof _legacy,\n { getContextIds: 'alpha' }\n> = _legacy;\n\nexport type { WorkspaceHost } from './types.js';\n\nexport type {\n ItemSelection,\n ItemSelectionOptions,\n ItemSelectionResult,\n Item,\n} from './items-selection/types.js';\n"],"mappings":"AAAA,SAASA,MAAM,IAAIC,OAAO,QAAQ,aAAa;AAC/C,SAASC,YAAY,IAAIC,aAAa,QAAQ,mCAAmC;AAGjF,OAAO,MAAMD,YAAY,GAAGC,aAAa;AAEzC,OAAO,MAAMH,MAGZ,GAAGC,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["legacy","_legacy","itemSelector","_itemSelector"],"sources":["../../src/index.ts"],"sourcesContent":["import { legacy as _legacy } from './legacy.js';\nimport { itemSelector as _itemSelector } from './items-selection/itemSelector.js';\nimport type { ExposeFieldsBasedOnToggle } from '@wix/sdk-types';\n\nexport const itemSelector = _itemSelector;\n\nexport const legacy: ExposeFieldsBasedOnToggle<\n typeof _legacy,\n { getContextIds: 'alpha' }\n> = _legacy;\n\nexport type { WorkspaceHost } from './types.js';\n\nexport * from './namespaces';\n\nexport type {\n ItemSelection,\n ItemSelectionOptions,\n ItemSelectionResult,\n Item,\n} from './items-selection/types.js';\n"],"mappings":"AAAA,SAASA,MAAM,IAAIC,OAAO,QAAQ,aAAa;AAC/C,SAASC,YAAY,IAAIC,aAAa,QAAQ,mCAAmC;AAGjF,OAAO,MAAMD,YAAY,GAAGC,aAAa;AAEzC,OAAO,MAAMH,MAGZ,GAAGC,OAAO;AAIX,cAAc,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createHostModule } from '@wix/sdk-runtime/host-modules';
|
|
2
|
+
function createAppsMethod(methodName) {
|
|
3
|
+
return host => {
|
|
4
|
+
if (!host.workspace) {
|
|
5
|
+
throw new Error('workspace is not available on the current host. Make sure to use an updated version of the host initialization package.');
|
|
6
|
+
}
|
|
7
|
+
if (!host.workspace.apps) {
|
|
8
|
+
throw new Error('apps is not available on the current host. Make sure to use an updated version of the host initialization package.');
|
|
9
|
+
}
|
|
10
|
+
const method = host.workspace.apps[methodName];
|
|
11
|
+
if (!method) {
|
|
12
|
+
throw new Error(`${String(methodName)} is not available on the current host. Make sure to use an updated version of the host initialization package.`);
|
|
13
|
+
}
|
|
14
|
+
return method;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export const apps = createHostModule({
|
|
18
|
+
startInstallFlow: createAppsMethod('startInstallFlow'),
|
|
19
|
+
startPurchasePlanFlow: createAppsMethod('startPurchasePlanFlow'),
|
|
20
|
+
startUpdateFlow: createAppsMethod('startUpdateFlow'),
|
|
21
|
+
openContactSupport: createAppsMethod('openContactSupport')
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createHostModule","createAppsMethod","methodName","host","workspace","Error","apps","method","String","startInstallFlow","startPurchasePlanFlow","startUpdateFlow","openContactSupport"],"sources":["../../../../src/namespaces/apps/apps.ts"],"sourcesContent":["import { createHostModule } from '@wix/sdk-runtime/host-modules';\nimport { WorkspaceHost } from '../../types.js';\nimport type { AppsNamespace } from './types.js';\n\nfunction createAppsMethod<K extends keyof AppsNamespace>(\n methodName: K,\n): (host: WorkspaceHost) => AppsNamespace[K] {\n return (host) => {\n if (!host.workspace) {\n throw new Error(\n 'workspace is not available on the current host. Make sure to use an updated version of the host initialization package.',\n );\n }\n\n if (!host.workspace.apps) {\n throw new Error(\n 'apps is not available on the current host. Make sure to use an updated version of the host initialization package.',\n );\n }\n\n const method = host.workspace.apps[methodName];\n if (!method) {\n throw new Error(\n `${String(\n methodName,\n )} is not available on the current host. Make sure to use an updated version of the host initialization package.`,\n );\n }\n\n return method as AppsNamespace[K];\n };\n}\n\nexport const apps = createHostModule<WorkspaceHost, AppsNamespace>({\n startInstallFlow: createAppsMethod('startInstallFlow'),\n startPurchasePlanFlow: createAppsMethod('startPurchasePlanFlow'),\n startUpdateFlow: createAppsMethod('startUpdateFlow'),\n openContactSupport: createAppsMethod('openContactSupport'),\n});\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,+BAA+B;AAIhE,SAASC,gBAAgBA,CACvBC,UAAa,EAC8B;EAC3C,OAAQC,IAAI,IAAK;IACf,IAAI,CAACA,IAAI,CAACC,SAAS,EAAE;MACnB,MAAM,IAAIC,KAAK,CACb,yHACF,CAAC;IACH;IAEA,IAAI,CAACF,IAAI,CAACC,SAAS,CAACE,IAAI,EAAE;MACxB,MAAM,IAAID,KAAK,CACb,oHACF,CAAC;IACH;IAEA,MAAME,MAAM,GAAGJ,IAAI,CAACC,SAAS,CAACE,IAAI,CAACJ,UAAU,CAAC;IAC9C,IAAI,CAACK,MAAM,EAAE;MACX,MAAM,IAAIF,KAAK,CACb,GAAGG,MAAM,CACPN,UACF,CAAC,gHACH,CAAC;IACH;IAEA,OAAOK,MAAM;EACf,CAAC;AACH;AAEA,OAAO,MAAMD,IAAI,GAAGN,gBAAgB,CAA+B;EACjES,gBAAgB,EAAER,gBAAgB,CAAC,kBAAkB,CAAC;EACtDS,qBAAqB,EAAET,gBAAgB,CAAC,uBAAuB,CAAC;EAChEU,eAAe,EAAEV,gBAAgB,CAAC,iBAAiB,CAAC;EACpDW,kBAAkB,EAAEX,gBAAgB,CAAC,oBAAoB;AAC3D,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/namespaces/apps/index.ts"],"sourcesContent":["export * from './apps.js';\nexport * from './types.js';\n"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/namespaces/apps/types.ts"],"sourcesContent":["type ResponseStatus = 'SUCCESS' | 'CANCELED';\n\ntype InstallFlowRequest = {\n appId: string;\n enablePostInstallNavigation?: boolean;\n};\n\ntype InstallFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\ntype PurchasePlanFlowRequest = {\n appId: string;\n};\n\ntype PurchasePlanFlowResponse = {\n appId: string;\n status: 'DISPATCHED' | 'NOT_INSTALLED';\n};\n\ntype UpdateFlowRequest = {\n appId: string;\n};\n\ntype UpdateFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\ntype ContactSupportRequest = {\n appId: string;\n};\n\ntype ContactSupportResponse = {\n status: 'DISPATCHED' | 'CANCELED';\n};\n\nexport type AppsNamespace = {\n startInstallFlow: (args: InstallFlowRequest) => Promise<InstallFlowResponse>;\n startPurchasePlanFlow: (\n args: PurchasePlanFlowRequest,\n ) => Promise<PurchasePlanFlowResponse>;\n startUpdateFlow: (args: UpdateFlowRequest) => Promise<UpdateFlowResponse>;\n openContactSupport: (\n args: ContactSupportRequest,\n ) => Promise<ContactSupportResponse>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/namespaces/index.ts"],"sourcesContent":["export * from './apps';\n"],"mappings":"AAAA,cAAc,QAAQ","ignoreList":[]}
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { Host } from '@wix/sdk-types';\n\nimport type { AppsNamespace } from './namespaces/apps';\n\ntype ContextIds = {\n accountId: string;\n userId: string;\n siteId?: string;\n appId?: string;\n};\n\nexport type WorkspaceHost = Host & {\n workspace?: {\n getContextIds?: () => ContextIds;\n openItemSelector?: (...args: any[]) => any;\n apps: AppsNamespace;\n };\n};\n\nexport type InternalSDK = {\n getContextIds?: () => ContextIds;\n};\n\nexport type ItemSelectorSDK = {\n openItemSelector?: (...args: any[]) => any;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { Host } from '@wix/sdk-types';\n\nimport type { AppsNamespace } from './namespaces/apps/types';\n\ntype ContextIds = {\n accountId: string;\n userId: string;\n siteId?: string;\n appId?: string;\n};\n\nexport type WorkspaceHost = Host & {\n workspace?: {\n getContextIds?: () => ContextIds;\n openItemSelector?: (...args: any[]) => any;\n apps: AppsNamespace;\n };\n};\n\nexport type InternalSDK = {\n getContextIds?: () => ContextIds;\n};\n\nexport type ItemSelectorSDK = {\n openItemSelector?: (...args: any[]) => any;\n};\n"],"mappings":"","ignoreList":[]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export declare const legacy: ExposeFieldsBasedOnToggle<typeof _legacy, {
|
|
|
5
5
|
getContextIds: 'alpha';
|
|
6
6
|
}>;
|
|
7
7
|
export type { WorkspaceHost } from './types.js';
|
|
8
|
+
export * from './namespaces';
|
|
8
9
|
export type { ItemSelection, ItemSelectionOptions, ItemSelectionResult, Item, } from './items-selection/types.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,YAAY,sJAAgB,CAAC;AAE1C,eAAO,MAAM,MAAM,EAAE,yBAAyB,CAC5C,OAAO,OAAO,EACd;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CACjB,CAAC;AAEZ,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,IAAI,GACL,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,YAAY,sJAAgB,CAAC;AAE1C,eAAO,MAAM,MAAM,EAAE,yBAAyB,CAC5C,OAAO,OAAO,EACd;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CACjB,CAAC;AAEZ,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,cAAc,cAAc,CAAC;AAE7B,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,IAAI,GACL,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../../src/namespaces/apps/apps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA+BhD,eAAO,MAAM,IAAI,mFAKf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/namespaces/apps/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
declare type ResponseStatus = 'SUCCESS' | 'CANCELED';
|
|
2
|
-
|
|
2
|
+
declare type InstallFlowRequest = {
|
|
3
3
|
appId: string;
|
|
4
4
|
enablePostInstallNavigation?: boolean;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
declare type InstallFlowResponse = {
|
|
7
7
|
status: ResponseStatus;
|
|
8
8
|
installedApps: {
|
|
9
9
|
appId: string;
|
|
10
10
|
version: string;
|
|
11
11
|
}[];
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
declare type PurchasePlanFlowRequest = {
|
|
14
14
|
appId: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
declare type PurchasePlanFlowResponse = {
|
|
17
17
|
appId: string;
|
|
18
18
|
status: 'DISPATCHED' | 'NOT_INSTALLED';
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
declare type UpdateFlowRequest = {
|
|
21
21
|
appId: string;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
declare type UpdateFlowResponse = {
|
|
24
24
|
status: ResponseStatus;
|
|
25
25
|
installedApps: {
|
|
26
26
|
appId: string;
|
|
27
27
|
version: string;
|
|
28
28
|
}[];
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
declare type ContactSupportRequest = {
|
|
31
31
|
appId: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
32
|
+
};
|
|
33
|
+
declare type ContactSupportResponse = {
|
|
34
34
|
status: 'DISPATCHED' | 'CANCELED';
|
|
35
|
-
}
|
|
36
|
-
export
|
|
35
|
+
};
|
|
36
|
+
export declare type AppsNamespace = {
|
|
37
37
|
startInstallFlow: (args: InstallFlowRequest) => Promise<InstallFlowResponse>;
|
|
38
38
|
startPurchasePlanFlow: (args: PurchasePlanFlowRequest) => Promise<PurchasePlanFlowResponse>;
|
|
39
39
|
startUpdateFlow: (args: UpdateFlowRequest) => Promise<UpdateFlowResponse>;
|
|
40
40
|
openContactSupport: (args: ContactSupportRequest) => Promise<ContactSupportResponse>;
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
export {};
|
|
43
|
-
//# sourceMappingURL=
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/namespaces/apps/types.ts"],"names":[],"mappings":"AAAA,aAAK,cAAc,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7C,aAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,aAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,aAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,aAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,GAAG,eAAe,CAAC;CACxC,CAAC;AAEF,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,aAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,aAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,YAAY,GAAG,UAAU,CAAC;CACnC,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,gBAAgB,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC7E,qBAAqB,EAAE,CACrB,IAAI,EAAE,uBAAuB,KAC1B,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,kBAAkB,EAAE,CAClB,IAAI,EAAE,qBAAqB,KACxB,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/namespaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,aAAK,UAAU,GAAG;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,aAAa,GAAG,IAAI,GAAG;IACjC,SAAS,CAAC,EAAE;QACV,aAAa,CAAC,EAAE,MAAM,UAAU,CAAC;QACjC,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;QAC3C,IAAI,EAAE,aAAa,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,aAAa,CAAC,EAAE,MAAM,UAAU,CAAC;CAClC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;CAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/workspace",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Aviv Maimon",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"wallaby": {
|
|
70
70
|
"autoDetect": true
|
|
71
71
|
},
|
|
72
|
-
"falconPackageHash": "
|
|
72
|
+
"falconPackageHash": "1d6eed135ce9cda2b5e3d93e5b193034fc355cab9308e6a302bea0ea"
|
|
73
73
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/namespaces/apps.ts"],"sourcesContent":["type ResponseStatus = 'SUCCESS' | 'CANCELED';\n\nexport type InstallFlowRequest = {\n appId: string;\n enablePostInstallNavigation?: boolean;\n};\n\nexport type InstallFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\nexport type PurchasePlanFlowRequest = {\n appId: string;\n};\n\nexport type PurchasePlanFlowResponse = {\n appId: string;\n status: 'DISPATCHED' | 'NOT_INSTALLED';\n};\n\nexport type UpdateFlowRequest = {\n appId: string;\n};\n\nexport type UpdateFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\nexport interface ContactSupportRequest {\n appId: string;\n}\n\nexport interface ContactSupportResponse {\n status: 'DISPATCHED' | 'CANCELED';\n}\n\nexport interface AppsNamespace {\n startInstallFlow: (args: InstallFlowRequest) => Promise<InstallFlowResponse>;\n startPurchasePlanFlow: (\n args: PurchasePlanFlowRequest,\n ) => Promise<PurchasePlanFlowResponse>;\n startUpdateFlow: (args: UpdateFlowRequest) => Promise<UpdateFlowResponse>;\n openContactSupport: (\n args: ContactSupportRequest,\n ) => Promise<ContactSupportResponse>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/namespaces/apps.ts"],"sourcesContent":["type ResponseStatus = 'SUCCESS' | 'CANCELED';\n\nexport type InstallFlowRequest = {\n appId: string;\n enablePostInstallNavigation?: boolean;\n};\n\nexport type InstallFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\nexport type PurchasePlanFlowRequest = {\n appId: string;\n};\n\nexport type PurchasePlanFlowResponse = {\n appId: string;\n status: 'DISPATCHED' | 'NOT_INSTALLED';\n};\n\nexport type UpdateFlowRequest = {\n appId: string;\n};\n\nexport type UpdateFlowResponse = {\n status: ResponseStatus;\n installedApps: {\n appId: string;\n version: string;\n }[];\n};\n\nexport interface ContactSupportRequest {\n appId: string;\n}\n\nexport interface ContactSupportResponse {\n status: 'DISPATCHED' | 'CANCELED';\n}\n\nexport interface AppsNamespace {\n startInstallFlow: (args: InstallFlowRequest) => Promise<InstallFlowResponse>;\n startPurchasePlanFlow: (\n args: PurchasePlanFlowRequest,\n ) => Promise<PurchasePlanFlowResponse>;\n startUpdateFlow: (args: UpdateFlowRequest) => Promise<UpdateFlowResponse>;\n openContactSupport: (\n args: ContactSupportRequest,\n ) => Promise<ContactSupportResponse>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../src/namespaces/apps.ts"],"names":[],"mappings":"AAAA,aAAK,cAAc,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7C,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,GAAG,eAAe,CAAC;CACxC,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,YAAY,GAAG,UAAU,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC7E,qBAAqB,EAAE,CACrB,IAAI,EAAE,uBAAuB,KAC1B,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,kBAAkB,EAAE,CAClB,IAAI,EAAE,qBAAqB,KACxB,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC"}
|