@hellena-sdk/hellena 1.0.1 → 1.0.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.
- package/README.md +20 -5
- package/dist/core/HellenaConnect.d.ts +0 -4
- package/dist/core/HellenaConnect.d.ts.map +1 -1
- package/dist/core/HellenaConnect.js +0 -4
- package/dist/core/HellenaConnect.js.map +1 -1
- package/dist/libs/graphql-client.ts.d.ts +1 -2
- package/dist/libs/graphql-client.ts.d.ts.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -1
- package/dist/resources/organization/dto/organization.dto.d.ts +17 -0
- package/dist/resources/organization/dto/organization.dto.d.ts.map +1 -0
- package/dist/resources/organization/dto/organization.dto.js +2 -0
- package/dist/resources/organization/dto/organization.dto.js.map +1 -0
- package/dist/resources/organization/organization.feature.d.ts +9 -0
- package/dist/resources/organization/organization.feature.d.ts.map +1 -0
- package/dist/resources/organization/organization.feature.js +9 -0
- package/dist/resources/organization/organization.feature.js.map +1 -0
- package/dist/resources/organization/organization.model.d.ts +4 -0
- package/dist/resources/organization/organization.model.d.ts.map +1 -0
- package/dist/resources/organization/organization.model.js +7 -0
- package/dist/resources/organization/organization.model.js.map +1 -0
- package/dist/resources/organization/service/organization.ser.d.ts +9 -0
- package/dist/resources/organization/service/organization.ser.d.ts.map +1 -0
- package/dist/resources/organization/service/organization.ser.js +26 -0
- package/dist/resources/organization/service/organization.ser.js.map +1 -0
- package/dist/resources/product/product.feature.d.ts.map +1 -1
- package/dist/resources/product/product.feature.js +2 -6
- package/dist/resources/product/product.feature.js.map +1 -1
- package/dist/test.d.ts +2 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/{index.js → test.js} +3 -4
- package/dist/test.js.map +1 -0
- package/package.json +3 -4
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,20 +1,35 @@
|
|
|
1
|
-
# hellena-
|
|
1
|
+
# hellena-SDK
|
|
2
2
|
|
|
3
3
|
A JavaScript SDK for the Hellena platform.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
8
|
+
npm i @hellena-sdk/hellena
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```javascript
|
|
14
|
-
|
|
14
|
+
import { HellenaClient } from "@hellena-sdk/hellena";
|
|
15
|
+
import dotenv from "dotenv";
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
dotenv.config({ quiet: true });
|
|
18
|
+
|
|
19
|
+
const main = async () => {
|
|
20
|
+
const hellena = new HellenaClient(process.env.HELLENA_API_KEY!);
|
|
21
|
+
|
|
22
|
+
const product = await hellena.product.findOne({
|
|
23
|
+
id: "123"
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
return product
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
main().then((data) => {
|
|
30
|
+
console.log(data.barcode, data.name, data.quantity);
|
|
31
|
+
}).catch((error) => {
|
|
32
|
+
console.error("An error occurred:", error);
|
|
18
33
|
});
|
|
19
34
|
```
|
|
20
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HellenaConnect.d.ts","sourceRoot":"","sources":["../../src/core/HellenaConnect.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;IAKX,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM;IAJ7C,SAAS,CAAC,QAAQ,CAAC,MAAM,6CAA6C;IACtE,SAAS,CAAC,QAAQ,CAAC,UAAU,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,SAAuC;gBAEtC,MAAM,EAAE,MAAM;IAE7C,SAAS,CAAC,UAAU;;;;
|
|
1
|
+
{"version":3,"file":"HellenaConnect.d.ts","sourceRoot":"","sources":["../../src/core/HellenaConnect.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;IAKX,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM;IAJ7C,SAAS,CAAC,QAAQ,CAAC,MAAM,6CAA6C;IACtE,SAAS,CAAC,QAAQ,CAAC,UAAU,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,SAAuC;gBAEtC,MAAM,EAAE,MAAM;IAE7C,SAAS,CAAC,UAAU;;;;CAMvB"}
|
|
@@ -11,9 +11,5 @@ export class HellenaConnect {
|
|
|
11
11
|
Authorization: `Bearer ${this.apiKey}`,
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
getApiKey() { return this.apiKey; }
|
|
15
|
-
getApiEndpoint() { return this.apiEndpoint; }
|
|
16
|
-
getApiVersion() { return this.apiVersion; }
|
|
17
|
-
getApiUrl() { return this.apiUrl; }
|
|
18
14
|
}
|
|
19
15
|
//# sourceMappingURL=HellenaConnect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HellenaConnect.js","sourceRoot":"","sources":["../../src/core/HellenaConnect.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAc;IAKvB,YAA+B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAJ1B,WAAM,GAAG,yCAAyC,CAAC;QACnD,eAAU,GAAG,IAAI,CAAC;QAClB,gBAAW,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IAEpB,CAAC;IAExC,UAAU;QAChB,OAAO;YACH,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;SACzC,CAAC;IACN,CAAC;
|
|
1
|
+
{"version":3,"file":"HellenaConnect.js","sourceRoot":"","sources":["../../src/core/HellenaConnect.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAc;IAKvB,YAA+B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAJ1B,WAAM,GAAG,yCAAyC,CAAC;QACnD,eAAU,GAAG,IAAI,CAAC;QAClB,gBAAW,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IAEpB,CAAC;IAExC,UAAU;QAChB,OAAO;YACH,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;SACzC,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.ts.d.ts","sourceRoot":"","sources":["../../src/libs/graphql-client.ts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql-client.ts.d.ts","sourceRoot":"","sources":["../../src/libs/graphql-client.ts.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,KAA+D,CAAC"}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HellenaConnect } from "./core/HellenaConnect.js";
|
|
2
2
|
export declare class HellenaClient extends HellenaConnect {
|
|
3
3
|
readonly product: import("./resources/product/product.feature.js").ProductFeature;
|
|
4
|
+
readonly organization: import("./resources/organization/organization.feature.js").OrganizationFeature;
|
|
4
5
|
constructor(apiKey: string);
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=main.d.ts.map
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI1D,qBAAa,aAAc,SAAQ,cAAc;IAC7C,SAAgB,OAAO,kEAAsB;IAC7C,SAAgB,YAAY,iFAA2B;gBAE3C,MAAM,EAAE,MAAM;CAG7B"}
|
package/dist/main.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { HellenaConnect } from "./core/HellenaConnect.js";
|
|
2
|
+
import { OrganizationModel } from "./resources/organization/organization.model.js";
|
|
2
3
|
import { ProductModel } from "./resources/product/product.model.js";
|
|
3
4
|
export class HellenaClient extends HellenaConnect {
|
|
4
5
|
constructor(apiKey) {
|
|
5
6
|
super(apiKey);
|
|
6
7
|
this.product = ProductModel(this);
|
|
8
|
+
this.organization = OrganizationModel(this);
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,MAAM,OAAO,aAAc,SAAQ,cAAc;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,MAAM,OAAO,aAAc,SAAQ,cAAc;IAI7C,YAAY,MAAc;QACtB,KAAK,CAAC,MAAM,CAAC,CAAC;QAJF,YAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,iBAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAIvD,CAAC;CACJ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface OrganizationInfoResponseDTO {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
category?: string;
|
|
6
|
+
address?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
logo?: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export interface OrganizationLinkDTO {
|
|
14
|
+
name: string;
|
|
15
|
+
link: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=organization.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.dto.d.ts","sourceRoot":"","sources":["../../../../src/resources/organization/dto/organization.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.dto.js","sourceRoot":"","sources":["../../../../src/resources/organization/dto/organization.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OrganizationInfoResponseDTO, OrganizationLinkDTO } from "./dto/organization.dto.js";
|
|
2
|
+
import { OrganizationService } from "./service/organization.ser.js";
|
|
3
|
+
export declare class OrganizationFeature {
|
|
4
|
+
private readonly service;
|
|
5
|
+
constructor(service: OrganizationService);
|
|
6
|
+
info(): Promise<OrganizationInfoResponseDTO>;
|
|
7
|
+
socialLinks(): Promise<OrganizationLinkDTO[]>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=organization.feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.feature.d.ts","sourceRoot":"","sources":["../../../src/resources/organization/organization.feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,qBAAa,mBAAmB;IAChB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,mBAAmB;IAEzD,IAAI,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAC5C,WAAW,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrganizationService } from "./service/organization.ser.js";
|
|
2
|
+
export class OrganizationFeature {
|
|
3
|
+
constructor(service) {
|
|
4
|
+
this.service = service;
|
|
5
|
+
}
|
|
6
|
+
info() { return this.service.getInfo(); }
|
|
7
|
+
socialLinks() { return this.service.getLinks(); }
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=organization.feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.feature.js","sourceRoot":"","sources":["../../../src/resources/organization/organization.feature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,OAAO,mBAAmB;IAC5B,YAA6B,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAAI,CAAC;IAE9D,IAAI,KAA2C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA,CAAC,CAAC;IAC9E,WAAW,KAAqC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAA,CAAC,CAAC;CACnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.model.d.ts","sourceRoot":"","sources":["../../../src/resources/organization/organization.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,uBAGxD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OrganizationService } from "./service/organization.ser.js";
|
|
2
|
+
import { OrganizationFeature } from "./organization.feature.js";
|
|
3
|
+
export function OrganizationModel(connect) {
|
|
4
|
+
const service = new OrganizationService(connect);
|
|
5
|
+
return new OrganizationFeature(service);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=organization.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.model.js","sourceRoot":"","sources":["../../../src/resources/organization/organization.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,UAAU,iBAAiB,CAAC,OAAuB;IACrD,MAAM,OAAO,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HellenaConnect } from "@/core/HellenaConnect.js";
|
|
2
|
+
import type { OrganizationInfoResponseDTO, OrganizationLinkDTO } from "../dto/organization.dto.js";
|
|
3
|
+
export declare class OrganizationService {
|
|
4
|
+
private readonly connect;
|
|
5
|
+
constructor(connect: HellenaConnect);
|
|
6
|
+
getInfo(): Promise<OrganizationInfoResponseDTO>;
|
|
7
|
+
getLinks(): Promise<OrganizationLinkDTO[]>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=organization.ser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.ser.d.ts","sourceRoot":"","sources":["../../../../src/resources/organization/service/organization.ser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAElG,qBAAa,mBAAmB;IAChB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,cAAc;IAE9C,OAAO,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAgB/C,QAAQ,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAenD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class OrganizationService {
|
|
2
|
+
constructor(connect) {
|
|
3
|
+
this.connect = connect;
|
|
4
|
+
}
|
|
5
|
+
async getInfo() {
|
|
6
|
+
const response = await fetch(`${this.connect["apiEndpoint"]}/organization/info`, {
|
|
7
|
+
method: "GET",
|
|
8
|
+
headers: this.connect["getHeaders"](),
|
|
9
|
+
});
|
|
10
|
+
if (!response.ok) {
|
|
11
|
+
throw new Error(`Erro ao buscar informações da organização (${response.status})`);
|
|
12
|
+
}
|
|
13
|
+
return response.json();
|
|
14
|
+
}
|
|
15
|
+
async getLinks() {
|
|
16
|
+
const response = await fetch(`${this.connect["apiEndpoint"]}/organization/links`, {
|
|
17
|
+
method: "GET",
|
|
18
|
+
headers: this.connect["getHeaders"](),
|
|
19
|
+
});
|
|
20
|
+
if (!response.ok) {
|
|
21
|
+
throw new Error(`Erro ao buscar links da organização (${response.status})`);
|
|
22
|
+
}
|
|
23
|
+
return response.json();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=organization.ser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.ser.js","sourceRoot":"","sources":["../../../../src/resources/organization/service/organization.ser.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,mBAAmB;IAC5B,YAA6B,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAAG,CAAC;IAExD,KAAK,CAAC,OAAO;QACT,MAAM,QAAQ,GAAG,MAAM,KAAK,CACxB,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,oBAAoB,EAClD;YACI,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;SACxC,CACJ,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,8CAA8C,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QACtF,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,MAAM,QAAQ,GAAG,MAAM,KAAK,CACxB,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,qBAAqB,EACnD;YACI,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;SACxC,CACJ,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,wCAAwC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.feature.d.ts","sourceRoot":"","sources":["../../../src/resources/product/product.feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,qBAAa,cAAc;IACX,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,cAAc;IAEpD,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"product.feature.d.ts","sourceRoot":"","sources":["../../../src/resources/product/product.feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,qBAAa,cAAc;IACX,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,cAAc;IAEpD,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;CACvD"}
|
|
@@ -2,11 +2,7 @@ export class ProductFeature {
|
|
|
2
2
|
constructor(service) {
|
|
3
3
|
this.service = service;
|
|
4
4
|
}
|
|
5
|
-
findMany() {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
findOne({ id }) {
|
|
9
|
-
return this.service.getProductById(id);
|
|
10
|
-
}
|
|
5
|
+
findMany() { return this.service.getAllProducts(); }
|
|
6
|
+
findOne({ id }) { return this.service.getProductById(id); }
|
|
11
7
|
}
|
|
12
8
|
//# sourceMappingURL=product.feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.feature.js","sourceRoot":"","sources":["../../../src/resources/product/product.feature.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IACvB,YAA6B,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;
|
|
1
|
+
{"version":3,"file":"product.feature.js","sourceRoot":"","sources":["../../../src/resources/product/product.feature.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,cAAc;IACvB,YAA6B,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;IAAI,CAAC;IAEzD,QAAQ,KAA4B,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAA,CAAC,CAAC;IAC1E,OAAO,CAAC,EAAE,EAAE,EAAkB,IAAyB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC;CAClG"}
|
package/dist/test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":""}
|
|
@@ -3,10 +3,9 @@ import { HellenaClient } from "./main.js";
|
|
|
3
3
|
dotenv.config({ quiet: true });
|
|
4
4
|
async function main() {
|
|
5
5
|
const hellena = new HellenaClient(process.env.HELLENA_API_KEY);
|
|
6
|
+
console.log("carregando...");
|
|
6
7
|
const products = await hellena.product.findMany();
|
|
7
|
-
|
|
8
|
-
console.log(product.barcode);
|
|
9
|
-
});
|
|
8
|
+
console.log(products);
|
|
10
9
|
}
|
|
11
10
|
main();
|
|
12
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=test.js.map
|
package/dist/test.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAE/B,KAAK,UAAU,IAAI;IACf,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,eAAgB,CAAC,CAAC;IAEhE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAC5B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAElD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hellena-sdk/hellena",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|
|
8
8
|
"start": "node dist/main.js",
|
|
9
9
|
"pack": "mkdir -p packages && npm pack && mv *.tgz packages/",
|
|
10
|
-
"dev": "node --loader ts-node/esm src/
|
|
10
|
+
"dev": "node --loader ts-node/esm src/test.ts"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"typescript": "^5.9.3"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"dotenv": "^17.2.3"
|
|
44
|
-
"graphql-request": "^7.4.0"
|
|
43
|
+
"dotenv": "^17.2.3"
|
|
45
44
|
}
|
|
46
45
|
}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAE/B,KAAK,UAAU,IAAI;IACf,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,eAAgB,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAClD,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACzB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,EAAE,CAAC"}
|