@nomalism-com/api 0.16.20 → 0.16.22
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.
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { EmailLog as Entity, shared } from '@nomalism-com/types';
|
|
2
2
|
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IEntity = Entity.Entity;
|
|
4
3
|
export import IEmailAttachment = Entity.IEmailAttachment;
|
|
5
4
|
export import IEmailAddress = Entity.IEmailAddress;
|
|
6
5
|
export import IFindByIdResponse = Entity.IFindByIdResponse;
|
|
7
6
|
export import IFindRequest = Entity.IFindRequest;
|
|
8
7
|
export import IFindResponse = Entity.IFindResponse;
|
|
9
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
10
8
|
export default class Repository implements Entity.IApi {
|
|
11
9
|
route: string;
|
|
12
10
|
publicRoute: string;
|
|
@@ -4,7 +4,6 @@ export import IEntity = Entity.Entity;
|
|
|
4
4
|
export import IEntityExtended = Entity.IEntityExtended;
|
|
5
5
|
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
6
|
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
7
|
-
export import ISendAttachment = Entity.ISendAttachment;
|
|
8
7
|
export import ISendRequest = Entity.ISendRequest;
|
|
9
8
|
export default class Repository implements Entity.IRepository {
|
|
10
9
|
route: string;
|
|
@@ -6,6 +6,7 @@ export import IFindLinesInPrisonResponse = Entity.IFindLinesInPrisonResponse;
|
|
|
6
6
|
export import ICheckLineInPrisonOptions = Entity.ICheckLineInPrisonOptions;
|
|
7
7
|
export import ICheckLinesInPrisonLinesRequest = Entity.ICheckLinesInPrisonLinesRequest;
|
|
8
8
|
export import ICheckLinesInPrisonRequest = Entity.ICheckLinesInPrisonRequest;
|
|
9
|
+
export import ICreateLinesInPrisonRequest = Entity.ICreateLinesInPrisonRequest;
|
|
9
10
|
export declare const checkLineInPrisonOptions: readonly ["Por confirmar", "Devolver a stock", "Quebrar", "Devolver a fornecedor"];
|
|
10
11
|
export default class Repository implements Entity.IApi {
|
|
11
12
|
route: string;
|
|
@@ -17,4 +18,5 @@ export default class Repository implements Entity.IApi {
|
|
|
17
18
|
findLinesInPrison(): Promise<IFindLinesInPrisonResponse[]>;
|
|
18
19
|
findLinesInPrisonProviders(): Promise<shared.IFindMinifiedResponse[]>;
|
|
19
20
|
checkLinesInPrison(data: ICheckLinesInPrisonRequest): Promise<void>;
|
|
21
|
+
createLinesInPrison(data: ICreateLinesInPrisonRequest): Promise<string>;
|
|
20
22
|
}
|
|
@@ -110,6 +110,19 @@ var Repository = (function () {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
|
+
Repository.prototype.createLinesInPrison = function (data) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
+
var response;
|
|
116
|
+
return __generator(this, function (_a) {
|
|
117
|
+
switch (_a.label) {
|
|
118
|
+
case 0: return [4, this.api.post("".concat(this.route, "create_lines"), data)];
|
|
119
|
+
case 1:
|
|
120
|
+
response = _a.sent();
|
|
121
|
+
return [2, response.data];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
};
|
|
113
126
|
return Repository;
|
|
114
127
|
}());
|
|
115
128
|
exports.default = Repository;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.16.
|
|
12
|
+
"version": "0.16.22",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/convert-units": "^2.3.9",
|
|
35
|
-
"@types/node": "^20.10.
|
|
35
|
+
"@types/node": "^20.10.7",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
|
37
37
|
"@typescript-eslint/parser": "^6.18.0",
|
|
38
38
|
"concurrently": "^8.2.2",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"typescript": "^5.3.3"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@nomalism-com/types": "^0.16.
|
|
50
|
+
"@nomalism-com/types": "^0.16.34",
|
|
51
51
|
"axios": "^0.27.2"
|
|
52
52
|
}
|
|
53
53
|
}
|