@or-sdk/keys 1.1.14 → 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/CHANGELOG.md +9 -0
- package/dist/types/Keys.d.ts +56 -0
- package/dist/types/Keys.d.ts.map +1 -1
- package/dist/types/types.d.ts +18 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/tsconfig.types.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/keys@1.1.14...@or-sdk/keys@1.2.0) (2026-02-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **deployer:** Add methods 'fetchFlowLogsChunk' and 'fetchAllFlowLogs' to fetch flow logs ([6b70992](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/6b70992ce3d1e4f308db69df700528f6eeffafcf))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [1.1.14](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/keys@1.1.13...@or-sdk/keys@1.1.14) (2026-01-15)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @or-sdk/keys
|
package/dist/types/Keys.d.ts
CHANGED
|
@@ -1,13 +1,69 @@
|
|
|
1
1
|
import type * as Types from './types';
|
|
2
|
+
/**
|
|
3
|
+
* OneReach Keys service client
|
|
4
|
+
* ## Installation:
|
|
5
|
+
* ```
|
|
6
|
+
* $ npm i @or-sdk/keys
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
2
9
|
export declare class Keys {
|
|
3
10
|
private readonly sdkApi;
|
|
4
11
|
constructor(params: Types.KeysConfig);
|
|
12
|
+
/**
|
|
13
|
+
* List account secrets
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const result = await keys.scrollKeys({limit:10,next:''});
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
5
18
|
scrollKeys({ accountId, limit, next, }?: Types.ListSecretsParams): Promise<Types.ListSecretsResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* List all account keys
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const result = await keys.listAllKeys();
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Or you can filter by key type
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const result = await keys.listAllKeys({keyType: 'PerplexityAI'});
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
6
30
|
listAllKeys({ keyType, accountId, }?: Types.ListAllKeysParams): Promise<Types.GetKeyResponse[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Get account key
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const result = await keys.getKey({key});
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
7
37
|
getKey({ accountId, key }: Types.GetKeyParams): Promise<Types.GetKeyResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Create account key
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const expireTime = Date.now() + 1000 * 60 * 60 * 24 * 365; // 1 year
|
|
42
|
+
* const result = await keys.createKey({key, secret, type, expireTime, meta});
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
8
45
|
createKey({ accountId, key, secret, type, expireTime, meta, }: Types.CreateKeyParams): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Update account key
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const expireTime = Date.now() + 1000 * 60 * 60 * 24 * 365; // 1 year
|
|
50
|
+
* const result = await keys.updateKey({key, expireTime, meta});
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
9
53
|
updateKey({ accountId, key, expireTime, meta }: Types.UpdateKeyParams): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Update account key secret
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const result = await keys.updateKeySecret({key, secret});
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
10
60
|
updateKeySecret({ accountId, key, secret }: Types.UpdateKeySecretParams): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete account key
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const result = await keys.deleteKey({key});
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
11
67
|
deleteKey({ accountId, key }: Types.DeleteSecretParams): Promise<void>;
|
|
12
68
|
}
|
|
13
69
|
//# sourceMappingURL=Keys.d.ts.map
|
package/dist/types/Keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keys.d.ts","sourceRoot":"","sources":["../../src/Keys.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Keys.d.ts","sourceRoot":"","sources":["../../src/Keys.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,SAAS,CAAC;AAEtC;;;;;;GAMG;AACH,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,MAAM,EAAE,KAAK,CAAC,UAAU;IAUpC;;;;;OAKG;IACU,UAAU,CAAC,EACtB,SAAqB,EACrB,KAAU,EACV,IAAI,GACL,GAAS,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC;IAkBtE;;;;;;;;;;OAUG;IACU,WAAW,CAAC,EACvB,OAAO,EACP,SAAqB,GACtB,GAAS,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;IAiBnE;;;;;OAKG;IACU,MAAM,CAAC,EAAE,SAAqB,EAAE,GAAG,EAAE,EAAE,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC;IAOtG;;;;;;OAMG;IACU,SAAS,CAAC,EACrB,SAAqB,EACrB,GAAG,EACH,MAAM,EACN,IAAI,EACJ,UAAU,EACV,IAAI,GACL,EAAE,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAexC;;;;;;OAMG;IACU,SAAS,CAAC,EAAE,SAAqB,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAa9G;;;;;OAKG;IACU,eAAe,CAAC,EAAE,SAAqB,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAahH;;;;;OAKG;IACU,SAAS,CAAC,EAAE,SAAqB,EAAE,GAAG,EAAE,EAAE,KAAK,CAAC,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOhG"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { Token } from '@or-sdk/base';
|
|
2
2
|
export type KeysConfig = {
|
|
3
|
+
/**
|
|
4
|
+
* token
|
|
5
|
+
*/
|
|
3
6
|
token: Token;
|
|
7
|
+
/**
|
|
8
|
+
* Url of OneReach service discovery api
|
|
9
|
+
*/
|
|
4
10
|
discoveryUrl?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Account ID for cross-account requests (super admin only)
|
|
13
|
+
*/
|
|
5
14
|
accountId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Url of OneReach SDK api
|
|
17
|
+
*/
|
|
6
18
|
sdkUrl?: string;
|
|
7
19
|
};
|
|
8
20
|
export type ListSecretsResponse = {
|
|
@@ -49,6 +61,9 @@ export type CreateKeyParams = {
|
|
|
49
61
|
key: string;
|
|
50
62
|
secret: unknown;
|
|
51
63
|
type: string;
|
|
64
|
+
/**
|
|
65
|
+
* timestamp like Date.now()
|
|
66
|
+
*/
|
|
52
67
|
expireTime?: number;
|
|
53
68
|
meta?: {
|
|
54
69
|
[key: string]: unknown;
|
|
@@ -57,6 +72,9 @@ export type CreateKeyParams = {
|
|
|
57
72
|
export type UpdateKeyParams = {
|
|
58
73
|
accountId?: string;
|
|
59
74
|
key: string;
|
|
75
|
+
/**
|
|
76
|
+
* timestamp like Date.now()
|
|
77
|
+
*/
|
|
60
78
|
expireTime?: number;
|
|
61
79
|
meta?: {
|
|
62
80
|
[key: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,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AAC;AAGF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/keys",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "pnpm clean && pnpm
|
|
9
|
+
"build": "pnpm clean && concurrently 'pnpm:build:*(!watch)'",
|
|
10
10
|
"build:cjs": "tsc --project tsconfig.json",
|
|
11
11
|
"build:esm": "tsc --project tsconfig.esm.json",
|
|
12
12
|
"build:types": "tsc --project tsconfig.types.json",
|
|
13
|
-
"build:watch": "concurrently
|
|
13
|
+
"build:watch": "concurrently 'pnpm:build:watch:*'",
|
|
14
14
|
"build:watch:cjs": "tsc --project tsconfig.json -w",
|
|
15
15
|
"build:watch:esm": "tsc --project tsconfig.esm.json -w",
|
|
16
16
|
"build:watch:types": "tsc --project tsconfig.types.json -w",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dev": "pnpm build:watch:esm"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@or-sdk/sdk-api": "^0.
|
|
21
|
+
"@or-sdk/sdk-api": "^0.27.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"concurrently": "9.0.1",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "ce62679c119c54ef41fd0d8f7084c563c3b21b24"
|
|
31
31
|
}
|