@qelos/sdk 3.6.6 → 3.7.1
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/administrator/manage-layouts.d.ts +4 -4
- package/dist/administrator/manage-layouts.js +5 -5
- package/dist/administrator/manage-layouts.js.map +1 -1
- package/dist/blueprints-entities.d.ts +6 -6
- package/dist/blueprints-entities.js +13 -11
- package/dist/blueprints-entities.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QelosSDKOptions } from
|
|
2
|
-
import BaseSDK from
|
|
1
|
+
import { QelosSDKOptions, RequestExtra } from '../types';
|
|
2
|
+
import BaseSDK from '../base-sdk';
|
|
3
3
|
import { ILayout, LayoutKind } from './layouts';
|
|
4
4
|
export default class QlManageLayouts extends BaseSDK {
|
|
5
5
|
private relativePath;
|
|
@@ -7,6 +7,6 @@ export default class QlManageLayouts extends BaseSDK {
|
|
|
7
7
|
getLayout(kind: LayoutKind, extra?: Partial<RequestInit>): Promise<ILayout>;
|
|
8
8
|
getList(extra?: Partial<RequestInit>): Promise<ILayout[]>;
|
|
9
9
|
remove(kind: LayoutKind, extra?: Partial<RequestInit>): Promise<any>;
|
|
10
|
-
update(kind: LayoutKind, changes: Partial<ILayout>, extra?:
|
|
11
|
-
create(layout: ILayout, extra?:
|
|
10
|
+
update(kind: LayoutKind, changes: Partial<ILayout>, extra?: RequestExtra): Promise<ILayout>;
|
|
11
|
+
create(layout: ILayout, extra?: RequestExtra): Promise<ILayout>;
|
|
12
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BaseSDK from
|
|
1
|
+
import BaseSDK from '../base-sdk';
|
|
2
2
|
export default class QlManageLayouts extends BaseSDK {
|
|
3
|
-
relativePath =
|
|
3
|
+
relativePath = '/api/layouts';
|
|
4
4
|
constructor(options) {
|
|
5
5
|
super(options);
|
|
6
6
|
}
|
|
@@ -12,13 +12,13 @@ export default class QlManageLayouts extends BaseSDK {
|
|
|
12
12
|
}
|
|
13
13
|
remove(kind, extra) {
|
|
14
14
|
return this.callApi(`${this.relativePath}/${kind}`, {
|
|
15
|
-
method:
|
|
15
|
+
method: 'delete',
|
|
16
16
|
...(extra || {}),
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
update(kind, changes, extra) {
|
|
20
20
|
return this.callJsonApi(`${this.relativePath}/${kind}`, {
|
|
21
|
-
method:
|
|
21
|
+
method: 'put',
|
|
22
22
|
headers: { 'content-type': 'application/json' },
|
|
23
23
|
body: JSON.stringify(changes),
|
|
24
24
|
...(extra || {}),
|
|
@@ -26,7 +26,7 @@ export default class QlManageLayouts extends BaseSDK {
|
|
|
26
26
|
}
|
|
27
27
|
create(layout, extra) {
|
|
28
28
|
return this.callJsonApi(this.relativePath, {
|
|
29
|
-
method:
|
|
29
|
+
method: 'post',
|
|
30
30
|
headers: { 'content-type': 'application/json' },
|
|
31
31
|
body: JSON.stringify(layout),
|
|
32
32
|
...(extra || {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage-layouts.js","sourceRoot":"","sources":["../../src/administrator/manage-layouts.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAC1C,YAAY,GAAG,cAAc,CAAC;IAEtC,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,SAAS,CAAC,IAAgB,EAAE,KAA4B;QACtD,OAAO,IAAI,CAAC,WAAW,CAAU,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,CAAC,KAA4B;QAClC,OAAO,IAAI,CAAC,WAAW,CAAY,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,IA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IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC7B,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACjB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,MAAe,EAAE,KAAoB;QAC1C,OAAO,IAAI,CAAC,WAAW,CAAU,IAAI,CAAC,YAAY,EAAE;YAClD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAC5B,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SACjB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QelosSDKOptions } from './types';
|
|
1
|
+
import { QelosSDKOptions, RequestExtra } from './types';
|
|
2
2
|
import BaseSDK from './base-sdk';
|
|
3
3
|
import type { ICommonQueryFilters } from '@qelos/global-types';
|
|
4
4
|
export default class QlBlueprintEntities<T = any> extends BaseSDK {
|
|
@@ -6,9 +6,9 @@ export default class QlBlueprintEntities<T = any> extends BaseSDK {
|
|
|
6
6
|
private blueprintKey;
|
|
7
7
|
private relativePath;
|
|
8
8
|
constructor(options: QelosSDKOptions, blueprintKey: string);
|
|
9
|
-
getEntity(identifier: string): Promise<T>;
|
|
10
|
-
getList(query?: ICommonQueryFilters & Record<string, any
|
|
11
|
-
remove(identifier: string): Promise<any>;
|
|
12
|
-
update(identifier: string, changes: Partial<T
|
|
13
|
-
create(entity: T): Promise<T>;
|
|
9
|
+
getEntity(identifier: string, extra?: RequestExtra): Promise<T>;
|
|
10
|
+
getList(query?: ICommonQueryFilters & Record<string, any>, extra?: RequestExtra): Promise<T[]>;
|
|
11
|
+
remove(identifier: string, extra?: RequestExtra): Promise<any>;
|
|
12
|
+
update(identifier: string, changes: Partial<T>, extra?: RequestExtra): Promise<T>;
|
|
13
|
+
create(entity: T, extra?: Partial<RequestInit>): Promise<T>;
|
|
14
14
|
}
|
|
@@ -8,27 +8,29 @@ export default class QlBlueprintEntities extends BaseSDK {
|
|
|
8
8
|
this.options = options;
|
|
9
9
|
this.blueprintKey = blueprintKey;
|
|
10
10
|
}
|
|
11
|
-
getEntity(identifier) {
|
|
12
|
-
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities/${identifier}${this.getQueryParams()}
|
|
11
|
+
getEntity(identifier, extra) {
|
|
12
|
+
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities/${identifier}${this.getQueryParams(extra?.query)}`, extra);
|
|
13
13
|
}
|
|
14
|
-
getList(query) {
|
|
15
|
-
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities${this.getQueryParams(query)}
|
|
14
|
+
getList(query, extra) {
|
|
15
|
+
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities${this.getQueryParams(query)}`, extra);
|
|
16
16
|
}
|
|
17
|
-
remove(identifier) {
|
|
18
|
-
return this.callApi(`${this.relativePath}/${this.blueprintKey}/entities/${identifier}${this.getQueryParams()}`, { method: 'delete' });
|
|
17
|
+
remove(identifier, extra) {
|
|
18
|
+
return this.callApi(`${this.relativePath}/${this.blueprintKey}/entities/${identifier}${this.getQueryParams(extra?.query)}`, { method: 'delete' });
|
|
19
19
|
}
|
|
20
|
-
update(identifier, changes) {
|
|
21
|
-
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities/${identifier}${this.getQueryParams()}`, {
|
|
20
|
+
update(identifier, changes, extra) {
|
|
21
|
+
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities/${identifier}${this.getQueryParams(extra?.query)}`, {
|
|
22
22
|
method: 'put',
|
|
23
23
|
headers: { 'content-type': 'application/json' },
|
|
24
|
-
body: JSON.stringify(changes)
|
|
24
|
+
body: JSON.stringify(changes),
|
|
25
|
+
...(extra || {}),
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
create(entity) {
|
|
28
|
+
create(entity, extra) {
|
|
28
29
|
return this.callJsonApi(`${this.relativePath}/${this.blueprintKey}/entities${this.getQueryParams()}`, {
|
|
29
30
|
method: 'post',
|
|
30
31
|
headers: { 'content-type': 'application/json' },
|
|
31
|
-
body: JSON.stringify(entity)
|
|
32
|
+
body: JSON.stringify(entity),
|
|
33
|
+
...(extra || {}),
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprints-entities.js","sourceRoot":"","sources":["../src/blueprints-entities.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,YAAY,CAAC;AAGjC,MAAM,CAAC,OAAO,OAAO,mBAA6B,SAAQ,OAAO;IAG3C;IAAkC;IAF9C,YAAY,GAAG,iBAAiB,CAAC;IAEzC,YAAoB,OAAwB,EAAU,YAAoB;QACxE,KAAK,CAAC,OAAO,CAAC,CAAA;QADI,YAAO,GAAP,OAAO,CAAiB;QAAU,iBAAY,GAAZ,YAAY,CAAQ;IAE1E,CAAC;IAED,SAAS,CAAC,UAAkB;
|
|
1
|
+
{"version":3,"file":"blueprints-entities.js","sourceRoot":"","sources":["../src/blueprints-entities.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,YAAY,CAAC;AAGjC,MAAM,CAAC,OAAO,OAAO,mBAA6B,SAAQ,OAAO;IAG3C;IAAkC;IAF9C,YAAY,GAAG,iBAAiB,CAAC;IAEzC,YAAoB,OAAwB,EAAU,YAAoB;QACxE,KAAK,CAAC,OAAO,CAAC,CAAA;QADI,YAAO,GAAP,OAAO,CAAiB;QAAU,iBAAY,GAAZ,YAAY,CAAQ;IAE1E,CAAC;IAED,SAAS,CAAC,UAAkB,EAAE,KAAoB;QAChD,OAAO,IAAI,CAAC,WAAW,CAAI,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,aAAa,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IAC3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CAAA;IACJ,CAAC;CACF"}
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qelos/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.1",
|
|
4
4
|
"description": "SDK for Qelos API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@qelos/global-types": "^3.
|
|
16
|
+
"@qelos/global-types": "^3.7.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"tsx": "^3.12.7",
|
|
20
20
|
"typescript": "^4.9.5"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "347151661e63696bccfb80f6b343a7a5bbce3924"
|
|
23
23
|
}
|