@tec.pet/tecpet-sdk 0.0.146 → 0.0.148

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.
@@ -19,5 +19,6 @@ export declare class FiscalInvoiceService {
19
19
  changePendingPaymentId(fiscalInvoiceId: string, body: PaChangeFiscalInvoicePendingPaymentRequest, shopId: number): Promise<PaChangeFiscalInvoicePendingPaymentResponse>;
20
20
  changeTransactions(fiscalInvoiceId: string, body: PaChangeFiscalInvoiceTransactionsRequest, shopId: number): Promise<PaChangeFiscalInvoiceTransactionsResponse>;
21
21
  changeNfId(fiscalInvoiceId: string, body: PaChangeFiscalInvoiceNfIdRequest, shopId: number): Promise<PaChangeFiscalInvoiceNfIdResponse>;
22
+ clearNfId(fiscalInvoiceId: string, shopId: number): Promise<PaChangeFiscalInvoiceNfIdResponse>;
22
23
  getByPendingPaymentId(query: PaGetFiscalInvoiceByPendingPaymentIdRequest): Promise<PaGetFiscalInvoiceByPendingPaymentIdResponse | null>;
23
24
  }
@@ -30,6 +30,9 @@ class FiscalInvoiceService {
30
30
  async changeNfId(fiscalInvoiceId, body, shopId) {
31
31
  return await this.api.patch(`/fiscalInvoice/${fiscalInvoiceId}/nfId`, body, shopId);
32
32
  }
33
+ async clearNfId(fiscalInvoiceId, shopId) {
34
+ return await this.api.delete(`/fiscalInvoice/${fiscalInvoiceId}/nfId`, shopId);
35
+ }
33
36
  async getByPendingPaymentId(query) {
34
37
  return await this.api.post(`/fiscalInvoice/byPendingPaymentId`, query);
35
38
  }
@@ -8,6 +8,20 @@ interface AdvancedConfigSegment {
8
8
  id: number;
9
9
  segmentType: ShopSegment;
10
10
  }
11
+ export interface PaShopConfigurationsTimeRange {
12
+ start: string;
13
+ stop: string;
14
+ }
15
+ export interface PaShopConfigurationsTimeTable {
16
+ fullTime: boolean;
17
+ monday: Array<PaShopConfigurationsTimeRange>;
18
+ tuesday: Array<PaShopConfigurationsTimeRange>;
19
+ wednesday: Array<PaShopConfigurationsTimeRange>;
20
+ thursday: Array<PaShopConfigurationsTimeRange>;
21
+ friday: Array<PaShopConfigurationsTimeRange>;
22
+ saturday: Array<PaShopConfigurationsTimeRange>;
23
+ sunday: Array<PaShopConfigurationsTimeRange>;
24
+ }
11
25
  export interface PaShopConfigurationsSpecie {
12
26
  id: string;
13
27
  type: SpecieTypeEnum;
@@ -17,6 +31,7 @@ export interface PaShopConfigurationsSegment {
17
31
  id: number;
18
32
  type: ShopSegment;
19
33
  name: string;
34
+ timeTable?: PaShopConfigurationsTimeTable;
20
35
  }
21
36
  export interface AdvancedConfigResponseDto {
22
37
  extraAuth: boolean;
@@ -7,6 +7,7 @@ export declare class HttpClient {
7
7
  post<T>(path: string, payload?: any, shopId?: number): Promise<T>;
8
8
  put<T>(path: string, payload?: any, shopId?: number): Promise<T>;
9
9
  patch<T>(path: string, payload?: any, shopId?: number): Promise<T>;
10
+ delete<T>(path: string, shopId?: number): Promise<T>;
10
11
  private headers;
11
12
  private shop;
12
13
  }
@@ -71,6 +71,15 @@ class HttpClient {
71
71
  throw error.response.data;
72
72
  }
73
73
  }
74
+ async delete(path, shopId) {
75
+ try {
76
+ const response = await this.client.delete(path, { headers: this.headers({ shopId }) });
77
+ return response?.data;
78
+ }
79
+ catch (error) {
80
+ throw error.response.data;
81
+ }
82
+ }
74
83
  headers({ shopId }) {
75
84
  if (shopId) {
76
85
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.146",
3
+ "version": "0.0.148",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",