@activeboxes/pieces-framework 0.7.4-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/README.md +11 -0
- package/package.json +27 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/lib/action/action.d.ts +45 -0
- package/src/lib/action/action.js +40 -0
- package/src/lib/action/action.js.map +1 -0
- package/src/lib/context.d.ts +122 -0
- package/src/lib/context.js +10 -0
- package/src/lib/context.js.map +1 -0
- package/src/lib/index.d.ts +7 -0
- package/src/lib/index.js +11 -0
- package/src/lib/index.js.map +1 -0
- package/src/lib/piece-metadata.d.ts +3267 -0
- package/src/lib/piece-metadata.js +75 -0
- package/src/lib/piece-metadata.js.map +1 -0
- package/src/lib/piece.d.ts +52 -0
- package/src/lib/piece.js +53 -0
- package/src/lib/piece.js.map +1 -0
- package/src/lib/property/authentication/basic-auth-prop.d.ts +33 -0
- package/src/lib/property/authentication/basic-auth-prop.js +26 -0
- package/src/lib/property/authentication/basic-auth-prop.js.map +1 -0
- package/src/lib/property/authentication/common.d.ts +16 -0
- package/src/lib/property/authentication/common.js +9 -0
- package/src/lib/property/authentication/common.js.map +1 -0
- package/src/lib/property/authentication/custom-auth-prop.d.ts +53 -0
- package/src/lib/property/authentication/custom-auth-prop.js +26 -0
- package/src/lib/property/authentication/custom-auth-prop.js.map +1 -0
- package/src/lib/property/authentication/index.d.ts +109 -0
- package/src/lib/property/authentication/index.js +33 -0
- package/src/lib/property/authentication/index.js.map +1 -0
- package/src/lib/property/authentication/oauth2-prop.d.ts +180 -0
- package/src/lib/property/authentication/oauth2-prop.js +43 -0
- package/src/lib/property/authentication/oauth2-prop.js.map +1 -0
- package/src/lib/property/authentication/secret-text-property.d.ts +10 -0
- package/src/lib/property/authentication/secret-text-property.js +14 -0
- package/src/lib/property/authentication/secret-text-property.js.map +1 -0
- package/src/lib/property/index.d.ts +682 -0
- package/src/lib/property/index.js +76 -0
- package/src/lib/property/index.js.map +1 -0
- package/src/lib/property/input/array-property.d.ts +133 -0
- package/src/lib/property/input/array-property.js +30 -0
- package/src/lib/property/input/array-property.js.map +1 -0
- package/src/lib/property/input/checkbox-property.d.ts +9 -0
- package/src/lib/property/input/checkbox-property.js +11 -0
- package/src/lib/property/input/checkbox-property.js.map +1 -0
- package/src/lib/property/input/common.d.ts +15 -0
- package/src/lib/property/input/common.js +15 -0
- package/src/lib/property/input/common.js.map +1 -0
- package/src/lib/property/input/date-time-property.d.ts +9 -0
- package/src/lib/property/input/date-time-property.js +11 -0
- package/src/lib/property/input/date-time-property.js.map +1 -0
- package/src/lib/property/input/dropdown/common.d.ts +21 -0
- package/src/lib/property/input/dropdown/common.js +14 -0
- package/src/lib/property/input/dropdown/common.js.map +1 -0
- package/src/lib/property/input/dropdown/dropdown-prop.d.ts +27 -0
- package/src/lib/property/input/dropdown/dropdown-prop.js +21 -0
- package/src/lib/property/input/dropdown/dropdown-prop.js.map +1 -0
- package/src/lib/property/input/dropdown/static-dropdown.d.ts +37 -0
- package/src/lib/property/input/dropdown/static-dropdown.js +22 -0
- package/src/lib/property/input/dropdown/static-dropdown.js.map +1 -0
- package/src/lib/property/input/dynamic-prop.d.ts +218 -0
- package/src/lib/property/input/dynamic-prop.js +26 -0
- package/src/lib/property/input/dynamic-prop.js.map +1 -0
- package/src/lib/property/input/file-property.d.ts +16 -0
- package/src/lib/property/input/file-property.js +22 -0
- package/src/lib/property/input/file-property.js.map +1 -0
- package/src/lib/property/input/index.d.ts +186 -0
- package/src/lib/property/input/index.js +91 -0
- package/src/lib/property/input/index.js.map +1 -0
- package/src/lib/property/input/json-property.d.ts +9 -0
- package/src/lib/property/input/json-property.js +11 -0
- package/src/lib/property/input/json-property.js.map +1 -0
- package/src/lib/property/input/markdown-property.d.ts +12 -0
- package/src/lib/property/input/markdown-property.js +11 -0
- package/src/lib/property/input/markdown-property.js.map +1 -0
- package/src/lib/property/input/number-property.d.ts +9 -0
- package/src/lib/property/input/number-property.js +11 -0
- package/src/lib/property/input/number-property.js.map +1 -0
- package/src/lib/property/input/object-property.d.ts +9 -0
- package/src/lib/property/input/object-property.js +11 -0
- package/src/lib/property/input/object-property.js.map +1 -0
- package/src/lib/property/input/property-type.d.ts +21 -0
- package/src/lib/property/input/property-type.js +26 -0
- package/src/lib/property/input/property-type.js.map +1 -0
- package/src/lib/property/input/text-property.d.ts +16 -0
- package/src/lib/property/input/text-property.js +15 -0
- package/src/lib/property/input/text-property.js.map +1 -0
- package/src/lib/trigger/trigger.d.ts +85 -0
- package/src/lib/trigger/trigger.js +74 -0
- package/src/lib/trigger/trigger.js.map +1 -0
- package/src/lib/validators/index.d.ts +1 -0
- package/src/lib/validators/index.js +5 -0
- package/src/lib/validators/index.js.map +1 -0
package/README.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# pieces-framework
|
2
|
+
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
4
|
+
|
5
|
+
## Building
|
6
|
+
|
7
|
+
Run `nx build pieces-framework` to build the library.
|
8
|
+
|
9
|
+
## Running unit tests
|
10
|
+
|
11
|
+
Run `nx test pieces-framework` to execute the unit tests via [Jest](https://jestjs.io).
|
package/package.json
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"name": "@activeboxes/pieces-framework",
|
3
|
+
"version": "0.7.42.0",
|
4
|
+
"type": "commonjs",
|
5
|
+
"dependencies": {
|
6
|
+
"@sinclair/typebox": "0.34.11",
|
7
|
+
"deepmerge-ts": "7.1.0",
|
8
|
+
"nanoid": "3.3.8",
|
9
|
+
"semver": "7.6.0",
|
10
|
+
"@activeboxes/shared": "0.10.146",
|
11
|
+
"tslib": "1.14.1"
|
12
|
+
},
|
13
|
+
"overrides": {
|
14
|
+
"cross-spawn": "7.0.6",
|
15
|
+
"@tryfabric/martian": {
|
16
|
+
"@notionhq/client": "$@notionhq/client"
|
17
|
+
},
|
18
|
+
"vite": {
|
19
|
+
"rollup": "npm:@rollup/wasm-node"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"resolutions": {
|
23
|
+
"rollup": "npm:@rollup/wasm-node"
|
24
|
+
},
|
25
|
+
"main": "./src/index.js",
|
26
|
+
"types": "./src/index.d.ts"
|
27
|
+
}
|
package/src/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib';
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/framework/src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { Static } from '@sinclair/typebox';
|
2
|
+
import { ActionContext } from '../context';
|
3
|
+
import { ActionBase } from '../piece-metadata';
|
4
|
+
import { InputPropertyMap } from '../property';
|
5
|
+
import { PieceAuthProperty } from '../property/authentication';
|
6
|
+
export type ActionRunner<PieceAuth extends PieceAuthProperty, ActionProps extends InputPropertyMap> = (ctx: ActionContext<PieceAuth, ActionProps>) => Promise<unknown | void>;
|
7
|
+
export declare const ErrorHandlingOptionsParam: import("@sinclair/typebox").TObject<{
|
8
|
+
retryOnFailure: import("@sinclair/typebox").TObject<{
|
9
|
+
defaultValue: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
10
|
+
hide: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
11
|
+
}>;
|
12
|
+
continueOnFailure: import("@sinclair/typebox").TObject<{
|
13
|
+
defaultValue: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
14
|
+
hide: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
15
|
+
}>;
|
16
|
+
}>;
|
17
|
+
export type ErrorHandlingOptionsParam = Static<typeof ErrorHandlingOptionsParam>;
|
18
|
+
type CreateActionParams<PieceAuth extends PieceAuthProperty, ActionProps extends InputPropertyMap> = {
|
19
|
+
/**
|
20
|
+
* A dummy parameter used to infer {@code PieceAuth} type
|
21
|
+
*/
|
22
|
+
name: string;
|
23
|
+
auth?: PieceAuth;
|
24
|
+
displayName: string;
|
25
|
+
description: string;
|
26
|
+
props: ActionProps;
|
27
|
+
run: ActionRunner<PieceAuth, ActionProps>;
|
28
|
+
test?: ActionRunner<PieceAuth, ActionProps>;
|
29
|
+
requireAuth?: boolean;
|
30
|
+
errorHandlingOptions?: ErrorHandlingOptionsParam;
|
31
|
+
};
|
32
|
+
export declare class IAction<PieceAuth extends PieceAuthProperty, ActionProps extends InputPropertyMap> implements ActionBase {
|
33
|
+
readonly name: string;
|
34
|
+
readonly displayName: string;
|
35
|
+
readonly description: string;
|
36
|
+
readonly props: ActionProps;
|
37
|
+
readonly run: ActionRunner<PieceAuth, ActionProps>;
|
38
|
+
readonly test: ActionRunner<PieceAuth, ActionProps>;
|
39
|
+
readonly requireAuth: boolean;
|
40
|
+
readonly errorHandlingOptions: ErrorHandlingOptionsParam;
|
41
|
+
constructor(name: string, displayName: string, description: string, props: ActionProps, run: ActionRunner<PieceAuth, ActionProps>, test: ActionRunner<PieceAuth, ActionProps>, requireAuth: boolean, errorHandlingOptions: ErrorHandlingOptionsParam);
|
42
|
+
}
|
43
|
+
export type Action<PieceAuth extends PieceAuthProperty = any, ActionProps extends InputPropertyMap = any> = IAction<PieceAuth, ActionProps>;
|
44
|
+
export declare const createAction: <PieceAuth extends PieceAuthProperty = PieceAuthProperty, ActionProps extends InputPropertyMap = any>(params: CreateActionParams<PieceAuth, ActionProps>) => IAction<PieceAuth, ActionProps>;
|
45
|
+
export {};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.createAction = exports.IAction = exports.ErrorHandlingOptionsParam = void 0;
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
5
|
+
exports.ErrorHandlingOptionsParam = typebox_1.Type.Object({
|
6
|
+
retryOnFailure: typebox_1.Type.Object({
|
7
|
+
defaultValue: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
8
|
+
hide: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
9
|
+
}),
|
10
|
+
continueOnFailure: typebox_1.Type.Object({
|
11
|
+
defaultValue: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
12
|
+
hide: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
13
|
+
}),
|
14
|
+
});
|
15
|
+
class IAction {
|
16
|
+
constructor(name, displayName, description, props, run, test, requireAuth, errorHandlingOptions) {
|
17
|
+
this.name = name;
|
18
|
+
this.displayName = displayName;
|
19
|
+
this.description = description;
|
20
|
+
this.props = props;
|
21
|
+
this.run = run;
|
22
|
+
this.test = test;
|
23
|
+
this.requireAuth = requireAuth;
|
24
|
+
this.errorHandlingOptions = errorHandlingOptions;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
exports.IAction = IAction;
|
28
|
+
const createAction = (params) => {
|
29
|
+
var _a, _b, _c;
|
30
|
+
return new IAction(params.name, params.displayName, params.description, params.props, params.run, (_a = params.test) !== null && _a !== void 0 ? _a : params.run, (_b = params.requireAuth) !== null && _b !== void 0 ? _b : true, (_c = params.errorHandlingOptions) !== null && _c !== void 0 ? _c : {
|
31
|
+
continueOnFailure: {
|
32
|
+
defaultValue: false,
|
33
|
+
},
|
34
|
+
retryOnFailure: {
|
35
|
+
defaultValue: false,
|
36
|
+
}
|
37
|
+
});
|
38
|
+
};
|
39
|
+
exports.createAction = createAction;
|
40
|
+
//# sourceMappingURL=action.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/action/action.ts"],"names":[],"mappings":";;;AAAA,+CAAiD;AASpC,QAAA,yBAAyB,GAAG,cAAI,CAAC,MAAM,CAAC;IACnD,cAAc,EAAE,cAAI,CAAC,MAAM,CAAC;QAC1B,YAAY,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,EAAE,CAAC;QAC3C,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,EAAE,CAAC;KACpC,CAAC;IACF,iBAAiB,EAAE,cAAI,CAAC,MAAM,CAAC;QAC7B,YAAY,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,EAAE,CAAC;QAC3C,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,EAAE,CAAC;KACpC,CAAC;CACH,CAAC,CAAA;AAkBF,MAAa,OAAO;IAClB,YACkB,IAAY,EACZ,WAAmB,EACnB,WAAmB,EACnB,KAAkB,EAClB,GAAyC,EACzC,IAA0C,EAC1C,WAAoB,EACpB,oBAA+C;QAP/C,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAa;QAClB,QAAG,GAAH,GAAG,CAAsC;QACzC,SAAI,GAAJ,IAAI,CAAsC;QAC1C,gBAAW,GAAX,WAAW,CAAS;QACpB,yBAAoB,GAApB,oBAAoB,CAA2B;IAC7D,CAAC;CACN;AAXD,0BAWC;AAOM,MAAM,YAAY,GAAG,CAI1B,MAAkD,EAClD,EAAE;;IACF,OAAO,IAAI,OAAO,CAChB,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,GAAG,EACV,MAAA,MAAM,CAAC,IAAI,mCAAI,MAAM,CAAC,GAAG,EACzB,MAAA,MAAM,CAAC,WAAW,mCAAI,IAAI,EAC1B,MAAA,MAAM,CAAC,oBAAoB,mCAAI;QAC7B,iBAAiB,EAAE;YACjB,YAAY,EAAE,KAAK;SACpB;QACD,cAAc,EAAE;YACd,YAAY,EAAE,KAAK;SACpB;KACF,CACF,CAAA;AACH,CAAC,CAAA;AAvBY,QAAA,YAAY,gBAuBxB"}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import { AppConnectionValue, ExecutionType, FlowRunId, PopulatedFlow, ProjectId, ResumePayload, SeekPage, TriggerPayload } from '@activeboxes/shared';
|
2
|
+
import { TriggerStrategy } from './trigger/trigger';
|
3
|
+
import { InputPropertyMap, PiecePropValueSchema, StaticPropsValue } from './property';
|
4
|
+
import { PieceAuthProperty } from './property/authentication';
|
5
|
+
import { StopResponse, DelayPauseMetadata, PauseMetadata, WebhookPauseMetadata } from '@activeboxes/shared';
|
6
|
+
type BaseContext<PieceAuth extends PieceAuthProperty, Props extends InputPropertyMap> = {
|
7
|
+
flows: FlowsContext;
|
8
|
+
auth: PiecePropValueSchema<PieceAuth>;
|
9
|
+
propsValue: StaticPropsValue<Props>;
|
10
|
+
store: Store;
|
11
|
+
project: {
|
12
|
+
id: ProjectId;
|
13
|
+
externalId: () => Promise<string | undefined>;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
type AppWebhookTriggerHookContext<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap> = BaseContext<PieceAuth, TriggerProps> & {
|
17
|
+
webhookUrl: string;
|
18
|
+
payload: TriggerPayload;
|
19
|
+
app: {
|
20
|
+
createListeners({ events, identifierValue, }: {
|
21
|
+
events: string[];
|
22
|
+
identifierValue: string;
|
23
|
+
}): void;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
type PollingTriggerHookContext<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap> = BaseContext<PieceAuth, TriggerProps> & {
|
27
|
+
setSchedule(schedule: {
|
28
|
+
cronExpression: string;
|
29
|
+
timezone?: string;
|
30
|
+
}): void;
|
31
|
+
};
|
32
|
+
type WebhookTriggerHookContext<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap> = BaseContext<PieceAuth, TriggerProps> & {
|
33
|
+
webhookUrl: string;
|
34
|
+
payload: TriggerPayload;
|
35
|
+
};
|
36
|
+
export type TriggerHookContext<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap, S extends TriggerStrategy> = S extends TriggerStrategy.APP_WEBHOOK ? AppWebhookTriggerHookContext<PieceAuth, TriggerProps> : S extends TriggerStrategy.POLLING ? PollingTriggerHookContext<PieceAuth, TriggerProps> : S extends TriggerStrategy.WEBHOOK ? WebhookTriggerHookContext<PieceAuth, TriggerProps> : never;
|
37
|
+
export type TestOrRunHookContext<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap, S extends TriggerStrategy> = TriggerHookContext<PieceAuth, TriggerProps, S> & {
|
38
|
+
files: FilesService;
|
39
|
+
};
|
40
|
+
export type StopHookParams = {
|
41
|
+
response: StopResponse;
|
42
|
+
};
|
43
|
+
export type StopHook = (params?: StopHookParams) => void;
|
44
|
+
export type PauseHookParams = {
|
45
|
+
pauseMetadata: PauseMetadata;
|
46
|
+
};
|
47
|
+
export type PauseHook = (params: {
|
48
|
+
pauseMetadata: DelayPauseMetadata | Omit<WebhookPauseMetadata, 'requestId'>;
|
49
|
+
}) => void;
|
50
|
+
export type FlowsContext = {
|
51
|
+
list(): Promise<SeekPage<PopulatedFlow>>;
|
52
|
+
current: {
|
53
|
+
id: string;
|
54
|
+
version: {
|
55
|
+
id: string;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
};
|
59
|
+
export type PropertyContext = {
|
60
|
+
server: ServerContext;
|
61
|
+
project: {
|
62
|
+
id: ProjectId;
|
63
|
+
externalId: () => Promise<string | undefined>;
|
64
|
+
};
|
65
|
+
searchValue?: string;
|
66
|
+
flows: FlowsContext;
|
67
|
+
};
|
68
|
+
export type ServerContext = {
|
69
|
+
apiUrl: string;
|
70
|
+
publicUrl: string;
|
71
|
+
token: string;
|
72
|
+
};
|
73
|
+
export type RunContext = {
|
74
|
+
id: FlowRunId;
|
75
|
+
stop: StopHook;
|
76
|
+
pause: PauseHook;
|
77
|
+
};
|
78
|
+
export type OnStartContext<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap> = Omit<BaseContext<PieceAuth, TriggerProps>, 'flows'> & {
|
79
|
+
run: Pick<RunContext, 'id'>;
|
80
|
+
payload: unknown;
|
81
|
+
};
|
82
|
+
export type BaseActionContext<ET extends ExecutionType, PieceAuth extends PieceAuthProperty, ActionProps extends InputPropertyMap> = BaseContext<PieceAuth, ActionProps> & {
|
83
|
+
executionType: ET;
|
84
|
+
connections: ConnectionsManager;
|
85
|
+
tags: TagsManager;
|
86
|
+
server: ServerContext;
|
87
|
+
files: FilesService;
|
88
|
+
serverUrl: string;
|
89
|
+
run: RunContext;
|
90
|
+
generateResumeUrl: (params: {
|
91
|
+
queryParams: Record<string, string>;
|
92
|
+
}) => string;
|
93
|
+
};
|
94
|
+
type BeginExecutionActionContext<PieceAuth extends PieceAuthProperty = PieceAuthProperty, ActionProps extends InputPropertyMap = InputPropertyMap> = BaseActionContext<ExecutionType.BEGIN, PieceAuth, ActionProps>;
|
95
|
+
type ResumeExecutionActionContext<PieceAuth extends PieceAuthProperty = PieceAuthProperty, ActionProps extends InputPropertyMap = InputPropertyMap> = BaseActionContext<ExecutionType.RESUME, PieceAuth, ActionProps> & {
|
96
|
+
resumePayload: ResumePayload;
|
97
|
+
};
|
98
|
+
export type ActionContext<PieceAuth extends PieceAuthProperty = PieceAuthProperty, ActionProps extends InputPropertyMap = InputPropertyMap> = BeginExecutionActionContext<PieceAuth, ActionProps> | ResumeExecutionActionContext<PieceAuth, ActionProps>;
|
99
|
+
export interface FilesService {
|
100
|
+
write({ fileName, data, }: {
|
101
|
+
fileName: string;
|
102
|
+
data: Buffer;
|
103
|
+
}): Promise<string>;
|
104
|
+
}
|
105
|
+
export interface ConnectionsManager {
|
106
|
+
get(key: string): Promise<AppConnectionValue | Record<string, unknown> | string | null>;
|
107
|
+
}
|
108
|
+
export interface TagsManager {
|
109
|
+
add(params: {
|
110
|
+
name: string;
|
111
|
+
}): Promise<void>;
|
112
|
+
}
|
113
|
+
export interface Store {
|
114
|
+
put<T>(key: string, value: T, scope?: StoreScope): Promise<T>;
|
115
|
+
get<T>(key: string, scope?: StoreScope): Promise<T | null>;
|
116
|
+
delete(key: string, scope?: StoreScope): Promise<void>;
|
117
|
+
}
|
118
|
+
export declare enum StoreScope {
|
119
|
+
PROJECT = "COLLECTION",
|
120
|
+
FLOW = "FLOW"
|
121
|
+
}
|
122
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.StoreScope = void 0;
|
4
|
+
var StoreScope;
|
5
|
+
(function (StoreScope) {
|
6
|
+
// Collection were deprecated in favor of project
|
7
|
+
StoreScope["PROJECT"] = "COLLECTION";
|
8
|
+
StoreScope["FLOW"] = "FLOW";
|
9
|
+
})(StoreScope || (exports.StoreScope = StoreScope = {}));
|
10
|
+
//# sourceMappingURL=context.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/framework/src/lib/context.ts"],"names":[],"mappings":";;;AA2MA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,iDAAiD;IACjD,oCAAsB,CAAA;IACtB,2BAAa,CAAA;AACf,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB"}
|
package/src/lib/index.js
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./action/action"), exports);
|
5
|
+
tslib_1.__exportStar(require("./property"), exports);
|
6
|
+
tslib_1.__exportStar(require("./trigger/trigger"), exports);
|
7
|
+
tslib_1.__exportStar(require("./context"), exports);
|
8
|
+
tslib_1.__exportStar(require("./piece"), exports);
|
9
|
+
tslib_1.__exportStar(require("./piece-metadata"), exports);
|
10
|
+
tslib_1.__exportStar(require("./validators/index"), exports);
|
11
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/framework/src/lib/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,qDAA2B;AAC3B,4DAAkC;AAClC,oDAA0B;AAC1B,kDAAwB;AACxB,2DAAiC;AACjC,6DAAkC"}
|