@or-sdk/store 0.5.0 → 0.6.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/dist/cjs/Store.js.map +1 -1
- package/dist/esm/Store.js.map +1 -1
- package/package.json +3 -3
- package/src/Store.ts +10 -1
package/dist/cjs/Store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,yCAA0C;
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,yCAA0C;AAQ1C;IAA2B,yBAAI;IAQ7B,eAAY,MAAmB;QAA/B,iBAUC;QATS,IAAA,KAAK,GAAgC,MAAM,MAAtC,EAAE,YAAY,GAAkB,MAAM,aAAxB,EAAE,WAAW,GAAK,MAAM,YAAX,CAAY;QAEpD,QAAA,kBAAM;YACJ,YAAY,cAAA;YACZ,KAAK,OAAA;YACL,UAAU,EAAE,uBAAW;SACxB,CAAC,SAAC;QAEH,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACjC,CAAC;IAQY,oCAAoB,GAAjC,UAAkC,OAAkB;;;gBAClD,WAAO,IAAI,CAAC,OAAO,CAAC;wBAClB,MAAM,EAAE,MAAM;wBACd,KAAK,EAAE,sBAAoB,IAAI,CAAC,WAAW,YAAO,OAAO,CAAC,EAAE,iBAAY,OAAO,CAAC,OAAS;wBACzF,IAAI,EAAE,OAAO;qBACd,CAAC,EAAC;;;KACJ;IACH,YAAC;AAAD,CAAC,AAjCD,CAA2B,WAAI,GAiC9B;AAjCY,sBAAK"}
|
package/dist/esm/Store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/Store.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ1C,MAAM,OAAO,KAAM,SAAQ,IAAI;IAQ7B,YAAY,MAAmB;QAC7B,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAEpD,KAAK,CAAC;YACJ,YAAY;YACZ,KAAK;YACL,UAAU,EAAE,WAAW;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAQY,oBAAoB,CAAC,OAAkB;;YAClD,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,oBAAoB,IAAI,CAAC,WAAW,OAAO,OAAO,CAAC,EAAE,YAAY,OAAO,CAAC,OAAO,EAAE;gBACzF,IAAI,EAAE,OAAO;aACd,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.6.0",
|
|
3
3
|
"name": "@or-sdk/store",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@or-sdk/base": "^0.
|
|
26
|
+
"@or-sdk/base": "^0.6.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "638b7198f7b70373ea8a3248443cfd2d2d13faa2"
|
|
29
29
|
}
|
package/src/Store.ts
CHANGED
|
@@ -3,13 +3,16 @@ import { StoreConfig, GetParams, UploadCredentials } from './types';
|
|
|
3
3
|
import { SERVICE_KEY } from './constants';
|
|
4
4
|
/**
|
|
5
5
|
* Store client
|
|
6
|
+
* ## Installation:
|
|
7
|
+
* ```
|
|
8
|
+
* $ npm i @or-sdk/store
|
|
9
|
+
* ```
|
|
6
10
|
*/
|
|
7
11
|
export class Store extends Base {
|
|
8
12
|
private readonly packageType: string;
|
|
9
13
|
|
|
10
14
|
/**
|
|
11
15
|
* ```typescript
|
|
12
|
-
*
|
|
13
16
|
* const storeApi = new Store({token: 'my-account-token-string'});
|
|
14
17
|
* ```
|
|
15
18
|
*/
|
|
@@ -25,6 +28,12 @@ export class Store extends Base {
|
|
|
25
28
|
this.packageType = packageType;
|
|
26
29
|
}
|
|
27
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Get upload credentials
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const result = await storeApi.getUploadCredentials({ id: 'id', version: 'version' });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
28
37
|
public async getUploadCredentials(payload: GetParams): Promise<UploadCredentials> {
|
|
29
38
|
return this.callApi({
|
|
30
39
|
method: 'POST',
|