@connect-plus-online/ogabai-integrations 0.0.56 → 0.0.58

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.d.mts CHANGED
@@ -582,6 +582,9 @@ interface GetMonthlyUserStatsByYearResponse {
582
582
  interface GetMonthlyUserStatsByYearResponseNestedFields {
583
583
  monthlyUserStat: MonthlyUserStatFields;
584
584
  }
585
+ interface GetUserDashStatsRequest {
586
+ storeId: string;
587
+ }
585
588
  interface GetUserDashStatsResponse {
586
589
  outOfStockCount: number;
587
590
  productCounts: ProductCounts;
@@ -656,7 +659,7 @@ declare const createUserService: (client: GraphQLClient) => {
656
659
  root?: (keyof GetMonthlyUserStatsByYearResponse)[];
657
660
  nestedFields?: GetMonthlyUserStatsByYearResponseNestedFields;
658
661
  }, option?: RequestOption): Promise<GetMonthlyUserStatsByYearResponse | undefined>;
659
- getUserDashStats(fetchFields?: {
662
+ getUserDashStats(input?: GetUserDashStatsRequest, fetchFields?: {
660
663
  root?: (keyof GetUserDashStatsResponse)[];
661
664
  nestedFields?: GetUserDashStatsResponseNestedFields;
662
665
  }, option?: RequestOption): Promise<GetUserDashStatsResponse | undefined>;
@@ -687,6 +690,13 @@ declare const createUserService: (client: GraphQLClient) => {
687
690
  };
688
691
  type UserService = ReturnType<typeof createUserService>;
689
692
 
693
+ interface AuthenticateWithStoreRequest {
694
+ storeId: string;
695
+ roleId: string;
696
+ }
697
+ interface AuthenticateWithStoreResponse {
698
+ accessToken: string;
699
+ }
690
700
  interface CheckRegistrationRequest {
691
701
  phone: string;
692
702
  }
@@ -755,6 +765,11 @@ interface SignUpResponse {
755
765
  }
756
766
 
757
767
  declare const createAuthService: (client: GraphQLClient) => {
768
+ authenticateWithStore(input: AuthenticateWithStoreRequest, fetchFields?: {
769
+ root?: (keyof AuthenticateWithStoreResponse)[];
770
+ }, option?: RequestOption): Promise<GraphQLResponse<{
771
+ authenticateWithStore: AuthenticateWithStoreResponse;
772
+ }>>;
758
773
  checkRegistration(input: CheckRegistrationRequest, fetchFields?: {
759
774
  root?: (keyof CheckRegistrationResponse)[];
760
775
  }, option?: RequestOption): Promise<GraphQLResponse<{
package/dist/index.d.ts CHANGED
@@ -582,6 +582,9 @@ interface GetMonthlyUserStatsByYearResponse {
582
582
  interface GetMonthlyUserStatsByYearResponseNestedFields {
583
583
  monthlyUserStat: MonthlyUserStatFields;
584
584
  }
585
+ interface GetUserDashStatsRequest {
586
+ storeId: string;
587
+ }
585
588
  interface GetUserDashStatsResponse {
586
589
  outOfStockCount: number;
587
590
  productCounts: ProductCounts;
@@ -656,7 +659,7 @@ declare const createUserService: (client: GraphQLClient) => {
656
659
  root?: (keyof GetMonthlyUserStatsByYearResponse)[];
657
660
  nestedFields?: GetMonthlyUserStatsByYearResponseNestedFields;
658
661
  }, option?: RequestOption): Promise<GetMonthlyUserStatsByYearResponse | undefined>;
659
- getUserDashStats(fetchFields?: {
662
+ getUserDashStats(input?: GetUserDashStatsRequest, fetchFields?: {
660
663
  root?: (keyof GetUserDashStatsResponse)[];
661
664
  nestedFields?: GetUserDashStatsResponseNestedFields;
662
665
  }, option?: RequestOption): Promise<GetUserDashStatsResponse | undefined>;
@@ -687,6 +690,13 @@ declare const createUserService: (client: GraphQLClient) => {
687
690
  };
688
691
  type UserService = ReturnType<typeof createUserService>;
689
692
 
693
+ interface AuthenticateWithStoreRequest {
694
+ storeId: string;
695
+ roleId: string;
696
+ }
697
+ interface AuthenticateWithStoreResponse {
698
+ accessToken: string;
699
+ }
690
700
  interface CheckRegistrationRequest {
691
701
  phone: string;
692
702
  }
@@ -755,6 +765,11 @@ interface SignUpResponse {
755
765
  }
756
766
 
757
767
  declare const createAuthService: (client: GraphQLClient) => {
768
+ authenticateWithStore(input: AuthenticateWithStoreRequest, fetchFields?: {
769
+ root?: (keyof AuthenticateWithStoreResponse)[];
770
+ }, option?: RequestOption): Promise<GraphQLResponse<{
771
+ authenticateWithStore: AuthenticateWithStoreResponse;
772
+ }>>;
758
773
  checkRegistration(input: CheckRegistrationRequest, fetchFields?: {
759
774
  root?: (keyof CheckRegistrationResponse)[];
760
775
  }, option?: RequestOption): Promise<GraphQLResponse<{
package/dist/index.esm.js CHANGED
@@ -560,7 +560,7 @@ var createUserService = (client) => ({
560
560
  return (_c = res.data) == null ? void 0 : _c.getMonthlyUserStatsByYear;
561
561
  },
562
562
  // user dashboard stats
563
- async getUserDashStats(fetchFields, option) {
563
+ async getUserDashStats(input, fetchFields, option) {
564
564
  var _a, _b, _c;
565
565
  const res = await client.request(
566
566
  user_schema_default.getUserDashStats(
@@ -569,7 +569,7 @@ var createUserService = (client) => ({
569
569
  (_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserDashStatsResponseNestedFields
570
570
  )
571
571
  ),
572
- {},
572
+ input,
573
573
  option
574
574
  );
575
575
  return (_c = res.data) == null ? void 0 : _c.getUserDashStats;
@@ -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(