@longvansoftware/storefront-js-client 0.0.2 → 0.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.
Files changed (29) hide show
  1. package/dist/constants/graphql/mutations/authorizationMutations.d.ts +7 -0
  2. package/dist/constants/graphql/mutations/authorizationMutations.js +99 -0
  3. package/dist/constants/graphql/mutations/crmMutations.d.ts +8 -0
  4. package/dist/constants/graphql/mutations/crmMutations.js +368 -0
  5. package/dist/constants/graphql/mutations/userMutations.d.ts +4 -0
  6. package/dist/constants/graphql/mutations/userMutations.js +116 -0
  7. package/dist/constants/graphql/queries/crmQueries.d.ts +1 -0
  8. package/dist/constants/graphql/queries/crmQueries.js +45 -0
  9. package/dist/constants/graphql/queries/productQueries.d.ts +9 -0
  10. package/dist/constants/graphql/queries/productQueries.js +368 -0
  11. package/dist/constants/interfaces/authorization.d.ts +82 -0
  12. package/dist/constants/interfaces/authorization.js +2 -0
  13. package/dist/constants/interfaces/crm.d.ts +218 -0
  14. package/dist/constants/interfaces/crm.js +2 -0
  15. package/dist/constants/interfaces/product.d.ts +61 -0
  16. package/dist/constants/interfaces/product.js +2 -0
  17. package/dist/constants/interfaces/user.d.ts +49 -0
  18. package/dist/constants/interfaces/user.js +2 -0
  19. package/dist/index.d.ts +19 -0
  20. package/dist/index.js +17 -0
  21. package/dist/modules/authorization/graphql.d.ts +15 -0
  22. package/dist/modules/authorization/graphql.js +116 -0
  23. package/dist/modules/crm/graphql.d.ts +19 -0
  24. package/dist/modules/crm/graphql.js +291 -0
  25. package/dist/modules/product/graphql.d.ts +19 -0
  26. package/dist/modules/product/graphql.js +180 -0
  27. package/dist/modules/user/graphql.d.ts +14 -0
  28. package/dist/modules/user/graphql.js +156 -0
  29. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,49 @@
