@riocrypto/common 1.0.881 → 1.0.884

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.
@@ -27,6 +27,7 @@ import { BankAccountQuery } from "../types/bank-account-query";
27
27
  import { AdminTask } from "../types/admin-task";
28
28
  import { AdminTaskType } from "../types/admin-task-type";
29
29
  import { ImportOrderInput } from "../types/import-order-input";
30
+ import { Invoice } from "../types/invoice";
30
31
  export declare class RioAdminClient {
31
32
  private axios;
32
33
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -125,4 +126,5 @@ export declare class RioAdminClient {
125
126
  deleteAuthorizedPhoneNumber(phoneNumber: string): Promise<User>;
126
127
  createKushkiBankPayment(orderId: string): Promise<any>;
127
128
  updateAuth(update: AuthUpdate, id?: string): Promise<Auth>;
129
+ getInvoice(orderId: string): Promise<Invoice>;
128
130
  }
@@ -455,5 +455,11 @@ class RioAdminClient {
455
455
  return data;
456
456
  });
457
457
  }
458
+ getInvoice(orderId) {
459
+ return __awaiter(this, void 0, void 0, function* () {
460
+ const response = yield this.axios.get(`/api/invoices?orderId=${orderId}}`);
461
+ return response.data;
462
+ });
463
+ }
458
464
  }
459
465
  exports.RioAdminClient = RioAdminClient;
@@ -22,6 +22,7 @@ import { QuoteInput } from "../types/quote-input";
22
22
  import { UserQuery } from "../types/user-query";
23
23
  import { OrderQuery } from "../types/order-query";
24
24
  import { BankAccountQuery } from "../types/bank-account-query";
25
+ import { Invoice } from "../types/invoice";
25
26
  export declare class RioClient {
26
27
  private axios;
27
28
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -102,4 +103,5 @@ export declare class RioClient {
102
103
  auth: Auth;
103
104
  missing: string[];
104
105
  }>;
106
+ getInvoice(orderId: string): Promise<Invoice>;
105
107
  }
@@ -367,5 +367,11 @@ class RioClient {
367
367
  return data;
368
368
  });
369
369
  }
370
+ getInvoice(orderId) {
371
+ return __awaiter(this, void 0, void 0, function* () {
372
+ const response = yield this.axios.get(`/api/invoices?orderId=${orderId}}`);
373
+ return response.data;
374
+ });
375
+ }
370
376
  }
371
377
  exports.RioClient = RioClient;
package/build/index.d.ts CHANGED
@@ -152,6 +152,7 @@ export * from "./types/admin-task";
152
152
  export * from "./types/partner";
153
153
  export * from "./types/import-order-input";
154
154
  export * from "./types/master-order-record";
155
+ export * from "./types/invoice";
155
156
  export * from "./classes/Asset";
156
157
  export * from "./classes/CountryAsset";
157
158
  export * from "./classes/CryptoAsset";
package/build/index.js CHANGED
@@ -168,6 +168,7 @@ __exportStar(require("./types/admin-task"), exports);
168
168
  __exportStar(require("./types/partner"), exports);
169
169
  __exportStar(require("./types/import-order-input"), exports);
170
170
  __exportStar(require("./types/master-order-record"), exports);
171
+ __exportStar(require("./types/invoice"), exports);
171
172
  __exportStar(require("./classes/Asset"), exports);
172
173
  __exportStar(require("./classes/CountryAsset"), exports);
173
174
  __exportStar(require("./classes/CryptoAsset"), exports);
@@ -0,0 +1,12 @@
1
+ import { Country } from "./country";
2
+ export interface Invoice {
3
+ id: string;
4
+ createdAt: Date;
5
+ userId: string;
6
+ orderId: string;
7
+ country: Country;
8
+ provider: string;
9
+ providerId: string;
10
+ pdfUrl?: string;
11
+ xmlUrl?: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.881",
3
+ "version": "1.0.884",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",