@connect-plus-online/ogabai-integrations 0.0.56 → 0.0.57
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/index.cjs.js +22 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.esm.js +22 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -687,6 +687,13 @@ declare const createUserService: (client: GraphQLClient) => {
|
|
|
687
687
|
};
|
|
688
688
|
type UserService = ReturnType<typeof createUserService>;
|
|
689
689
|
|
|
690
|
+
interface AuthenticateWithStoreRequest {
|
|
691
|
+
storeId: string;
|
|
692
|
+
roleId: string;
|
|
693
|
+
}
|
|
694
|
+
interface AuthenticateWithStoreResponse {
|
|
695
|
+
accessToken: string;
|
|
696
|
+
}
|
|
690
697
|
interface CheckRegistrationRequest {
|
|
691
698
|
phone: string;
|
|
692
699
|
}
|
|
@@ -755,6 +762,11 @@ interface SignUpResponse {
|
|
|
755
762
|
}
|
|
756
763
|
|
|
757
764
|
declare const createAuthService: (client: GraphQLClient) => {
|
|
765
|
+
authenticateWithStore(input: AuthenticateWithStoreRequest, fetchFields?: {
|
|
766
|
+
root?: (keyof AuthenticateWithStoreResponse)[];
|
|
767
|
+
}, option?: RequestOption): Promise<GraphQLResponse<{
|
|
768
|
+
authenticateWithStore: AuthenticateWithStoreResponse;
|
|
769
|
+
}>>;
|
|
758
770
|
checkRegistration(input: CheckRegistrationRequest, fetchFields?: {
|
|
759
771
|
root?: (keyof CheckRegistrationResponse)[];
|
|
760
772
|
}, option?: RequestOption): Promise<GraphQLResponse<{
|
package/dist/index.d.ts
CHANGED
|
@@ -687,6 +687,13 @@ declare const createUserService: (client: GraphQLClient) => {
|
|
|
687
687
|
};
|
|
688
688
|
type UserService = ReturnType<typeof createUserService>;
|
|
689
689
|
|
|
690
|
+
interface AuthenticateWithStoreRequest {
|
|
691
|
+
storeId: string;
|
|
692
|
+
roleId: string;
|
|
693
|
+
}
|
|
694
|
+
interface AuthenticateWithStoreResponse {
|
|
695
|
+
accessToken: string;
|
|
696
|
+
}
|
|
690
697
|
interface CheckRegistrationRequest {
|
|
691
698
|
phone: string;
|
|
692
699
|
}
|
|
@@ -755,6 +762,11 @@ interface SignUpResponse {
|
|
|
755
762
|
}
|
|
756
763
|
|
|
757
764
|
declare const createAuthService: (client: GraphQLClient) => {
|
|
765
|
+
authenticateWithStore(input: AuthenticateWithStoreRequest, fetchFields?: {
|
|
766
|
+
root?: (keyof AuthenticateWithStoreResponse)[];
|
|
767
|
+
}, option?: RequestOption): Promise<GraphQLResponse<{
|
|
768
|
+
authenticateWithStore: AuthenticateWithStoreResponse;
|
|
769
|
+
}>>;
|
|
758
770
|
checkRegistration(input: CheckRegistrationRequest, fetchFields?: {
|
|
759
771
|
root?: (keyof CheckRegistrationResponse)[];
|
|
760
772
|
}, option?: RequestOption): Promise<GraphQLResponse<{
|
package/dist/index.esm.js
CHANGED
|
@@ -630,6 +630,13 @@ var createUserService = (client) => ({
|
|
|
630
630
|
|
|
631
631
|
// src/services/user/schemas/auth.schema.ts
|
|
632
632
|
var authSchema = {
|
|
633
|
+
authenticateWithStore: (query) => `
|
|
634
|
+
mutation authenticateWithStore($storeId: String!, $roleId: String!) {
|
|
635
|
+
authenticateWithStore(storeId: $storeId, roleId: $roleId) {
|
|
636
|
+
${query}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
`,
|
|
633
640
|
// change pin
|
|
634
641
|
changePin: (query) => `
|
|
635
642
|
mutation changePin($userId: String!, $oldPin: String!, $newPin: String!) {
|
|
@@ -690,6 +697,9 @@ var authSchema = {
|
|
|
690
697
|
};
|
|
691
698
|
|
|
692
699
|
// src/services/user/types/auth.type.ts
|
|
700
|
+
var authenticateWithStoreResponse = [
|
|
701
|
+
"accessToken"
|
|
702
|
+
];
|
|
693
703
|
var checkRegistrationResponse = [
|
|
694
704
|
"isRegistered"
|
|
695
705
|
];
|
|
@@ -720,6 +730,18 @@ var signUpResponse = [
|
|
|
720
730
|
|
|
721
731
|
// src/services/user/auth.service.ts
|
|
722
732
|
var createAuthService = (client) => ({
|
|
733
|
+
async authenticateWithStore(input, fetchFields, option) {
|
|
734
|
+
var _a;
|
|
735
|
+
return client.request(
|
|
736
|
+
authSchema.authenticateWithStore(
|
|
737
|
+
gqlQueryStringBuilder(
|
|
738
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : authenticateWithStoreResponse
|
|
739
|
+
)
|
|
740
|
+
),
|
|
741
|
+
input,
|
|
742
|
+
option
|
|
743
|
+
);
|
|
744
|
+
},
|
|
723
745
|
async checkRegistration(input, fetchFields, option) {
|
|
724
746
|
var _a;
|
|
725
747
|
return client.request(
|