@octostar/platform-api 0.0.2 → 0.0.3-alpha.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/LICENSE +1 -1
- package/dist/platform-api.d.ts +10 -1
- package/lib/apis.d.ts +2 -1
- package/lib/apis.d.ts.map +1 -1
- package/lib/apis.js +4 -0
- package/lib/apis.js.map +1 -1
- package/lib/constants.d.ts +1 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +1 -0
- package/lib/constants.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/permissions.d.ts +4 -0
- package/lib/permissions.d.ts.map +1 -0
- package/lib/permissions.js +5 -0
- package/lib/permissions.js.map +1 -0
- package/package.json +3 -3
package/LICENSE
CHANGED
package/dist/platform-api.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Desktop } from '@octostar/platform-types';
|
|
2
|
+
import { ExtrasApi } from '@octostar/platform-types';
|
|
2
3
|
import { Ontology } from '@octostar/platform-types';
|
|
3
4
|
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const ALL_PERMISSIONS = "all";
|
|
6
|
+
|
|
7
|
+
export declare const apiNames: Record<"desktop", "octostar:api-names:desktop"> & Record<"ontology", "octostar:api-names:ontology"> & Record<"context", "octostar:api-names:context"> & Record<"extras", "octostar:api-names:extras">;
|
|
5
8
|
|
|
6
9
|
declare type BasePostResponsePayload<D, E> = {
|
|
7
10
|
data: D;
|
|
@@ -20,6 +23,8 @@ declare type CreateMessageNamesResult<N, M> = M extends readonly [infer F, ...in
|
|
|
20
23
|
|
|
21
24
|
export declare const createPrefixesConstants: <N extends string, M extends readonly [string, ...string[]]>(namespace: N, messages: M) => CreateMessageNamesResult<N, M>;
|
|
22
25
|
|
|
26
|
+
export declare const DESKTOP_PERMISSION_GROUP = "octostar:desktop:";
|
|
27
|
+
|
|
23
28
|
export declare const desktopApi: () => EnsureMethodsReturnPromise<Desktop>;
|
|
24
29
|
|
|
25
30
|
export declare type EnsureMethodsReturnPromise<T> = {
|
|
@@ -31,12 +36,16 @@ export declare type ErrorPostResponsePayload = BasePostResponsePayload<null, {
|
|
|
31
36
|
message: string;
|
|
32
37
|
}>;
|
|
33
38
|
|
|
39
|
+
export declare const extrasApi: () => EnsureMethodsReturnPromise<ExtrasApi>;
|
|
40
|
+
|
|
34
41
|
export declare type GetRemoteApiParams = {
|
|
35
42
|
name: string;
|
|
36
43
|
};
|
|
37
44
|
|
|
38
45
|
declare type MessageValue<N, M> = `${N & string}:${M & string}`;
|
|
39
46
|
|
|
47
|
+
export declare const ONTOLOGY_PERMISSION_GROUP = "octostar:ontology:";
|
|
48
|
+
|
|
40
49
|
export declare const ontologyApi: () => EnsureMethodsReturnPromise<Ontology>;
|
|
41
50
|
|
|
42
51
|
export declare const postMessageNames: Record<"get_api", "octostar:post-messages:get_api">;
|
package/lib/apis.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Desktop, Ontology } from '@octostar/platform-types';
|
|
1
|
+
import { Desktop, Ontology, ExtrasApi } from '@octostar/platform-types';
|
|
2
2
|
import { ContextApi, EnsureMethodsReturnPromise } from './types';
|
|
3
3
|
export declare const desktopApi: () => EnsureMethodsReturnPromise<Desktop>;
|
|
4
4
|
export declare const ontologyApi: () => EnsureMethodsReturnPromise<Ontology>;
|
|
5
5
|
export declare const contextApi: () => EnsureMethodsReturnPromise<ContextApi<unknown>>;
|
|
6
|
+
export declare const extrasApi: () => EnsureMethodsReturnPromise<ExtrasApi>;
|
|
6
7
|
//# sourceMappingURL=apis.d.ts.map
|
package/lib/apis.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../src/apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../src/apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGxE,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AA4BjE,eAAO,MAAM,UAAU,2CACwC,CAAC;AAEhE,eAAO,MAAM,WAAW,4CACwC,CAAC;AAEjE,eAAO,MAAM,UAAU,uDACwC,CAAC;AAEhE,eAAO,MAAM,SAAS,6CACwC,CAAC"}
|
package/lib/apis.js
CHANGED
|
@@ -14,8 +14,12 @@ const apisLocator = AsyncServiceLocator.getInstance('platform-api', {
|
|
|
14
14
|
// TODO: clarify about the context type
|
|
15
15
|
createRemoteApiHandle({
|
|
16
16
|
name: apiNames.context,
|
|
17
|
+
}))
|
|
18
|
+
.registerService('extras', () => createRemoteApiHandle({
|
|
19
|
+
name: apiNames.extras,
|
|
17
20
|
}));
|
|
18
21
|
export const desktopApi = () => forwardCallsToFutureObject(apisLocator.getService('desktop'));
|
|
19
22
|
export const ontologyApi = () => forwardCallsToFutureObject(apisLocator.getService('ontology'));
|
|
20
23
|
export const contextApi = () => forwardCallsToFutureObject(apisLocator.getService('context'));
|
|
24
|
+
export const extrasApi = () => forwardCallsToFutureObject(apisLocator.getService('extras'));
|
|
21
25
|
//# sourceMappingURL=apis.js.map
|
package/lib/apis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.js","sourceRoot":"","sources":["../src/apis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE9E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,GAAG,mBAAmB,CAAC,WAAW,CA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AC,CACH;KACA,eAAe,CAAC,UAAU,EAAE,GAAG,EAAE,CAChC,qBAAqB,CAAuC;IAC1D,IAAI,EAAE,QAAQ,CAAC,QAAQ;CACxB,CAAC,CACH;KACA,eAAe,CAAC,SAAS,EAAE,GAAG,EAAE;AAC/B,uCAAuC;AACvC,qBAAqB,CAAkD;IACrE,IAAI,EAAE,QAAQ,CAAC,OAAO;CACvB,CAAC,CACH;KACA,eAAe,CAAC,QAAQ,EAAE,GAAG,EAAE,CAC9B,qBAAqB,CAAwC;IAC3D,IAAI,EAAE,QAAQ,CAAC,MAAM;CACtB,CAAC,CACH,CAAC;AAEJ,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAC7B,0BAA0B,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAC9B,0BAA0B,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAC7B,0BAA0B,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAC5B,0BAA0B,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
package/lib/constants.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ type MessageValue<N, M> = `${N & string}:${M & string}`;
|
|
|
2
2
|
type CreateMessageNamesResult<N, M> = M extends readonly [infer F, ...infer R] ? Record<F & string, MessageValue<N, F>> & CreateMessageNamesResult<N, R> : {};
|
|
3
3
|
export declare const createPrefixesConstants: <N extends string, M extends readonly [string, ...string[]]>(namespace: N, messages: M) => CreateMessageNamesResult<N, M>;
|
|
4
4
|
export declare const postMessageNames: Record<"get_api", "octostar:post-messages:get_api">;
|
|
5
|
-
export declare const apiNames: Record<"desktop", "octostar:api-names:desktop"> & Record<"ontology", "octostar:api-names:ontology"> & Record<"context", "octostar:api-names:context">;
|
|
5
|
+
export declare const apiNames: Record<"desktop", "octostar:api-names:desktop"> & Record<"ontology", "octostar:api-names:ontology"> & Record<"context", "octostar:api-names:context"> & Record<"extras", "octostar:api-names:extras">;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=constants.d.ts.map
|
package/lib/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC;AAExD,KAAK,wBAAwB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,GAC1E,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,GACvE,EAAE,CAAC;AAEP,eAAO,MAAM,uBAAuB,2HAcnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,qDAG5B,CAAC;AAEF,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC;AAExD,KAAK,wBAAwB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,GAC1E,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,GACvE,EAAE,CAAC;AAEP,eAAO,MAAM,uBAAuB,2HAcnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,qDAG5B,CAAC;AAEF,eAAO,MAAM,QAAQ,uMAKV,CAAC"}
|
package/lib/constants.js
CHANGED
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAIrC,SAAY,EACZ,QAAW,EACqB,EAAE;IAClC,MAAM,MAAM,GAA+C,EAAE,CAAC;IAE9D,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,GAAG,SAAS,IAAI,OAAO,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO,MAAwC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CACrD,wBAAwB,EACxB,CAAC,SAAS,CAAU,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,oBAAoB,EAAE;IACpE,SAAS;IACT,UAAU;IACV,SAAS;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAIrC,SAAY,EACZ,QAAW,EACqB,EAAE;IAClC,MAAM,MAAM,GAA+C,EAAE,CAAC;IAE9D,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,GAAG,SAAS,IAAI,OAAO,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO,MAAwC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CACrD,wBAAwB,EACxB,CAAC,SAAS,CAAU,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC,oBAAoB,EAAE;IACpE,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;CACA,CAAC,CAAC;AAEZ,OAAO;AACP,8BAA8B"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAC5D,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAC9D,eAAO,MAAM,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// used in original octostar codebase with streamlit-octostar-research implementation
|
|
2
|
+
export const DESKTOP_PERMISSION_GROUP = 'octostar:desktop:';
|
|
3
|
+
export const ONTOLOGY_PERMISSION_GROUP = 'octostar:ontology:';
|
|
4
|
+
export const ALL_PERMISSIONS = 'all';
|
|
5
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octostar/platform-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-alpha.0",
|
|
4
4
|
"description": "Provides access to the API exposed by Octostar platform to an application run in an iframe",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"octostar",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"run:api-extractor": "api-extractor run --local --verbose"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@octostar/platform-types": "0.0.
|
|
30
|
+
"@octostar/platform-types": "0.0.2-alpha.0",
|
|
31
31
|
"post-robot": "^10.0.46"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "3c66984cab2d4035b09eec776c871937a5ec8b18"
|
|
41
41
|
}
|