@longvansoftware/storefront-js-client 4.6.2 → 4.6.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 (74) hide show
  1. package/dist/src/graphql/accounting_service/mutations.d.ts +2 -0
  2. package/dist/src/graphql/accounting_service/mutations.js +100 -0
  3. package/dist/src/graphql/accounting_service/queries.d.ts +1 -0
  4. package/dist/src/graphql/accounting_service/queries.js +62 -0
  5. package/dist/src/graphql/content_api/queries.d.ts +2 -0
  6. package/dist/src/graphql/content_api/queries.js +23 -0
  7. package/dist/src/graphql/crm_camping/mutations.d.ts +1 -0
  8. package/dist/src/graphql/crm_camping/mutations.js +37 -0
  9. package/dist/src/graphql/crm_camping/queries.d.ts +14 -0
  10. package/dist/src/graphql/crm_camping/queries.js +420 -0
  11. package/dist/src/graphql/orderGraphQL/mutations.d.ts +10 -0
  12. package/dist/src/graphql/orderGraphQL/mutations.js +410 -0
  13. package/dist/src/graphql/orderGraphQL/queries.d.ts +10 -0
  14. package/dist/src/graphql/orderGraphQL/queries.js +480 -0
  15. package/dist/src/graphql/paymentLV/mutations.d.ts +2 -0
  16. package/dist/src/graphql/paymentLV/mutations.js +31 -0
  17. package/dist/src/graphql/paymentLV/queries.d.ts +5 -0
  18. package/dist/src/graphql/paymentLV/queries.js +135 -0
  19. package/dist/src/graphql/product/queries.d.ts +31 -29
  20. package/dist/src/graphql/product/queries.js +20 -10
  21. package/dist/src/graphql/quicklab_service/mutations.d.ts +8 -0
  22. package/dist/src/graphql/quicklab_service/mutations.js +171 -0
  23. package/dist/src/graphql/quicklab_service/queries.d.ts +7 -0
  24. package/dist/src/graphql/quicklab_service/queries.js +131 -0
  25. package/dist/src/graphql/remote_access_service/mutations.d.ts +7 -0
  26. package/dist/src/graphql/remote_access_service/mutations.js +89 -0
  27. package/dist/src/graphql/remote_access_service/queries.d.ts +2 -0
  28. package/dist/src/graphql/remote_access_service/queries.js +34 -0
  29. package/dist/src/graphql/resource_permission/mutations.d.ts +2 -0
  30. package/dist/src/graphql/resource_permission/mutations.js +65 -0
  31. package/dist/src/graphql/resource_permission/queries.d.ts +1 -0
  32. package/dist/src/graphql/resource_permission/queries.js +18 -0
  33. package/dist/src/graphql/storage_s3/mutations.d.ts +27 -0
  34. package/dist/src/graphql/storage_s3/mutations.js +603 -0
  35. package/dist/src/graphql/storage_s3/queries.d.ts +12 -0
  36. package/dist/src/graphql/storage_s3/queries.js +129 -0
  37. package/dist/src/lib/accounting_service/index.d.ts +9 -0
  38. package/dist/src/lib/accounting_service/index.js +69 -0
  39. package/dist/src/lib/cloud_rest/index.d.ts +17 -0
  40. package/dist/src/lib/cloud_rest/index.js +101 -0
  41. package/dist/src/lib/content_api/index.d.ts +7 -0
  42. package/dist/src/lib/content_api/index.js +43 -0
  43. package/dist/src/lib/crm_camping/index.d.ts +21 -0
  44. package/dist/src/lib/crm_camping/index.js +302 -0
  45. package/dist/src/lib/dns/index.d.ts +7 -0
  46. package/dist/src/lib/{cloudService → dns}/index.js +16 -11
  47. package/dist/src/lib/orderGraphQL/index.d.ts +24 -0
  48. package/dist/src/lib/orderGraphQL/index.js +342 -0
  49. package/dist/src/lib/order_cloud_rest/index.d.ts +7 -0
  50. package/dist/src/lib/order_cloud_rest/index.js +39 -0
  51. package/dist/src/lib/paymentLV/index.d.ts +13 -0
  52. package/dist/src/lib/paymentLV/index.js +149 -0
  53. package/dist/src/lib/product/index.d.ts +1 -0
  54. package/dist/src/lib/product/index.js +18 -0
  55. package/dist/src/lib/quicklab_service/index.d.ts +19 -0
  56. package/dist/src/lib/quicklab_service/index.js +211 -0
  57. package/dist/src/lib/remote_access_service/index.d.ts +16 -0
  58. package/dist/src/lib/remote_access_service/index.js +181 -0
  59. package/dist/src/lib/resource_permission/index.d.ts +9 -0
  60. package/dist/src/lib/resource_permission/index.js +82 -0
  61. package/dist/src/lib/service.d.ts +14 -0
  62. package/dist/src/lib/service.js +101 -0
  63. package/dist/src/lib/storage_s3/index.d.ts +42 -0
  64. package/dist/src/lib/storage_s3/index.js +736 -0
  65. package/dist/src/types/remote_access_service.d.ts +12 -0
  66. package/dist/src/types/remote_access_service.js +2 -0
  67. package/dist/src/types/storage_s3.d.ts +10 -0
  68. package/dist/src/types/storage_s3.js +2 -0
  69. package/dist/src/utils/build-field-string.d.ts +1 -0
  70. package/dist/src/utils/build-field-string.js +16 -0
  71. package/package.json +3 -2
  72. package/dist/src/graphql/cloudService/queries.d.ts +0 -1
  73. package/dist/src/graphql/cloudService/queries.js +0 -71
  74. package/dist/src/lib/cloudService/index.d.ts +0 -5
