@nomalism-com/api 0.8.365 → 0.8.367
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.
|
@@ -12,7 +12,8 @@ export import IFindCabideProvidersResponse = Entity.IFindCabideProvidersResponse
|
|
|
12
12
|
export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
|
|
13
13
|
export import IFindWithPaginationResponse = Entity.IFindWithPaginationResponse;
|
|
14
14
|
export import IBasicSearchRequest = Entity.IBasicSearchRequest;
|
|
15
|
+
export import IBasicSearchResponse = Entity.IBasicSearchResponse;
|
|
15
16
|
export declare const route: string;
|
|
16
17
|
export declare const publicRoute: string;
|
|
17
18
|
export declare const printLabelToPdfUrl: ({ id }: shared.IFindByIdRequest, token: string) => string;
|
|
18
|
-
export declare const findById: (selector: shared.IFindByIdRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Cabide | null>, create: (data: Entity.ICreateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Cabide>, update: (selector: shared.IFindByIdRequest, data: Entity.IUpdateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Cabide | null>, deleteOne: (selector: shared.IFindByIdRequest) => Promise<void
|
|
19
|
+
export declare const findByBasicSearch: (data: Entity.IBasicSearchRequest) => Promise<shared.IPaginationResponse<Entity.IBasicSearchResponse>>, findById: (selector: shared.IFindByIdRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Cabide | null>, find: (data: Entity.IFindRequest) => Promise<Entity.IFindResponse[]>, findPaginated: (selector: Entity.IFindPaginatedRequest) => Promise<Entity.IFindWithPaginationResponse>, findCabideProviders: (search_value: shared.IFindMinifiedRequest) => Promise<Entity.IFindCabideProvidersResponse[]>, create: (data: Entity.ICreateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Cabide>, update: (selector: shared.IFindByIdRequest, data: Entity.IUpdateRequest) => Promise<import("@nomalism-com/types/dist/shared/entities").Cabide | null>, deleteOne: (selector: shared.IFindByIdRequest) => Promise<void>;
|
|
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.
|
|
42
|
+
exports.deleteOne = exports.update = exports.create = exports.findCabideProviders = exports.findPaginated = exports.find = exports.findById = exports.findByBasicSearch = exports.printLabelToPdfUrl = exports.publicRoute = exports.route = exports.cabidesTypesEnum = void 0;
|
|
43
43
|
var types_1 = require("@nomalism-com/types");
|
|
44
44
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
45
45
|
var stock_1 = require("../stock");
|
|
@@ -47,11 +47,11 @@ exports.cabidesTypesEnum = types_1.Cabide.cabideTypes;
|
|
|
47
47
|
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "cabide/");
|
|
48
48
|
exports.publicRoute = "".concat(stock_1.serviceHostname).concat(stock_1.servicePublicPath, "cabide/");
|
|
49
49
|
var repository = {
|
|
50
|
-
|
|
50
|
+
findByBasicSearch: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
51
|
var response;
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
53
|
switch (_a.label) {
|
|
54
|
-
case 0: return [4, client_1.default.
|
|
54
|
+
case 0: return [4, client_1.default.get("".concat(exports.route, "basic_search"), { params: params })];
|
|
55
55
|
case 1:
|
|
56
56
|
response = _a.sent();
|
|
57
57
|
return [2, response.data];
|
|
@@ -102,11 +102,11 @@ var repository = {
|
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
}); },
|
|
105
|
-
|
|
105
|
+
findCabideProviders: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
106
106
|
var response;
|
|
107
107
|
return __generator(this, function (_a) {
|
|
108
108
|
switch (_a.label) {
|
|
109
|
-
case 0: return [4, client_1.default.get("".concat(exports.route, "
|
|
109
|
+
case 0: return [4, client_1.default.get("".concat(exports.route, "cabide_providers"), {
|
|
110
110
|
params: params,
|
|
111
111
|
})];
|
|
112
112
|
case 1:
|
|
@@ -115,13 +115,11 @@ var repository = {
|
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
}); },
|
|
118
|
-
|
|
118
|
+
create: function (body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
119
119
|
var response;
|
|
120
120
|
return __generator(this, function (_a) {
|
|
121
121
|
switch (_a.label) {
|
|
122
|
-
case 0: return [4, client_1.default.
|
|
123
|
-
params: params,
|
|
124
|
-
})];
|
|
122
|
+
case 0: return [4, client_1.default.post("".concat(exports.route), body)];
|
|
125
123
|
case 1:
|
|
126
124
|
response = _a.sent();
|
|
127
125
|
return [2, response.data];
|
|
@@ -157,4 +155,4 @@ var printLabelToPdfUrl = function (_a, token) {
|
|
|
157
155
|
return "".concat(exports.publicRoute, "print_label_pdf/").concat(id, "?").concat(qs.toString());
|
|
158
156
|
};
|
|
159
157
|
exports.printLabelToPdfUrl = printLabelToPdfUrl;
|
|
160
|
-
exports.findById = repository.findById, exports.
|
|
158
|
+
exports.findByBasicSearch = repository.findByBasicSearch, exports.findById = repository.findById, exports.find = repository.find, exports.findPaginated = repository.findPaginated, exports.findCabideProviders = repository.findCabideProviders, exports.create = repository.create, exports.update = repository.update, exports.deleteOne = repository.deleteOne;
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nomalism-com/api",
|
|
3
|
-
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
-
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"nomalism",
|
|
7
|
-
"api",
|
|
8
|
-
"types",
|
|
9
|
-
"typescript",
|
|
10
|
-
"helper"
|
|
11
|
-
],
|
|
12
|
-
"version": "0.8.
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"license": "UNLICENSED",
|
|
19
|
-
"homepage": "https://gitlab.com/nomalism-develop/api",
|
|
20
|
-
"bugs": {
|
|
21
|
-
"url": "https://gitlab.com/nomalism-develop/api/issues"
|
|
22
|
-
},
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://gitlab.com/nomalism-develop/api.git"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
29
|
-
"build": "rm -rf dist && tsc --project tsconfig.json",
|
|
30
|
-
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
31
|
-
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/convert-units": "^2.3.6",
|
|
35
|
-
"@types/node": "^18.16.19",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
|
37
|
-
"@typescript-eslint/parser": "^5.61.0",
|
|
38
|
-
"concurrently": "^8.2.0",
|
|
39
|
-
"eslint": "^8.44.0",
|
|
40
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
|
-
"eslint-config-prettier": "^8.8.0",
|
|
42
|
-
"eslint-import-resolver-typescript": "^3.5.5",
|
|
43
|
-
"eslint-plugin-import": "^2.27.5",
|
|
44
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
45
|
-
"prettier": "^2.8.8",
|
|
46
|
-
"tsx": "^3.12.7",
|
|
47
|
-
"typescript": "^5.1.6"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@nomalism-com/types": "^0.9.
|
|
51
|
-
"axios": "^0.27.2"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nomalism-com/api",
|
|
3
|
+
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
+
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"nomalism",
|
|
7
|
+
"api",
|
|
8
|
+
"types",
|
|
9
|
+
"typescript",
|
|
10
|
+
"helper"
|
|
11
|
+
],
|
|
12
|
+
"version": "0.8.367",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"license": "UNLICENSED",
|
|
19
|
+
"homepage": "https://gitlab.com/nomalism-develop/api",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://gitlab.com/nomalism-develop/api/issues"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://gitlab.com/nomalism-develop/api.git"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
29
|
+
"build": "rm -rf dist && tsc --project tsconfig.json",
|
|
30
|
+
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
31
|
+
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/convert-units": "^2.3.6",
|
|
35
|
+
"@types/node": "^18.16.19",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
|
37
|
+
"@typescript-eslint/parser": "^5.61.0",
|
|
38
|
+
"concurrently": "^8.2.0",
|
|
39
|
+
"eslint": "^8.44.0",
|
|
40
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
|
+
"eslint-config-prettier": "^8.8.0",
|
|
42
|
+
"eslint-import-resolver-typescript": "^3.5.5",
|
|
43
|
+
"eslint-plugin-import": "^2.27.5",
|
|
44
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
45
|
+
"prettier": "^2.8.8",
|
|
46
|
+
"tsx": "^3.12.7",
|
|
47
|
+
"typescript": "^5.1.6"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@nomalism-com/types": "^0.9.487",
|
|
51
|
+
"axios": "^0.27.2"
|
|
52
|
+
}
|
|
53
|
+
}
|