@nomalism-com/api 0.46.31 → 0.46.32
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/index.js
CHANGED
|
@@ -10,6 +10,7 @@ __export(main_exports, {
|
|
|
10
10
|
API: () => API,
|
|
11
11
|
AccountCode: () => accountCode_exports,
|
|
12
12
|
AdminPanel: () => adminPanel_exports,
|
|
13
|
+
AllowedDevice: () => allowedDevice_exports,
|
|
13
14
|
BankData: () => bankData_exports,
|
|
14
15
|
Catalogo: () => CAT_exports,
|
|
15
16
|
Channel: () => channel_exports,
|
|
@@ -4612,7 +4613,7 @@ var Repository129 = class {
|
|
|
4612
4613
|
const response = await this.api.get(`${this.route}${id}`);
|
|
4613
4614
|
return response.data;
|
|
4614
4615
|
}
|
|
4615
|
-
async
|
|
4616
|
+
async find() {
|
|
4616
4617
|
const response = await this.api.get(`${this.route}`);
|
|
4617
4618
|
return response.data;
|
|
4618
4619
|
}
|
|
@@ -4652,6 +4653,40 @@ var Repository130 = class {
|
|
|
4652
4653
|
}
|
|
4653
4654
|
};
|
|
4654
4655
|
|
|
4656
|
+
// src/modules/sms/allowedDevice.ts
|
|
4657
|
+
var allowedDevice_exports = {};
|
|
4658
|
+
__export(allowedDevice_exports, {
|
|
4659
|
+
default: () => Repository131
|
|
4660
|
+
});
|
|
4661
|
+
var Repository131 = class {
|
|
4662
|
+
constructor({ api, route }) {
|
|
4663
|
+
this.api = api;
|
|
4664
|
+
this.route = route;
|
|
4665
|
+
}
|
|
4666
|
+
async find() {
|
|
4667
|
+
const response = await this.api.get(`${this.route}`);
|
|
4668
|
+
return response.data;
|
|
4669
|
+
}
|
|
4670
|
+
async findById(id) {
|
|
4671
|
+
const response = await this.api.get(`${this.route}${id}`);
|
|
4672
|
+
return response.data;
|
|
4673
|
+
}
|
|
4674
|
+
async findByKey(key) {
|
|
4675
|
+
const response = await this.api.get(`${this.route}key/${key}`);
|
|
4676
|
+
return response.data;
|
|
4677
|
+
}
|
|
4678
|
+
async create(data) {
|
|
4679
|
+
const response = await this.api.post(`${this.route}`, data);
|
|
4680
|
+
return response.data.id;
|
|
4681
|
+
}
|
|
4682
|
+
async update(selector, data) {
|
|
4683
|
+
await this.api.patch(`${this.route}${selector.id}`, data);
|
|
4684
|
+
}
|
|
4685
|
+
async deleteOne(selector) {
|
|
4686
|
+
await this.api.delete(`${this.route}${selector.id}`);
|
|
4687
|
+
}
|
|
4688
|
+
};
|
|
4689
|
+
|
|
4655
4690
|
// src/main.ts
|
|
4656
4691
|
var API = class {
|
|
4657
4692
|
constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }) {
|
|
@@ -4962,6 +4997,9 @@ var API = class {
|
|
|
4962
4997
|
this.Catalogo = new Repository128(getModuleParams("stock", Nomalism.Catalogo.Route));
|
|
4963
4998
|
this.SmsSender = new Repository129(getModuleParams("sms", Nomalism.SmsSender.Route));
|
|
4964
4999
|
this.SmsTemplate = new Repository130(getModuleParams("sms", Nomalism.SmsTemplate.Route));
|
|
5000
|
+
this.AllowedDevice = new Repository131(
|
|
5001
|
+
getModuleParams("sms", Nomalism.AllowedDevice.Route)
|
|
5002
|
+
);
|
|
4965
5003
|
}
|
|
4966
5004
|
};
|
|
4967
5005
|
|
package/dist/main.d.ts
CHANGED
|
@@ -131,6 +131,7 @@ import TimeSheetClass from './modules/user/timeSheet';
|
|
|
131
131
|
import CatalogoClass from './modules/document/CAT';
|
|
132
132
|
import SmsSenderClass from './modules/sms/smsSender';
|
|
133
133
|
import SmsTemplateClass from './modules/sms/smsTemplate';
|
|
134
|
+
import AllowedDeviceClass from './modules/sms/allowedDevice';
|
|
134
135
|
export * as BankData from './modules/user/bankData';
|
|
135
136
|
export * as Client from './modules/user/clients';
|
|
136
137
|
export * as ClientType from './modules/user/clientType';
|
|
@@ -254,6 +255,7 @@ export * as TimeSheet from './modules/user/timeSheet';
|
|
|
254
255
|
export * as Catalogo from './modules/document/CAT';
|
|
255
256
|
export * as SmsSender from './modules/sms/smsSender';
|
|
256
257
|
export * as SmsTemplate from './modules/sms/smsTemplate';
|
|
258
|
+
export * as AllowedDevice from './modules/sms/allowedDevice';
|
|
257
259
|
export type IEnvironment = 'production' | 'uat' | 'development' | 'localhost';
|
|
258
260
|
type IService = 'stock' | 'users' | 'integration' | 'documents' | 'view' | 'print' | 'tickets' | 'llm' | 'sms';
|
|
259
261
|
export interface IOptions {
|
|
@@ -403,6 +405,7 @@ export declare class API {
|
|
|
403
405
|
Catalogo: CatalogoClass;
|
|
404
406
|
SmsSender: SmsSenderClass;
|
|
405
407
|
SmsTemplate: SmsTemplateClass;
|
|
408
|
+
AllowedDevice: AllowedDeviceClass;
|
|
406
409
|
private defaultHeaders;
|
|
407
410
|
constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }: IOptions);
|
|
408
411
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Nomalism from '@nomalism-com/types';
|
|
2
|
+
import { IModuleConstructor } from '../../main';
|
|
3
|
+
export default class Repository implements Nomalism.AllowedDevice.IApi {
|
|
4
|
+
route: string;
|
|
5
|
+
private api;
|
|
6
|
+
constructor({ api, route }: IModuleConstructor);
|
|
7
|
+
find(): Promise<Nomalism.AllowedDevice.IEntity[]>;
|
|
8
|
+
findById(id: string): Promise<Nomalism.AllowedDevice.IEntity>;
|
|
9
|
+
findByKey(key: string): Promise<Nomalism.AllowedDevice.IEntity>;
|
|
10
|
+
create(data: Nomalism.AllowedDevice.ICreateRequest): Promise<string>;
|
|
11
|
+
update(selector: {
|
|
12
|
+
id: string;
|
|
13
|
+
}, data: Nomalism.AllowedDevice.IUpdateRequest): Promise<void>;
|
|
14
|
+
deleteOne(selector: {
|
|
15
|
+
id: string;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
}
|
|
@@ -7,5 +7,5 @@ export default class Repository implements Nomalism.SmsSender.IController {
|
|
|
7
7
|
claim(): Promise<Nomalism.SmsSender.IClaimResponse[]>;
|
|
8
8
|
result(id: string, body: Nomalism.SmsSender.IResultRequest): Promise<void>;
|
|
9
9
|
findById(id: string): Promise<Nomalism.SmsSender.IFindResponse>;
|
|
10
|
-
|
|
10
|
+
find(): Promise<Nomalism.SmsSender.IFindResponse[]>;
|
|
11
11
|
}
|
|
@@ -5,8 +5,8 @@ export default class Repository implements Nomalism.SmsTemplate.IApi {
|
|
|
5
5
|
private api;
|
|
6
6
|
constructor({ api, route }: IModuleConstructor);
|
|
7
7
|
find(): Promise<Nomalism.SmsTemplate.IEntity[]>;
|
|
8
|
-
findById(id: string): Promise<Nomalism.SmsTemplate.
|
|
9
|
-
findByKey(key: string): Promise<Nomalism.SmsTemplate.
|
|
8
|
+
findById(id: string): Promise<Nomalism.SmsTemplate.IEntity>;
|
|
9
|
+
findByKey(key: string): Promise<Nomalism.SmsTemplate.IEntity>;
|
|
10
10
|
create(data: Nomalism.SmsTemplate.ICreateRequest): Promise<string>;
|
|
11
11
|
update(selector: {
|
|
12
12
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/api",
|
|
3
3
|
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.32",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"prepack": "npm run lint && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@nomalism-com/types": "^0.46.
|
|
26
|
+
"@nomalism-com/types": "^0.46.39",
|
|
27
27
|
"axios": "^1.18.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|