@@ -1,32 +1,34 @@
1
- export declare const GET_PRODUCT_BY_ID_QUERY: import("graphql").DocumentNode;
2
- export declare const GET_SIMPLE_PRODUCT_BY_ID_QUERY: import("graphql").DocumentNode;
3
- export declare const GET_PRODUCT_BY_SLUG_QUERY: import("graphql").DocumentNode;
4
- export declare const GET_SIMPLE_PRODUCTS_QUERY: import("graphql").DocumentNode;
5
- export declare const GET_CATEGORIES_QUERY: import("graphql").DocumentNode;
6
- export declare const GET_CATEGORY_BY_HANDLE_QUERY: import("graphql").DocumentNode;
7
- export declare const GET_CATEGORY_BY_ID_QUERY: import("graphql").DocumentNode;
1
+ import { DocumentNode } from "graphql";
2
+ export declare const GET_PRODUCT_BY_ID_QUERY: DocumentNode;
3
+ export declare const GET_SIMPLE_PRODUCT_BY_ID_QUERY: DocumentNode;
4
+ export declare const GET_PRODUCT_BY_SLUG_QUERY: DocumentNode;
5
+ export declare const GET_SIMPLE_PRODUCTS_QUERY: DocumentNode;
6
+ export declare const GET_CATEGORIES_QUERY: DocumentNode;
7
+ export declare const GET_CATEGORY_BY_HANDLE_QUERY: DocumentNode;
8
+ export declare const GET_CATEGORY_BY_ID_QUERY: DocumentNode;
8
9
  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";
9
10
  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";
10
11
  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";
