@nhvbeauty/tpl 0.1.4 → 0.3.0
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/README.md +168 -0
- package/lib/entities/products/index.d.ts +5 -0
- package/lib/entities/products/index.js +28 -0
- package/lib/entities/products/index.js.map +1 -0
- package/lib/entities/products/interfaces/products.interface.d.ts +28 -0
- package/lib/entities/products/interfaces/products.interface.js +3 -0
- package/lib/entities/products/interfaces/products.interface.js.map +1 -0
- package/lib/entities/shipping/index.d.ts +7 -0
- package/lib/entities/shipping/index.js +35 -0
- package/lib/entities/shipping/index.js.map +1 -0
- package/lib/entities/shipping/interfaces/get-freight.interface.d.ts +30 -0
- package/lib/entities/shipping/interfaces/get-freight.interface.js +3 -0
- package/lib/entities/shipping/interfaces/get-freight.interface.js.map +1 -0
- package/lib/entities/shipping/interfaces/validate-zipcode.interface.d.ts +13 -0
- package/lib/entities/shipping/interfaces/validate-zipcode.interface.js +3 -0
- package/lib/entities/shipping/interfaces/validate-zipcode.interface.js.map +1 -0
- package/lib/tpl.d.ts +4 -0
- package/lib/tpl.js +8 -0
- package/lib/tpl.js.map +1 -1
- package/package.json +5 -2
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# @nhvbeauty/tpl
|
|
2
|
+
|
|
3
|
+
SDK TypeScript para integração com a API da TPL (`https://oms.tpl.com.br/api`).
|
|
4
|
+
|
|
5
|
+
## Instalação
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @nhvbeauty/tpl
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Uso rápido
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Tpl } from '@nhvbeauty/tpl'
|
|
15
|
+
|
|
16
|
+
const client = new Tpl()
|
|
17
|
+
|
|
18
|
+
const auth = await client.auth.login({
|
|
19
|
+
apikey: 'SUA_API_KEY',
|
|
20
|
+
token: 'SEU_TOKEN',
|
|
21
|
+
email: 'seu-email@dominio.com',
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const authedClient = new Tpl(auth.token)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Cliente
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
const client = new Tpl(authToken?, baseUrl?)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- `authToken` (opcional): token retornado em `auth.login`.
|
|
34
|
+
- `baseUrl` (opcional): padrão `https://oms.tpl.com.br/api`.
|
|
35
|
+
|
|
36
|
+
## Módulos disponíveis
|
|
37
|
+
|
|
38
|
+
### `auth`
|
|
39
|
+
|
|
40
|
+
#### `login(body)`
|
|
41
|
+
|
|
42
|
+
Endpoint: `POST /get/auth`
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const result = await client.auth.login({
|
|
46
|
+
apikey: 'SUA_API_KEY',
|
|
47
|
+
token: 'SEU_TOKEN',
|
|
48
|
+
email: 'seu-email@dominio.com',
|
|
49
|
+
})
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### `orders`
|
|
53
|
+
|
|
54
|
+
#### `find(params)`
|
|
55
|
+
|
|
56
|
+
Endpoint: `POST /get/orderdetail`
|
|
57
|
+
|
|
58
|
+
Aceita um dos formatos:
|
|
59
|
+
- `{ id: number | bigint }`
|
|
60
|
+
- `{ number: string }`
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const byId = await client.orders.find({ id: 12345 })
|
|
64
|
+
const byNumber = await client.orders.find({ number: 'PED-12345' })
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `shipping`
|
|
68
|
+
|
|
69
|
+
#### `validateZipcode(params)`
|
|
70
|
+
|
|
71
|
+
Endpoint: `POST /get/valid-zipcode`
|
|
72
|
+
|
|
73
|
+
Payload:
|
|
74
|
+
- `{ zipcode: string }`
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const zipcode = await client.shipping.validateZipcode({
|
|
78
|
+
zipcode: '13270000',
|
|
79
|
+
})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Resposta de sucesso:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"code": 200,
|
|
87
|
+
"message": "Sucesso",
|
|
88
|
+
"dados": [
|
|
89
|
+
{
|
|
90
|
+
"cidade": "Valinhos",
|
|
91
|
+
"logradouro": "",
|
|
92
|
+
"bairro": "Centro",
|
|
93
|
+
"uf": "SP"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Quando o CEP não é encontrado, a API responde `404` (ex.: `{ "code": 404, "message": "CEP nao encontrado" }`) e o SDK lança erro.
|
|
100
|
+
|
|
101
|
+
#### `getFreight(params)`
|
|
102
|
+
|
|
103
|
+
Endpoint: `POST /get/freight`
|
|
104
|
+
|
|
105
|
+
Payload nesta versão:
|
|
106
|
+
- `identification?: string`
|
|
107
|
+
- `to: string`
|
|
108
|
+
- `weight: number` (gramas)
|
|
109
|
+
- `value: number` (valor do pedido sem frete)
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
const freight = await client.shipping.getFreight({
|
|
113
|
+
identification: '12345678901',
|
|
114
|
+
to: '13270000',
|
|
115
|
+
weight: 1200,
|
|
116
|
+
value: 199.9,
|
|
117
|
+
})
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Resposta (exemplo real):
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
[
|
|
124
|
+
{
|
|
125
|
+
"shipmentCompany": "Loggi (4 dias)",
|
|
126
|
+
"deadline": 4,
|
|
127
|
+
"value": "9.90",
|
|
128
|
+
"originalvalue": "8.20",
|
|
129
|
+
"region": "INTERIOR",
|
|
130
|
+
"observation": "",
|
|
131
|
+
"safe": 0,
|
|
132
|
+
"cost": 0,
|
|
133
|
+
"safecost": 0,
|
|
134
|
+
"role": "0",
|
|
135
|
+
"extra": 0,
|
|
136
|
+
"extraWeight": "0",
|
|
137
|
+
"extraValue": "0.00",
|
|
138
|
+
"icms": 0.88,
|
|
139
|
+
"iss": "0",
|
|
140
|
+
"aplicou": 0,
|
|
141
|
+
"weightVolume": 15,
|
|
142
|
+
"weightm3": -1,
|
|
143
|
+
"shipmentId": "3",
|
|
144
|
+
"state": "SP",
|
|
145
|
+
"cubageFactor": "167.00"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Observação: no retorno de frete, campos numéricos podem vir como `string` ou `number` dependendo da regra aplicada pela API.
|
|
151
|
+
|
|
152
|
+
## Tratamento de erros
|
|
153
|
+
|
|
154
|
+
Para respostas HTTP fora de `2xx`, o SDK lança erro contendo:
|
|
155
|
+
- `message`
|
|
156
|
+
- `statusCode`
|
|
157
|
+
- `response` (quando retornado pela API)
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
try {
|
|
161
|
+
await client.shipping.validateZipcode({ zipcode: '00000000' })
|
|
162
|
+
}
|
|
163
|
+
catch (error: any) {
|
|
164
|
+
console.error(error.statusCode)
|
|
165
|
+
console.error(error.response)
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Products = void 0;
|
|
13
|
+
const entity_1 = require("../@shared/entity");
|
|
14
|
+
class Products extends entity_1.Entity {
|
|
15
|
+
find(skus) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const skuList = !skus || skus.length === 0
|
|
18
|
+
? [{ sku: '*' }]
|
|
19
|
+
: skus.map((sku) => ({ sku }));
|
|
20
|
+
return yield this.repository.request({
|
|
21
|
+
endpoint: '/get/products',
|
|
22
|
+
body: { skus: skuList },
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Products = Products;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/products/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,8CAA0C;AAE1C,MAAa,QAAS,SAAQ,eAAM;IACrB,IAAI,CAAC,IAAe;;YAC/B,MAAM,OAAO,GACX,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;gBACxB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;gBAChB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;YAElC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;gBACnC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;aACxB,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAZD,4BAYC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IProductsBody {
|
|
2
|
+
skus: Array<{
|
|
3
|
+
sku: string;
|
|
4
|
+
}>;
|
|
5
|
+
}
|
|
6
|
+
export interface IProductComposition {
|
|
7
|
+
sku: string;
|
|
8
|
+
ean: string;
|
|
9
|
+
descricao: string;
|
|
10
|
+
unidade: string | null;
|
|
11
|
+
use: number;
|
|
12
|
+
amount: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IProduct {
|
|
15
|
+
type: 'P' | 'K';
|
|
16
|
+
ean: string;
|
|
17
|
+
sku: string;
|
|
18
|
+
kit: string;
|
|
19
|
+
descricao: string;
|
|
20
|
+
unidade: string | null;
|
|
21
|
+
code: number;
|
|
22
|
+
amount: number;
|
|
23
|
+
composition: IProductComposition[];
|
|
24
|
+
}
|
|
25
|
+
export interface IProductsResponse {
|
|
26
|
+
code: number;
|
|
27
|
+
stock: IProduct[];
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.interface.js","sourceRoot":"","sources":["../../../../src/entities/products/interfaces/products.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IGetFreightBody, IGetFreightResponse } from './interfaces/get-freight.interface';
|
|
2
|
+
import type { IValidateZipcodeBody, IValidateZipcodeResponse } from './interfaces/validate-zipcode.interface';
|
|
3
|
+
import { Entity } from '../@shared/entity';
|
|
4
|
+
export declare class Shipping extends Entity {
|
|
5
|
+
validateZipcode(params: IValidateZipcodeBody): Promise<IValidateZipcodeResponse>;
|
|
6
|
+
getFreight(params: IGetFreightBody): Promise<IGetFreightResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Shipping = void 0;
|
|
13
|
+
const entity_1 = require("../@shared/entity");
|
|
14
|
+
class Shipping extends entity_1.Entity {
|
|
15
|
+
validateZipcode(params) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
return yield this.repository.request({
|
|
18
|
+
endpoint: '/get/valid-zipcode',
|
|
19
|
+
body: {
|
|
20
|
+
zipcode: params.zipcode,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
getFreight(params) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return yield this.repository.request({
|
|
28
|
+
endpoint: '/get/freight',
|
|
29
|
+
body: params,
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Shipping = Shipping;
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/shipping/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,8CAA0C;AAE1C,MAAa,QAAS,SAAQ,eAAM;IACrB,eAAe,CAC1B,MAA4B;;YAE5B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;gBACnC,QAAQ,EAAE,oBAAoB;gBAC9B,IAAI,EAAE;oBACJ,OAAO,EAAE,MAAM,CAAC,OAAO;iBACxB;aACF,CAAC,CAAA;QACJ,CAAC;KAAA;IAEY,UAAU,CACrB,MAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;gBACnC,QAAQ,EAAE,cAAc;gBACxB,IAAI,EAAE,MAAM;aACb,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AApBD,4BAoBC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface IGetFreightBody {
|
|
2
|
+
identification?: string;
|
|
3
|
+
to: string;
|
|
4
|
+
weight: number;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IGetFreightItem {
|
|
8
|
+
shipmentCompany: string;
|
|
9
|
+
deadline: number;
|
|
10
|
+
value: string | number;
|
|
11
|
+
originalvalue?: string | number;
|
|
12
|
+
region?: string;
|
|
13
|
+
observation: string;
|
|
14
|
+
safe: string | number;
|
|
15
|
+
cost: string | number;
|
|
16
|
+
safecost: string | number;
|
|
17
|
+
role: string | number;
|
|
18
|
+
extra: string | number;
|
|
19
|
+
extraWeight: string | number;
|
|
20
|
+
extraValue: string | number;
|
|
21
|
+
icms: string | number;
|
|
22
|
+
iss: string | number;
|
|
23
|
+
aplicou: 0 | 1 | number;
|
|
24
|
+
weightVolume?: string | number;
|
|
25
|
+
weightm3: string | number;
|
|
26
|
+
shipmentId: string | number;
|
|
27
|
+
state: string;
|
|
28
|
+
cubageFactor: string | number;
|
|
29
|
+
}
|
|
30
|
+
export type IGetFreightResponse = IGetFreightItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-freight.interface.js","sourceRoot":"","sources":["../../../../src/entities/shipping/interfaces/get-freight.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-zipcode.interface.js","sourceRoot":"","sources":["../../../../src/entities/shipping/interfaces/validate-zipcode.interface.ts"],"names":[],"mappings":""}
|
package/lib/tpl.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Auth } from './entities/auth';
|
|
2
2
|
import { Orders } from './entities/orders';
|
|
3
|
+
import { Products } from './entities/products';
|
|
4
|
+
import { Shipping } from './entities/shipping';
|
|
3
5
|
export declare class Tpl {
|
|
4
6
|
#private;
|
|
5
7
|
constructor(authToken?: string, baseUrl?: string);
|
|
6
8
|
private getModule;
|
|
7
9
|
get auth(): Auth;
|
|
8
10
|
get orders(): Orders;
|
|
11
|
+
get shipping(): Shipping;
|
|
12
|
+
get products(): Products;
|
|
9
13
|
}
|
package/lib/tpl.js
CHANGED
|
@@ -15,6 +15,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.Tpl = void 0;
|
|
16
16
|
const auth_1 = require("./entities/auth");
|
|
17
17
|
const orders_1 = require("./entities/orders");
|
|
18
|
+
const products_1 = require("./entities/products");
|
|
19
|
+
const shipping_1 = require("./entities/shipping");
|
|
18
20
|
const ioc_1 = require("./providers/ioc");
|
|
19
21
|
class Tpl {
|
|
20
22
|
constructor(authToken, baseUrl = 'https://oms.tpl.com.br/api') {
|
|
@@ -35,6 +37,12 @@ class Tpl {
|
|
|
35
37
|
get orders() {
|
|
36
38
|
return this.getModule(orders_1.Orders);
|
|
37
39
|
}
|
|
40
|
+
get shipping() {
|
|
41
|
+
return this.getModule(shipping_1.Shipping);
|
|
42
|
+
}
|
|
43
|
+
get products() {
|
|
44
|
+
return this.getModule(products_1.Products);
|
|
45
|
+
}
|
|
38
46
|
}
|
|
39
47
|
exports.Tpl = Tpl;
|
|
40
48
|
_Tpl_repository = new WeakMap(), _Tpl_modules = new WeakMap();
|
package/lib/tpl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tpl.js","sourceRoot":"","sources":["../src/tpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,0CAAsC;AACtC,8CAA0C;AAC1C,yCAA+C;AAE/C,MAAa,GAAG;IAmBd,YACE,SAAkB,EAClB,UAAkB,4BAA4B;QApBhD,kCAA2B;QAC3B,+BAA4C;QAqB1C,uBAAA,IAAI,mBAAe,IAAA,mBAAa,EAAC,SAAS,IAAI,SAAS,EAAE,OAAO,CAAC,MAAA,CAAA;QACjE,uBAAA,IAAI,gBAAY,EAAE,MAAA,CAAA;IACpB,CAAC;IAQO,SAAS,CAAmB,WAAuB;QACzD,IAAI,CAAC,uBAAA,IAAI,oBAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,uBAAA,IAAI,oBAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,uBAAA,IAAI,uBAAY,CAAC,CAAA;QACrE,CAAC;QACD,OAAO,uBAAA,IAAI,oBAAS,CAAC,WAAW,CAAC,IAAI,CAAM,CAAA;IAC7C,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,WAAI,CAAC,CAAA;IAC7B,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,eAAM,CAAC,CAAA;IAC/B,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"tpl.js","sourceRoot":"","sources":["../src/tpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,0CAAsC;AACtC,8CAA0C;AAC1C,kDAA8C;AAC9C,kDAA8C;AAC9C,yCAA+C;AAE/C,MAAa,GAAG;IAmBd,YACE,SAAkB,EAClB,UAAkB,4BAA4B;QApBhD,kCAA2B;QAC3B,+BAA4C;QAqB1C,uBAAA,IAAI,mBAAe,IAAA,mBAAa,EAAC,SAAS,IAAI,SAAS,EAAE,OAAO,CAAC,MAAA,CAAA;QACjE,uBAAA,IAAI,gBAAY,EAAE,MAAA,CAAA;IACpB,CAAC;IAQO,SAAS,CAAmB,WAAuB;QACzD,IAAI,CAAC,uBAAA,IAAI,oBAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,uBAAA,IAAI,oBAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,uBAAA,IAAI,uBAAY,CAAC,CAAA;QACrE,CAAC;QACD,OAAO,uBAAA,IAAI,oBAAS,CAAC,WAAW,CAAC,IAAI,CAAM,CAAA;IAC7C,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,WAAI,CAAC,CAAA;IAC7B,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,eAAM,CAAC,CAAA;IAC/B,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAQ,CAAC,CAAA;IACjC,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAQ,CAAC,CAAA;IACjC,CAAC;CACF;AAvDD,kBAuDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nhvbeauty/tpl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Pacote de integração com a API da TPL",
|
|
5
5
|
"directories": {
|
|
6
6
|
"test": "test"
|
|
@@ -26,11 +26,14 @@
|
|
|
26
26
|
],
|
|
27
27
|
"main": "lib/index.js",
|
|
28
28
|
"files": [
|
|
29
|
+
"README.md",
|
|
29
30
|
"lib/**/*"
|
|
30
31
|
],
|
|
31
32
|
"scripts": {
|
|
32
|
-
"
|
|
33
|
+
"clean": "rm -rf lib",
|
|
34
|
+
"build": "npm run clean && tsc --project tsconfig.build.json",
|
|
33
35
|
"lint": "eslint --fix 'src/**/*.ts'",
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
34
37
|
"test": "npm run build && jest --config jest.config.ts",
|
|
35
38
|
"test:coverage": "jest --config jest.config.ts --coverage"
|
|
36
39
|
},
|