From b77015b413d5c4e8e04c45de10ac4c5709479fed Mon Sep 17 00:00:00 2001 From: Yosvel Quintero Date: Fri, 25 Aug 2023 13:17:45 +0700 Subject: [PATCH] chore: queries locales and timezones --- .../graphql/src/lib/generated/generated.ts | 82 +++++++++++++++++++ .../graphql/master-data-locale-read.graphql | 25 ++++++ .../graphql/master-data-timezone-read.graphql | 22 +++++ 3 files changed, 129 insertions(+) create mode 100644 packages/modules/shared/src/lib/graphql/master-data-locale-read.graphql create mode 100644 packages/modules/shared/src/lib/graphql/master-data-timezone-read.graphql diff --git a/packages/core/graphql/src/lib/generated/generated.ts b/packages/core/graphql/src/lib/generated/generated.ts index cc088cf6..99d11e06 100644 --- a/packages/core/graphql/src/lib/generated/generated.ts +++ b/packages/core/graphql/src/lib/generated/generated.ts @@ -5369,6 +5369,45 @@ export type RequestPasswordChangeMutation = { }; }; +export type MasterDataLocaleReadQueryVariables = Exact<{ + input: IIoRestorecommerceResourcebaseReadRequest; +}>; + +export type MasterDataLocaleReadQuery = { + __typename?: 'Query'; + master_data: { + __typename?: 'ResourceQuery'; + locale: { + __typename?: 'ResourceLocaleQuery'; + Read?: { + __typename?: 'ProtoIoRestorecommerceLocaleLocaleListResponse'; + details?: { + __typename?: 'IoRestorecommerceLocaleLocaleListResponse'; + items?: Array<{ + __typename?: 'IoRestorecommerceLocaleLocaleResponse'; + payload?: { + __typename?: 'IoRestorecommerceLocaleLocale'; + id?: string | null; + description?: string | null; + value?: string | null; + } | null; + status?: { + __typename?: 'IoRestorecommerceStatusStatus'; + code?: number | null; + message?: string | null; + } | null; + }> | null; + operationStatus?: { + __typename?: 'IoRestorecommerceStatusOperationStatus'; + code?: number | null; + message?: string | null; + } | null; + } | null; + } | null; + }; + }; +}; + export const UserDeleteDocument = gql` mutation UserDelete($input: IIoRestorecommerceResourcebaseDeleteRequest!) { identity { @@ -5679,3 +5718,46 @@ export class RequestPasswordChangeGQL extends Apollo.Mutation< super(apollo); } } +export const MasterDataLocaleReadDocument = gql` + query MasterDataLocaleRead( + $input: IIoRestorecommerceResourcebaseReadRequest! + ) { + master_data { + locale { + Read(input: $input) { + details { + items { + payload { + id + description + value + } + status { + code + message + } + } + operationStatus { + code + message + } + } + } + } + } + } +`; + +@Injectable({ + providedIn: 'root', +}) +export class MasterDataLocaleReadGQL extends Apollo.Query< + MasterDataLocaleReadQuery, + MasterDataLocaleReadQueryVariables +> { + override document = MasterDataLocaleReadDocument; + + constructor(apollo: Apollo.Apollo) { + super(apollo); + } +} diff --git a/packages/modules/shared/src/lib/graphql/master-data-locale-read.graphql b/packages/modules/shared/src/lib/graphql/master-data-locale-read.graphql new file mode 100644 index 00000000..6c801271 --- /dev/null +++ b/packages/modules/shared/src/lib/graphql/master-data-locale-read.graphql @@ -0,0 +1,25 @@ +query MasterDataLocaleRead($input: IIoRestorecommerceResourcebaseReadRequest!) { + master_data { + locale { + Read(input: $input) { + details { + items { + payload { + id + description + value + } + status { + code + message + } + } + operationStatus { + code + message + } + } + } + } + } +} diff --git a/packages/modules/shared/src/lib/graphql/master-data-timezone-read.graphql b/packages/modules/shared/src/lib/graphql/master-data-timezone-read.graphql new file mode 100644 index 00000000..46ed64d6 --- /dev/null +++ b/packages/modules/shared/src/lib/graphql/master-data-timezone-read.graphql @@ -0,0 +1,22 @@ +query MasterDataTimezoneRead( + $input: IIoRestorecommerceResourcebaseReadRequest! +) { + master_data { + timezone { + Read(input: $input) { + details { + operationStatus { + code + message + } + items { + payload { + id + description + } + } + } + } + } + } +}