11
- export declare const GET_PRODUCT_OPTION: import("graphql").DocumentNode;
12
- export declare const GET_POLICY: import("graphql").DocumentNode;
13
- export declare const GET_STORES: import("graphql").DocumentNode;
14
- export declare const GET_DETAIL_STORES: import("graphql").DocumentNode;
15
- export declare const GET_PRODUCT_IMAGE: import("graphql").DocumentNode;
16
- export declare const GET_PRODUCT: import("graphql").DocumentNode;
17
- export declare const GET_UNITS: import("graphql").DocumentNode;
18
- export declare const GET_PRODUCT_VARIANT_BY_ID: import("graphql").DocumentNode;
19
- export declare const GET_PRODUCT_TEMPLATES: import("graphql").DocumentNode;
20
- export declare const GET_GROUPS: import("graphql").DocumentNode;
21
- export declare const GET_BRAND: import("graphql").DocumentNode;
22
- export declare const GET_TAGS: import("graphql").DocumentNode;
23
- export declare const GET_PRODUCT_BY_GROUPID: import("graphql").DocumentNode;
24
- export declare const GET_CATEGORY_BY_ID: import("graphql").DocumentNode;
25
- export declare const GET_CATEGORY_BY_HANDLE: import("graphql").DocumentNode;
26
- export declare const GET_TAGS_BY_PRODUCT: import("graphql").DocumentNode;
27
- export declare const GET_PRODUCT_STORE_BY_SCOPE: import("graphql").DocumentNode;
28
- export declare const GET_PRODUCT_STORE_PUBLIC: import("graphql").DocumentNode;
29
- export declare const GET_PRODUCT_MARKET_PLACE: import("graphql").DocumentNode;
30
- export declare const GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG: import("graphql").DocumentNode;
31
- export declare const GET_PRODUCT_MARKET_PLACE_BY_ID: import("graphql").DocumentNode;
32
- export declare const GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER: import("graphql").DocumentNode;
12
+ export declare const GET_PRODUCT_OPTION: DocumentNode;
13
+ export declare const GET_POLICY: DocumentNode;
14
+ export declare const GET_STORES: DocumentNode;
15
+ export declare const GET_DETAIL_STORES: DocumentNode;
16
+ export declare const GET_PRODUCT_IMAGE: DocumentNode;
17
+ export declare const GET_PRODUCT: DocumentNode;
18
+ export declare const GET_UNITS: DocumentNode;
19
+ export declare const GET_PRODUCT_VARIANT_BY_ID: DocumentNode;
20
+ export declare const GET_PRODUCT_TEMPLATES: DocumentNode;
21
+ export declare const GET_GROUPS: DocumentNode;
22
+ export declare const GET_BRAND: DocumentNode;
23
+ export declare const GET_TAGS: DocumentNode;
24
+ export declare const GET_PRODUCT_BY_GROUPID: DocumentNode;
25
+ export declare const GET_CATEGORY_BY_ID: DocumentNode;
26
+ export declare const GET_CATEGORY_BY_HANDLE: DocumentNode;
27
+ export declare const GET_TAGS_BY_PRODUCT: DocumentNode;
28
+ export declare const GET_PRODUCT_STORE_BY_SCOPE: DocumentNode;
29
+ export declare const GET_PRODUCT_STORE_PUBLIC: DocumentNode;
30
+ export declare const GET_PRODUCT_MARKET_PLACE: DocumentNode;
31
+ export declare const GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG: DocumentNode;
32
+ export declare const GET_PRODUCT_MARKET_PLACE_BY_ID: DocumentNode;
33
+ export declare const GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER: DocumentNode;
34
+ export declare const GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = exports.GET_PRODUCT_MARKET_PLACE_BY_ID = exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = exports.GET_PRODUCT_MARKET_PLACE = exports.GET_PRODUCT_STORE_PUBLIC = exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = 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_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = exports.GET_PRODUCT_MARKET_PLACE_BY_ID = exports.GET_PRODUCT_MARKET_PLACE_DETAIL_BY_SLUG = exports.GET_PRODUCT_MARKET_PLACE = exports.GET_PRODUCT_STORE_PUBLIC = exports.GET_PRODUCT_STORE_BY_SCOPE = exports.GET_TAGS_BY_PRODUCT = exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = 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_SIMPLE_PRODUCT_BY_ID_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
6
  // query GetProductById(
@@ -527,15 +527,7 @@ exports.GET_SIMPLE_PRODUCTS_QUERY = (0, graphql_tag_1.gql) `
527
527
  vat
528
528
  qualify
529
529
  parentId
530
- tags {
531
- id
532
- name
533
- slug
534
- type
535
- scope
536
- storeIds
537
- selected
538
- }
530
+
539
531
  handle
540
532
  price
541
533
  compareAtPrice
@@ -1761,3 +1753,21 @@ exports.GET_PRODUCT_MARKET_PLACE_BY_SUPPLIER = (0, graphql_tag_1.gql) `
1761
1753
  }
1762
1754
  }
