itrm-tools 1.1.1 → 1.1.3

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.
@@ -3,12 +3,12 @@ export declare class AlegraConnectionManager {
3
3
  private alegraUrl;
4
4
  private headers;
5
5
  constructor(alegraUrl: string, token: string);
6
- createContact(contact: IAlegraContact): Promise<unknown>;
6
+ createContact(contact: IAlegraContact): Promise<IAlegraContact>;
7
7
  findContact(document: string): Promise<IAlegraContact | undefined>;
8
- createJournal(body: IAlegraJournal): Promise<unknown>;
8
+ createJournal(body: IAlegraJournal): Promise<IAlegraJournal>;
9
9
  findJournal(journalId: string | number): Promise<IAlegraJournal>;
10
10
  deleteJournal(journalId: string | number): Promise<unknown>;
11
- createPayment(body: IAlegraPayment): Promise<unknown>;
11
+ createPayment(body: IAlegraPayment): Promise<IAlegraPayment>;
12
12
  findPayment(paymentId: string | number): Promise<IAlegraPayment>;
13
13
  updatePayment(paymentId: string | number, body: IAlegraPayment): Promise<unknown>;
14
14
  deletePayment(paymentId: string | number): Promise<unknown>;
@@ -18,7 +18,7 @@ class AlegraConnectionManager {
18
18
  }
19
19
  createContact(contact) {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
- return yield RequestAxiosCall_1.RequestAxiosCall.post(`${this.alegraUrl}/v1/contacts`, contact, this.headers);
21
+ return (yield RequestAxiosCall_1.RequestAxiosCall.post(`${this.alegraUrl}/v1/contacts`, contact, this.headers));
22
22
  });
23
23
  }
24
24
  findContact(document) {
@@ -29,7 +29,7 @@ class AlegraConnectionManager {
29
29
  }
30
30
  createJournal(body) {
31
31
  return __awaiter(this, void 0, void 0, function* () {
32
- return yield RequestAxiosCall_1.RequestAxiosCall.post(`${this.alegraUrl}/v1/journals`, body, this.headers);
32
+ return (yield RequestAxiosCall_1.RequestAxiosCall.post(`${this.alegraUrl}/v1/journals`, body, this.headers));
33
33
  });
34
34
  }
35
35
  findJournal(journalId) {
@@ -44,7 +44,7 @@ class AlegraConnectionManager {
44
44
  }
45
45
  createPayment(body) {
46
46
  return __awaiter(this, void 0, void 0, function* () {
47
- return yield RequestAxiosCall_1.RequestAxiosCall.post(`${this.alegraUrl}/v1/payments`, body, this.headers);
47
+ return (yield RequestAxiosCall_1.RequestAxiosCall.post(`${this.alegraUrl}/v1/payments`, body, this.headers));
48
48
  });
49
49
  }
50
50
  findPayment(paymentId) {
@@ -1 +1 @@
1
- {"version":3,"file":"AlegraConnectionManager.js","sourceRoot":"","sources":["../../../src/api/alegra/AlegraConnectionManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,kEAA+D;AAG/D,MAAa,uBAAuB;IAIhC,YAAY,SAAiB,EAAE,KAAa;QACxC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,SAAS,KAAK,EAAE,EAAE,EAAE,CAAC;IACpE,CAAC;IAEY,aAAa,CAAC,OAAuB;;YAC9C,OAAO,MAAM,mCAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/F,CAAC;KAAA;IAEY,WAAW,CAAC,QAAgB;;YACrC,IAAI,QAAQ,GAAQ,MAAM,mCAAgB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,mDAAmD,QAAQ,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC7I,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzD,CAAC;KAAA;IAEY,aAAa,CAAC,IAAoB;;YAC3C,OAAO,MAAM,mCAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,CAAC;KAAA;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M,mCAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAmB,CAAC;QAChH,CAAC;KAAA;IAEY,WAAW,CAAC,SAA0B;;YAC/C,OAAQ,MAAM,mCAAgB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,gBAAgB,SAAS,EAAE,EAAE,IAAI,CAAC,OAAO,CAAoB,CAAC;QACtH,CAAC;KAAA;IAEY,aAAa,CAAC,SAA0B,EAAE,IAAoB;;YACvE,OAAO,MAAM,mCAAgB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,gBAAgB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxG,CAAC;KAAA;IAEY,aAAa,CAAC,SAA0B;;YACjD,OAAO,MAAM,mCAAgB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,gBAAgB,SAAS,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrG,CAAC;KAAA;CACJ;AA7CD,0DA6CC"}
@@ -90,7 +90,7 @@ export interface IAlegraPayment {
90
90
  id: string | number;
91
91
  };
92
92
  client: IAlegraContact;
93
- paymentMethod: 'transfer' | 'cash' | 'deposit' | 'check' | 'credit-card' | 'debit-card';
93
+ paymentMethod?: 'transfer' | 'cash' | 'deposit' | 'check' | 'credit-card' | 'debit-card';
94
94
  observations: string;
95
95
  anotation: string;
96
96
  type: 'in' | 'out';
@@ -134,7 +134,7 @@ export interface IAlegraEntry {
134
134
  type?: string;
135
135
  line?: string;
136
136
  lineParent?: any;
137
- costCenter: any;
137
+ costCenter?: any;
138
138
  associatedDocument?: {
139
139
  idResource: any;
140
140
  resourceType: any;
@@ -22,6 +22,7 @@
22
22
  /// <reference types="mongoose/types/validation" />
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
25
26
  import { DefaultSchemaOptions, FilterQuery, Model, MongooseBulkWriteOptions, ObtainDocumentType, ResolveSchemaOptions, SchemaDefinition, SchemaDefinitionType, SchemaOptions, UpdateQuery, UpdateWithAggregationPipeline } from "mongoose";
26
27
  export declare class MongooseModelManager<S> {
27
28
  collection: string;
@@ -37,13 +38,13 @@ export declare class MongooseModelManager<S> {
37
38
  createMany(data: S[]): Promise<any>;
38
39
  exists(filter: FilterQuery<S>): import("mongoose").Query<{
39
40
  _id: import("mongoose").InferId<S>;
40
- } | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "findOne">;
41
- find(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>> | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "findOne">;
42
- findMany(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "find">;
43
- batch(filter: FilterQuery<S>, from: number, size: number): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "find">;
41
+ } | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "findOne", {}>;
42
+ find(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>> | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "findOne", {}>;
43
+ findMany(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "find", {}>;
44
+ batch(filter: FilterQuery<S>, from: number, size: number): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "find", {}>;
44
45
  updateOne(filter: FilterQuery<S>, data: UpdateWithAggregationPipeline | UpdateQuery<S>): any;
45
46
  bulkWrite(writes: any[], options?: MongooseBulkWriteOptions): Promise<any>;
46
47
  delete(filter: FilterQuery<S>): any;
47
48
  deleteMany(filter: FilterQuery<S>): any;
48
- countDocuments(filter: FilterQuery<S>): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "countDocuments">;
49
+ countDocuments(filter: FilterQuery<S>): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S> & import("mongoose").Require_id<S>>, {}, S, "countDocuments", {}>;
49
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itrm-tools",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",