@or-sdk/sdk-api 0.28.3-beta.4136.0 → 0.29.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/SdkApi.d.ts +0 -8
- package/dist/types/SdkApi.d.ts.map +1 -1
- package/dist/types/types.d.ts +0 -22
- package/dist/types/types.d.ts.map +1 -1
- package/package.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
|
+
## [0.29.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/sdk-api@0.28.2...@or-sdk/sdk-api@0.29.0) (2026-05-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **sdk-api:** add generateLegacyToken endpoint ([b1be6cf](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/b1be6cfdabe8778077b392d9134113ddf850b4cc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [0.28.2](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/sdk-api@0.28.1...@or-sdk/sdk-api@0.28.2) (2026-04-30)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @or-sdk/sdk-api
|
package/dist/types/SdkApi.d.ts
CHANGED
|
@@ -3,14 +3,6 @@ import { GenerateLegacyTokenParams, GenerateLegacyTokenResponse, SdkApiConfig }
|
|
|
3
3
|
export declare class SdkApi extends Base {
|
|
4
4
|
constructor(params: SdkApiConfig);
|
|
5
5
|
makeRequest<T>(params: CalApiParams): Promise<T>;
|
|
6
|
-
/**
|
|
7
|
-
* Exchange an API token for a 30-min legacy user token with USER role
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const { token, expire } = await sdkApi.generateLegacyToken();
|
|
11
|
-
* const { token, expire } = await sdkApi.generateLegacyToken({ userId });
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
6
|
generateLegacyToken(params?: GenerateLegacyTokenParams): Promise<GenerateLegacyTokenResponse>;
|
|
15
7
|
protected normalizeRoute(route: string): string;
|
|
16
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkApi.d.ts","sourceRoot":"","sources":["../../src/SdkApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,qBAAa,MAAO,SAAQ,IAAI;gBAElB,MAAM,EAAE,YAAY;IAYnB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SdkApi.d.ts","sourceRoot":"","sources":["../../src/SdkApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,qBAAa,MAAO,SAAQ,IAAI;gBAElB,MAAM,EAAE,YAAY;IAYnB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;IAYhD,mBAAmB,CAC9B,MAAM,GAAE,yBAA8B,GACrC,OAAO,CAAC,2BAA2B,CAAC;IAQvC,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAQhD"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
import { Token } from '@or-sdk/base';
|
|
2
2
|
export type GenerateLegacyTokenParams = {
|
|
3
|
-
/**
|
|
4
|
-
* userId for the generated token – must be an active user with role USER in the api-token's account
|
|
5
|
-
* Optional when the api-token's `createdBy` user already satisfies that requirement
|
|
6
|
-
*/
|
|
7
3
|
userId?: string;
|
|
8
4
|
};
|
|
9
5
|
export type GenerateLegacyTokenResponse = {
|
|
10
|
-
/**
|
|
11
|
-
* Raw legacy user token
|
|
12
|
-
*/
|
|
13
6
|
token: string;
|
|
14
|
-
/**
|
|
15
|
-
* Unix-ms timestamp when the token expires
|
|
16
|
-
*/
|
|
17
7
|
expire: number;
|
|
18
8
|
};
|
|
19
9
|
export type SdkApiConfig = {
|
|
20
|
-
/**
|
|
21
|
-
* token
|
|
22
|
-
*/
|
|
23
10
|
token: Token;
|
|
24
|
-
/**
|
|
25
|
-
* Url of OneReach service discovery api
|
|
26
|
-
*/
|
|
27
11
|
discoveryUrl?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Account ID for cross-account requests (super admin only)
|
|
30
|
-
*/
|
|
31
12
|
accountId?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Url of OneReach SDK api
|
|
34
|
-
*/
|
|
35
13
|
sdkUrl?: string;
|
|
36
14
|
};
|
|
37
15
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,yBAAyB,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,yBAAyB,GAAG;IAKtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IAIxC,KAAK,EAAE,MAAM,CAAC;IAKd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAIzB,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/sdk-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -26,5 +26,6 @@
|
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"gitHead": "180ec71c70b831e306e144f2616f081caa2083c2"
|
|
30
31
|
}
|