@nomalism-com/api 0.46.25 → 0.46.27

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
@@ -104,6 +104,7 @@ __export(main_exports, {
104
104
  SideMenu: () => sideMenu_exports,
105
105
  SidemenuHighlight: () => sidemenuHighlight_exports,
106
106
  SmsSender: () => smsSender_exports,
107
+ SmsTemplate: () => smsTemplate_exports,
107
108
  StartDocumentHeaderLastUpdate: () => startDocumentHeaderLastUpdate_exports,
108
109
  StockMovement: () => stockMovement_exports,
109
110
  StoreOperator: () => storeOperator_exports,
@@ -4616,6 +4617,40 @@ var Repository129 = class {
4616
4617
  }
4617
4618
  };
4618
4619
 
4620
+ // src/modules/sms/smsTemplate.ts
4621
+ var smsTemplate_exports = {};
4622
+ __export(smsTemplate_exports, {
4623
+ default: () => Repository130
4624
+ });
4625
+ var Repository130 = class {
4626
+ constructor({ api, route }) {
4627
+ this.api = api;
4628
+ this.route = route;
4629
+ }
4630
+ async find() {
4631
+ const response = await this.api.get(`${this.route}`);
4632
+ return response.data;
4633
+ }
4634
+ async findById(id) {
4635
+ const response = await this.api.get(`${this.route}${id}`);
4636
+ return response.data;
4637
+ }
4638
+ async findByKey(key) {
4639
+ const response = await this.api.get(`${this.route}key/${key}`);
4640
+ return response.data;
4641
+ }
4642
+ async create(data) {
4643
+ const response = await this.api.post(`${this.route}`, data);
4644
+ return response.data.id;
4645
+ }
4646
+ async update(selector, data) {
4647
+ await this.api.patch(`${this.route}${selector.id}`, data);
4648
+ }
4649
+ async deleteOne(selector) {
4650
+ await this.api.delete(`${this.route}${selector.id}`);
4651
+ }
4652
+ };
4653
+
4619
4654
  // src/main.ts
4620
4655
  var API = class {
4621
4656
  constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }) {
@@ -4925,6 +4960,7 @@ var API = class {
4925
4960
  this.TimeSheet = new TimesheetRepository(getModuleParams("users", Nomalism.TimeSheet.Route));
4926
4961
  this.Catalogo = new Repository128(getModuleParams("stock", Nomalism.Catalogo.Route));
4927
4962
  this.SmsSender = new Repository129(getModuleParams("sms", Nomalism.SmsSender.Route));
4963
+ this.SmsTemplate = new Repository130(getModuleParams("sms", Nomalism.SmsTemplate.Route));
4928
4964
  }
4929
4965
  };
4930
4966
 
package/dist/main.d.ts CHANGED
@@ -130,6 +130,7 @@ import ProductLocationClass from './modules/stock/productLocation';
130
130
  import TimeSheetClass from './modules/user/timeSheet';
131
131
  import CatalogoClass from './modules/document/CAT';
132
132
  import SmsSenderClass from './modules/sms/smsSender';
133
+ import SmsTemplateClass from './modules/sms/smsTemplate';
133
134
  export * as BankData from './modules/user/bankData';
134
135
  export * as Client from './modules/user/clients';
135
136
  export * as ClientType from './modules/user/clientType';
@@ -252,6 +253,7 @@ export * as ProductLocation from './modules/stock/productLocation';
252
253
  export * as TimeSheet from './modules/user/timeSheet';
253
254
  export * as Catalogo from './modules/document/CAT';
254
255
  export * as SmsSender from './modules/sms/smsSender';
256
+ export * as SmsTemplate from './modules/sms/smsTemplate';
255
257
  export type IEnvironment = 'production' | 'uat' | 'development' | 'localhost';
256
258
  type IService = 'stock' | 'users' | 'integration' | 'documents' | 'view' | 'print' | 'tickets' | 'llm' | 'sms';
257
259
  export interface IOptions {
@@ -400,6 +402,7 @@ export declare class API {
400
402
  TimeSheet: TimeSheetClass;
401
403
  Catalogo: CatalogoClass;
402
404
  SmsSender: SmsSenderClass;
405
+ SmsTemplate: SmsTemplateClass;
403
406
  private defaultHeaders;
404
407
  constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }: IOptions);
405
408
  }
@@ -0,0 +1,17 @@
1
+ import Nomalism from '@nomalism-com/types';
2
+ import { IModuleConstructor } from '../../main';
3
+ export default class Repository implements Nomalism.SmsTemplate.IApi {
4
+ route: string;
5
+ private api;
6
+ constructor({ api, route }: IModuleConstructor);
7
+ find(): Promise<Nomalism.SmsTemplate.IEntity[]>;
8
+ findById(id: string): Promise<Nomalism.SmsTemplate.Entity>;
9
+ findByKey(key: string): Promise<Nomalism.SmsTemplate.Entity>;
10
+ create(data: Nomalism.SmsTemplate.ICreateRequest): Promise<string>;
11
+ update(selector: {
12
+ id: string;
13
+ }, data: Nomalism.SmsTemplate.IUpdateRequest): Promise<void>;
14
+ deleteOne(selector: {
15
+ id: string;
16
+ }): Promise<void>;
17
+ }
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.25",
4
+ "version": "0.46.27",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -23,14 +23,14 @@
23
23
  "prepack": "npm run lint && npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "@nomalism-com/types": "^0.46.25",
27
- "axios": "^1.18.0"
26
+ "@nomalism-com/types": "^0.46.29",
27
+ "axios": "^1.18.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@swc/core": "^1.15.41",
30
+ "@swc/core": "^1.15.43",
31
31
  "@types/node": "^24.13.2",
32
- "@typescript-eslint/eslint-plugin": "^8.61.1",
33
- "@typescript-eslint/parser": "^8.61.1",
32
+ "@typescript-eslint/eslint-plugin": "^8.62.0",
33
+ "@typescript-eslint/parser": "^8.62.0",
34
34
  "eslint": "^9.39.4",
35
35
  "eslint-config-prettier": "^10.1.8",
36
36
  "eslint-import-resolver-typescript": "^4.4.5",