@shopify/ui-extensions-server-kit 0.0.0-experimental-20260902222805
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/CHANGELOG.md +157 -0
- package/README.md +75 -0
- package/dist/ExtensionServerClient/ExtensionServerClient.d.ts +27 -0
- package/dist/ExtensionServerClient/ExtensionServerClient.test.d.ts +9 -0
- package/dist/ExtensionServerClient/index.d.ts +2 -0
- package/dist/ExtensionServerClient/server-types.d.ts +66 -0
- package/dist/ExtensionServerClient/types.d.ts +124 -0
- package/dist/_virtual/jsx-runtime.cjs.js +1 -0
- package/dist/_virtual/jsx-runtime.cjs2.js +1 -0
- package/dist/_virtual/jsx-runtime.es.js +5 -0
- package/dist/_virtual/jsx-runtime.es2.js +4 -0
- package/dist/_virtual/react-jsx-runtime.development.cjs.js +1 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.cjs.js +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +4 -0
- package/dist/context/ExtensionServerProvider.d.ts +3 -0
- package/dist/context/ExtensionServerProvider.test.d.ts +1 -0
- package/dist/context/constants.d.ts +2 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/types.d.ts +12 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useExtensionServerContext.d.ts +1 -0
- package/dist/hooks/useExtensionServerState.d.ts +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/i18n.d.ts +68 -0
- package/dist/i18n.test.d.ts +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.cjs2.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +46 -0
- package/dist/index.es2.js +8 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +22 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.es.js +604 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js +9 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +28 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.es.js +10 -0
- package/dist/packages/ui-extensions-server-kit/src/ExtensionServerClient/ExtensionServerClient.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/ExtensionServerClient/ExtensionServerClient.es.js +136 -0
- package/dist/packages/ui-extensions-server-kit/src/ExtensionServerClient/types.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/ExtensionServerClient/types.es.js +4 -0
- package/dist/packages/ui-extensions-server-kit/src/context/ExtensionServerProvider.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/context/ExtensionServerProvider.es.js +30 -0
- package/dist/packages/ui-extensions-server-kit/src/context/constants.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/context/constants.es.js +13 -0
- package/dist/packages/ui-extensions-server-kit/src/hooks/useExtensionServerContext.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/hooks/useExtensionServerContext.es.js +7 -0
- package/dist/packages/ui-extensions-server-kit/src/hooks/useExtensionServerState.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/hooks/useExtensionServerState.es.js +9 -0
- package/dist/packages/ui-extensions-server-kit/src/hooks/useIsomorphicLayoutEffect.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/hooks/useIsomorphicLayoutEffect.es.js +5 -0
- package/dist/packages/ui-extensions-server-kit/src/i18n.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/i18n.es.js +60 -0
- package/dist/packages/ui-extensions-server-kit/src/state/actions/actions.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/state/actions/actions.es.js +37 -0
- package/dist/packages/ui-extensions-server-kit/src/state/reducers/constants.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/state/reducers/constants.es.js +7 -0
- package/dist/packages/ui-extensions-server-kit/src/state/reducers/extensionServerReducer.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/state/reducers/extensionServerReducer.es.js +57 -0
- package/dist/packages/ui-extensions-server-kit/src/testing/MockExtensionServerProvider.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/testing/MockExtensionServerProvider.es.js +25 -0
- package/dist/packages/ui-extensions-server-kit/src/testing/app.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/testing/app.es.js +16 -0
- package/dist/packages/ui-extensions-server-kit/src/testing/extensions.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/testing/extensions.es.js +66 -0
- package/dist/packages/ui-extensions-server-kit/src/types.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/types.es.js +4 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/assetToString.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/assetToString.es.js +7 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/isUIExtension.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/isUIExtension.es.js +7 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/isValidSurface.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/isValidSurface.es.js +7 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/noop.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/noop.es.js +5 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/replaceUpdated.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/replaceUpdated.es.js +14 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/set.cjs.js +1 -0
- package/dist/packages/ui-extensions-server-kit/src/utilities/set.es.js +18 -0
- package/dist/state/actions/actions.d.ts +6 -0
- package/dist/state/actions/index.d.ts +2 -0
- package/dist/state/actions/types.d.ts +21 -0
- package/dist/state/index.d.ts +2 -0
- package/dist/state/reducers/constants.d.ts +2 -0
- package/dist/state/reducers/extensionServerReducer.d.ts +3 -0
- package/dist/state/reducers/extensionServerReducer.test.d.ts +1 -0
- package/dist/state/reducers/index.d.ts +3 -0
- package/dist/state/reducers/types.d.ts +6 -0
- package/dist/testing/MockExtensionServerProvider.d.ts +8 -0
- package/dist/testing/app.d.ts +2 -0
- package/dist/testing/extensions.d.ts +6 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/types.d.ts +196 -0
- package/dist/utilities/assetToString.d.ts +2 -0
- package/dist/utilities/assetToString.test.d.ts +1 -0
- package/dist/utilities/index.d.ts +6 -0
- package/dist/utilities/isUIExtension.d.ts +1 -0
- package/dist/utilities/isValidSurface.d.ts +2 -0
- package/dist/utilities/noop.d.ts +1 -0
- package/dist/utilities/replaceUpdated.d.ts +1 -0
- package/dist/utilities/replaceUpdated.test.d.ts +1 -0
- package/dist/utilities/set.d.ts +4 -0
- package/dist/utilities/set.test.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.mjs +1 -0
- package/node_modules/@testing-library/react/LICENSE +20 -0
- package/node_modules/@testing-library/react/README.md +692 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.cjs.js +537 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.esm.js +497 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.pure.cjs.js +501 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.pure.esm.js +461 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.pure.umd.js +502 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.pure.umd.js.map +1 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.pure.umd.min.js +2 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.pure.umd.min.js.map +1 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.umd.js +538 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.umd.js.map +1 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.umd.min.js +2 -0
- package/node_modules/@testing-library/react/dist/@testing-library/react.umd.min.js.map +1 -0
- package/node_modules/@testing-library/react/dist/act-compat.js +80 -0
- package/node_modules/@testing-library/react/dist/config.js +33 -0
- package/node_modules/@testing-library/react/dist/fire-event.js +70 -0
- package/node_modules/@testing-library/react/dist/index.js +52 -0
- package/node_modules/@testing-library/react/dist/pure.js +356 -0
- package/node_modules/@testing-library/react/dont-cleanup-after-each.js +1 -0
- package/node_modules/@testing-library/react/package.json +116 -0
- package/node_modules/@testing-library/react/pure.d.ts +1 -0
- package/node_modules/@testing-library/react/pure.js +2 -0
- package/node_modules/@testing-library/react/types/index.d.ts +287 -0
- package/node_modules/@testing-library/react/types/pure.d.ts +1 -0
- package/node_modules/@types/react/LICENSE +21 -0
- package/node_modules/@types/react/README.md +15 -0
- package/node_modules/@types/react/canary.d.ts +166 -0
- package/node_modules/@types/react/experimental.d.ts +127 -0
- package/node_modules/@types/react/global.d.ts +160 -0
- package/node_modules/@types/react/index.d.ts +4543 -0
- package/node_modules/@types/react/jsx-dev-runtime.d.ts +45 -0
- package/node_modules/@types/react/jsx-runtime.d.ts +36 -0
- package/node_modules/@types/react/package.json +206 -0
- package/node_modules/@types/react/ts5.0/canary.d.ts +166 -0
- package/node_modules/@types/react/ts5.0/experimental.d.ts +127 -0
- package/node_modules/@types/react/ts5.0/global.d.ts +160 -0
- package/node_modules/@types/react/ts5.0/index.d.ts +4530 -0
- package/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts +44 -0
- package/node_modules/@types/react/ts5.0/jsx-runtime.d.ts +35 -0
- package/node_modules/@vitejs/plugin-react/LICENSE +21 -0
- package/node_modules/@vitejs/plugin-react/README.md +159 -0
- package/node_modules/@vitejs/plugin-react/dist/index.d.ts +75 -0
- package/node_modules/@vitejs/plugin-react/dist/index.js +401 -0
- package/node_modules/@vitejs/plugin-react/dist/refresh-runtime.js +663 -0
- package/node_modules/@vitejs/plugin-react/package.json +77 -0
- package/node_modules/@vitejs/plugin-react/types/preamble.d.ts +1 -0
- package/package.json +64 -0
- package/project.json +40 -0
- package/scripts/create-entry-files.ts +44 -0
- package/src/ExtensionServerClient/ExtensionServerClient.test.ts +1238 -0
- package/src/ExtensionServerClient/ExtensionServerClient.ts +320 -0
- package/src/ExtensionServerClient/index.ts +2 -0
- package/src/ExtensionServerClient/server-types.ts +65 -0
- package/src/ExtensionServerClient/types.ts +159 -0
- package/src/context/ExtensionServerProvider.test.tsx +318 -0
- package/src/context/ExtensionServerProvider.tsx +48 -0
- package/src/context/constants.ts +16 -0
- package/src/context/index.ts +3 -0
- package/src/context/types.ts +14 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useExtensionServerContext.ts +4 -0
- package/src/hooks/useExtensionServerState.ts +6 -0
- package/src/hooks/useIsomorphicLayoutEffect.ts +6 -0
- package/src/i18n.test.ts +417 -0
- package/src/i18n.ts +205 -0
- package/src/index.ts +7 -0
- package/src/state/actions/actions.ts +36 -0
- package/src/state/actions/index.ts +2 -0
- package/src/state/actions/types.ts +26 -0
- package/src/state/index.ts +2 -0
- package/src/state/reducers/constants.ts +6 -0
- package/src/state/reducers/extensionServerReducer.test.ts +165 -0
- package/src/state/reducers/extensionServerReducer.ts +87 -0
- package/src/state/reducers/index.ts +3 -0
- package/src/state/reducers/types.ts +7 -0
- package/src/testing/MockExtensionServerProvider.tsx +36 -0
- package/src/testing/app.ts +15 -0
- package/src/testing/extensions.ts +71 -0
- package/src/testing/index.ts +3 -0
- package/src/types.ts +204 -0
- package/src/utilities/assetToString.test.ts +16 -0
- package/src/utilities/assetToString.ts +7 -0
- package/src/utilities/index.ts +6 -0
- package/src/utilities/isUIExtension.ts +8 -0
- package/src/utilities/isValidSurface.ts +6 -0
- package/src/utilities/noop.ts +1 -0
- package/src/utilities/replaceUpdated.test.ts +26 -0
- package/src/utilities/replaceUpdated.ts +15 -0
- package/src/utilities/set.test.ts +19 -0
- package/src/utilities/set.ts +35 -0
- package/testing.d.ts +1 -0
- package/testing.js +1 -0
- package/testing.mjs +1 -0
- package/tests/setup.ts +3 -0
- package/vite.config.mts +57 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ConnectedAction, UpdateAction, RefreshAction, FocusAction, UnfocusAction } from './types';
|
|
2
|
+
export declare function createConnectedAction(payload: ConnectedAction['payload']): ConnectedAction;
|
|
3
|
+
export declare function createUpdateAction(payload: UpdateAction['payload']): UpdateAction;
|
|
4
|
+
export declare function createRefreshAction(payload: RefreshAction['payload']): RefreshAction;
|
|
5
|
+
export declare function createFocusAction(payload: FocusAction['payload']): FocusAction;
|
|
6
|
+
export declare function createUnfocusAction(payload: UnfocusAction['payload']): UnfocusAction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ConnectedAction {
|
|
2
|
+
type: 'connected';
|
|
3
|
+
payload: ExtensionServer.InboundEvents['connected'];
|
|
4
|
+
}
|
|
5
|
+
export interface UpdateAction {
|
|
6
|
+
type: 'update';
|
|
7
|
+
payload: ExtensionServer.InboundEvents['update'];
|
|
8
|
+
}
|
|
9
|
+
export interface RefreshAction {
|
|
10
|
+
type: 'refresh';
|
|
11
|
+
payload: ExtensionServer.InboundEvents['refresh'];
|
|
12
|
+
}
|
|
13
|
+
export interface FocusAction {
|
|
14
|
+
type: 'focus';
|
|
15
|
+
payload: ExtensionServer.InboundEvents['focus'];
|
|
16
|
+
}
|
|
17
|
+
export interface UnfocusAction {
|
|
18
|
+
type: 'unfocus';
|
|
19
|
+
payload: ExtensionServer.InboundEvents['unfocus'];
|
|
20
|
+
}
|
|
21
|
+
export type ExtensionServerActions = ConnectedAction | UpdateAction | RefreshAction | FocusAction | UnfocusAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtensionServerProviderProps, ExtensionServerContext } from '../context';
|
|
3
|
+
interface InternalProviderProps extends Partial<ExtensionServerContext> {
|
|
4
|
+
children?: ExtensionServerProviderProps['children'];
|
|
5
|
+
}
|
|
6
|
+
type MockExtensionServerProviderProps = Partial<ExtensionServerProviderProps> & InternalProviderProps;
|
|
7
|
+
export declare function MockExtensionServerProvider({ children, options, ...props }: MockExtensionServerProviderProps): React.JSX.Element;
|
|
8
|
+
export {};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { FlattenedLocalization, Localization } from './i18n';
|
|
2
|
+
import './ExtensionServerClient/types';
|
|
3
|
+
import type { Surface } from './ExtensionServerClient/types';
|
|
4
|
+
declare global {
|
|
5
|
+
namespace ExtensionServer {
|
|
6
|
+
type ServerEvents = {
|
|
7
|
+
event: 'dispatch';
|
|
8
|
+
data: InboundEvents['dispatch'];
|
|
9
|
+
} | {
|
|
10
|
+
event: 'connected';
|
|
11
|
+
data: InboundEvents['connected'];
|
|
12
|
+
} | {
|
|
13
|
+
event: 'update';
|
|
14
|
+
data: InboundEvents['update'];
|
|
15
|
+
};
|
|
16
|
+
interface InboundEvents extends DispatchEvents {
|
|
17
|
+
dispatch: {
|
|
18
|
+
type: keyof DispatchEvents;
|
|
19
|
+
payload: DispatchEvents[keyof DispatchEvents];
|
|
20
|
+
};
|
|
21
|
+
connected: {
|
|
22
|
+
extensions: ExtensionPayload[];
|
|
23
|
+
app?: App;
|
|
24
|
+
store: string;
|
|
25
|
+
};
|
|
26
|
+
update: {
|
|
27
|
+
extensions?: ExtensionPayload[];
|
|
28
|
+
app?: App;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface OutboundPersistEvents {
|
|
32
|
+
update: {
|
|
33
|
+
extensions?: ({
|
|
34
|
+
uuid: string;
|
|
35
|
+
} & DeepPartial<ExtensionPayload>)[];
|
|
36
|
+
app?: DeepPartial<App>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface DispatchEvents {
|
|
40
|
+
refresh: {
|
|
41
|
+
uuid: string;
|
|
42
|
+
}[];
|
|
43
|
+
focus: {
|
|
44
|
+
uuid: string;
|
|
45
|
+
}[];
|
|
46
|
+
unfocus: void;
|
|
47
|
+
navigate: {
|
|
48
|
+
url: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
namespace API {
|
|
52
|
+
interface BaseResponse {
|
|
53
|
+
app: App;
|
|
54
|
+
root: ResourceURL;
|
|
55
|
+
socket: ResourceURL;
|
|
56
|
+
devConsole: ResourceURL;
|
|
57
|
+
store: string;
|
|
58
|
+
version: string;
|
|
59
|
+
}
|
|
60
|
+
interface ExtensionsResponse extends BaseResponse {
|
|
61
|
+
extensions: ExtensionPayload[];
|
|
62
|
+
}
|
|
63
|
+
interface ExtensionResponse extends BaseResponse {
|
|
64
|
+
extension: ExtensionPayload;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
interface UIExtension extends ExtensionPayload {
|
|
68
|
+
extensionPoints: ExtensionPoint[];
|
|
69
|
+
apiVersion: string;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export type DeepPartial<T> = {
|
|
74
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
75
|
+
};
|
|
76
|
+
interface ResourceURL {
|
|
77
|
+
url: string;
|
|
78
|
+
}
|
|
79
|
+
export interface Asset extends ResourceURL {
|
|
80
|
+
name: string;
|
|
81
|
+
lastUpdated: number;
|
|
82
|
+
}
|
|
83
|
+
interface Metafield {
|
|
84
|
+
namespace: string;
|
|
85
|
+
key: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ExtensionPointIntercept {
|
|
88
|
+
event: string;
|
|
89
|
+
blocking: boolean;
|
|
90
|
+
applies_to?: string[];
|
|
91
|
+
}
|
|
92
|
+
export interface ExtensionPointCapabilities {
|
|
93
|
+
allow_direct_linking?: boolean;
|
|
94
|
+
intercepts?: ExtensionPointIntercept[];
|
|
95
|
+
}
|
|
96
|
+
export interface ExtensionPoint {
|
|
97
|
+
target: string;
|
|
98
|
+
surface: Surface;
|
|
99
|
+
metafields?: Metafield[];
|
|
100
|
+
resource: ResourceURL;
|
|
101
|
+
root: ResourceURL;
|
|
102
|
+
localization?: FlattenedLocalization | Localization | null;
|
|
103
|
+
name: string;
|
|
104
|
+
description?: string;
|
|
105
|
+
assets?: Record<string, Asset>;
|
|
106
|
+
capabilities?: ExtensionPointCapabilities;
|
|
107
|
+
}
|
|
108
|
+
type ExtensionPoints = string[] | ExtensionPoint[] | null;
|
|
109
|
+
interface CollectBuyerConsentCapabilities {
|
|
110
|
+
smsMarketing: boolean;
|
|
111
|
+
customerPrivacy: boolean;
|
|
112
|
+
}
|
|
113
|
+
interface IframeCapabilities {
|
|
114
|
+
sources: string[];
|
|
115
|
+
}
|
|
116
|
+
interface Capabilities {
|
|
117
|
+
apiAccess: boolean;
|
|
118
|
+
blockProgress: boolean;
|
|
119
|
+
networkAccess: boolean;
|
|
120
|
+
collectBuyerConsent: CollectBuyerConsentCapabilities;
|
|
121
|
+
iframe: IframeCapabilities;
|
|
122
|
+
}
|
|
123
|
+
export interface ExtensionPayload {
|
|
124
|
+
type: string;
|
|
125
|
+
externalType: string;
|
|
126
|
+
assets: Record<string, Asset>;
|
|
127
|
+
development: {
|
|
128
|
+
hidden: boolean;
|
|
129
|
+
status: Status;
|
|
130
|
+
focused?: boolean;
|
|
131
|
+
resource: ResourceURL;
|
|
132
|
+
root: ResourceURL;
|
|
133
|
+
renderer: {
|
|
134
|
+
name: string;
|
|
135
|
+
version: string;
|
|
136
|
+
};
|
|
137
|
+
error?: {
|
|
138
|
+
message: string;
|
|
139
|
+
file?: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
uuid: string;
|
|
143
|
+
version: string;
|
|
144
|
+
surface: Surface;
|
|
145
|
+
name: string;
|
|
146
|
+
description?: string;
|
|
147
|
+
handle: string;
|
|
148
|
+
extensionPoints: ExtensionPoints;
|
|
149
|
+
capabilities?: Capabilities;
|
|
150
|
+
supportedFeatures: ExtensionSupportedFeatures;
|
|
151
|
+
authenticatedRedirectStartUrl?: string;
|
|
152
|
+
authenticatedRedirectRedirectUrls?: string[];
|
|
153
|
+
localization?: FlattenedLocalization | Localization | null;
|
|
154
|
+
settings?: {
|
|
155
|
+
fields?: {
|
|
156
|
+
type: string;
|
|
157
|
+
key?: string;
|
|
158
|
+
name?: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
required?: boolean;
|
|
161
|
+
validations?: unknown[];
|
|
162
|
+
}[];
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export interface ExtensionSupportedFeatures {
|
|
166
|
+
runsOffline: boolean;
|
|
167
|
+
}
|
|
168
|
+
export declare enum Status {
|
|
169
|
+
Success = "success"
|
|
170
|
+
}
|
|
171
|
+
export interface App {
|
|
172
|
+
id: string;
|
|
173
|
+
apiKey: string;
|
|
174
|
+
url: string;
|
|
175
|
+
mobileUrl: string;
|
|
176
|
+
applicationUrl: string;
|
|
177
|
+
handle?: string | null;
|
|
178
|
+
title: string;
|
|
179
|
+
developerName?: string;
|
|
180
|
+
icon: {
|
|
181
|
+
transformedSrc: string;
|
|
182
|
+
};
|
|
183
|
+
installation?: {
|
|
184
|
+
launchUrl: string;
|
|
185
|
+
};
|
|
186
|
+
supportEmail?: string;
|
|
187
|
+
supportLocales?: string[];
|
|
188
|
+
allowedDomains?: string[];
|
|
189
|
+
assets?: {
|
|
190
|
+
[key: string]: {
|
|
191
|
+
url: string;
|
|
192
|
+
lastUpdated: number;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isUIExtension(extension: unknown): extension is ExtensionServer.UIExtension;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const noop: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function replaceUpdated<T>(arr: T[], updates: T[], cb: (v: T) => unknown): T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist';
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/index.cjs');
|
package/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/index.es.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright (c) 2017-Present Kent C. Dodds
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|