@activepieces/pieces-common 0.0.9 → 0.1.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/package.json +6 -6
- package/src/lib/authentication/index.d.ts +4 -4
- package/src/lib/authentication/index.js +1 -1
- package/src/lib/authentication/index.js.map +1 -1
- package/src/lib/http/core/delegating-authentication-converter.d.ts +1 -1
- package/src/lib/http/core/http-client.d.ts +1 -1
- package/src/lib/http/core/http-header.js +1 -1
- package/src/lib/http/core/http-header.js.map +1 -1
- package/src/lib/http/core/http-headers.d.ts +1 -1
- package/src/lib/http/core/http-message-body.d.ts +1 -1
- package/src/lib/http/core/http-method.js +1 -1
- package/src/lib/http/core/http-method.js.map +1 -1
- package/src/lib/http/core/http-request.d.ts +1 -1
- package/src/lib/http/core/http-response.d.ts +1 -1
- package/src/lib/http/core/media-type.js +1 -1
- package/src/lib/http/core/media-type.js.map +1 -1
- package/src/lib/http/core/query-params.d.ts +1 -1
- package/src/lib/polling/index.d.ts +21 -15
- package/src/lib/polling/index.js +10 -10
- package/src/lib/polling/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/pieces-common",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@sinclair/typebox": "0.26.
|
|
6
|
+
"@sinclair/typebox": "^0.26.3",
|
|
7
7
|
"axios": "1.2.4",
|
|
8
|
-
"nanoid": "3.3.4",
|
|
9
|
-
"@activepieces/pieces-framework": "0.
|
|
10
|
-
"@activepieces/shared": "0.
|
|
11
|
-
"tslib": "
|
|
8
|
+
"nanoid": "^3.3.4",
|
|
9
|
+
"@activepieces/pieces-framework": "0.4.0",
|
|
10
|
+
"@activepieces/shared": "0.4.0",
|
|
11
|
+
"tslib": "1.14.1"
|
|
12
12
|
},
|
|
13
13
|
"main": "./src/index.js",
|
|
14
14
|
"types": "./src/index.d.ts"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Authentication = BearerTokenAuthentication | BasicAuthentication;
|
|
2
2
|
export declare enum AuthenticationType {
|
|
3
3
|
BEARER_TOKEN = "BEARER_TOKEN",
|
|
4
4
|
BASIC = "BASIC"
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type BaseAuthentication<T extends AuthenticationType> = {
|
|
7
7
|
type: T;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type BearerTokenAuthentication = BaseAuthentication<AuthenticationType.BEARER_TOKEN> & {
|
|
10
10
|
token: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type BasicAuthentication = BaseAuthentication<AuthenticationType.BASIC> & {
|
|
13
13
|
username: string;
|
|
14
14
|
password: string;
|
|
15
15
|
};
|
|
@@ -5,5 +5,5 @@ var AuthenticationType;
|
|
|
5
5
|
(function (AuthenticationType) {
|
|
6
6
|
AuthenticationType["BEARER_TOKEN"] = "BEARER_TOKEN";
|
|
7
7
|
AuthenticationType["BASIC"] = "BASIC";
|
|
8
|
-
})(AuthenticationType
|
|
8
|
+
})(AuthenticationType || (exports.AuthenticationType = AuthenticationType = {}));
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/common/src/lib/authentication/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,mDAA6B,CAAA;IAC7B,qCAAe,CAAA;AAChB,CAAC,EAHW,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/common/src/lib/authentication/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,mDAA6B,CAAA;IAC7B,qCAAe,CAAA;AAChB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B"}
|
|
@@ -11,7 +11,7 @@ declare class BearerTokenAuthenticationConverter implements AuthenticationConver
|
|
|
11
11
|
declare class BasicTokenAuthenticationConverter implements AuthenticationConverter<BasicAuthentication> {
|
|
12
12
|
convert(authentication: BasicAuthentication, headers: HttpHeaders): HttpHeaders;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
type AuthenticationConverter<T extends Authentication> = {
|
|
15
15
|
convert: (authentication: T, headers: HttpHeaders) => HttpHeaders;
|
|
16
16
|
};
|
|
17
17
|
export {};
|
|
@@ -2,7 +2,7 @@ import { AxiosHttpClient } from '../axios/axios-http-client';
|
|
|
2
2
|
import type { HttpMessageBody } from './http-message-body';
|
|
3
3
|
import type { HttpRequest } from './http-request';
|
|
4
4
|
import { HttpResponse } from './http-response';
|
|
5
|
-
export
|
|
5
|
+
export type HttpClient = {
|
|
6
6
|
sendRequest<RequestBody extends HttpMessageBody, ResponseBody extends HttpMessageBody>(request: HttpRequest<RequestBody>): Promise<HttpResponse<ResponseBody>>;
|
|
7
7
|
};
|
|
8
8
|
export declare const httpClient: AxiosHttpClient;
|
|
@@ -7,5 +7,5 @@ var HttpHeader;
|
|
|
7
7
|
HttpHeader["ACCEPT"] = "Accept";
|
|
8
8
|
HttpHeader["API_KEY"] = "Api-Key";
|
|
9
9
|
HttpHeader["CONTENT_TYPE"] = "Content-Type";
|
|
10
|
-
})(HttpHeader
|
|
10
|
+
})(HttpHeader || (exports.HttpHeader = HttpHeader = {}));
|
|
11
11
|
//# sourceMappingURL=http-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-header.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/common/src/lib/http/core/http-header.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,6CAA+B,CAAA;IAC/B,+BAAiB,CAAA;IACd,iCAAmB,CAAA;IACtB,2CAA6B,CAAA;AAC9B,CAAC,EALW,UAAU,
|
|
1
|
+
{"version":3,"file":"http-header.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/common/src/lib/http/core/http-header.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,6CAA+B,CAAA;IAC/B,+BAAiB,CAAA;IACd,iCAAmB,CAAA;IACtB,2CAA6B,CAAA;AAC9B,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type HttpHeaders = Record<string, string | string[] | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type HttpMessageBody = Record<string, any>;
|
|
@@ -9,5 +9,5 @@ var HttpMethod;
|
|
|
9
9
|
HttpMethod["PUT"] = "PUT";
|
|
10
10
|
HttpMethod["DELETE"] = "DELETE";
|
|
11
11
|
HttpMethod["HEAD"] = "HEAD";
|
|
12
|
-
})(HttpMethod
|
|
12
|
+
})(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
|
|
13
13
|
//# sourceMappingURL=http-method.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-method.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/common/src/lib/http/core/http-method.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACd,CAAC,EAPW,UAAU,
|
|
1
|
+
{"version":3,"file":"http-method.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/common/src/lib/http/core/http-method.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACd,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB"}
|
|
@@ -3,7 +3,7 @@ import type { HttpMethod } from './http-method';
|
|
|
3
3
|
import type { QueryParams } from './query-params';
|
|
4
4
|
import { HttpHeaders } from './http-headers';
|
|
5
5
|
import { Authentication } from '../../authentication';
|
|
6
|
-
export
|
|
6
|
+
export type HttpRequest<RequestBody extends HttpMessageBody = any> = {
|
|
7
7
|
method: HttpMethod;
|
|
8
8
|
url: string;
|
|
9
9
|
body?: RequestBody | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpMessageBody } from "./http-message-body";
|
|
2
2
|
import { HttpHeaders } from "./http-headers";
|
|
3
|
-
export
|
|
3
|
+
export type HttpResponse<RequestBody extends HttpMessageBody = any> = {
|
|
4
4
|
status: number;
|
|
5
5
|
headers?: HttpHeaders | undefined;
|
|
6
6
|
body: RequestBody;
|
|
@@ -4,5 +4,5 @@ exports.MediaType = void 0;
|
|
|
4
4
|
var MediaType;
|
|
5
5
|
(function (MediaType) {
|
|
6
6
|
MediaType["APPLICATION_JSON"] = "application/json";
|
|
7
|
-
})(MediaType
|
|
7
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
8
8
|
//# sourceMappingURL=media-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-type.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/common/src/lib/http/core/media-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,kDAAqC,CAAA;AACtC,CAAC,EAFW,SAAS,
|
|
1
|
+
{"version":3,"file":"media-type.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/common/src/lib/http/core/media-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,kDAAqC,CAAA;AACtC,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type QueryParams = Record<string, string>;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Store } from "@activepieces/pieces-framework";
|
|
2
|
-
interface TimebasedPolling<
|
|
2
|
+
interface TimebasedPolling<AuthValue, PropsValue> {
|
|
3
3
|
strategy: DedupeStrategy.TIMEBASED;
|
|
4
|
-
items: (
|
|
4
|
+
items: (params: {
|
|
5
|
+
auth: AuthValue;
|
|
5
6
|
store: Store;
|
|
6
|
-
propsValue:
|
|
7
|
+
propsValue: PropsValue;
|
|
7
8
|
lastFetchEpochMS: number;
|
|
8
9
|
}) => Promise<{
|
|
9
10
|
epochMilliSeconds: number;
|
|
10
11
|
data: unknown;
|
|
11
12
|
}[]>;
|
|
12
13
|
}
|
|
13
|
-
interface LastItemPolling<
|
|
14
|
+
interface LastItemPolling<AuthValue, PropsValue> {
|
|
14
15
|
strategy: DedupeStrategy.LAST_ITEM;
|
|
15
|
-
items: (
|
|
16
|
+
items: (params: {
|
|
17
|
+
auth: AuthValue;
|
|
16
18
|
store: Store;
|
|
17
|
-
propsValue:
|
|
19
|
+
propsValue: PropsValue;
|
|
18
20
|
lastItemId: unknown;
|
|
19
21
|
}) => Promise<{
|
|
20
22
|
id: unknown;
|
|
@@ -25,24 +27,28 @@ export declare enum DedupeStrategy {
|
|
|
25
27
|
TIMEBASED = 0,
|
|
26
28
|
LAST_ITEM = 1
|
|
27
29
|
}
|
|
28
|
-
export
|
|
30
|
+
export type Polling<AuthValue, PropsValue> = TimebasedPolling<AuthValue, PropsValue> | LastItemPolling<AuthValue, PropsValue>;
|
|
29
31
|
export declare const pollingHelper: {
|
|
30
|
-
poll<
|
|
32
|
+
poll<AuthValue, PropsValue>(polling: Polling<AuthValue, PropsValue>, { store, auth, propsValue, maxItemsToPoll }: {
|
|
31
33
|
store: Store;
|
|
32
|
-
|
|
34
|
+
auth: AuthValue;
|
|
35
|
+
propsValue: PropsValue;
|
|
33
36
|
maxItemsToPoll?: number | undefined;
|
|
34
37
|
}): Promise<unknown[]>;
|
|
35
|
-
onEnable<
|
|
38
|
+
onEnable<AuthValue_1, PropsValue_1>(polling: Polling<AuthValue_1, PropsValue_1>, { store, auth, propsValue }: {
|
|
36
39
|
store: Store;
|
|
37
|
-
|
|
40
|
+
auth: AuthValue_1;
|
|
41
|
+
propsValue: PropsValue_1;
|
|
38
42
|
}): Promise<void>;
|
|
39
|
-
onDisable<
|
|
43
|
+
onDisable<AuthValue_2, PropsValue_2>(polling: Polling<AuthValue_2, PropsValue_2>, params: {
|
|
40
44
|
store: Store;
|
|
41
|
-
|
|
45
|
+
auth: AuthValue_2;
|
|
46
|
+
propsValue: PropsValue_2;
|
|
42
47
|
}): Promise<void>;
|
|
43
|
-
test<
|
|
48
|
+
test<AuthValue_3, PropsValue_3>(polling: Polling<AuthValue_3, PropsValue_3>, { auth, propsValue, store }: {
|
|
44
49
|
store: Store;
|
|
45
|
-
|
|
50
|
+
auth: AuthValue_3;
|
|
51
|
+
propsValue: PropsValue_3;
|
|
46
52
|
}): Promise<unknown[]>;
|
|
47
53
|
};
|
|
48
54
|
export {};
|
package/src/lib/polling/index.js
CHANGED
|
@@ -7,22 +7,22 @@ var DedupeStrategy;
|
|
|
7
7
|
(function (DedupeStrategy) {
|
|
8
8
|
DedupeStrategy[DedupeStrategy["TIMEBASED"] = 0] = "TIMEBASED";
|
|
9
9
|
DedupeStrategy[DedupeStrategy["LAST_ITEM"] = 1] = "LAST_ITEM";
|
|
10
|
-
})(DedupeStrategy
|
|
10
|
+
})(DedupeStrategy || (exports.DedupeStrategy = DedupeStrategy = {}));
|
|
11
11
|
exports.pollingHelper = {
|
|
12
|
-
poll(polling, { store, propsValue, maxItemsToPoll }) {
|
|
12
|
+
poll(polling, { store, auth, propsValue, maxItemsToPoll }) {
|
|
13
13
|
var _a, _b, _c;
|
|
14
14
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
15
|
switch (polling.strategy) {
|
|
16
16
|
case DedupeStrategy.TIMEBASED: {
|
|
17
17
|
const lastEpochMilliSeconds = (_a = (yield store.get("lastPoll"))) !== null && _a !== void 0 ? _a : 0;
|
|
18
|
-
const items = yield polling.items({ store, propsValue, lastFetchEpochMS: lastEpochMilliSeconds });
|
|
18
|
+
const items = yield polling.items({ store, auth, propsValue, lastFetchEpochMS: lastEpochMilliSeconds });
|
|
19
19
|
const newLastEpochMilliSeconds = items.reduce((acc, item) => Math.max(acc, item.epochMilliSeconds), lastEpochMilliSeconds);
|
|
20
20
|
yield store.put("lastPoll", newLastEpochMilliSeconds);
|
|
21
21
|
return items.filter(f => f.epochMilliSeconds > lastEpochMilliSeconds).map((item) => item.data);
|
|
22
22
|
}
|
|
23
23
|
case DedupeStrategy.LAST_ITEM: {
|
|
24
24
|
const lastItemId = (yield store.get("lastItem"));
|
|
25
|
-
const items = yield polling.items({ store, propsValue, lastItemId });
|
|
25
|
+
const items = yield polling.items({ store, auth, propsValue, lastItemId });
|
|
26
26
|
const lastItemIndex = items.findIndex(f => f.id === lastItemId);
|
|
27
27
|
let newItems = [];
|
|
28
28
|
if ((0, shared_1.isNil)(lastItemId) || lastItemIndex == -1) {
|
|
@@ -45,7 +45,7 @@ exports.pollingHelper = {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
},
|
|
48
|
-
onEnable(polling, { store, propsValue }) {
|
|
48
|
+
onEnable(polling, { store, auth, propsValue }) {
|
|
49
49
|
var _a;
|
|
50
50
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
51
|
switch (polling.strategy) {
|
|
@@ -54,7 +54,7 @@ exports.pollingHelper = {
|
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
56
|
case DedupeStrategy.LAST_ITEM: {
|
|
57
|
-
const items = (yield polling.items({ store, propsValue, lastItemId: null }));
|
|
57
|
+
const items = (yield polling.items({ store, auth, propsValue, lastItemId: null }));
|
|
58
58
|
const lastItemId = (_a = items === null || items === void 0 ? void 0 : items[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
59
59
|
if (!(0, shared_1.isNil)(lastItemId)) {
|
|
60
60
|
yield store.put("lastItem", lastItemId);
|
|
@@ -67,7 +67,7 @@ exports.pollingHelper = {
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
|
-
onDisable(polling,
|
|
70
|
+
onDisable(polling, params) {
|
|
71
71
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
72
72
|
switch (polling.strategy) {
|
|
73
73
|
case DedupeStrategy.TIMEBASED:
|
|
@@ -76,16 +76,16 @@ exports.pollingHelper = {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
|
-
test(polling, {
|
|
79
|
+
test(polling, { auth, propsValue, store }) {
|
|
80
80
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
81
81
|
let items = [];
|
|
82
82
|
switch (polling.strategy) {
|
|
83
83
|
case DedupeStrategy.TIMEBASED: {
|
|
84
|
-
items = yield polling.items({ store, propsValue, lastFetchEpochMS: 0 });
|
|
84
|
+
items = yield polling.items({ store, auth, propsValue, lastFetchEpochMS: 0 });
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
case DedupeStrategy.LAST_ITEM: {
|
|
88
|
-
items = yield polling.items({ store
|
|
88
|
+
items = yield polling.items({ store, auth, propsValue, lastItemId: null });
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/common/src/lib/polling/index.ts"],"names":[],"mappings":";;;;AACA,iDAA4C;AAwB5C,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,6DAAS,CAAA;IACT,6DAAS,CAAA;AACb,CAAC,EAHW,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/common/src/lib/polling/index.ts"],"names":[],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