1
+ export interface createCompanyRequest {
2
+ name: string;
3
+ phone: string;
4
+ address: string;
5
+ }
6
+ export interface CreateCompany {
7
+ id: string;
8
+ name: string;
9
+ address: string;
10
+ gender: string;
11
+ identityNumber: string;
12
+ birthDate: Date;
13
+ email: string;
14
+ phone: string;
15
+ createdStamp: Date;
16
+ createdBy: string;
17
+ memberLevel: string;
18
+ }
19
+ export interface updateCustomerRequest {
20
+ fullName: string;
21
+ phone: string;
22
+ address: string;
23
+ }
24
+ export interface GetPersonByPartyIds {
25
+ status: string;
26
+ partyId: string;
27
+ fullName: string;
28
+ phone: string;
29
+ address: string;
30
+ gender: string;
31
+ birthDate: Date;
32
+ email: string;
33
+ personalTitle: string;
34
+ imageUrl: string;
35
+ identityNumber: string;
36
+ addressModel: addressModel;
37
+ id: string;
38
+ }
39
+ export interface addressModel {
40
+ id: string;
41
+ addressInfo: string;
42
+ provinceGeoId: string;
43
+ districtGeoId: string;
44
+ wardGeoId: string;
45
+ provinceName: string;
46
+ districtName: string;
47
+ wardName: string;
48
+ isDefault: boolean;
49
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { CRMModuleGraphQL } from "./modules/crm/graphql";
2
+ import { ProductModuleGraphQL } from "./modules/product/graphql";
3
+ import { AuthorizationModuleGraphQL } from "./modules/authorization/graphql";
4
+ import { USERModuleGraphQL } from "./modules/user/graphql";
5
+ interface Endpoints {
6
+ crmEndpoint: string;
7
+ productEndpoint: string;
8
+ authorizationEndpoint: string;
9
+ storeFrontEndpoint: string;
10
+ userEndpoint: string;
11
+ }
12
+ export declare class SDKLongVan {
13
+ crm: CRMModuleGraphQL;
14
+ product: ProductModuleGraphQL;
15
+ authorization: AuthorizationModuleGraphQL;
16
+ user: USERModuleGraphQL;
17
+ constructor(endpoints: Endpoints, partnerId: string, storeId: string);
18
+ }
19
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDKLongVan = void 0;
4
+ const graphql_1 = require("./modules/crm/graphql");
5
+ const graphql_2 = require("./modules/product/graphql");
6
+ const graphql_3 = require("./modules/authorization/graphql");
7
+ const graphql_4 = require("./modules/user/graphql");
8
+ class SDKLongVan {
9
+ constructor(endpoints, partnerId, storeId) {
10
+ const { crmEndpoint, productEndpoint, authorizationEndpoint, userEndpoint } = endpoints;
11
+ this.crm = new graphql_1.CRMModuleGraphQL(crmEndpoint, partnerId, storeId);
12
+ this.product = new graphql_2.ProductModuleGraphQL(productEndpoint, partnerId, storeId);
13
+ this.authorization = new graphql_3.AuthorizationModuleGraphQL(authorizationEndpoint, partnerId, storeId);
14
+ this.user = new graphql_4.USERModuleGraphQL(userEndpoint, partnerId, storeId);
15
+ }
16
+ }
17
+ exports.SDKLongVan = SDKLongVan;
@@ -0,0 +1,15 @@
1
+ import { GraphQLClient } from "graphql-request";
2
+ import { LoginRequest, LoginResponse, RegisterRequest, RegisterResponse, SendSmsVerifyCodeResponse, SmsVerifyCodeRequest, UpdateInfoRequest, UpdateInfoResponse } from "../../constants/interfaces/authorization";
3
+ export declare class AuthorizationModuleGraphQL {
4
+ private client;
5
+ private endpoint;
6
+ partnerId: string;
7
+ private storeId;
8
+ constructor(endpoint: string, partnerId: string, storeId: string);
9
+ getClient(): GraphQLClient;
10
+ login(loginRequest: LoginRequest): Promise<LoginResponse | null>;
11
+ register(registerRequest: RegisterRequest): Promise<RegisterResponse | null>;
12
+ sendSmsVerifyCode(username: string): Promise<SendSmsVerifyCodeResponse | null>;
13
+ verifyCode(verifyCodeRequest: SmsVerifyCodeRequest): Promise<boolean>;
14
+ updateInfo(updateInfoRequest: UpdateInfoRequest): Promise<UpdateInfoResponse | null>;
15
+ }
@@ -0,0 +1,116 @@
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.AuthorizationModuleGraphQL = void 0;
13
+ const graphql_request_1 = require("graphql-request");
14
+ const authorizationMutations_1 = require("../../constants/graphql/mutations/authorizationMutations");
15
+ class AuthorizationModuleGraphQL {
16
+ constructor(endpoint, partnerId, storeId) {
17
+ this.endpoint = endpoint;
18
+ this.partnerId = partnerId;
19
+ this.storeId = storeId;
20
+ this.client = new graphql_request_1.GraphQLClient(endpoint);
21
+ }
22
+ getClient() {
23
+ return this.client;
24
+ }
25
+ login(loginRequest) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ const variables = {
28
+ loginRequest: Object.assign({ orgId: this.partnerId }, (loginRequest || {})),
29
+ };
30
+ try {
31
+ const { login } = yield this.client.request(authorizationMutations_1.LOGIN_MUTATION, variables);
32
+ return login;
33
+ }
34
+ catch (error) {
35
+ console.error("Error during login:", error);
36
+ return null;
37
+ }
38
+ });
39
+ }
40
+ register(registerRequest) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ const variables = Object.assign({ orgId: this.partnerId }, (registerRequest || {}));
43
+ try {
44
+ const { register } = yield this.client.request(authorizationMutations_1.REGISTER_MUTATION, variables);
45
+ return register;
46
+ }
47
+ catch (error) {
48
+ console.error("Error during registration:", error);
49
+ return null;
50
+ }
51
+ });
52
+ }
53
+ sendSmsVerifyCode(username) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const variables = {
56
+ orgId: this.partnerId,
57
+ username,
58
+ };
59
+ try {
60
+ const { sendSmsVerifyCode } = yield this.client.request(authorizationMutations_1.SEND_SMS_VERIFY_CODE_MUTATION, variables);
61
+ return sendSmsVerifyCode;
62
+ }
63
+ catch (error) {
64
+ console.error("Error sending SMS verification code:", error);
65
+ return null;
66
+ }
67
+ });
68
+ }
69
+ verifyCode(verifyCodeRequest) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ const variables = {
72
+ orgId: this.partnerId,
73
+ verifyCodeRequest,
74
+ };
75
+ try {
76
+ const { verifyCode } = yield this.client.request(authorizationMutations_1.VERIFY_CODE_MUTATION, variables);
77
+ return verifyCode;
78
+ }
79
+ catch (error) {
80
+ console.error("Error during code verification:", error);
81
+ return false;
82
+ }
83
+ });
84
+ }
85
+ // async resetPassword(
86
+ // resetPasswordRequest: ResetPasswordRequest
87
+ // ): Promise<boolean> {
88
+ // const variables = {
89
+ // orgId: this.partnerId,
90
+ // resetPasswordRequest,
91
+ // };
92
+ // try {
93
+ // const { resetPassword } = await this.client.request<{
94
+ // resetPassword: ResetPasswordResponse;
95
+ // }>(RESET_PASSWORD_MUTATION, variables);
96
+ // return resetPassword.success;
97
+ // } catch (error) {
98
+ // console.error("Error resetting password:", error);
99
+ // return false;
100
+ // }
101
+ // }
102
+ updateInfo(updateInfoRequest) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ const variables = Object.assign({ orgId: this.partnerId }, updateInfoRequest);
105
+ try {
106
+ const { updateInfo } = yield this.client.request(authorizationMutations_1.UPDATE_INFO_MUTATION, variables);
107
+ return updateInfo;
108
+ }
109
+ catch (error) {
110
+ console.error("Error during updating info:", error);
111
+ return null;
112
+ }
113
+ });
114
+ }
115
+ }
116
+ exports.AuthorizationModuleGraphQL = AuthorizationModuleGraphQL;
@@ -0,0 +1,19 @@
1
+ import { GraphQLClient } from "graphql-request";
2
+ import { AddOpportunityRequest, GetOpportunity, GetOpportunityRequest, ListToDo, Opportunity, getListWorkEffortType, listAttachment, updateWorkEffortDescription } from "../../constants/interfaces/crm";
3
+ export declare class CRMModuleGraphQL {
4
+ private client;
5
+ private endpoint;
6
+ private partnerId;
7
+ private storeId;
8
+ constructor(endpoint: string, partnerId: string, storeId: string);
9
+ getClient(): GraphQLClient;
10
+ addOpportunity(addOpportunityRequest: AddOpportunityRequest, performerId: string): Promise<Opportunity>;
11
+ getListOpportunity(performerId: string, getOpportunityRequest: GetOpportunityRequest): Promise<GetOpportunity>;
12
+ getListTodo(workEffortId: string[]): Promise<ListToDo>;
13
+ getListWorkEffortType(id: string): Promise<getListWorkEffortType>;
14
+ updateStatusAttachmentById(performerId: string, attachmentId: string, status: string): Promise<listAttachment>;
15
+ updateWorkEffortDescription(performerId: string, workEffortId: string, description: string): Promise<updateWorkEffortDescription>;
16
+ updateWorkEffortName(performerId: string, workEffortId: string, name: string): Promise<updateWorkEffortDescription>;
17
+ updateWorkEffortStatus(performerId: string, workEffortId: string, source: string, status: string): Promise<updateWorkEffortDescription>;
18
+ addAttachmentForWorkEffort(performerId: string, workEffortId: string, attachments: [{}]): Promise<listAttachment>;
19
+ }
@@ -0,0 +1,291 @@
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.CRMModuleGraphQL = void 0;
13
+ const graphql_request_1 = require("graphql-request");
14
+ const crmMutations_1 = require("../../constants/graphql/mutations/crmMutations");
15
+ const crmQueries_1 = require("../../constants/graphql/queries/crmQueries");
16
+ class CRMModuleGraphQL {
17
+ constructor(endpoint, partnerId, storeId) {
18
+ this.endpoint = endpoint;
19
+ this.partnerId = partnerId;
20
+ this.storeId = storeId;
21
+ this.client = new graphql_request_1.GraphQLClient(endpoint);
22
+ }
23
+ getClient() {
24
+ return this.client;
25
+ }
26
+ addOpportunity(addOpportunityRequest, performerId) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ const variables = {
29
+ partyId: this.partnerId,
30
+ addOpportunityRequest,
31
+ performerId,
32
+ };
33
+ try {
34
+ const response = yield this.client.request(crmMutations_1.ADD_OPPORTUNITY_MUTATION, variables);
35
+ if (response && response.addOpportunity) {
36
+ return response.addOpportunity;
37
+ }
38
+ else {
39
+ throw new Error("No opportunity returned from the backend");
40
+ }
41
+ }
42
+ catch (error) {
43
+ if (error.response &&
44
+ error.response.errors &&
45
+ error.response.errors.length > 0) {
46
+ const errorMessage = error.response.errors[0].message;
47
+ throw new Error(errorMessage);
48
+ }
49
+ else {
50
+ throw new Error("Unknown error occurred");
51
+ }
52
+ }
53
+ });
54
+ }
55
+ ;
56
+ getListOpportunity(performerId, getOpportunityRequest) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const variables = {
59
+ partyId: this.partnerId,
60
+ performerId,
61
+ getOpportunityRequest,
62
+ };
63
+ try {
64
+ const response = yield this.client.request(crmQueries_1.GET_LIST_OPPORTUNITY_QUERY, variables);
65
+ if (response && response.getDataOpportunity) {
66
+ return response.getDataOpportunity; // Trả về phần tử getDataOpportunity từ response
67
+ }
68
+ else {
69
+ throw new Error("No list opportunity returned from the backend");
70
+ }
71
+ }
72
+ catch (error) {
73
+ if (error.response &&
74
+ error.response.errors &&
75
+ error.response.errors.length > 0) {
76
+ const errorMessage = error.response.errors[0].message;
77
+ throw new Error(errorMessage);
78
+ }
79
+ else {
80
+ throw new Error("Unknown error occurred");
81
+ }
82
+ }
83
+ });
84
+ }
85
+ getListTodo(workEffortId) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const variables = {
88
+ partyId: this.partnerId,
89
+ workEffortId
90
+ };
91
+ try {
92
+ const response = yield this.client.request(crmMutations_1.GET_LIST_TODO, variables);
93
+ if (response && response.getListTodo) {
94
+ return response.getListTodo; // Trả về phần tử getDataOpportunity từ response
95
+ }
96
+ else {
97
+ throw new Error("No list todo returned from the backend");
98
+ }
99
+ }
100
+ catch (error) {
101
+ if (error.response &&
102
+ error.response.errors &&
103
+ error.response.errors.length > 0) {
104
+ const errorMessage = error.response.errors[0].message;
105
+ throw new Error(errorMessage);
106
+ }
107
+ else {
108
+ throw new Error("Unknown error occurred");
109
+ }
110
+ }
111
+ });
112
+ }
113
+ getListWorkEffortType(id) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ const variables = {
116
+ partyId: this.partnerId,
117
+ id
118
+ };
119
+ try {
120
+ const response = yield this.client.request(crmMutations_1.GET_LIST_WORK_EFFORT_TYPE, variables);
121
+ if (response && response.getListWorkEffortType) {
122
+ return response.getListWorkEffortType; // Trả về phần tử getDataOpportunity từ response
123
+ }
124
+ else {
125
+ throw new Error("No getListWorkEffortType returned from the backend");
126
+ }
127
+ }
128
+ catch (error) {
129
+ if (error.response &&
130
+ error.response.errors &&
131
+ error.response.errors.length > 0) {
132
+ const errorMessage = error.response.errors[0].message;
133
+ throw new Error(errorMessage);
134
+ }
135
+ else {
136
+ throw new Error("Unknown error occurred");
137
+ }
138
+ }
139
+ });
140
+ }
141
+ updateStatusAttachmentById(performerId, attachmentId, status) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ const variables = {
144
+ performerId,
145
+ attachmentId,
146
+ status
147
+ };
148
+ try {
149
+ const response = yield this.client.request(crmMutations_1.UPDATE_STATUS_ATTACHMENT_BY_ID, variables);
150
+ if (response && response.updateStatusAttachmentById) {
151
+ return response.updateStatusAttachmentById; // Trả về phần tử getDataOpportunity từ response
152
+ }
153
+ else {
154
+ throw new Error("No updateStatusAttachmentById returned from the backend");
155
+ }
156
+ }
157
+ catch (error) {
158
+ if (error.response &&
159
+ error.response.errors &&
160
+ error.response.errors.length > 0) {
161
+ const errorMessage = error.response.errors[0].message;
162
+ throw new Error(errorMessage);
163
+ }
164
+ else {
165
+ throw new Error("Unknown error occurred");
166
+ }
167
+ }
168
+ });
169
+ }
170
+ updateWorkEffortDescription(performerId, workEffortId, description) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ const variables = {
173
+ performerId,
174
+ workEffortId,
175
+ description
176
+ };
177
+ try {
178
+ const response = yield this.client.request(crmMutations_1.UPDATE_WORK_EFFORT_DESCRIPTION, variables);
179
+ if (response && response.updateWorkEffortDescription) {
180
+ return response.updateWorkEffortDescription; // Trả về phần tử getDataOpportunity từ response
181
+ }
182
+ else {
183
+ throw new Error("No updateWorkEffortDescription returned from the backend");
184
+ }
185
+ }
186
+ catch (error) {
187
+ if (error.response &&
188
+ error.response.errors &&
189
+ error.response.errors.length > 0) {
190
+ const errorMessage = error.response.errors[0].message;
191
+ throw new Error(errorMessage);
192
+ }
193
+ else {
194
+ throw new Error("Unknown error occurred");
195
+ }
196
+ }
197
+ });
198
+ }
199
+ updateWorkEffortName(performerId, workEffortId, name) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ const variables = {
202
+ partyId: this.partnerId,
203
+ performerId,
204
+ workEffortId,
205
+ name
206
+ };
207
+ try {
208
+ const response = yield this.client.request(crmMutations_1.UPDATE_WORK_EFFORT_NAME, variables);
209
+ if (response && response.updateWorkEffortName) {
210
+ return response.updateWorkEffortName; // Trả về phần tử getDataOpportunity từ response
211
+ }
212
+ else {
213
+ throw new Error("No updateWorkEffortName returned from the backend");
214
+ }
215
+ }
216
+ catch (error) {
217
+ if (error.response &&
218
+ error.response.errors &&
219
+ error.response.errors.length > 0) {
220
+ const errorMessage = error.response.errors[0].message;
221
+ throw new Error(errorMessage);
222
+ }
223
+ else {
224
+ throw new Error("Unknown error occurred");
225
+ }
226
+ }
227
+ });
228
+ }
229
+ updateWorkEffortStatus(performerId, workEffortId, source, status) {
230
+ return __awaiter(this, void 0, void 0, function* () {
231
+ const variables = {
232
+ partyId: this.partnerId,
233
+ performerId,
234
+ workEffortId,
235
+ source,
236
+ status
237
+ };
238
+ try {
239
+ const response = yield this.client.request(crmMutations_1.UPDATE_WORK_EFFORT_STATUS, variables);
240
+ if (response && response.updateWorkEffortStatus) {
241
+ return response.updateWorkEffortStatus; // Trả về phần tử getDataOpportunity từ response
242
+ }
243
+ else {
244
+ throw new Error("No updateWorkEffortStatus returned from the backend");
245
+ }
246
+ }
247
+ catch (error) {
248
+ if (error.response &&
249
+ error.response.errors &&
250
+ error.response.errors.length > 0) {
251
+ const errorMessage = error.response.errors[0].message;
252
+ throw new Error(errorMessage);
253
+ }
254
+ else {
255
+ throw new Error("Unknown error occurred");
256
+ }
257
+ }
258
+ });
259
+ }
260
+ addAttachmentForWorkEffort(performerId, workEffortId, attachments) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ const variables = {
263
+ partyId: this.partnerId,
264
+ performerId,
265
+ workEffortId,
266
+ attachments,
267
+ };
268
+ try {
269
+ const response = yield this.client.request(crmMutations_1.ADD_ATTACHMENT_FOR_WORK_EFFORT, variables);
270
+ if (response && response.addAttachmentForWorkEffort) {
271
+ return response.addAttachmentForWorkEffort; // Trả về phần tử getDataOpportunity từ response
272
+ }
273
+ else {
274
+ throw new Error("No addAttachmentForWorkEffort returned from the backend");
275
+ }
276
+ }
277
+ catch (error) {
278
+ if (error.response &&
279
+ error.response.errors &&
280
+ error.response.errors.length > 0) {
281
+ const errorMessage = error.response.errors[0].message;
282
+ throw new Error(errorMessage);
283
+ }
284
+ else {
285
+ throw new Error("Unknown error occurred");
286
+ }
287
+ }
288
+ });
289
+ }
290
+ }
291
+ exports.CRMModuleGraphQL = CRMModuleGraphQL;
@@ -0,0 +1,19 @@
1
+ import { GraphQLClient } from "graphql-request";
2
+ import { Product, Category, ProductFilterOptions, CategoryFilterOptions, Brand } from "../../constants/interfaces/product";
3
+ export declare class ProductModuleGraphQL {
4
+ private client;
5
+ private endpoint;
6
+ private partnerId;
7
+ private storeId;
8
+ constructor(endpoint: string, partnerId: string, storeId: string);
9
+ getClient(): GraphQLClient;
10
+ getProductById(productId: string): Promise<Product | null>;
11
+ getProductBySlug(productSlug: string): Promise<Product | null>;
12
+ getSimpleProducts(productFilterOptions: ProductFilterOptions): Promise<Product[] | null>;
13
+ getCategories(categoryFilterOptions: CategoryFilterOptions): Promise<Category[] | null>;
14
+ getCategoryByHandle(handle: string): Promise<Category | null>;
15
+ getCategoryById(categoryId: string): Promise<Category | null>;
16
+ getBrands(): Promise<Brand[] | null>;
17
+ getBrandsByCategory(categoryId: string): Promise<Brand[] | null>;
18
+ getBrandDetail(brandId: string): Promise<Brand | null>;
19
+ }