rotacloud 1.0.49 → 1.0.52
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/interfaces/terminal.interface.d.ts +1 -1
- package/dist/cjs/models/terminal.model.d.ts +2 -2
- package/dist/cjs/services/terminals.service.d.ts +5 -0
- package/dist/cjs/services/terminals.service.js +5 -0
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/terminal.interface.d.ts +1 -1
- package/dist/mjs/models/terminal.model.d.ts +2 -2
- package/dist/mjs/services/terminals.service.d.ts +5 -0
- package/dist/mjs/services/terminals.service.js +5 -0
- package/dist/mjs/version.js +1 -1
- package/package.json +1 -1
- package/src/interfaces/terminal.interface.ts +1 -1
- package/src/models/terminal.model.ts +2 -2
- package/src/services/terminals.service.ts +9 -0
- package/src/version.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiTerminalLocation, ApiTerminal } from '../interfaces/index.js';
|
|
2
2
|
export declare class Terminal {
|
|
3
3
|
id: number;
|
|
4
4
|
deleted: boolean;
|
|
@@ -8,7 +8,7 @@ export declare class Terminal {
|
|
|
8
8
|
device: string | null;
|
|
9
9
|
version: string | null;
|
|
10
10
|
ip: string | null;
|
|
11
|
-
location:
|
|
11
|
+
location: ApiTerminalLocation | null;
|
|
12
12
|
timezone: number;
|
|
13
13
|
require_photo: boolean;
|
|
14
14
|
require_photo_breaks: boolean;
|
|
@@ -20,6 +20,11 @@ declare class TerminalsService extends Service {
|
|
|
20
20
|
rawResponse: true;
|
|
21
21
|
} & Options): Promise<AxiosResponse<ApiTerminal, any>>;
|
|
22
22
|
update(id: number, data: Partial<ApiTerminal>, options: Options): Promise<Terminal>;
|
|
23
|
+
closeTerminal(id: number): Promise<number>;
|
|
24
|
+
closeTerminal(id: number, options: {
|
|
25
|
+
rawResponse: true;
|
|
26
|
+
} & Options): Promise<AxiosResponse<number, any>>;
|
|
27
|
+
closeTerminal(id: number, options: Options): Promise<number>;
|
|
23
28
|
list(options?: Options): AsyncGenerator<Terminal, void, unknown>;
|
|
24
29
|
listAll(options?: Options): Promise<Terminal[]>;
|
|
25
30
|
listByPage(options?: Options): AsyncGenerator<AxiosResponse<ApiTerminal[], any>, any, unknown>;
|
|
@@ -55,6 +55,11 @@ class TerminalsService extends index_js_1.Service {
|
|
|
55
55
|
})
|
|
56
56
|
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new terminal_model_js_1.Terminal(res.data)));
|
|
57
57
|
}
|
|
58
|
+
closeTerminal(id, options) {
|
|
59
|
+
return super
|
|
60
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
61
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
62
|
+
}
|
|
58
63
|
list(options) {
|
|
59
64
|
const _super = Object.create(null, {
|
|
60
65
|
iterator: { get: () => super.iterator }
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiTerminalLocation, ApiTerminal } from '../interfaces/index.js';
|
|
2
2
|
export declare class Terminal {
|
|
3
3
|
id: number;
|
|
4
4
|
deleted: boolean;
|
|
@@ -8,7 +8,7 @@ export declare class Terminal {
|
|
|
8
8
|
device: string | null;
|
|
9
9
|
version: string | null;
|
|
10
10
|
ip: string | null;
|
|
11
|
-
location:
|
|
11
|
+
location: ApiTerminalLocation | null;
|
|
12
12
|
timezone: number;
|
|
13
13
|
require_photo: boolean;
|
|
14
14
|
require_photo_breaks: boolean;
|
|
@@ -20,6 +20,11 @@ declare class TerminalsService extends Service {
|
|
|
20
20
|
rawResponse: true;
|
|
21
21
|
} & Options): Promise<AxiosResponse<ApiTerminal, any>>;
|
|
22
22
|
update(id: number, data: Partial<ApiTerminal>, options: Options): Promise<Terminal>;
|
|
23
|
+
closeTerminal(id: number): Promise<number>;
|
|
24
|
+
closeTerminal(id: number, options: {
|
|
25
|
+
rawResponse: true;
|
|
26
|
+
} & Options): Promise<AxiosResponse<number, any>>;
|
|
27
|
+
closeTerminal(id: number, options: Options): Promise<number>;
|
|
23
28
|
list(options?: Options): AsyncGenerator<Terminal, void, unknown>;
|
|
24
29
|
listAll(options?: Options): Promise<Terminal[]>;
|
|
25
30
|
listByPage(options?: Options): AsyncGenerator<AxiosResponse<ApiTerminal[], any>, any, unknown>;
|
|
@@ -24,6 +24,11 @@ class TerminalsService extends Service {
|
|
|
24
24
|
})
|
|
25
25
|
.then((res) => Promise.resolve(options?.rawResponse ? res : new Terminal(res.data)));
|
|
26
26
|
}
|
|
27
|
+
closeTerminal(id, options) {
|
|
28
|
+
return super
|
|
29
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
30
|
+
.then((res) => Promise.resolve(options?.rawResponse ? res : res.status));
|
|
31
|
+
}
|
|
27
32
|
async *list(options) {
|
|
28
33
|
for await (const res of super.iterator({ url: this.apiPath }, options)) {
|
|
29
34
|
yield new Terminal(res);
|
package/dist/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.52' };
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiTerminalLocation, ApiTerminal } from '../interfaces/index.js';
|
|
2
2
|
|
|
3
3
|
export class Terminal {
|
|
4
4
|
public id: number;
|
|
@@ -9,7 +9,7 @@ export class Terminal {
|
|
|
9
9
|
public device: string | null;
|
|
10
10
|
public version: string | null;
|
|
11
11
|
public ip: string | null;
|
|
12
|
-
public location:
|
|
12
|
+
public location: ApiTerminalLocation | null;
|
|
13
13
|
public timezone: number;
|
|
14
14
|
public require_photo: boolean;
|
|
15
15
|
public require_photo_breaks: boolean;
|
|
@@ -47,6 +47,15 @@ class TerminalsService extends Service {
|
|
|
47
47
|
.then((res) => Promise.resolve(options?.rawResponse ? res : new Terminal(res.data)));
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
closeTerminal(id: number): Promise<number>;
|
|
51
|
+
closeTerminal(id: number, options: { rawResponse: true } & Options): Promise<AxiosResponse<number, any>>;
|
|
52
|
+
closeTerminal(id: number, options: Options): Promise<number>;
|
|
53
|
+
closeTerminal(id: number, options?: Options) {
|
|
54
|
+
return super
|
|
55
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
56
|
+
.then((res) => Promise.resolve(options?.rawResponse ? res : res.status));
|
|
57
|
+
}
|
|
58
|
+
|
|
50
59
|
async *list(options?: Options) {
|
|
51
60
|
for await (const res of super.iterator<ApiTerminal>({ url: this.apiPath }, options)) {
|
|
52
61
|
yield new Terminal(res);
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.52' };
|