1763
1755
  `;
1756
+ const GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = (fields = []) => {
1757
+ const fieldStr = fields.join("\n ");
1758
+ const hasFields = fields.length > 0;
1759
+ return (0, graphql_tag_1.gql) `
1760
+ query getProductSimpleByHandle(
1761
+ $partnerId: String!
1762
+ $storeChannel: String!
1763
+ $handle: String
1764
+ ) {
1765
+ getProductSimpleByHandle(
1766
+ partnerId: $partnerId
1767
+ storeChannel: $storeChannel
1768
+ handle: $handle
1769
+ ) ${hasFields ? `{ ${fieldStr} }` : ""}
1770
+ }
1771
+ `;
1772
+ };
1773
+ exports.GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC = GET_PRODUCT_SIMPLE_BY_HANDLE_DYNAMIC;
@@ -0,0 +1,8 @@
1
+ import { DocumentNode } from "graphql";
2
+ export declare const CREATE_LAB_SESSION_BY_TEMPLATE_ID: DocumentNode;
3
+ export declare const CREATE_LAB_SESSION_BY_LAB_SESSION_ID: DocumentNode;
4
+ export declare const CREATE_LAB_SESSION_BY_COMPUTING_ID: DocumentNode;
5
+ export declare const UPDATE_END_TIME_LAB_SESSION: DocumentNode;
6
+ export declare const STOP_LAB_SESSION: DocumentNode;
7
+ export declare const UPDATE_TYPE_LAB_SESSION: DocumentNode;
8
+ export declare const STOP_LAB_SESSION_FOR_CUSTOMER: DocumentNode;
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STOP_LAB_SESSION_FOR_CUSTOMER = exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ // Tạo phiên thực hành từ template
6
+ exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
7
+ mutation CreateLabSessionByTemplateId(
8
+ $templateId: String!
9
+ $userId: String!
10
+ $articleId: String!
11
+ $typeLabSessionCode: String!
12
+ ) {
13
+ createLabSessionByTemplateId(
14
+ templateId: $templateId
15
+ userId: $userId
16
+ articleId: $articleId
17
+ typeLabSessionCode: $typeLabSessionCode
18
+ ) {
19
+ labSessionId
20
+ userId
21
+ typeLabSession
22
+ statusUseName
23
+ statusUse
24
+ startTime
25
+ endTime
26
+ note
27
+ articleId
28
+ articleTitle
29
+ computingId
30
+ computingName
31
+ computingState
32
+ templateId
33
+ templateName
34
+ productId
35
+ productName
36
+ parent
37
+ labSessionIdLast
38
+ statusUseLast
39
+ startTimeLast
40
+ endTimeLast
41
+ noteLast
42
+ }
43
+ }
44
+ `;
45
+ // Tạo phiên thực hành con từ phiên thực hành chính
46
+ exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = (0, graphql_tag_1.gql) `
47
+ mutation CreateLabSessionByLabSessionId(
48
+ $labSessionId: String!
49
+ $userId: String!
50
+ $articleId: String!
51
+ ) {
52
+ createLabSessionByLabSessionId(
53
+ labSessionId: $labSessionId
54
+ userId: $userId
55
+ articleId: $articleId
56
+ ) {
57
+ labSessionId
58
+ userId
59
+ typeLabSession
60
+ statusUseName
61
+ statusUse
62
+ startTime
63
+ endTime
64
+ note
65
+ articleId
66
+ articleTitle
67
+ computingId
68
+ computingName
69
+ computingState
70
+ templateId
71
+ templateName
72
+ productId
73
+ productName
74
+ parent
75
+ labSessionIdLast
76
+ statusUseLast
77
+ startTimeLast
78
+ endTimeLast
79
+ noteLast
80
+ }
81
+ }
82
+ `;
83
+ // Tạo phiên thực hành từ computing của khách hàng
84
+ exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = (0, graphql_tag_1.gql) `
85
+ mutation CreateLabSessionByComputingId(
86
+ $computingId: String!
87
+ $userId: String!
88
+ $articleId: String!
89
+ ) {
90
+ createLabSessionByComputingId(
91
+ computingId: $computingId
92
+ userId: $userId
93
+ articleId: $articleId
94
+ ) {
95
+ labSessionId
96
+ userId
97
+ typeLabSession
98
+ statusUseName
99
+ statusUse
100
+ startTime
101
+ endTime
102
+ note
103
+ articleId
104
+ articleTitle
105
+ computingId
106
+ computingName
107
+ computingState
108
+ templateId
109
+ templateName
110
+ productId
111
+ productName
112
+ parent
113
+ labSessionIdLast
114
+ statusUseLast
115
+ startTimeLast
116
+ endTimeLast
117
+ noteLast
118
+ }
119
+ }
120
+ `;
121
+ // Cập nhật lại thời gian thực hành mỗi phút 1 lần(setup realtime ở FE)
122
+ exports.UPDATE_END_TIME_LAB_SESSION = (0, graphql_tag_1.gql) `
123
+ mutation UpdateEndTimeLabSession($labSessionId: String!, $userId: String!) {
124
+ updateEndTimeLabSession(labSessionId: $labSessionId, userId: $userId) {
125
+ status
126
+ message
127
+ }
128
+ }
129
+ `;
130
+ // Dừng thực hành
131
+ exports.STOP_LAB_SESSION = (0, graphql_tag_1.gql) `
132
+ mutation StopLabSession(
133
+ $labSessionId: String!
134
+ $userId: String!
135
+ $note: String
136
+ ) {
137
+ stopLabSession(labSessionId: $labSessionId, userId: $userId, note: $note) {
138
+ status
139
+ message
140
+ }
141
+ }
142
+ `;
143
+ exports.UPDATE_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
144
+ mutation StopLabSession(
145
+ $labSessionId: String!
146
+ $typeLabSessionCode: String!
147
+ $userId: String!
148
+ ) {
149
+ updateTypeLabSession(
150
+ labSessionId: $labSessionId
151
+ typeLabSessionCode: $typeLabSessionCode
152
+ userId: $userId
153
+ ) {
154
+ status
155
+ message
156
+ }
157
+ }
158
+ `;
159
+ // Dừng thực hành
160
+ exports.STOP_LAB_SESSION_FOR_CUSTOMER = (0, graphql_tag_1.gql) `
161
+ mutation StopLabSessionForCustomer(
162
+ $labSessionId: String!
163
+ $userId: String!
164
+ $note: String
165
+ ) {
166
+ stopLabSessionForCustomer(labSessionId: $labSessionId, userId: $userId, note: $note) {
167
+ status
168
+ message
169
+ }
170
+ }
171
+ `;
@@ -0,0 +1,7 @@
1
+ import { DocumentNode } from "graphql";
2
+ export declare const GET_TEMPLATE_BY_ARTICLE_ID: DocumentNode;
3
+ export declare const GET_TYPE_LAB_SESSION: DocumentNode;
4
+ export declare const GET_LAB_SESSIONS_BY_USER_ID: DocumentNode;
5
+ export declare const GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID: DocumentNode;
6
+ export declare const GET_LAB_SESSIONS_CHILL_BY_PARENT: DocumentNode;
7
+ export declare const GET_LAB_DOING_AND_DONE_BY_USERID: (fields?: string[]) => DocumentNode;
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_LAB_DOING_AND_DONE_BY_USERID = exports.GET_LAB_SESSIONS_CHILL_BY_PARENT = exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = exports.GET_LAB_SESSIONS_BY_USER_ID = exports.GET_TYPE_LAB_SESSION = exports.GET_TEMPLATE_BY_ARTICLE_ID = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ // Danh sách template của bài lab
6
+ exports.GET_TEMPLATE_BY_ARTICLE_ID = (0, graphql_tag_1.gql) `
7
+ query GetTemplatesByArticleId($articleId: String!) {
8
+ getTemplatesByArticleId(articleId: $articleId) {
9
+ templateId
10
+ templateName
11
+ product {
12
+ id
13
+ title
14
+ }
15
+ }
16
+ }
17
+ `;
18
+ // Danh sách loại thực hành
19
+ exports.GET_TYPE_LAB_SESSION = (0, graphql_tag_1.gql) `
20
+ query {
21
+ getTypeLabSessions {
22
+ name
23
+ code
24
+ }
25
+ }
26
+ `;
27
+ // Danh sách phiên thực hành của người dùng
28
+ exports.GET_LAB_SESSIONS_BY_USER_ID = (0, graphql_tag_1.gql) `
29
+ query GetLabSessionsByUserId($userId: String!) {
30
+ getLabSessionsByUserId(userId: $userId) {
31
+ labSessionId
32
+ userId
33
+ typeLabSession
34
+ statusUseName
35
+ statusUse
36
+ startTime
37
+ endTime
38
+ note
39
+ articleId
40
+ articleTitle
41
+ computingId
42
+ computingName
43
+ computingState
44
+ templateId
45
+ templateName
46
+ productId
47
+ productName
48
+ parent
49
+ labSessionIdLast
50
+ statusUseLast
51
+ startTimeLast
52
+ endTimeLast
53
+ noteLast
54
+ }
55
+ }
56
+ `;
57
+ // Danh sách phiên thực hành theo bài lab của người dùng
58
+ exports.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID = (0, graphql_tag_1.gql) `
59
+ query GetLabSessionsByUserIdAndArticleId(
60
+ $userId: String!
61
+ $articleId: String!
62
+ ) {
63
+ getLabSessionsByUserIdAndArticleId(userId: $userId, articleId: $articleId) {
64
+ labSessionId
65
+ userId
66
+ typeLabSession
67
+ statusUseName
68
+ statusUse
69
+ startTime
70
+ endTime
71
+ note
72
+ articleId
73
+ articleTitle
74
+ computingId
75
+ computingName
76
+ computingState
77
+ templateId
78
+ templateName
79
+ productId
80
+ productName
81
+ parent
82
+ labSessionIdLast
83
+ statusUseLast
84
+ startTimeLast
85
+ endTimeLast
86
+ noteLast
87
+ }
88
+ }
89
+ `;
90
+ exports.GET_LAB_SESSIONS_CHILL_BY_PARENT = (0, graphql_tag_1.gql) `
91
+ query GetLabSessionsByUserIdAndArticleId(
92
+ $labSessionId: String!
93
+ $userId: String!
94
+ ) {
95
+ getLabSessionsChillByParent(labSessionId: $labSessionId, userId: $userId) {
96
+ labSessionId
97
+ userId
98
+ typeLabSession
99
+ statusUseName
100
+ statusUse
101
+ startTime
102
+ endTime
103
+ note
104
+ articleId
105
+ articleTitle
106
+ computingId
107
+ computingName
108
+ computingState
109
+ templateId
110
+ templateName
111
+ productId
112
+ productName
113
+ parent
114
+ labSessionIdLast
115
+ statusUseLast
116
+ startTimeLast
117
+ endTimeLast
118
+ noteLast
119
+ }
120
+ }
121
+ `;
122
+ const GET_LAB_DOING_AND_DONE_BY_USERID = (fields = []) => {
123
+ const fieldStr = fields.join("\n ");
124
+ const hasFields = fields.length > 0;
125
+ return (0, graphql_tag_1.gql) `
126
+ query getLabDoingAndDoneByUserId($partnerId: String!, $userId: String!) {
127
+ getLabDoingAndDoneByUserId(partnerId: $partnerId userId: $userId) ${hasFields ? `{ ${fieldStr} }` : ""}
128
+ }
129
+ `;
130
+ };
131
+ exports.GET_LAB_DOING_AND_DONE_BY_USERID = GET_LAB_DOING_AND_DONE_BY_USERID;
@@ -0,0 +1,7 @@
1
+ export declare const CREATE_REMOTE_ACCESS: import("graphql").DocumentNode;
2
+ export declare const UPDATE_REMOTE_ACCESS_NAME: import("graphql").DocumentNode;
3
+ export declare const UPDATE_REMOTE_ACCESS_DESCRIPTION: import("graphql").DocumentNode;
4
+ export declare const UPDATE_REMOTE_ACCESS_TYPE: import("graphql").DocumentNode;
5
+ export declare const UPDATE_REMOTE_ACCESS_INFO: import("graphql").DocumentNode;
6
+ export declare const UPDATE_REMOTE_ACCESS: import("graphql").DocumentNode;
7
+ export declare const DELETE_REMOTE_ACCESS: import("graphql").DocumentNode;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DELETE_REMOTE_ACCESS = exports.UPDATE_REMOTE_ACCESS = exports.UPDATE_REMOTE_ACCESS_INFO = exports.UPDATE_REMOTE_ACCESS_TYPE = exports.UPDATE_REMOTE_ACCESS_DESCRIPTION = exports.UPDATE_REMOTE_ACCESS_NAME = exports.CREATE_REMOTE_ACCESS = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.CREATE_REMOTE_ACCESS = (0, graphql_tag_1.gql) `
6
+ mutation CreateRemoteAccess(
7
+ $remoteAccess: CreateRemoteAccessInput!
8
+ $remoteAccessInfo: RemoteAccessInfoInput!
9
+ $createdBy: String!
10
+ ) {
11
+ createRemoteAccess(
12
+ remoteAccess: $remoteAccess
13
+ remoteAccessInfo: $remoteAccessInfo
14
+ createdBy: $createdBy
15
+ ) {
16
+ id
17
+ }
18
+ }
19
+ `;
20
+ exports.UPDATE_REMOTE_ACCESS_NAME = (0, graphql_tag_1.gql) `
21
+ mutation UpdateRemoteAccessName(
22
+ $remoteAccessId: String!
23
+ $name: String!
24
+ $updatedBy: String!
25
+ ) {
26
+ updateRemoteAccessName(
27
+ remoteAccessId: $remoteAccessId
28
+ name: $name
29
+ updatedBy: $updatedBy
30
+ )
31
+ }
32
+ `;
33
+ exports.UPDATE_REMOTE_ACCESS_DESCRIPTION = (0, graphql_tag_1.gql) `
34
+ mutation UpdateRemoteAccessDescription(
35
+ $remoteAccessId: String!
36
+ $description: String!
37
+ $updatedBy: String!
38
+ ) {
39
+ updateRemoteAccessDescription(
40
+ remoteAccessId: $remoteAccessId
41
+ description: $description
42
+ updatedBy: $updatedBy
43
+ )
44
+ }
45
+ `;
46
+ exports.UPDATE_REMOTE_ACCESS_TYPE = (0, graphql_tag_1.gql) `
47
+ mutation UpdateRemoteAccessType(
48
+ $remoteAccessId: String!
49
+ $type: RemoteAccessType!
50
+ $updatedBy: String!
51
+ ) {
52
+ updateRemoteAccessType(
53
+ remoteAccessId: $remoteAccessId
54
+ type: $type
55
+ updatedBy: $updatedBy
56
+ )
57
+ }
58
+ `;
59
+ exports.UPDATE_REMOTE_ACCESS_INFO = (0, graphql_tag_1.gql) `
60
+ mutation UpdateRemoteAccessInfo(
61
+ $remoteAccessId: String!
62
+ $remoteAccessInfoInput: RemoteAccessInfoInput!
63
+ $updatedBy: String!
64
+ ) {
65
+ updateRemoteAccessInfo(
66
+ remoteAccessId: $remoteAccessId
67
+ remoteAccessInfoInput: $remoteAccessInfoInput
68
+ updatedBy: $updatedBy
69
+ )
70
+ }
71
+ `;
72
+ exports.UPDATE_REMOTE_ACCESS = (0, graphql_tag_1.gql) `
73
+ mutation UpdateRemoteAccess(
74
+ $remoteAccessId: String!
75
+ $updateRemoteAccessDTO: UpdateRemoteAccessDTO!
76
+ $updatedBy: String!
77
+ ) {
78
+ updateRemoteAccess(
79
+ remoteAccessId: $remoteAccessId
80
+ updateRemoteAccessDTO: $updateRemoteAccessDTO
81
+ updatedBy: $updatedBy
82
+ )
83
+ }
84
+ `;
85
+ exports.DELETE_REMOTE_ACCESS = (0, graphql_tag_1.gql) `
86
+ mutation DeleteRemoteAccess($remoteAccessId: String!, $updatedBy: String!) {
87
+ deleteRemoteAccess(remoteAccessId: $remoteAccessId, updatedBy: $updatedBy)
88
+ }
89
+ `;
@@ -0,0 +1,2 @@
1
+ export declare const GET_REMOTE_ACCESS_BY_TARGETID_AND_TARGETTYPE: import("graphql").DocumentNode;
2
+ export declare const GET_CONNECTION_INFO_FROM_REMOTE_ACCESS_BY_ID: import("graphql").DocumentNode;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_CONNECTION_INFO_FROM_REMOTE_ACCESS_BY_ID = exports.GET_REMOTE_ACCESS_BY_TARGETID_AND_TARGETTYPE = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.GET_REMOTE_ACCESS_BY_TARGETID_AND_TARGETTYPE = (0, graphql_tag_1.gql) `
6
+ query GetRemoteAccessByTargetIdAndTargetType(
7
+ $targetId: String!
8
+ $targetType: String!
9
+ ) {
10
+ getRemoteAccessByTargetIdAndTargetType(
11
+ targetId: $targetId
12
+ targetType: $targetType
13
+ ) {
14
+ id
15
+ name
16
+ description
17
+ targetId
18
+ targetType
19
+ type
20
+ status
21
+ }
22
+ }
23
+ `;
24
+ exports.GET_CONNECTION_INFO_FROM_REMOTE_ACCESS_BY_ID = (0, graphql_tag_1.gql) `
25
+ query GetConnectionInfoFromRemoteAccessById($remoteAccessId: String!) {
26
+ getConnectionInfoFromRemoteAccessById(remoteAccessId: $remoteAccessId) {
27
+ url
28
+ host
29
+ port
30
+ username
31
+ password
32
+ }
33
+ }
34
+ `;
@@ -0,0 +1,2 @@
1
+ export declare const SHARE_RESOURCE: import("graphql").DocumentNode;
2
+ export declare const REMOVE_SHARE_PARTY: import("graphql").DocumentNode;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMOVE_SHARE_PARTY = exports.SHARE_RESOURCE = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.SHARE_RESOURCE = (0, graphql_tag_1.gql) `
6
+ mutation ShareResource(
7
+ $partnerId: String!
8
+ $createModel: ShareResourceRequest!
9
+ ) {
10
+ shareResource(partnerId: $partnerId, createModel: $createModel) {
11
+ id
12
+ name
13
+ resourceId
14
+ org
15
+ resourceType
16
+ oauthSharePermissions {
17
+ role
18
+ partyId
19
+ partyName
20
+ permission
21
+ }
22
+ description
23
+ createdStamp
24
+ updatedStamp
25
+ updatedBy
26
+ createdBy
27
+ }
28
+ }
29
+ `;
30
+ exports.REMOVE_SHARE_PARTY = (0, graphql_tag_1.gql) `
31
+ mutation RemoveShareParty(
32
+ $partnerId: String!
33
+ $orgId: String!
34
+ $resourceType: String!
35
+ $resourceId: String!
36
+ $sharePartyId: String!
37
+ $ownerId: String!
38
+ ) {
39
+ removeShareParty(
40
+ partnerId: $partnerId
41
+ ownerId: $ownerId
42
+ orgId: $orgId
43
+ resourceType: $resourceType
44
+ resourceId: $resourceId
45
+ sharePartyId: $sharePartyId
46
+ ) {
47
+ id
48
+ name
49
+ resourceId
50
+ org
51
+ resourceType
52
+ oauthSharePermissions {
53
+ role
54
+ partyId
55
+ partyName
56
+ permission
57
+ }
58
+ description
59
+ createdStamp
60
+ updatedStamp
61
+ updatedBy
62
+ createdBy
63
+ }
64
+ }
65
+ `;
@@ -0,0 +1 @@
1
+ export declare const GET_SHARED_USER_BY_SERVICE: import("graphql").DocumentNode;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_SHARED_USER_BY_SERVICE = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.GET_SHARED_USER_BY_SERVICE = (0, graphql_tag_1.gql) `
6
+ query GetSharedUserByService($resourceType: String!, $resourceId: String!) {
7
+ getSharedUserByService(
8
+ resourceType: $resourceType
9
+ resourceId: $resourceId
10
+ ) {
11
+ role
12
+ partyId
13
+ partyName
14
+ permission
15
+ status
16
+ }
17
+ }
18
+ `;