@longvansoftware/service-js-client 1.0.2

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 (84) hide show
  1. package/README.md +93 -0
  2. package/dist/config/config.d.ts +26 -0
  3. package/dist/config/config.js +29 -0
  4. package/dist/src/graphql/auth/mutations.d.ts +7 -0
  5. package/dist/src/graphql/auth/mutations.js +99 -0
  6. package/dist/src/graphql/auth/queries.d.ts +1 -0
  7. package/dist/src/graphql/auth/queries.js +25 -0
  8. package/dist/src/graphql/cloud/mutations.d.ts +8 -0
  9. package/dist/src/graphql/cloud/mutations.js +115 -0
  10. package/dist/src/graphql/cloud/queries.d.ts +5 -0
  11. package/dist/src/graphql/cloud/queries.js +121 -0
  12. package/dist/src/graphql/computing/mutations.d.ts +10 -0
  13. package/dist/src/graphql/computing/mutations.js +110 -0
  14. package/dist/src/graphql/computing/queries.d.ts +3 -0
  15. package/dist/src/graphql/computing/queries.js +48 -0
  16. package/dist/src/graphql/crm/mutations.d.ts +8 -0
  17. package/dist/src/graphql/crm/mutations.js +316 -0
  18. package/dist/src/graphql/crm/queries.d.ts +7 -0
  19. package/dist/src/graphql/crm/queries.js +281 -0
  20. package/dist/src/graphql/payment/mutations.d.ts +1 -0
  21. package/dist/src/graphql/payment/mutations.js +35 -0
  22. package/dist/src/graphql/payment/queries.d.ts +2 -0
  23. package/dist/src/graphql/payment/queries.js +23 -0
  24. package/dist/src/graphql/product/mutations.d.ts +0 -0
  25. package/dist/src/graphql/product/mutations.js +1 -0
  26. package/dist/src/graphql/product/queries.d.ts +11 -0
  27. package/dist/src/graphql/product/queries.js +431 -0
  28. package/dist/src/graphql/service/mutations.d.ts +10 -0
  29. package/dist/src/graphql/service/mutations.js +284 -0
  30. package/dist/src/graphql/service/queries.d.ts +6 -0
  31. package/dist/src/graphql/service/queries.js +174 -0
  32. package/dist/src/graphql/user/mutations.d.ts +4 -0
  33. package/dist/src/graphql/user/mutations.js +118 -0
  34. package/dist/src/graphql/user/queries.d.ts +13 -0
  35. package/dist/src/graphql/user/queries.js +252 -0
  36. package/dist/src/index.d.ts +1 -0
  37. package/dist/src/index.js +5 -0
  38. package/dist/src/lib/SDK.d.ts +42 -0
  39. package/dist/src/lib/SDK.js +71 -0
  40. package/dist/src/lib/auth/index.d.ts +27 -0
  41. package/dist/src/lib/auth/index.js +72 -0
  42. package/dist/src/lib/cloud/index.d.ts +25 -0
  43. package/dist/src/lib/cloud/index.js +248 -0
  44. package/dist/src/lib/computing/index.d.ts +25 -0
  45. package/dist/src/lib/computing/index.js +254 -0
  46. package/dist/src/lib/crm/index.d.ts +21 -0
  47. package/dist/src/lib/crm/index.js +296 -0
  48. package/dist/src/lib/order/index.d.ts +452 -0
  49. package/dist/src/lib/order/index.js +1204 -0
  50. package/dist/src/lib/payment/index.d.ts +7 -0
  51. package/dist/src/lib/payment/index.js +69 -0
  52. package/dist/src/lib/product/index.d.ts +37 -0
  53. package/dist/src/lib/product/index.js +132 -0
  54. package/dist/src/lib/service/index.d.ts +94 -0
  55. package/dist/src/lib/service/index.js +348 -0
  56. package/dist/src/lib/service.d.ts +14 -0
  57. package/dist/src/lib/service.js +101 -0
  58. package/dist/src/lib/serviceSDK.d.ts +18 -0
  59. package/dist/src/lib/serviceSDK.js +187 -0
  60. package/dist/src/lib/user/index.d.ts +23 -0
  61. package/dist/src/lib/user/index.js +345 -0
  62. package/dist/src/lib/warehouse/index.d.ts +20 -0
  63. package/dist/src/lib/warehouse/index.js +48 -0
  64. package/dist/src/types/auth.d.ts +82 -0
  65. package/dist/src/types/auth.js +2 -0
  66. package/dist/src/types/cloud.d.ts +40 -0
  67. package/dist/src/types/cloud.js +2 -0
  68. package/dist/src/types/computing.d.ts +16 -0
  69. package/dist/src/types/computing.js +2 -0
  70. package/dist/src/types/crm.d.ts +291 -0
  71. package/dist/src/types/crm.js +2 -0
  72. package/dist/src/types/order.d.ts +54 -0
  73. package/dist/src/types/order.js +2 -0
  74. package/dist/src/types/product.d.ts +63 -0
  75. package/dist/src/types/product.js +2 -0
  76. package/dist/src/types/service.d.ts +29 -0
  77. package/dist/src/types/service.js +2 -0
  78. package/dist/src/types/user.d.ts +95 -0
  79. package/dist/src/types/user.js +2 -0
  80. package/dist/src/types/warehouse.d.ts +5 -0
  81. package/dist/src/types/warehouse.js +2 -0
  82. package/dist/src/utils/helpers.d.ts +4 -0
  83. package/dist/src/utils/helpers.js +41 -0
  84. package/package.json +43 -0
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
6
+ query GetPaymentMethod($orgId: String!, $storeChannelId: String) {
7
+ getPaymentMethod(orgId: $orgId, storeChannelId: $storeChannelId) {
8
+ id
9
+ code
10
+ name
11
+ }
12
+ }
13
+ `;
14
+ exports.GEN_QR_PAYMENT = (0, graphql_tag_1.gql) `
15
+ query GenQRPayment($orgId: String!, $orderId: String!, $storeId: String!, $totalAmount: BigDecimal){
16
+ genQRPayment(
17
+ orgId: $orgId
18
+ orderId: $orderId
19
+ storeId: $storeId
20
+ totalAmount: $totalAmount
21
+ )
22
+ }
23
+ `;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,11 @@
1
+ export declare const GET_PRODUCT_BY_ID_QUERY: import("graphql").DocumentNode;
2
+ export declare const GET_PRODUCT_BY_SLUG_QUERY: import("graphql").DocumentNode;
3
+ export declare const GET_SIMPLE_PRODUCTS_QUERY: import("graphql").DocumentNode;
4
+ export declare const GET_CATEGORIES_QUERY: import("graphql").DocumentNode;
5
+ export declare const GET_CATEGORY_BY_HANDLE_QUERY: import("graphql").DocumentNode;
6
+ export declare const GET_CATEGORY_BY_ID_QUERY: import("graphql").DocumentNode;
7
+ export declare const GET_BRANDS_QUERY = "\nquery GetBrands($partnerId: String!, $storeChannel: String!, $enable: Boolean) {\n\tgetBrands(partnerId: $partnerId, storeChannel: $storeChannel, enable: $enable) {\n\t\tid\n\t\tname\n\t\timage\n\t\timageIcon\n\t}\n}\n";
8
+ export declare const GET_BRANDS_BY_CATEGORY_QUERY = "\nquery GetBrandsByCategory($partnerId: String!, $storeChannel: String!, $categoryId: String!) {\n\tgetBrandsByCategory(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {\n\t\tid\n\t\tname\n\t\timage\n\t\timageIcon\n\t}\n}\n";
9
+ export declare const GET_BRAND_DETAIL_QUERY = "\n query GetBrandDetail($partnerId: String!, $brandId: String!, $storeChannel: String!) {\n getDetail(partnerId: $partnerId, brandId: $brandId, storeChannel: $storeChannel) {\n id\n name\n image\n imageIcon\n }\n }\n";
10
+ export declare const GET_PRODUCT_OPTION: import("graphql").DocumentNode;
11
+ export declare const GET_POLICY: import("graphql").DocumentNode;
@@ -0,0 +1,431 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
+ // query GetProductById(
7
+ // $partnerId: String!
8
+ // $storeChannel: String!
9
+ // $productId: String!
10
+ // ) {
11
+ // getProductById(
12
+ // partnerId: $partnerId
13
+ // storeChannel: $storeChannel
14
+ // productId: $productId
15
+ // ) {
16
+ // title
17
+ // id
18
+ // description
19
+ // sku
20
+ // shortDescription
21
+ // weight
22
+ // width
23
+ // height
24
+ // vat
25
+ // unit
26
+ // qualify
27
+ // parentId
28
+ // handle
29
+ // price
30
+ // priceVaries
31
+ // available
32
+ // options
33
+ // compareAtPrice
34
+ // featuredImage
35
+ // images
36
+ // createdAt
37
+ // favorite
38
+ // productAttributes {
39
+ // id
40
+ // productId
41
+ // attributeName
42
+ // attributeValue
43
+ // }
44
+ // variants {
45
+ // id
46
+ // handle
47
+ // title
48
+ // price
49
+ // weight
50
+ // width
51
+ // depth
52
+ // height
53
+ // compareAtPrice
54
+ // available
55
+ // option1
56
+ // option2
57
+ // option3
58
+ // options
59
+ // weightUnit
60
+ // optionsIds
61
+ // featuredImage
62
+ // sku
63
+ // qualify
64
+ // featureTypeDTOS {
65
+ // id
66
+ // name
67
+ // position
68
+ // values
69
+ // required
70
+ // valuesFull
71
+ // enable
72
+ // }
73
+ // }
74
+ // featureTypes {
75
+ // id
76
+ // name
77
+ // position
78
+ // values
79
+ // required
80
+ // valuesFull
81
+ // enable
82
+ // }
83
+ // categories {
84
+ // id
85
+ // title
86
+ // handle
87
+ // description
88
+ // }
89
+ // }
90
+ // }
91
+ // `;
92
+ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
93
+ query GetProductById(
94
+ $partnerId: String!
95
+ $storeChannel: String!
96
+ $productId: String!
97
+ ) {
98
+ getProductById(
99
+ partnerId: $partnerId
100
+ storeChannel: $storeChannel
101
+ productId: $productId
102
+ ) {
103
+ id
104
+ title
105
+ description
106
+ sku
107
+ shortDescription
108
+ weight
109
+ width
110
+ depth
111
+ height
112
+ vat
113
+ qualify
114
+ parentId
115
+ handle
116
+ price
117
+ options
118
+ optionsRelationship
119
+ compareAtPrice
120
+ featuredImage
121
+ images
122
+ productAttributes {
123
+ attributeName
124
+ attributeValue
125
+ }
126
+ variants {
127
+ id
128
+ handle
129
+ title
130
+ price
131
+ compareAtPrice
132
+ options
133
+ optionsIds
134
+ featuredImage
135
+ sku
136
+ }
137
+ featureTypes {
138
+ id
139
+ name
140
+ values
141
+ valuesFull {
142
+ id
143
+ name
144
+ }
145
+ }
146
+ categories {
147
+ id
148
+ title
149
+ handle
150
+ }
151
+ }
152
+ }
153
+ `;
154
+ exports.GET_PRODUCT_BY_SLUG_QUERY = (0, graphql_tag_1.gql) `
155
+ query GetProductByHandle(
156
+ $partnerId: String!
157
+ $storeChannel: String!
158
+ $handle: String!
159
+ ) {
160
+ getProductByHandle(
161
+ partnerId: $partnerId
162
+ storeChannel: $storeChannel
163
+ handle: $handle
164
+ ) {
165
+ id
166
+ title
167
+ description
168
+ sku
169
+ shortDescription
170
+ weight
171
+ width
172
+ depth
173
+ height
174
+ vat
175
+ qualify
176
+ parentId
177
+ handle
178
+ price
179
+ options
180
+ optionsRelationship
181
+ compareAtPrice
182
+ featuredImage
183
+ images
184
+ productAttributes {
185
+ attributeName
186
+ attributeValue
187
+ }
188
+ variants {
189
+ id
190
+ handle
191
+ title
192
+ price
193
+ compareAtPrice
194
+ options
195
+ optionsIds
196
+ featuredImage
197
+ sku
198
+ }
199
+ featureTypes {
200
+ id
201
+ name
202
+ values
203
+ }
204
+ categories {
205
+ id
206
+ title
207
+ handle
208
+ }
209
+ }
210
+ }
211
+ `;
212
+ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
213
+ query GetSimpleProducts(
214
+ $partnerId: String!
215
+ $storeChannel: String!
216
+ $category: String
217
+ $product: String
218
+ $sku: String
219
+ $tag: String
220
+ $priceFrom: BigDecimal
221
+ $priceTo: BigDecimal
222
+ $status: String
223
+ $productType: String
224
+ $subType: String
225
+ $sortOrder: String
226
+ $sortBy: String
227
+ $brandId: String
228
+ $keyword: String
229
+ $display: String
230
+ $onlyPromotion: Boolean
231
+ $currentPage: Int
232
+ $maxResult: Int
233
+ ) {
234
+ getSimpleProducts(
235
+ partnerId: $partnerId
236
+ storeChannel: $storeChannel
237
+ category: $category
238
+ product: $product
239
+ sku: $sku
240
+ tag: $tag
241
+ priceFrom: $priceFrom
242
+ priceTo: $priceTo
243
+ status: $status
244
+ productType: $productType
245
+ subType: $subType
246
+ sortOrder: $sortOrder
247
+ sortBy: $sortBy
248
+ brandId: $brandId
249
+ keyword: $keyword
250
+ display: $display
251
+ onlyPromotion: $onlyPromotion
252
+ currentPage: $currentPage
253
+ maxResult: $maxResult
254
+ ) {
255
+ total
256
+ currentPage
257
+ maxResult
258
+ totalPage
259
+ data {
260
+ id
261
+ title
262
+ sku
263
+ shortDescription
264
+ vat
265
+ subType
266
+ qualify
267
+ handle
268
+ price
269
+ compareAtPrice
270
+ featuredImage
271
+ images
272
+ }
273
+ }
274
+ }
275
+ `;
276
+ exports.GET_CATEGORIES_QUERY = (0, graphql_tag_1.gql) `
277
+ query GetCategories(
278
+ $partnerId: String!
279
+ $storeChannel: String!
280
+ $typeBuild: String!
281
+ $level: Int!
282
+ ) {
283
+ getCategories(
284
+ partnerId: $partnerId
285
+ storeChannel: $storeChannel
286
+ typeBuild: $typeBuild
287
+ level: $level
288
+ ) {
289
+ id
290
+ title
291
+ image
292
+ icon
293
+ parentId
294
+ level
295
+ sequence
296
+ handle
297
+ child {
298
+ id
299
+ title
300
+ image
301
+ icon
302
+ parentId
303
+ level
304
+ sequence
305
+ handle
306
+ }
307
+ }
308
+ }
309
+ `;
310
+ exports.GET_CATEGORY_BY_HANDLE_QUERY = (0, graphql_tag_1.gql) `
311
+ query GetCategoryByHandle(
312
+ $partnerId: String!
313
+ $storeChannel: String!
314
+ $handle: String!
315
+ ) {
316
+ getCategoryByHandle(
317
+ partnerId: $partnerId
318
+ storeChannel: $storeChannel
319
+ handle: $handle
320
+ ) {
321
+ id
322
+ title
323
+ image
324
+ icon
325
+ parentId
326
+ level
327
+ handle
328
+ child {
329
+ id
330
+ title
331
+ image
332
+ icon
333
+ parentId
334
+ level
335
+ handle
336
+ }
337
+ }
338
+ }
339
+ `;
340
+ exports.GET_CATEGORY_BY_ID_QUERY = (0, graphql_tag_1.gql) `
341
+ query GetCategoryById(
342
+ $partnerId: String!
343
+ $storeChannel: String!
344
+ $categoryId: String!
345
+ ) {
346
+ getCategoryById(
347
+ partnerId: $partnerId
348
+ storeChannel: $storeChannel
349
+ categoryId: $categoryId
350
+ ) {
351
+ id
352
+ title
353
+ image
354
+ icon
355
+ parentId
356
+ level
357
+ handle
358
+ child {
359
+ id
360
+ title
361
+ image
362
+ icon
363
+ parentId
364
+ level
365
+ handle
366
+ }
367
+ }
368
+ }
369
+ `;
370
+ exports.GET_BRANDS_QUERY = `
371
+ query GetBrands($partnerId: String!, $storeChannel: String!, $enable: Boolean) {
372
+ getBrands(partnerId: $partnerId, storeChannel: $storeChannel, enable: $enable) {
373
+ id
374
+ name
375
+ image
376
+ imageIcon
377
+ }
378
+ }
379
+ `;
380
+ exports.GET_BRANDS_BY_CATEGORY_QUERY = `
381
+ query GetBrandsByCategory($partnerId: String!, $storeChannel: String!, $categoryId: String!) {
382
+ getBrandsByCategory(partnerId: $partnerId, storeChannel: $storeChannel, categoryId: $categoryId) {
383
+ id
384
+ name
385
+ image
386
+ imageIcon
387
+ }
388
+ }
389
+ `;
390
+ exports.GET_BRAND_DETAIL_QUERY = `
391
+ query GetBrandDetail($partnerId: String!, $brandId: String!, $storeChannel: String!) {
392
+ getDetail(partnerId: $partnerId, brandId: $brandId, storeChannel: $storeChannel) {
393
+ id
394
+ name
395
+ image
396
+ imageIcon
397
+ }
398
+ }
399
+ `;
400
+ exports.GET_PRODUCT_OPTION = (0, graphql_tag_1.gql) `
401
+ query GetProductOption(
402
+ $partnerId: String!
403
+ $storeChannel: String!
404
+ $productId: String!
405
+ ) {
406
+ getProductOption(
407
+ partnerId: $partnerId
408
+ storeChannel: $storeChannel
409
+ productId: $productId
410
+ ) {
411
+ id
412
+ name
413
+ subType
414
+ productFeatureDTOS {
415
+ productOptionGroupItemDTOS {
416
+ id
417
+ productId
418
+ productName
419
+ price
420
+ }
421
+ }
422
+ }
423
+ }
424
+ `;
425
+ exports.GET_POLICY = (0, graphql_tag_1.gql) `
426
+ query GetPolicy($groupId: String!) {
427
+ getPolicy(groupId: $groupId) {
428
+ value
429
+ }
430
+ }
431
+ `;
@@ -0,0 +1,10 @@
1
+ export declare const CREATE_SERVICE: import("graphql").DocumentNode;
2
+ export declare const UPDATE_SERVICE: import("graphql").DocumentNode;
3
+ export declare const DELETE_SERVICE: import("graphql").DocumentNode;
4
+ export declare const DELETE_ATTR_VALUE: import("graphql").DocumentNode;
5
+ export declare const UPDATE_SUCCESS_ACTION_PROCESS_STATUS: import("graphql").DocumentNode;
6
+ export declare const UPDATE_FAIL_ACTION_PROCESS_STATUS: import("graphql").DocumentNode;
7
+ export declare const CREATE_SERVICE_TICKET: import("graphql").DocumentNode;
8
+ export declare const CREATE_SERVICE_ACTION: import("graphql").DocumentNode;
9
+ export declare const UPDATE_ATTR_VALUE: import("graphql").DocumentNode;
10
+ export declare const ADD_ACTION_ATTRIBUTE: import("graphql").DocumentNode;