@longvansoftware/service-js-client 2.6.1 → 2.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.
- package/dist/src/graphql/auth/queries.d.ts +3 -0
- package/dist/src/graphql/auth/queries.js +52 -1
- package/dist/src/graphql/campaign/mutations.d.ts +1 -0
- package/dist/src/graphql/campaign/mutations.js +34 -0
- package/dist/src/graphql/campaign/queries.d.ts +11 -0
- package/dist/src/graphql/campaign/queries.js +496 -0
- package/dist/src/graphql/cashbook/queries.d.ts +2 -0
- package/dist/src/graphql/cashbook/queries.js +99 -0
- package/dist/src/graphql/cloudCloud/mutations.d.ts +3 -0
- package/dist/src/graphql/cloudCloud/mutations.js +41 -0
- package/dist/src/graphql/cloudCloud/queries.d.ts +5 -0
- package/dist/src/graphql/cloudCloud/queries.js +185 -0
- package/dist/src/graphql/orderCloud/mutations.d.ts +1 -0
- package/dist/src/graphql/orderCloud/mutations.js +12 -0
- package/dist/src/graphql/orderCloud/queries.d.ts +1 -0
- package/dist/src/graphql/orderCloud/queries.js +12 -0
- package/dist/src/graphql/paymentV2/mutations.d.ts +5 -0
- package/dist/src/graphql/paymentV2/mutations.js +124 -0
- package/dist/src/graphql/paymentV2/queries.d.ts +10 -0
- package/dist/src/graphql/paymentV2/queries.js +277 -0
- package/dist/src/graphql/storage_s3/mutations.d.ts +5 -0
- package/dist/src/graphql/storage_s3/mutations.js +114 -2
- package/dist/src/graphql/storage_s3/queries.d.ts +6 -0
- package/dist/src/graphql/storage_s3/queries.js +74 -2
- package/dist/src/graphql/store/mutations.d.ts +1 -0
- package/dist/src/graphql/store/mutations.js +29 -0
- package/dist/src/graphql/store/queries.d.ts +1 -0
- package/dist/src/graphql/store/queries.js +29 -0
- package/dist/src/graphql/truedoc/queries.d.ts +1 -0
- package/dist/src/graphql/truedoc/queries.js +18 -0
- package/dist/src/graphql/user/mutations.d.ts +13 -11
- package/dist/src/graphql/user/mutations.js +12 -1
- package/dist/src/lib/accounting/index.d.ts +5 -0
- package/dist/src/lib/accounting/index.js +32 -0
- package/dist/src/lib/auth/index.d.ts +11 -0
- package/dist/src/lib/auth/index.js +89 -3
- package/dist/src/lib/campaign/index.d.ts +22 -0
- package/dist/src/lib/campaign/index.js +252 -0
- package/dist/src/lib/cashbook/index.d.ts +6 -0
- package/dist/src/lib/cashbook/index.js +56 -0
- package/dist/src/lib/cloudCloud/index.d.ts +12 -0
- package/dist/src/lib/cloudCloud/index.js +142 -0
- package/dist/src/lib/comhub/index.d.ts +6 -0
- package/dist/src/lib/comhub/index.js +50 -0
- package/dist/src/lib/deepLinkVietQr/index.d.ts +7 -0
- package/dist/src/lib/deepLinkVietQr/index.js +58 -0
- package/dist/src/lib/fileService/index.d.ts +34 -0
- package/dist/src/lib/fileService/index.js +80 -0
- package/dist/src/lib/getImage/index.d.ts +4 -0
- package/dist/src/lib/getImage/index.js +10 -0
- package/dist/src/lib/image/index.d.ts +7 -0
- package/dist/src/lib/image/index.js +49 -0
- package/dist/src/lib/omnigateway/index.d.ts +7 -0
- package/dist/src/lib/omnigateway/index.js +58 -0
- package/dist/src/lib/orderCloud/index.d.ts +5 -0
- package/dist/src/lib/orderCloud/index.js +37 -0
- package/dist/src/lib/paymentV2/index.d.ts +19 -0
- package/dist/src/lib/paymentV2/index.js +264 -0
- package/dist/src/lib/portal/index.d.ts +33 -0
- package/dist/src/lib/portal/index.js +456 -0
- package/dist/src/lib/storage_s3/index.d.ts +11 -0
- package/dist/src/lib/storage_s3/index.js +201 -0
- package/dist/src/lib/store/index.d.ts +30 -0
- package/dist/src/lib/store/index.js +74 -0
- package/dist/src/lib/token/index.d.ts +5 -0
- package/dist/src/lib/token/index.js +32 -0
- package/dist/src/lib/truedoc/index.d.ts +5 -0
- package/dist/src/lib/truedoc/index.js +35 -0
- package/dist/src/lib/upload/index.d.ts +5 -0
- package/dist/src/lib/upload/index.js +35 -0
- package/dist/src/lib/user/index.d.ts +1 -0
- package/dist/src/lib/user/index.js +20 -0
- package/dist/src/lib/warehouseV2/index.d.ts +13 -0
- package/dist/src/lib/warehouseV2/index.js +54 -0
- package/dist/src/lib/zca/index.d.ts +12 -0
- package/dist/src/lib/zca/index.js +41 -0
- package/dist/src/types/campaign.d.ts +14 -0
- package/dist/src/types/campaign.js +2 -0
- package/dist/src/types/invoice.d.ts +14 -0
- package/dist/src/types/invoice.js +2 -0
- package/dist/src/types/portal.d.ts +7 -0
- package/dist/src/types/portal.js +2 -0
- package/dist/src/types/store.d.ts +158 -0
- package/dist/src/types/store.js +3 -0
- package/dist/src/utils/validatePhoneNumber.d.ts +1 -0
- package/dist/src/utils/validatePhoneNumber.js +20 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ACTION_SYNC_USER_FROM_S3 = exports.RESET_KEY = exports.REMOVE_CORS_BUCKET = exports.UPDATE_CORS_BUCKET = exports.ADD_CORS_BUCKET = exports.REMOVE_S3_DOMAIN = exports.ADD_S3_DOMAIN = exports.REMOVE_FILE_OTHER_VERSION = exports.RESTORE_FILE_OTHER_VERSION = exports.REMOVE_FILE_TRASH = exports.RESTORE_FILE_TRASH = exports.UPDATE_BUCKET_VERSIONING = exports.UPDATE_ACL_PERMISSION_BUCKET = exports.REMOVE_FILE = exports.MOVE_FILE = exports.COPY_FILE = exports.SHARE_LINK_FILE_BY_TIME = exports.SHARE_LINK_FILE_BY_TIME_DYNAMIC = exports.RENAME_FILE = exports.UPDATE_ACL_PERMISSION_FILE = exports.UPLOAD_FOLDER = exports.REMOVE_FOLDER = exports.CREATE_FOLDER = exports.DELETE_BUCKET = exports.RENAME_BUCKET = exports.CREATE_BUCKET = void 0;
|
|
3
|
+
exports.CREATE_BUCKET_POLICY_STATEMENT = exports.UPDATE_BUCKET_POLICY = exports.REMOVE_SUB_USER = exports.UPDATE_SUB_USER_PERMISSION = exports.CREATE_SUB_USER = exports.ACTION_SYNC_USER_FROM_S3 = exports.RESET_KEY = exports.REMOVE_CORS_BUCKET = exports.UPDATE_CORS_BUCKET = exports.ADD_CORS_BUCKET = exports.REMOVE_S3_DOMAIN = exports.ADD_S3_DOMAIN = exports.REMOVE_FILE_OTHER_VERSION = exports.RESTORE_FILE_OTHER_VERSION = exports.REMOVE_FILE_TRASH = exports.RESTORE_FILE_TRASH = exports.UPDATE_BUCKET_VERSIONING = exports.UPDATE_ACL_PERMISSION_BUCKET = exports.REMOVE_FILE = exports.MOVE_FILE = exports.COPY_FILE = exports.SHARE_LINK_FILE_BY_TIME = exports.SHARE_LINK_FILE_BY_TIME_DYNAMIC = exports.RENAME_FILE = exports.UPDATE_ACL_PERMISSION_FILE = exports.UPLOAD_FOLDER = exports.REMOVE_FOLDER = exports.CREATE_FOLDER = exports.DELETE_BUCKET = exports.RENAME_BUCKET = exports.CREATE_BUCKET = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
const CREATE_BUCKET = (fields = []) => {
|
|
6
6
|
const fieldStr = fields.join('\n ');
|
|
@@ -595,9 +595,121 @@ const ACTION_SYNC_USER_FROM_S3 = (fields = []) => {
|
|
|
595
595
|
updateBy: $updateBy,
|
|
596
596
|
serviceId: $serviceId
|
|
597
597
|
) {
|
|
598
|
-
${hasFields ? `${fieldStr}` : ''}
|
|
598
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
`;
|
|
602
602
|
};
|
|
603
603
|
exports.ACTION_SYNC_USER_FROM_S3 = ACTION_SYNC_USER_FROM_S3;
|
|
604
|
+
const CREATE_SUB_USER = (fields = []) => {
|
|
605
|
+
const fieldStr = fields.join('\n ');
|
|
606
|
+
const hasFields = fields.length > 0;
|
|
607
|
+
return (0, graphql_tag_1.gql) `
|
|
608
|
+
mutation CreateSubUser(
|
|
609
|
+
$serviceId: String!,
|
|
610
|
+
$s3UserId: String!,
|
|
611
|
+
$subUserName: String!,
|
|
612
|
+
$subUserPermission: String!
|
|
613
|
+
) {
|
|
614
|
+
createSubUser(
|
|
615
|
+
serviceId: $serviceId,
|
|
616
|
+
s3UserId: $s3UserId,
|
|
617
|
+
subUserName: $subUserName,
|
|
618
|
+
subUserPermission: $subUserPermission
|
|
619
|
+
) {
|
|
620
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
`;
|
|
624
|
+
};
|
|
625
|
+
exports.CREATE_SUB_USER = CREATE_SUB_USER;
|
|
626
|
+
const UPDATE_SUB_USER_PERMISSION = (fields = []) => {
|
|
627
|
+
const fieldStr = fields.join('\n ');
|
|
628
|
+
const hasFields = fields.length > 0;
|
|
629
|
+
return (0, graphql_tag_1.gql) `
|
|
630
|
+
mutation UpdateSubUserPermission(
|
|
631
|
+
$serviceId: String!,
|
|
632
|
+
$s3UserId: String!,
|
|
633
|
+
$subUserId: String!,
|
|
634
|
+
$subUserPermission: String!
|
|
635
|
+
) {
|
|
636
|
+
updateSubUserPermission(
|
|
637
|
+
serviceId: $serviceId,
|
|
638
|
+
s3UserId: $s3UserId,
|
|
639
|
+
subUserId: $subUserId,
|
|
640
|
+
subUserPermission: $subUserPermission
|
|
641
|
+
) {
|
|
642
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
`;
|
|
646
|
+
};
|
|
647
|
+
exports.UPDATE_SUB_USER_PERMISSION = UPDATE_SUB_USER_PERMISSION;
|
|
648
|
+
const REMOVE_SUB_USER = (fields = []) => {
|
|
649
|
+
const fieldStr = fields.join('\n ');
|
|
650
|
+
const hasFields = fields.length > 0;
|
|
651
|
+
return (0, graphql_tag_1.gql) `
|
|
652
|
+
mutation RemoveSubUser(
|
|
653
|
+
$serviceId: String!,
|
|
654
|
+
$s3UserId: String!,
|
|
655
|
+
$subUserId: String!
|
|
656
|
+
) {
|
|
657
|
+
removeSubUser(
|
|
658
|
+
serviceId: $serviceId,
|
|
659
|
+
s3UserId: $s3UserId,
|
|
660
|
+
subUserId: $subUserId
|
|
661
|
+
) {
|
|
662
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
`;
|
|
666
|
+
};
|
|
667
|
+
exports.REMOVE_SUB_USER = REMOVE_SUB_USER;
|
|
668
|
+
const UPDATE_BUCKET_POLICY = (fields = []) => {
|
|
669
|
+
const fieldStr = fields.join('\n ');
|
|
670
|
+
const hasFields = fields.length > 0;
|
|
671
|
+
return (0, graphql_tag_1.gql) `
|
|
672
|
+
mutation UpdateBucketPolicy(
|
|
673
|
+
$serviceId: String!,
|
|
674
|
+
$s3UserId: String!,
|
|
675
|
+
$bucketId: String!,
|
|
676
|
+
$jsonPolicy: String!,
|
|
677
|
+
$byUser: String!
|
|
678
|
+
) {
|
|
679
|
+
updateBucketPolicy(
|
|
680
|
+
serviceId: $serviceId,
|
|
681
|
+
s3UserId: $s3UserId,
|
|
682
|
+
bucketId: $bucketId,
|
|
683
|
+
jsonPolicy: $jsonPolicy,
|
|
684
|
+
byUser: $byUser
|
|
685
|
+
) {
|
|
686
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
`;
|
|
690
|
+
};
|
|
691
|
+
exports.UPDATE_BUCKET_POLICY = UPDATE_BUCKET_POLICY;
|
|
692
|
+
const CREATE_BUCKET_POLICY_STATEMENT = (fields = []) => {
|
|
693
|
+
const fieldStr = fields.join('\n ');
|
|
694
|
+
const hasFields = fields.length > 0;
|
|
695
|
+
return (0, graphql_tag_1.gql) `
|
|
696
|
+
mutation CreateBucketPolicyStatement(
|
|
697
|
+
$serviceId: String!,
|
|
698
|
+
$s3UserId: String!,
|
|
699
|
+
$bucketId: String!,
|
|
700
|
+
$statement: StatementInput!,
|
|
701
|
+
$byUser: String!
|
|
702
|
+
) {
|
|
703
|
+
createBucketPolicyStatement(
|
|
704
|
+
serviceId: $serviceId,
|
|
705
|
+
s3UserId: $s3UserId,
|
|
706
|
+
bucketId: $bucketId,
|
|
707
|
+
statement: $statement,
|
|
708
|
+
byUser: $byUser
|
|
709
|
+
) {
|
|
710
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
`;
|
|
714
|
+
};
|
|
715
|
+
exports.CREATE_BUCKET_POLICY_STATEMENT = CREATE_BUCKET_POLICY_STATEMENT;
|
|
@@ -10,3 +10,9 @@ export declare const GET_LIST_FILE_OTHER_VERSION: (fields?: string[]) => Documen
|
|
|
10
10
|
export declare const CHART_IN_YEAR: (fields?: string[]) => DocumentNode;
|
|
11
11
|
export declare const GET_IP_CONSUL: DocumentNode;
|
|
12
12
|
export declare const FILTER_LIST_OBJECT: (fields?: string[]) => DocumentNode;
|
|
13
|
+
export declare const GET_LIST_SUB_USER: (fields?: string[]) => DocumentNode;
|
|
14
|
+
export declare const GET_LIST_PERMISSION_SUB_USER: (fields?: string[]) => DocumentNode;
|
|
15
|
+
export declare const GET_BUCKET_POLICY: (fields?: string[]) => DocumentNode;
|
|
16
|
+
export declare const GET_BUCKET_POLICY_EFFECT: (fields?: string[]) => DocumentNode;
|
|
17
|
+
export declare const GET_BUCKET_POLICY_ACTION: (fields?: string[]) => DocumentNode;
|
|
18
|
+
export declare const PREVIEW_CREATE_BUCKET_POLICY_STATEMENT: (fields?: string[]) => DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FILTER_LIST_OBJECT = exports.GET_IP_CONSUL = exports.CHART_IN_YEAR = exports.GET_LIST_FILE_OTHER_VERSION = exports.GET_LIST_CORS_BY_S3_USER_ID = exports.GET_LIST_S3_DOMAIN_BY_S3_USER_ID = exports.GET_LIST_FILE_TRASH = exports.GET_LIST_OBJECT = exports.GET_LIST_BUCKET_BY_S3_USER_ID = exports.GET_LIST_S3_USER_ACTIVE_BY_SERVICE_ID = exports.GET_LIST_S3_USER_BY_SERVICE_ID = void 0;
|
|
3
|
+
exports.PREVIEW_CREATE_BUCKET_POLICY_STATEMENT = exports.GET_BUCKET_POLICY_ACTION = exports.GET_BUCKET_POLICY_EFFECT = exports.GET_BUCKET_POLICY = exports.GET_LIST_PERMISSION_SUB_USER = exports.GET_LIST_SUB_USER = exports.FILTER_LIST_OBJECT = exports.GET_IP_CONSUL = exports.CHART_IN_YEAR = exports.GET_LIST_FILE_OTHER_VERSION = exports.GET_LIST_CORS_BY_S3_USER_ID = exports.GET_LIST_S3_DOMAIN_BY_S3_USER_ID = exports.GET_LIST_FILE_TRASH = exports.GET_LIST_OBJECT = exports.GET_LIST_BUCKET_BY_S3_USER_ID = exports.GET_LIST_S3_USER_ACTIVE_BY_SERVICE_ID = exports.GET_LIST_S3_USER_BY_SERVICE_ID = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
const GET_LIST_S3_USER_BY_SERVICE_ID = (fields = []) => {
|
|
6
6
|
const fieldStr = fields.join('\n ');
|
|
@@ -121,9 +121,81 @@ const FILTER_LIST_OBJECT = (fields = []) => {
|
|
|
121
121
|
return (0, graphql_tag_1.gql) `
|
|
122
122
|
query FilterListObject($s3UserId: String!, $bucketId: String!, $maxKeys: Int!, $key: String, $prefixSearch: String, $continuationToken: String, $serviceId: String!) {
|
|
123
123
|
filterListObject(s3UserId: $s3UserId, bucketId: $bucketId, maxKeys: $maxKeys, key: $key, prefixSearch: $prefixSearch, continuationToken: $continuationToken, serviceId: $serviceId){
|
|
124
|
-
${hasFields ? `${fieldStr}` : ''}
|
|
124
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
`;
|
|
128
128
|
};
|
|
129
129
|
exports.FILTER_LIST_OBJECT = FILTER_LIST_OBJECT;
|
|
130
|
+
const GET_LIST_SUB_USER = (fields = []) => {
|
|
131
|
+
const fieldStr = fields.join('\n ');
|
|
132
|
+
const hasFields = fields.length > 0;
|
|
133
|
+
return (0, graphql_tag_1.gql) `
|
|
134
|
+
query GetListSubUser($serviceId: String!, $s3UserId: String!) {
|
|
135
|
+
getListSubUser(serviceId: $serviceId, s3UserId: $s3UserId) {
|
|
136
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
};
|
|
141
|
+
exports.GET_LIST_SUB_USER = GET_LIST_SUB_USER;
|
|
142
|
+
const GET_LIST_PERMISSION_SUB_USER = (fields = []) => {
|
|
143
|
+
const fieldStr = fields.join('\n ');
|
|
144
|
+
const hasFields = fields.length > 0;
|
|
145
|
+
return (0, graphql_tag_1.gql) `
|
|
146
|
+
query GetListPermissionSubUser($serviceId: String!, $s3UserId: String!) {
|
|
147
|
+
getListPermissionSubUser(serviceId: $serviceId, s3UserId: $s3UserId) {
|
|
148
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
`;
|
|
152
|
+
};
|
|
153
|
+
exports.GET_LIST_PERMISSION_SUB_USER = GET_LIST_PERMISSION_SUB_USER;
|
|
154
|
+
const GET_BUCKET_POLICY = (fields = []) => {
|
|
155
|
+
const fieldStr = fields.join('\n ');
|
|
156
|
+
const hasFields = fields.length > 0;
|
|
157
|
+
return (0, graphql_tag_1.gql) `
|
|
158
|
+
query GetBucketPolicy($serviceId: String!, $s3UserId: String!, $bucketId: String!) {
|
|
159
|
+
getBucketPolicy(serviceId: $serviceId, s3UserId: $s3UserId, bucketId: $bucketId) {
|
|
160
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
};
|
|
165
|
+
exports.GET_BUCKET_POLICY = GET_BUCKET_POLICY;
|
|
166
|
+
const GET_BUCKET_POLICY_EFFECT = (fields = []) => {
|
|
167
|
+
const fieldStr = fields.join('\n ');
|
|
168
|
+
const hasFields = fields.length > 0;
|
|
169
|
+
return (0, graphql_tag_1.gql) `
|
|
170
|
+
query GetBucketPolicyEffect($serviceId: String!, $s3UserId: String!) {
|
|
171
|
+
getBucketPolicyEffect(serviceId: $serviceId, s3UserId: $s3UserId) {
|
|
172
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
};
|
|
177
|
+
exports.GET_BUCKET_POLICY_EFFECT = GET_BUCKET_POLICY_EFFECT;
|
|
178
|
+
const GET_BUCKET_POLICY_ACTION = (fields = []) => {
|
|
179
|
+
const fieldStr = fields.join('\n ');
|
|
180
|
+
const hasFields = fields.length > 0;
|
|
181
|
+
return (0, graphql_tag_1.gql) `
|
|
182
|
+
query GetBucketPolicyAction($serviceId: String!, $s3UserId: String!) {
|
|
183
|
+
getBucketPolicyAction(serviceId: $serviceId, s3UserId: $s3UserId) {
|
|
184
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
};
|
|
189
|
+
exports.GET_BUCKET_POLICY_ACTION = GET_BUCKET_POLICY_ACTION;
|
|
190
|
+
const PREVIEW_CREATE_BUCKET_POLICY_STATEMENT = (fields = []) => {
|
|
191
|
+
const fieldStr = fields.join('\n ');
|
|
192
|
+
const hasFields = fields.length > 0;
|
|
193
|
+
return (0, graphql_tag_1.gql) `
|
|
194
|
+
query PreviewCreateBucketPolicyStatement($serviceId: String!, $s3UserId: String!, $bucketId: String!, $statement: StatementInput!) {
|
|
195
|
+
previewCreateBucketPolicyStatement(serviceId: $serviceId, s3UserId: $s3UserId, bucketId: $bucketId, statement: $statement) {
|
|
196
|
+
${hasFields ? `${fieldStr}` : ''}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
`;
|
|
200
|
+
};
|
|
201
|
+
exports.PREVIEW_CREATE_BUCKET_POLICY_STATEMENT = PREVIEW_CREATE_BUCKET_POLICY_STATEMENT;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CREATE_STORE_MUTATION: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CREATE_STORE_MUTATION = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.CREATE_STORE_MUTATION = (0, graphql_tag_1.gql) `
|
|
6
|
+
mutation CreateStore($partnerId: String, $storeName: String) {
|
|
7
|
+
createStore(partnerId: $partnerId, storeName: $storeName) {
|
|
8
|
+
id
|
|
9
|
+
createdStamp
|
|
10
|
+
name
|
|
11
|
+
type
|
|
12
|
+
enable
|
|
13
|
+
partyId
|
|
14
|
+
warehouses
|
|
15
|
+
warehouseIdDefault
|
|
16
|
+
enableOrderAbleFuture
|
|
17
|
+
enableOrderNegativeQuantity
|
|
18
|
+
storeEcommerceName
|
|
19
|
+
shippingCompanies
|
|
20
|
+
shippingCompanyIdPrimary
|
|
21
|
+
customerIdPrimary
|
|
22
|
+
paymentMethodIdPrimary
|
|
23
|
+
enableCustomProductPrice
|
|
24
|
+
enablePaymentPartial
|
|
25
|
+
paymentPartialPercent
|
|
26
|
+
productStoreLink
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GET_STORE_CHANNEL_BY_EMP_ID_QUERY: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET_STORE_CHANNEL_BY_EMP_ID_QUERY = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.GET_STORE_CHANNEL_BY_EMP_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetStoreChannelByEmpId($saleId: String) {
|
|
7
|
+
getStoreChannelByEmpId(saleId: $saleId) {
|
|
8
|
+
id
|
|
9
|
+
createdStamp
|
|
10
|
+
name
|
|
11
|
+
type
|
|
12
|
+
enable
|
|
13
|
+
partyId
|
|
14
|
+
warehouses
|
|
15
|
+
warehouseIdDefault
|
|
16
|
+
enableOrderAbleFuture
|
|
17
|
+
enableOrderNegativeQuantity
|
|
18
|
+
storeEcommerceName
|
|
19
|
+
shippingCompanies
|
|
20
|
+
shippingCompanyIdPrimary
|
|
21
|
+
customerIdPrimary
|
|
22
|
+
paymentMethodIdPrimary
|
|
23
|
+
enableCustomProductPrice
|
|
24
|
+
enablePaymentPartial
|
|
25
|
+
paymentPartialPercent
|
|
26
|
+
productStoreLink
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GET_CUSTOMER_INFOR: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET_CUSTOMER_INFOR = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.GET_CUSTOMER_INFOR = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetCustomerInfo($bmlToken: String!) {
|
|
7
|
+
getCustomerInfo(bmlToken: $bmlToken) {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
email
|
|
11
|
+
phone
|
|
12
|
+
tier
|
|
13
|
+
gender
|
|
14
|
+
tdAccessToken
|
|
15
|
+
dob
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
1
|
+
import { DocumentNode } from "graphql";
|
|
2
|
+
export declare const CREATE_COMPANY: DocumentNode;
|
|
3
|
+
export declare const UPDATE_COMPANY_INFOR: DocumentNode;
|
|
4
|
+
export declare const UPDATE_CUSTOMER_V2: DocumentNode;
|
|
5
|
+
export declare const CREATE_CUSTOMER_V2: DocumentNode;
|
|
6
|
+
export declare const CREATE_VAT_INFO: DocumentNode;
|
|
7
|
+
export declare const UPDATE_VAT_INFO: DocumentNode;
|
|
8
|
+
export declare const DELETE_VAT_INFO: DocumentNode;
|
|
9
|
+
export declare const CREATE_TEAM: DocumentNode;
|
|
10
|
+
export declare const ADD_USER_TO_TEAM: DocumentNode;
|
|
11
|
+
export declare const REMOVE_USER_FROM_TEAM: DocumentNode;
|
|
12
|
+
export declare const UPDATE_TEAM_NAME: DocumentNode;
|
|
13
|
+
export declare const UPDATE_CUSTOMER_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_TEAM_NAME = exports.REMOVE_USER_FROM_TEAM = exports.ADD_USER_TO_TEAM = exports.CREATE_TEAM = exports.DELETE_VAT_INFO = exports.UPDATE_VAT_INFO = exports.CREATE_VAT_INFO = exports.CREATE_CUSTOMER_V2 = exports.UPDATE_CUSTOMER_V2 = exports.UPDATE_COMPANY_INFOR = exports.CREATE_COMPANY = void 0;
|
|
3
|
+
exports.UPDATE_CUSTOMER_DYNAMIC = exports.UPDATE_TEAM_NAME = exports.REMOVE_USER_FROM_TEAM = exports.ADD_USER_TO_TEAM = exports.CREATE_TEAM = exports.DELETE_VAT_INFO = exports.UPDATE_VAT_INFO = exports.CREATE_VAT_INFO = exports.CREATE_CUSTOMER_V2 = exports.UPDATE_CUSTOMER_V2 = exports.UPDATE_COMPANY_INFOR = exports.CREATE_COMPANY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.CREATE_COMPANY = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation CreateCompany(
|
|
@@ -227,3 +227,14 @@ exports.UPDATE_TEAM_NAME = (0, graphql_tag_1.gql) `
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
`;
|
|
230
|
+
const UPDATE_CUSTOMER_DYNAMIC = (fields = []) => {
|
|
231
|
+
const fieldStr = fields.join("\n ");
|
|
232
|
+
const hasFields = fields.length > 0;
|
|
233
|
+
return (0, graphql_tag_1.gql) `mutation updateCustomer($id: String! $fieldName: String! $valueUpdate: String! $partnerId: String! $updatedBy: String!) {
|
|
234
|
+
updateCustomer(id: $id, fieldName: $fieldName, valueUpdate: $valueUpdate, partnerId: $partnerId, updatedBy: $updatedBy) {
|
|
235
|
+
${hasFields ? `${fieldStr}` : ""}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
`;
|
|
239
|
+
};
|
|
240
|
+
exports.UPDATE_CUSTOMER_DYNAMIC = UPDATE_CUSTOMER_DYNAMIC;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.AccountingService = void 0;
|
|
13
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
+
class AccountingService extends serviceSDK_1.Service {
|
|
15
|
+
constructor(endpoint, orgId, storeId) {
|
|
16
|
+
super(endpoint, orgId, storeId);
|
|
17
|
+
}
|
|
18
|
+
getCustomerWallet(customerId, type) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const endpoint = `/${this.orgId}/get_gl_account?partyId=${customerId}&type=${type}`;
|
|
21
|
+
const method = "GET";
|
|
22
|
+
try {
|
|
23
|
+
const response = yield this.restApiCallWithNoHeader(endpoint, method);
|
|
24
|
+
return response;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.AccountingService = AccountingService;
|
|
@@ -50,4 +50,15 @@ export declare class AuthService extends Service {
|
|
|
50
50
|
getOrganizationsByPartyIdDynamic(partyId: string, fields: string[]): Promise<any>;
|
|
51
51
|
checkEnabled2FA(partyId: string, fields: string[]): Promise<any>;
|
|
52
52
|
logout(accessToken: string, partyId: string): Promise<any>;
|
|
53
|
+
resetPassword(username: string, newPassword: string, accessToken: string): Promise<any>;
|
|
54
|
+
loginGoogle(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string): Promise<any>;
|
|
55
|
+
loginFacebook(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string): Promise<any>;
|
|
56
|
+
/**
|
|
57
|
+
* Logs in a user via Zalo by executing a GraphQL query.
|
|
58
|
+
*
|
|
59
|
+
* @param redirectUrl - The URL to redirect the user to after login.
|
|
60
|
+
* @returns A promise that resolves to the result of the `loginZalo` GraphQL query.
|
|
61
|
+
* @throws Will throw an error if the GraphQL query fails.
|
|
62
|
+
*/
|
|
63
|
+
loginZalo(redirectUrl: string, redirectUrlError?: string, serviceOperator?: string): Promise<any>;
|
|
53
64
|
}
|
|
@@ -53,7 +53,7 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
53
53
|
*/
|
|
54
54
|
register(registerRequest) {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const variables = { registerRequest };
|
|
56
|
+
const variables = { orgId: this.orgId, registerRequest };
|
|
57
57
|
yield this.graphqlMutation(mutations_1.REGISTER_MUTATION, variables);
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -451,7 +451,7 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
451
451
|
return __awaiter(this, void 0, void 0, function* () {
|
|
452
452
|
const query = (0, queries_1.GET_ORGANIZATIONS_BY_PARTYID)(fields);
|
|
453
453
|
const variables = {
|
|
454
|
-
partyId
|
|
454
|
+
partyId,
|
|
455
455
|
};
|
|
456
456
|
try {
|
|
457
457
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -467,7 +467,7 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
467
467
|
return __awaiter(this, void 0, void 0, function* () {
|
|
468
468
|
const query = (0, queries_1.CHECK_ENABLED_2FA)(fields);
|
|
469
469
|
const variables = {
|
|
470
|
-
partyId
|
|
470
|
+
partyId,
|
|
471
471
|
};
|
|
472
472
|
try {
|
|
473
473
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -496,5 +496,91 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
+
resetPassword(username, newPassword, accessToken) {
|
|
500
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
501
|
+
const query = mutations_1.RESET_PASSWORD_MUTATION;
|
|
502
|
+
const variables = {
|
|
503
|
+
orgId: this.orgId,
|
|
504
|
+
username,
|
|
505
|
+
newPassword,
|
|
506
|
+
accessToken,
|
|
507
|
+
};
|
|
508
|
+
try {
|
|
509
|
+
const response = yield this.graphqlMutation(query, variables);
|
|
510
|
+
return response.resetPassword;
|
|
511
|
+
}
|
|
512
|
+
catch (error) {
|
|
513
|
+
console.log(`Error in resetPassword: ${error}`);
|
|
514
|
+
throw error;
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
loginGoogle(redirectUrl, redirectUrlError, serviceOperator) {
|
|
519
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
520
|
+
const query = queries_1.LOGIN_GOOGLE;
|
|
521
|
+
const variables = {
|
|
522
|
+
orgId: this.orgId,
|
|
523
|
+
type: "login",
|
|
524
|
+
redirectUrl,
|
|
525
|
+
serviceOperator,
|
|
526
|
+
redirectUrlError,
|
|
527
|
+
};
|
|
528
|
+
try {
|
|
529
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
530
|
+
return response.loginGoogle;
|
|
531
|
+
}
|
|
532
|
+
catch (error) {
|
|
533
|
+
console.log(`Error in loginGoogle: ${error}`);
|
|
534
|
+
throw error;
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
loginFacebook(redirectUrl, redirectUrlError, serviceOperator) {
|
|
539
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
540
|
+
const query = queries_1.LOGIN_FACEBOOK;
|
|
541
|
+
const variables = {
|
|
542
|
+
orgId: this.orgId,
|
|
543
|
+
type: "login",
|
|
544
|
+
redirectUrl,
|
|
545
|
+
serviceOperator,
|
|
546
|
+
redirectUrlError,
|
|
547
|
+
};
|
|
548
|
+
try {
|
|
549
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
550
|
+
return response.loginFacebook;
|
|
551
|
+
}
|
|
552
|
+
catch (error) {
|
|
553
|
+
console.log(`Error in loginFacebook: ${error}`);
|
|
554
|
+
throw error;
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Logs in a user via Zalo by executing a GraphQL query.
|
|
560
|
+
*
|
|
561
|
+
* @param redirectUrl - The URL to redirect the user to after login.
|
|
562
|
+
* @returns A promise that resolves to the result of the `loginZalo` GraphQL query.
|
|
563
|
+
* @throws Will throw an error if the GraphQL query fails.
|
|
564
|
+
*/
|
|
565
|
+
loginZalo(redirectUrl, redirectUrlError, serviceOperator) {
|
|
566
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
567
|
+
const query = queries_1.LOGIN_ZALO;
|
|
568
|
+
const variables = {
|
|
569
|
+
orgId: this.orgId,
|
|
570
|
+
type: "login",
|
|
571
|
+
redirectUrl,
|
|
572
|
+
serviceOperator,
|
|
573
|
+
redirectUrlError,
|
|
574
|
+
};
|
|
575
|
+
try {
|
|
576
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
577
|
+
return response.loginZalo;
|
|
578
|
+
}
|
|
579
|
+
catch (error) {
|
|
580
|
+
console.log(`Error in loginZalo: ${error}`);
|
|
581
|
+
throw error;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
499
585
|
}
|
|
500
586
|
exports.AuthService = AuthService;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Service } from "../serviceSDK";
|
|
2
|
+
export declare class CampaignService extends Service {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new CampaignService instance.
|
|
5
|
+
* @param endpoint - The endpoint URL for the service.
|
|
6
|
+
* @param orgId - The organization ID.
|
|
7
|
+
* @param storeId - The store ID.
|
|
8
|
+
*/
|
|
9
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
10
|
+
getCampaignActionActiveNow(customerId: string, campaignActionType: string): Promise<any>;
|
|
11
|
+
searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, excludeExpired: Boolean, pageNumber: number, pageSize: number): Promise<any>;
|
|
12
|
+
checkValidVoucher(customerId: string, voucherCode: string): Promise<any>;
|
|
13
|
+
getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
|
|
14
|
+
getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
|
|
15
|
+
getVoucherAvailableForCustomer(campaignId: string, campaignActionId: string, customerId: string, excludeExpired: Boolean, isPageAble: Boolean): Promise<any>;
|
|
16
|
+
addCustomerToVoucher(voucherCode: string, userId: string, affiliateId: string): Promise<any>;
|
|
17
|
+
suggestVoucher(customerId: string, campaignId: string, campaignActionId: string, isBirthday: Boolean): Promise<any>;
|
|
18
|
+
getCampaignActionById(id: string): Promise<any>;
|
|
19
|
+
searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
|
|
20
|
+
getCampaign(id: string): Promise<any>;
|
|
21
|
+
searchProductPricePromotionResponse(campaignId: string, campaignActionId: string, statusActive: string): Promise<any>;
|
|
22
|
+
}
|