Fix geo GraphQL schema mismatch: camelCase → snake_case
All checks were successful
Build Docker Image / build (push) Successful in 5m46s

All geo .graphql operations and consuming code updated to match
server schema which uses snake_case field/argument names.
Removed non-existent QuoteCalculations query, using NearestOffers instead.
This commit is contained in:
Ruslan Bakiev
2026-03-09 21:45:57 +07:00
parent 15563991df
commit 25f946b293
34 changed files with 504 additions and 744 deletions

View File

@@ -13,96 +13,61 @@ export type Scalars = {
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
Date: { input: string; output: string; }
DateTime: { input: string; output: string; }
Decimal: { input: string; output: string; }
};
export type OfferType = {
__typename?: 'OfferType';
categoryName: Scalars['String']['output'];
createdAt: Scalars['DateTime']['output'];
export type Offer = {
__typename?: 'Offer';
categoryName?: Maybe<Scalars['String']['output']>;
createdAt: Scalars['String']['output'];
currency: Scalars['String']['output'];
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
locationCountry: Scalars['String']['output'];
locationCountryCode: Scalars['String']['output'];
description?: Maybe<Scalars['String']['output']>;
locationCountry?: Maybe<Scalars['String']['output']>;
locationCountryCode?: Maybe<Scalars['String']['output']>;
locationLatitude?: Maybe<Scalars['Float']['output']>;
locationLongitude?: Maybe<Scalars['Float']['output']>;
locationName: Scalars['String']['output'];
locationUuid: Scalars['String']['output'];
pricePerUnit?: Maybe<Scalars['Decimal']['output']>;
locationName?: Maybe<Scalars['String']['output']>;
locationUuid?: Maybe<Scalars['String']['output']>;
pricePerUnit: Scalars['Float']['output'];
productName: Scalars['String']['output'];
productUuid: Scalars['String']['output'];
quantity: Scalars['Decimal']['output'];
status: OffersOfferStatusChoices;
quantity: Scalars['Float']['output'];
status: Scalars['String']['output'];
teamUuid: Scalars['String']['output'];
terminusDocumentId: Scalars['String']['output'];
terminusSchemaId: Scalars['String']['output'];
unit: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
updatedAt: Scalars['String']['output'];
uuid: Scalars['String']['output'];
validUntil?: Maybe<Scalars['Date']['output']>;
workflowError: Scalars['String']['output'];
workflowStatus: OffersOfferWorkflowStatusChoices;
validUntil?: Maybe<Scalars['String']['output']>;
};
/** An enumeration. */
export enum OffersOfferStatusChoices {
/** Активно */
Active = 'ACTIVE',
/** Отменено */
Cancelled = 'CANCELLED',
/** Закрыто */
Closed = 'CLOSED',
/** Черновик */
Draft = 'DRAFT'
}
/** An enumeration. */
export enum OffersOfferWorkflowStatusChoices {
/** Активен */
Active = 'ACTIVE',
/** Ошибка */
Error = 'ERROR',
/** Ожидает обработки */
Pending = 'PENDING'
}
export type Product = {
__typename?: 'Product';
categoryId?: Maybe<Scalars['Int']['output']>;
categoryId?: Maybe<Scalars['String']['output']>;
categoryName?: Maybe<Scalars['String']['output']>;
name?: Maybe<Scalars['String']['output']>;
terminusSchemaId?: Maybe<Scalars['String']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
};
/** Public schema - no authentication required */
export type PublicQuery = {
__typename?: 'PublicQuery';
/** Get products that have active offers */
export type Query = {
__typename?: 'Query';
getAvailableProducts?: Maybe<Array<Maybe<Product>>>;
getOffer?: Maybe<OfferType>;
getOffers?: Maybe<Array<Maybe<OfferType>>>;
getOffer?: Maybe<Offer>;
getOffers?: Maybe<Array<Maybe<Offer>>>;
getOffersCount?: Maybe<Scalars['Int']['output']>;
getProducts?: Maybe<Array<Maybe<Product>>>;
getSupplierProfile?: Maybe<SupplierProfileType>;
/** Get supplier profile by team UUID */
getSupplierProfileByTeam?: Maybe<SupplierProfileType>;
getSupplierProfiles?: Maybe<Array<Maybe<SupplierProfileType>>>;
getSupplierProfile?: Maybe<SupplierProfile>;
getSupplierProfileByTeam?: Maybe<SupplierProfile>;
getSupplierProfiles?: Maybe<Array<Maybe<SupplierProfile>>>;
getSupplierProfilesCount?: Maybe<Scalars['Int']['output']>;
};
/** Public schema - no authentication required */
export type PublicQueryGetOfferArgs = {
export type QueryGetOfferArgs = {
uuid: Scalars['String']['input'];
};
/** Public schema - no authentication required */
export type PublicQueryGetOffersArgs = {
export type QueryGetOffersArgs = {
categoryName?: InputMaybe<Scalars['String']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>;
@@ -113,8 +78,7 @@ export type PublicQueryGetOffersArgs = {
};
/** Public schema - no authentication required */
export type PublicQueryGetOffersCountArgs = {
export type QueryGetOffersCountArgs = {
categoryName?: InputMaybe<Scalars['String']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>;
productUuid?: InputMaybe<Scalars['String']['input']>;
@@ -123,20 +87,17 @@ export type PublicQueryGetOffersCountArgs = {
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfileArgs = {
export type QueryGetSupplierProfileArgs = {
uuid: Scalars['String']['input'];
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfileByTeamArgs = {
export type QueryGetSupplierProfileByTeamArgs = {
teamUuid: Scalars['String']['input'];
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfilesArgs = {
export type QueryGetSupplierProfilesArgs = {
country?: InputMaybe<Scalars['String']['input']>;
isVerified?: InputMaybe<Scalars['Boolean']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
@@ -144,51 +105,46 @@ export type PublicQueryGetSupplierProfilesArgs = {
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfilesCountArgs = {
export type QueryGetSupplierProfilesCountArgs = {
country?: InputMaybe<Scalars['String']['input']>;
isVerified?: InputMaybe<Scalars['Boolean']['input']>;
};
/** Профиль поставщика на бирже */
export type SupplierProfileType = {
__typename?: 'SupplierProfileType';
country: Scalars['String']['output'];
export type SupplierProfile = {
__typename?: 'SupplierProfile';
country?: Maybe<Scalars['String']['output']>;
countryCode?: Maybe<Scalars['String']['output']>;
createdAt: Scalars['DateTime']['output'];
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
description?: Maybe<Scalars['String']['output']>;
isActive: Scalars['Boolean']['output'];
isVerified: Scalars['Boolean']['output'];
kycProfileUuid: Scalars['String']['output'];
kycProfileUuid?: Maybe<Scalars['String']['output']>;
latitude?: Maybe<Scalars['Float']['output']>;
logoUrl: Scalars['String']['output'];
logoUrl?: Maybe<Scalars['String']['output']>;
longitude?: Maybe<Scalars['Float']['output']>;
name: Scalars['String']['output'];
offersCount?: Maybe<Scalars['Int']['output']>;
teamUuid: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
uuid: Scalars['String']['output'];
};
export type GetAvailableProductsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetAvailableProductsQueryResult = { __typename?: 'PublicQuery', getAvailableProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetAvailableProductsQueryResult = { __typename?: 'Query', getAvailableProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: string | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetLocationOffersQueryVariables = Exact<{
locationUuid: Scalars['String']['input'];
}>;
export type GetLocationOffersQueryResult = { __typename?: 'PublicQuery', getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetLocationOffersQueryResult = { __typename?: 'Query', getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetOfferQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetOfferQueryResult = { __typename?: 'PublicQuery', getOffer?: { __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null };
export type GetOfferQueryResult = { __typename?: 'Query', getOffer?: { __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null };
export type GetOffersQueryVariables = Exact<{
productUuid?: InputMaybe<Scalars['String']['input']>;
@@ -200,47 +156,47 @@ export type GetOffersQueryVariables = Exact<{
}>;
export type GetOffersQueryResult = { __typename?: 'PublicQuery', getOffersCount?: number | null, getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetOffersQueryResult = { __typename?: 'Query', getOffersCount?: number | null, getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetProductQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetProductQueryResult = { __typename?: 'PublicQuery', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetProductQueryResult = { __typename?: 'Query', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: string | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetProductOffersQueryVariables = Exact<{
productUuid: Scalars['String']['input'];
}>;
export type GetProductOffersQueryResult = { __typename?: 'PublicQuery', getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetProductOffersQueryResult = { __typename?: 'Query', getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetProductsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetProductsQueryResult = { __typename?: 'PublicQuery', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetProductsQueryResult = { __typename?: 'Query', getProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: string | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetSupplierOffersQueryVariables = Exact<{
teamUuid: Scalars['String']['input'];
}>;
export type GetSupplierOffersQueryResult = { __typename?: 'PublicQuery', getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: string, unit: string, pricePerUnit?: string | null, currency: string, description: string, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetSupplierOffersQueryResult = { __typename?: 'Query', getOffers?: Array<{ __typename?: 'Offer', uuid: string, teamUuid: string, status: string, locationUuid?: string | null, locationName?: string | null, locationCountry?: string | null, locationCountryCode?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName?: string | null, quantity: number, unit: string, pricePerUnit: number, currency: string, description?: string | null, validUntil?: string | null, createdAt: string, updatedAt: string } | null> | null };
export type GetSupplierProfileQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetSupplierProfileQueryResult = { __typename?: 'PublicQuery', getSupplierProfile?: { __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, kycProfileUuid: string, name: string, description: string, country: string, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null };
export type GetSupplierProfileQueryResult = { __typename?: 'Query', getSupplierProfile?: { __typename?: 'SupplierProfile', uuid: string, teamUuid: string, kycProfileUuid?: string | null, name: string, description?: string | null, country?: string | null, logoUrl?: string | null, isVerified: boolean, isActive: boolean, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null };
export type GetSupplierProfileByTeamQueryVariables = Exact<{
teamUuid: Scalars['String']['input'];
}>;
export type GetSupplierProfileByTeamQueryResult = { __typename?: 'PublicQuery', getSupplierProfileByTeam?: { __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, kycProfileUuid: string, name: string, description: string, country: string, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null } | null };
export type GetSupplierProfileByTeamQueryResult = { __typename?: 'Query', getSupplierProfileByTeam?: { __typename?: 'SupplierProfile', uuid: string, teamUuid: string, kycProfileUuid?: string | null, name: string, description?: string | null, country?: string | null, logoUrl?: string | null, isVerified: boolean, isActive: boolean, offersCount?: number | null } | null };
export type GetSupplierProfilesQueryVariables = Exact<{
country?: InputMaybe<Scalars['String']['input']>;
@@ -249,7 +205,7 @@ export type GetSupplierProfilesQueryVariables = Exact<{
}>;
export type GetSupplierProfilesQueryResult = { __typename?: 'PublicQuery', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, name: string, description: string, country: string, countryCode?: string | null, logoUrl: string, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null };
export type GetSupplierProfilesQueryResult = { __typename?: 'Query', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfile', uuid: string, teamUuid: string, name: string, description?: string | null, country?: string | null, countryCode?: string | null, logoUrl?: string | null, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null };
export const GetAvailableProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAvailableProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAvailableProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode<GetAvailableProductsQueryResult, GetAvailableProductsQueryVariables>;