Initial commit from monorepo

This commit is contained in:
Ruslan Bakiev
2026-01-07 09:10:35 +07:00
commit 3db50d9637
371 changed files with 43223 additions and 0 deletions

View File

@@ -0,0 +1,242 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
Date: { input: any; output: any; }
DateTime: { input: string; output: string; }
Decimal: { input: any; output: any; }
};
export type OfferType = {
__typename?: 'OfferType';
categoryName: Scalars['String']['output'];
createdAt: Scalars['DateTime']['output'];
currency: Scalars['String']['output'];
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
locationCountry: Scalars['String']['output'];
locationCountryCode: 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']>;
productName: Scalars['String']['output'];
productUuid: Scalars['String']['output'];
quantity: Scalars['Decimal']['output'];
status: OffersOfferStatusChoices;
teamUuid: Scalars['String']['output'];
terminusDocumentId: Scalars['String']['output'];
terminusSchemaId: Scalars['String']['output'];
unit: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
uuid: Scalars['String']['output'];
validUntil?: Maybe<Scalars['Date']['output']>;
workflowError: Scalars['String']['output'];
workflowStatus: OffersOfferWorkflowStatusChoices;
};
/** 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']>;
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';
getOffer?: Maybe<OfferType>;
getOffers?: Maybe<Array<Maybe<OfferType>>>;
getOffersCount?: Maybe<Scalars['Int']['output']>;
getProducts?: Maybe<Array<Maybe<Product>>>;
getSupplierProfile?: Maybe<SupplierProfileType>;
getSupplierProfiles?: Maybe<Array<Maybe<SupplierProfileType>>>;
getSupplierProfilesCount?: Maybe<Scalars['Int']['output']>;
};
/** Public schema - no authentication required */
export type PublicQueryGetOfferArgs = {
uuid: Scalars['String']['input'];
};
/** Public schema - no authentication required */
export type PublicQueryGetOffersArgs = {
categoryName?: InputMaybe<Scalars['String']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
productUuid?: InputMaybe<Scalars['String']['input']>;
status?: InputMaybe<Scalars['String']['input']>;
teamUuid?: InputMaybe<Scalars['String']['input']>;
};
/** Public schema - no authentication required */
export type PublicQueryGetOffersCountArgs = {
categoryName?: InputMaybe<Scalars['String']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>;
productUuid?: InputMaybe<Scalars['String']['input']>;
status?: InputMaybe<Scalars['String']['input']>;
teamUuid?: InputMaybe<Scalars['String']['input']>;
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfileArgs = {
uuid: Scalars['String']['input'];
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfilesArgs = {
country?: InputMaybe<Scalars['String']['input']>;
isVerified?: InputMaybe<Scalars['Boolean']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
};
/** Public schema - no authentication required */
export type PublicQueryGetSupplierProfilesCountArgs = {
country?: InputMaybe<Scalars['String']['input']>;
isVerified?: InputMaybe<Scalars['Boolean']['input']>;
};
/** Профиль поставщика на бирже */
export type SupplierProfileType = {
__typename?: 'SupplierProfileType';
country: Scalars['String']['output'];
countryCode?: Maybe<Scalars['String']['output']>;
createdAt: Scalars['DateTime']['output'];
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
isActive: Scalars['Boolean']['output'];
isVerified: Scalars['Boolean']['output'];
latitude?: Maybe<Scalars['Float']['output']>;
logoUrl: 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 GetLocationOffersQueryVariables = Exact<{
locationUuid: Scalars['String']['input'];
}>;
export type GetLocationOffersQuery = { __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: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null> | null };
export type GetOfferQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetOfferQuery = { __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: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null };
export type GetOffersQueryVariables = Exact<{
status?: InputMaybe<Scalars['String']['input']>;
productUuid?: InputMaybe<Scalars['String']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>;
categoryName?: InputMaybe<Scalars['String']['input']>;
teamUuid?: InputMaybe<Scalars['String']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
}>;
export type GetOffersQuery = { __typename?: 'PublicQuery', getOffersCount?: number | null, 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: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null> | null };
export type GetProductQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetProductQuery = { __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 GetProductOffersQueryVariables = Exact<{
productUuid: Scalars['String']['input'];
}>;
export type GetProductOffersQuery = { __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: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null> | null };
export type GetProductsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetProductsQuery = { __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 GetSupplierOffersQueryVariables = Exact<{
teamUuid: Scalars['String']['input'];
}>;
export type GetSupplierOffersQuery = { __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: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null> | null };
export type GetSupplierProfileQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetSupplierProfileQuery = { __typename?: 'PublicQuery', getSupplierProfile?: { __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, name: string, description: string, country: string, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null } | null };
export type GetSupplierProfilesQueryVariables = Exact<{
country?: InputMaybe<Scalars['String']['input']>;
isVerified?: InputMaybe<Scalars['Boolean']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
}>;
export type GetSupplierProfilesQuery = { __typename?: 'PublicQuery', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, name: string, description: string, country: string, countryCode?: string | null, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null };
export const GetLocationOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLocationOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetLocationOffersQuery, GetLocationOffersQueryVariables>;
export const GetOfferDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOffer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetOfferQuery, GetOfferQueryVariables>;
export const GetOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"status"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"categoryName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"getOffersCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"categoryName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}}]}]}}]} as unknown as DocumentNode<GetOffersQuery, GetOffersQueryVariables>;
export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getProducts"},"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<GetProductQuery, GetProductQueryVariables>;
export const GetProductOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProductOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetProductOffersQuery, GetProductOffersQueryVariables>;
export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getProducts"},"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<GetProductsQuery, GetProductsQueryVariables>;
export const GetSupplierOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetSupplierOffersQuery, GetSupplierOffersQueryVariables>;
export const GetSupplierProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierProfile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfile"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isVerified"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}}]}}]}}]} as unknown as DocumentNode<GetSupplierProfileQuery, GetSupplierProfileQueryVariables>;
export const GetSupplierProfilesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierProfiles"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isVerified"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfiles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"isVerified"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isVerified"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isVerified"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}},{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfilesCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"isVerified"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isVerified"}}}]}]}}]} as unknown as DocumentNode<GetSupplierProfilesQuery, GetSupplierProfilesQueryVariables>;

View File

@@ -0,0 +1,241 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
JSONString: { input: any; output: any; }
};
/** Edge between two nodes (route). */
export type EdgeType = {
__typename?: 'EdgeType';
distanceKm?: Maybe<Scalars['Float']['output']>;
toLatitude?: Maybe<Scalars['Float']['output']>;
toLongitude?: Maybe<Scalars['Float']['output']>;
toName?: Maybe<Scalars['String']['output']>;
toUuid?: Maybe<Scalars['String']['output']>;
transportType?: Maybe<Scalars['String']['output']>;
travelTimeSeconds?: Maybe<Scalars['Int']['output']>;
};
/** Auto + rail edges for a node, rail uses nearest rail node. */
export type NodeConnectionsType = {
__typename?: 'NodeConnectionsType';
autoEdges?: Maybe<Array<Maybe<EdgeType>>>;
hub?: Maybe<NodeType>;
railEdges?: Maybe<Array<Maybe<EdgeType>>>;
railNode?: Maybe<NodeType>;
};
/** Logistics node with edges to neighbors. */
export type NodeType = {
__typename?: 'NodeType';
country?: Maybe<Scalars['String']['output']>;
countryCode?: Maybe<Scalars['String']['output']>;
edges?: Maybe<Array<Maybe<EdgeType>>>;
latitude?: Maybe<Scalars['Float']['output']>;
longitude?: Maybe<Scalars['Float']['output']>;
name?: Maybe<Scalars['String']['output']>;
syncedAt?: Maybe<Scalars['String']['output']>;
transportTypes?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
uuid?: Maybe<Scalars['String']['output']>;
};
/** Route options for a product source to the destination. */
export type ProductRouteOptionType = {
__typename?: 'ProductRouteOptionType';
distanceKm?: Maybe<Scalars['Float']['output']>;
routes?: Maybe<Array<Maybe<RoutePathType>>>;
sourceLat?: Maybe<Scalars['Float']['output']>;
sourceLon?: Maybe<Scalars['Float']['output']>;
sourceName?: Maybe<Scalars['String']['output']>;
sourceUuid?: Maybe<Scalars['String']['output']>;
};
/** Root query. */
export type Query = {
__typename?: 'Query';
/** Get auto route between two points via GraphHopper */
autoRoute?: Maybe<RouteType>;
/** Find routes from product offer nodes to destination */
findProductRoutes?: Maybe<Array<Maybe<ProductRouteOptionType>>>;
/** Find K shortest routes through graph between two nodes */
findRoutes?: Maybe<Array<Maybe<RoutePathType>>>;
/** Get node by UUID with all edges to neighbors */
node?: Maybe<NodeType>;
/** Get auto + rail edges for a node (rail uses nearest rail node) */
nodeConnections?: Maybe<NodeConnectionsType>;
/** Get all nodes (without edges for performance) */
nodes?: Maybe<Array<Maybe<NodeType>>>;
/** Get total count of nodes (with optional transport filter) */
nodesCount?: Maybe<Scalars['Int']['output']>;
/** Get rail route between two points via OpenRailRouting */
railRoute?: Maybe<RouteType>;
};
/** Root query. */
export type QueryAutoRouteArgs = {
fromLat: Scalars['Float']['input'];
fromLon: Scalars['Float']['input'];
toLat: Scalars['Float']['input'];
toLon: Scalars['Float']['input'];
};
/** Root query. */
export type QueryFindProductRoutesArgs = {
limitRoutes?: InputMaybe<Scalars['Int']['input']>;
limitSources?: InputMaybe<Scalars['Int']['input']>;
productUuid: Scalars['String']['input'];
toUuid: Scalars['String']['input'];
};
/** Root query. */
export type QueryFindRoutesArgs = {
fromUuid: Scalars['String']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
toUuid: Scalars['String']['input'];
};
/** Root query. */
export type QueryNodeArgs = {
uuid: Scalars['String']['input'];
};
/** Root query. */
export type QueryNodeConnectionsArgs = {
limitAuto?: InputMaybe<Scalars['Int']['input']>;
limitRail?: InputMaybe<Scalars['Int']['input']>;
uuid: Scalars['String']['input'];
};
/** Root query. */
export type QueryNodesArgs = {
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
transportType?: InputMaybe<Scalars['String']['input']>;
};
/** Root query. */
export type QueryNodesCountArgs = {
transportType?: InputMaybe<Scalars['String']['input']>;
};
/** Root query. */
export type QueryRailRouteArgs = {
fromLat: Scalars['Float']['input'];
fromLon: Scalars['Float']['input'];
toLat: Scalars['Float']['input'];
toLon: Scalars['Float']['input'];
};
/** Complete route through graph with multiple stages. */
export type RoutePathType = {
__typename?: 'RoutePathType';
stages?: Maybe<Array<Maybe<RouteStageType>>>;
totalDistanceKm?: Maybe<Scalars['Float']['output']>;
totalTimeSeconds?: Maybe<Scalars['Int']['output']>;
};
/** Single stage in a multi-hop route. */
export type RouteStageType = {
__typename?: 'RouteStageType';
distanceKm?: Maybe<Scalars['Float']['output']>;
fromLat?: Maybe<Scalars['Float']['output']>;
fromLon?: Maybe<Scalars['Float']['output']>;
fromName?: Maybe<Scalars['String']['output']>;
fromUuid?: Maybe<Scalars['String']['output']>;
toLat?: Maybe<Scalars['Float']['output']>;
toLon?: Maybe<Scalars['Float']['output']>;
toName?: Maybe<Scalars['String']['output']>;
toUuid?: Maybe<Scalars['String']['output']>;
transportType?: Maybe<Scalars['String']['output']>;
travelTimeSeconds?: Maybe<Scalars['Int']['output']>;
};
/** Route between two points with geometry. */
export type RouteType = {
__typename?: 'RouteType';
distanceKm?: Maybe<Scalars['Float']['output']>;
/** GeoJSON LineString coordinates */
geometry?: Maybe<Scalars['JSONString']['output']>;
};
export type FindRoutesQueryVariables = Exact<{
fromUuid: Scalars['String']['input'];
toUuid: Scalars['String']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
}>;
export type FindRoutesQuery = { __typename?: 'Query', findRoutes?: Array<{ __typename?: 'RoutePathType', totalDistanceKm?: number | null, totalTimeSeconds?: number | null, stages?: Array<{ __typename?: 'RouteStageType', fromUuid?: string | null, fromName?: string | null, fromLat?: number | null, fromLon?: number | null, toUuid?: string | null, toName?: string | null, toLat?: number | null, toLon?: number | null, distanceKm?: number | null, travelTimeSeconds?: number | null, transportType?: string | null } | null> | null } | null> | null };
export type GetAutoRouteQueryVariables = Exact<{
fromLat: Scalars['Float']['input'];
fromLon: Scalars['Float']['input'];
toLat: Scalars['Float']['input'];
toLon: Scalars['Float']['input'];
}>;
export type GetAutoRouteQuery = { __typename?: 'Query', autoRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: any | null } | null };
export type GetNodeQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetNodeQuery = { __typename?: 'Query', node?: { __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, syncedAt?: string | null, edges?: Array<{ __typename?: 'EdgeType', toUuid?: string | null, toName?: string | null, toLatitude?: number | null, toLongitude?: number | null, distanceKm?: number | null, travelTimeSeconds?: number | null, transportType?: string | null } | null> | null } | null };
export type GetNodeConnectionsQueryVariables = Exact<{
uuid: Scalars['String']['input'];
limitAuto?: InputMaybe<Scalars['Int']['input']>;
limitRail?: InputMaybe<Scalars['Int']['input']>;
}>;
export type GetNodeConnectionsQuery = { __typename?: 'Query', nodeConnections?: { __typename?: 'NodeConnectionsType', hub?: { __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, syncedAt?: string | null } | null, railNode?: { __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, syncedAt?: string | null } | null, autoEdges?: Array<{ __typename?: 'EdgeType', toUuid?: string | null, toName?: string | null, toLatitude?: number | null, toLongitude?: number | null, distanceKm?: number | null, travelTimeSeconds?: number | null, transportType?: string | null } | null> | null, railEdges?: Array<{ __typename?: 'EdgeType', toUuid?: string | null, toName?: string | null, toLatitude?: number | null, toLongitude?: number | null, distanceKm?: number | null, travelTimeSeconds?: number | null, transportType?: string | null } | null> | null } | null };
export type GetNodesQueryVariables = Exact<{
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
transportType?: InputMaybe<Scalars['String']['input']>;
}>;
export type GetNodesQuery = { __typename?: 'Query', nodesCount?: number | null, nodes?: Array<{ __typename?: 'NodeType', uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null, country?: string | null, countryCode?: string | null, syncedAt?: string | null, transportTypes?: Array<string | null> | null } | null> | null };
export type GetRailRouteQueryVariables = Exact<{
fromLat: Scalars['Float']['input'];
fromLon: Scalars['Float']['input'];
toLat: Scalars['Float']['input'];
toLon: Scalars['Float']['input'];
}>;
export type GetRailRouteQuery = { __typename?: 'Query', railRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: any | null } | null };
export const FindRoutesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindRoutes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findRoutes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"toUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalDistanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"totalTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fromUuid"}},{"kind":"Field","name":{"kind":"Name","value":"fromName"}},{"kind":"Field","name":{"kind":"Name","value":"fromLat"}},{"kind":"Field","name":{"kind":"Name","value":"fromLon"}},{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLat"}},{"kind":"Field","name":{"kind":"Name","value":"toLon"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<FindRoutesQuery, FindRoutesQueryVariables>;
export const GetAutoRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetAutoRouteQuery, GetAutoRouteQueryVariables>;
export const GetNodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<GetNodeQuery, GetNodeQueryVariables>;
export const GetNodeConnectionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNodeConnections"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitAuto"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitRail"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodeConnections"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitAuto"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitAuto"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitRail"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitRail"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hub"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"railNode"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"autoEdges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"railEdges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<GetNodeConnectionsQuery, GetNodeConnectionsQueryVariables>;
export const GetNodesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNodes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}},{"kind":"Field","name":{"kind":"Name","value":"transportTypes"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nodesCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}}]}]}}]} as unknown as DocumentNode<GetNodesQuery, GetNodesQueryVariables>;
export const GetRailRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRailRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"railRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetRailRouteQuery, GetRailRouteQueryVariables>;

View File

@@ -0,0 +1,75 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
};
/** Balance information for a team's account from TigerBeetle. */
export type TeamBalance = {
__typename?: 'TeamBalance';
/** Current balance (credits - debits) */
balance: Scalars['Float']['output'];
/** Total credits posted */
creditsPosted: Scalars['Float']['output'];
/** Total debits posted */
debitsPosted: Scalars['Float']['output'];
/** Whether account exists in TigerBeetle */
exists: Scalars['Boolean']['output'];
};
export type TeamQuery = {
__typename?: 'TeamQuery';
/** Get balance for the authenticated team */
teamBalance?: Maybe<TeamBalance>;
/** Get transactions for the authenticated team */
teamTransactions?: Maybe<Array<Maybe<TeamTransaction>>>;
};
export type TeamQueryTeamTransactionsArgs = {
limit?: InputMaybe<Scalars['Int']['input']>;
};
/** Transaction from TigerBeetle. */
export type TeamTransaction = {
__typename?: 'TeamTransaction';
amount: Scalars['Float']['output'];
/** Operation code */
code?: Maybe<Scalars['Int']['output']>;
/** Operation code name from OperationCode table */
codeName?: Maybe<Scalars['String']['output']>;
/** UUID of the other account in transaction */
counterpartyUuid?: Maybe<Scalars['String']['output']>;
/** 'credit' or 'debit' relative to team account */
direction: Scalars['String']['output'];
id: Scalars['String']['output'];
/** TigerBeetle timestamp */
timestamp?: Maybe<Scalars['Float']['output']>;
};
export type GetTeamBalanceQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTeamBalanceQuery = { __typename?: 'TeamQuery', teamBalance?: { __typename?: 'TeamBalance', balance: number, creditsPosted: number, debitsPosted: number, exists: boolean } | null };
export type GetTeamTransactionsQueryVariables = Exact<{
limit?: InputMaybe<Scalars['Int']['input']>;
}>;
export type GetTeamTransactionsQuery = { __typename?: 'TeamQuery', teamTransactions?: Array<{ __typename?: 'TeamTransaction', id: string, amount: number, timestamp?: number | null, code?: number | null, codeName?: string | null, direction: string, counterpartyUuid?: string | null } | null> | null };
export const GetTeamBalanceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamBalance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamBalance"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"balance"}},{"kind":"Field","name":{"kind":"Name","value":"creditsPosted"}},{"kind":"Field","name":{"kind":"Name","value":"debitsPosted"}},{"kind":"Field","name":{"kind":"Name","value":"exists"}}]}}]}}]} as unknown as DocumentNode<GetTeamBalanceQuery, GetTeamBalanceQueryVariables>;
export const GetTeamTransactionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamTransactions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamTransactions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"amount"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"codeName"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"counterpartyUuid"}}]}}]}}]} as unknown as DocumentNode<GetTeamTransactionsQuery, GetTeamTransactionsQueryVariables>;

View File

@@ -0,0 +1,220 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
Date: { input: any; output: any; }
DateTime: { input: string; output: string; }
Decimal: { input: any; output: any; }
JSONString: { input: any; output: any; }
};
export type CreateOffer = {
__typename?: 'CreateOffer';
message?: Maybe<Scalars['String']['output']>;
offerUuid?: Maybe<Scalars['String']['output']>;
success?: Maybe<Scalars['Boolean']['output']>;
workflowId?: Maybe<Scalars['String']['output']>;
};
export type CreateRequest = {
__typename?: 'CreateRequest';
request?: Maybe<RequestType>;
};
export type DeleteOffer = {
__typename?: 'DeleteOffer';
success?: Maybe<Scalars['Boolean']['output']>;
};
export type OfferInput = {
categoryName?: InputMaybe<Scalars['String']['input']>;
currency?: InputMaybe<Scalars['String']['input']>;
description?: InputMaybe<Scalars['String']['input']>;
locationCountry?: InputMaybe<Scalars['String']['input']>;
locationCountryCode?: InputMaybe<Scalars['String']['input']>;
locationLatitude?: InputMaybe<Scalars['Float']['input']>;
locationLongitude?: InputMaybe<Scalars['Float']['input']>;
locationName?: InputMaybe<Scalars['String']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>;
pricePerUnit?: InputMaybe<Scalars['Decimal']['input']>;
productName: Scalars['String']['input'];
productUuid: Scalars['String']['input'];
quantity: Scalars['Decimal']['input'];
teamUuid: Scalars['String']['input'];
terminusPayload?: InputMaybe<Scalars['JSONString']['input']>;
terminusSchemaId?: InputMaybe<Scalars['String']['input']>;
unit?: InputMaybe<Scalars['String']['input']>;
validUntil?: InputMaybe<Scalars['Date']['input']>;
};
export type OfferType = {
__typename?: 'OfferType';
categoryName: Scalars['String']['output'];
createdAt: Scalars['DateTime']['output'];
currency: Scalars['String']['output'];
description: Scalars['String']['output'];
id: Scalars['ID']['output'];
locationCountry: Scalars['String']['output'];
locationCountryCode: 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']>;
productName: Scalars['String']['output'];
productUuid: Scalars['String']['output'];
quantity: Scalars['Decimal']['output'];
status: OffersOfferStatusChoices;
teamUuid: Scalars['String']['output'];
terminusDocumentId: Scalars['String']['output'];
terminusSchemaId: Scalars['String']['output'];
unit: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
uuid: Scalars['String']['output'];
validUntil?: Maybe<Scalars['Date']['output']>;
workflowError: Scalars['String']['output'];
workflowStatus: OffersOfferWorkflowStatusChoices;
};
/** 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 RequestInput = {
productUuid: Scalars['String']['input'];
quantity: Scalars['Decimal']['input'];
sourceLocationUuid: Scalars['String']['input'];
userId: Scalars['String']['input'];
};
export type RequestType = {
__typename?: 'RequestType';
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
productUuid: Scalars['String']['output'];
quantity: Scalars['Decimal']['output'];
sourceLocationUuid: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
userId: Scalars['String']['output'];
uuid: Scalars['String']['output'];
};
/** Team mutations - Team Access Token authentication */
export type TeamMutation = {
__typename?: 'TeamMutation';
createOffer?: Maybe<CreateOffer>;
createRequest?: Maybe<CreateRequest>;
deleteOffer?: Maybe<DeleteOffer>;
updateOffer?: Maybe<UpdateOffer>;
};
/** Team mutations - Team Access Token authentication */
export type TeamMutationCreateOfferArgs = {
input: OfferInput;
};
/** Team mutations - Team Access Token authentication */
export type TeamMutationCreateRequestArgs = {
input: RequestInput;
};
/** Team mutations - Team Access Token authentication */
export type TeamMutationDeleteOfferArgs = {
uuid: Scalars['String']['input'];
};
/** Team mutations - Team Access Token authentication */
export type TeamMutationUpdateOfferArgs = {
input: OfferInput;
uuid: Scalars['String']['input'];
};
/** Team schema - Team Access Token authentication */
export type TeamQuery = {
__typename?: 'TeamQuery';
getRequest?: Maybe<RequestType>;
getRequests?: Maybe<Array<Maybe<RequestType>>>;
getTeamOffers?: Maybe<Array<Maybe<OfferType>>>;
};
/** Team schema - Team Access Token authentication */
export type TeamQueryGetRequestArgs = {
uuid: Scalars['String']['input'];
};
/** Team schema - Team Access Token authentication */
export type TeamQueryGetRequestsArgs = {
userId: Scalars['String']['input'];
};
/** Team schema - Team Access Token authentication */
export type TeamQueryGetTeamOffersArgs = {
teamUuid: Scalars['String']['input'];
};
export type UpdateOffer = {
__typename?: 'UpdateOffer';
offer?: Maybe<OfferType>;
};
export type CreateOfferMutationVariables = Exact<{
input: OfferInput;
}>;
export type CreateOfferMutation = { __typename?: 'TeamMutation', createOffer?: { __typename?: 'CreateOffer', success?: boolean | null, message?: string | null, workflowId?: string | null, offerUuid?: string | null } | null };
export type CreateRequestMutationVariables = Exact<{
input: RequestInput;
}>;
export type CreateRequestMutation = { __typename?: 'TeamMutation', createRequest?: { __typename?: 'CreateRequest', request?: { __typename?: 'RequestType', uuid: string, productUuid: string, quantity: any, sourceLocationUuid: string, userId: string } | null } | null };
export type GetRequestsQueryVariables = Exact<{
userId: Scalars['String']['input'];
}>;
export type GetRequestsQuery = { __typename?: 'TeamQuery', getRequests?: Array<{ __typename?: 'RequestType', uuid: string, productUuid: string, quantity: any, sourceLocationUuid: string, userId: string } | null> | null };
export const CreateOfferDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOffer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"OfferInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOffer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"workflowId"}},{"kind":"Field","name":{"kind":"Name","value":"offerUuid"}}]}}]}}]} as unknown as DocumentNode<CreateOfferMutation, CreateOfferMutationVariables>;
export const CreateRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"RequestInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createRequest"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"request"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}}]}}]}}]}}]} as unknown as DocumentNode<CreateRequestMutation, CreateRequestMutationVariables>;
export const GetRequestsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRequests"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getRequests"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}}]}}]}}]} as unknown as DocumentNode<GetRequestsQuery, GetRequestsQueryVariables>;

View File

@@ -0,0 +1,124 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
};
export type CompanyType = {
__typename?: 'CompanyType';
active?: Maybe<Scalars['Boolean']['output']>;
country?: Maybe<Scalars['String']['output']>;
countryCode?: Maybe<Scalars['String']['output']>;
name?: Maybe<Scalars['String']['output']>;
taxId?: Maybe<Scalars['String']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
};
export type OrderLineType = {
__typename?: 'OrderLineType';
currency?: Maybe<Scalars['String']['output']>;
notes?: Maybe<Scalars['String']['output']>;
priceUnit?: Maybe<Scalars['Float']['output']>;
productName?: Maybe<Scalars['String']['output']>;
productUuid?: Maybe<Scalars['String']['output']>;
quantity?: Maybe<Scalars['Float']['output']>;
subtotal?: Maybe<Scalars['Float']['output']>;
unit?: Maybe<Scalars['String']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
};
export type OrderType = {
__typename?: 'OrderType';
createdAt?: Maybe<Scalars['String']['output']>;
currency?: Maybe<Scalars['String']['output']>;
destinationLocationName?: Maybe<Scalars['String']['output']>;
destinationLocationUuid?: Maybe<Scalars['String']['output']>;
name?: Maybe<Scalars['String']['output']>;
notes?: Maybe<Scalars['String']['output']>;
orderLines?: Maybe<Array<Maybe<OrderLineType>>>;
sourceLocationName?: Maybe<Scalars['String']['output']>;
sourceLocationUuid?: Maybe<Scalars['String']['output']>;
stages?: Maybe<Array<Maybe<StageType>>>;
status?: Maybe<Scalars['String']['output']>;
teamUuid?: Maybe<Scalars['String']['output']>;
totalAmount?: Maybe<Scalars['Float']['output']>;
updatedAt?: Maybe<Scalars['String']['output']>;
userId?: Maybe<Scalars['String']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
};
export type StageType = {
__typename?: 'StageType';
destinationLatitude?: Maybe<Scalars['Float']['output']>;
destinationLocationName?: Maybe<Scalars['String']['output']>;
destinationLongitude?: Maybe<Scalars['Float']['output']>;
locationLatitude?: Maybe<Scalars['Float']['output']>;
locationLongitude?: Maybe<Scalars['Float']['output']>;
locationName?: Maybe<Scalars['String']['output']>;
name?: Maybe<Scalars['String']['output']>;
selectedCompany?: Maybe<CompanyType>;
sequence?: Maybe<Scalars['Int']['output']>;
sourceLatitude?: Maybe<Scalars['Float']['output']>;
sourceLocationName?: Maybe<Scalars['String']['output']>;
sourceLongitude?: Maybe<Scalars['Float']['output']>;
stageType?: Maybe<Scalars['String']['output']>;
transportType?: Maybe<Scalars['String']['output']>;
trips?: Maybe<Array<Maybe<TripType>>>;
uuid?: Maybe<Scalars['String']['output']>;
};
/** Team schema - Team Access Token authentication */
export type TeamQuery = {
__typename?: 'TeamQuery';
getOrder?: Maybe<OrderType>;
getTeamOrders?: Maybe<Array<Maybe<OrderType>>>;
};
/** Team schema - Team Access Token authentication */
export type TeamQueryGetOrderArgs = {
orderUuid: Scalars['String']['input'];
};
export type TripType = {
__typename?: 'TripType';
actualLoadingDate?: Maybe<Scalars['String']['output']>;
actualUnloadingDate?: Maybe<Scalars['String']['output']>;
company?: Maybe<CompanyType>;
name?: Maybe<Scalars['String']['output']>;
plannedLoadingDate?: Maybe<Scalars['String']['output']>;
plannedUnloadingDate?: Maybe<Scalars['String']['output']>;
plannedWeight?: Maybe<Scalars['Float']['output']>;
realLoadingDate?: Maybe<Scalars['String']['output']>;
sequence?: Maybe<Scalars['Int']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
weightAtLoading?: Maybe<Scalars['Float']['output']>;
weightAtUnloading?: Maybe<Scalars['Float']['output']>;
};
export type GetOrderQueryVariables = Exact<{
orderUuid: Scalars['String']['input'];
}>;
export type GetOrderQuery = { __typename?: 'TeamQuery', getOrder?: { __typename?: 'OrderType', uuid?: string | null, name?: string | null, status?: string | null, totalAmount?: number | null, currency?: string | null, sourceLocationName?: string | null, destinationLocationName?: string | null, createdAt?: string | null, notes?: string | null, orderLines?: Array<{ __typename?: 'OrderLineType', uuid?: string | null, productName?: string | null, quantity?: number | null, unit?: string | null, subtotal?: number | null } | null> | null, stages?: Array<{ __typename?: 'StageType', uuid?: string | null, name?: string | null, stageType?: string | null, transportType?: string | null, sourceLocationName?: string | null, sourceLatitude?: number | null, sourceLongitude?: number | null, destinationLocationName?: string | null, destinationLatitude?: number | null, destinationLongitude?: number | null, locationName?: string | null, locationLatitude?: number | null, locationLongitude?: number | null, selectedCompany?: { __typename?: 'CompanyType', uuid?: string | null, name?: string | null, taxId?: string | null, country?: string | null, countryCode?: string | null, active?: boolean | null } | null, trips?: Array<{ __typename?: 'TripType', uuid?: string | null, name?: string | null, plannedLoadingDate?: string | null, actualLoadingDate?: string | null, plannedUnloadingDate?: string | null, actualUnloadingDate?: string | null, realLoadingDate?: string | null, plannedWeight?: number | null, weightAtLoading?: number | null, weightAtUnloading?: number | null, company?: { __typename?: 'CompanyType', uuid?: string | null, name?: string | null, taxId?: string | null, country?: string | null, countryCode?: string | null, active?: boolean | null } | null } | null> | null } | null> | null } | null };
export type GetTeamOrdersQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTeamOrdersQuery = { __typename?: 'TeamQuery', getTeamOrders?: Array<{ __typename?: 'OrderType', uuid?: string | null, name?: string | null, status?: string | null, totalAmount?: number | null, currency?: string | null, sourceLocationName?: string | null, destinationLocationName?: string | null, createdAt?: string | null, orderLines?: Array<{ __typename?: 'OrderLineType', uuid?: string | null, productName?: string | null, quantity?: number | null, unit?: string | null } | null> | null, stages?: Array<{ __typename?: 'StageType', uuid?: string | null, name?: string | null, stageType?: string | null, transportType?: string | null, sourceLatitude?: number | null, sourceLongitude?: number | null, destinationLatitude?: number | null, destinationLongitude?: number | null, sourceLocationName?: string | null, destinationLocationName?: string | null, trips?: Array<{ __typename?: 'TripType', uuid?: string | null, name?: string | null, plannedLoadingDate?: string | null, actualLoadingDate?: string | null, plannedUnloadingDate?: string | null, actualUnloadingDate?: string | null, realLoadingDate?: string | null } | null> | null } | null> | null } | null> | null };
export const GetOrderDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOrder"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOrder"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"orderUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderUuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"totalAmount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"notes"}},{"kind":"Field","name":{"kind":"Name","value":"orderLines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"subtotal"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"stageType"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"selectedCompany"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"taxId"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"active"}}]}},{"kind":"Field","name":{"kind":"Name","value":"trips"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"plannedLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"realLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedWeight"}},{"kind":"Field","name":{"kind":"Name","value":"weightAtLoading"}},{"kind":"Field","name":{"kind":"Name","value":"weightAtUnloading"}},{"kind":"Field","name":{"kind":"Name","value":"company"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"taxId"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"active"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetOrderQuery, GetOrderQueryVariables>;
export const GetTeamOrdersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamOrders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getTeamOrders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"totalAmount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"orderLines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"stageType"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"trips"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"plannedLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"realLoadingDate"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetTeamOrdersQuery, GetTeamOrdersQueryVariables>;

View File

@@ -0,0 +1,228 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
DateTime: { input: string; output: string; }
};
export type CreateTeamAddressInput = {
address: Scalars['String']['input'];
countryCode?: InputMaybe<Scalars['String']['input']>;
isDefault?: InputMaybe<Scalars['Boolean']['input']>;
latitude?: InputMaybe<Scalars['Float']['input']>;
longitude?: InputMaybe<Scalars['Float']['input']>;
name: Scalars['String']['input'];
};
export type CreateTeamAddressMutation = {
__typename?: 'CreateTeamAddressMutation';
message?: Maybe<Scalars['String']['output']>;
success?: Maybe<Scalars['Boolean']['output']>;
workflowId?: Maybe<Scalars['String']['output']>;
};
export type DeleteTeamAddressMutation = {
__typename?: 'DeleteTeamAddressMutation';
message?: Maybe<Scalars['String']['output']>;
success?: Maybe<Scalars['Boolean']['output']>;
};
export type InviteMemberInput = {
email: Scalars['String']['input'];
role?: InputMaybe<Scalars['String']['input']>;
};
export type InviteMemberMutation = {
__typename?: 'InviteMemberMutation';
message?: Maybe<Scalars['String']['output']>;
success?: Maybe<Scalars['Boolean']['output']>;
};
export type SelectedLocation = {
__typename?: 'SelectedLocation';
latitude?: Maybe<Scalars['Float']['output']>;
longitude?: Maybe<Scalars['Float']['output']>;
name?: Maybe<Scalars['String']['output']>;
type?: Maybe<Scalars['String']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
};
export type SetSelectedLocationInput = {
latitude: Scalars['Float']['input'];
longitude: Scalars['Float']['input'];
name: Scalars['String']['input'];
type: Scalars['String']['input'];
uuid: Scalars['String']['input'];
};
export type SetSelectedLocationMutation = {
__typename?: 'SetSelectedLocationMutation';
message?: Maybe<Scalars['String']['output']>;
selectedLocation?: Maybe<SelectedLocation>;
success?: Maybe<Scalars['Boolean']['output']>;
};
export type Team = {
__typename?: 'Team';
addresses?: Maybe<Array<Maybe<TeamAddress>>>;
createdAt: Scalars['DateTime']['output'];
id?: Maybe<Scalars['String']['output']>;
logtoOrgId?: Maybe<Scalars['String']['output']>;
members?: Maybe<Array<Maybe<TeamMember>>>;
name: Scalars['String']['output'];
owner?: Maybe<User>;
ownerId?: Maybe<Scalars['String']['output']>;
selectedLocation?: Maybe<SelectedLocation>;
updatedAt: Scalars['DateTime']['output'];
uuid: Scalars['String']['output'];
};
export type TeamAddress = {
__typename?: 'TeamAddress';
address: Scalars['String']['output'];
countryCode?: Maybe<Scalars['String']['output']>;
createdAt?: Maybe<Scalars['String']['output']>;
graphNodeId?: Maybe<Scalars['String']['output']>;
isDefault?: Maybe<Scalars['Boolean']['output']>;
latitude?: Maybe<Scalars['Float']['output']>;
longitude?: Maybe<Scalars['Float']['output']>;
name: Scalars['String']['output'];
processedAt?: Maybe<Scalars['String']['output']>;
uuid: Scalars['String']['output'];
};
export type TeamMember = {
__typename?: 'TeamMember';
joinedAt?: Maybe<Scalars['String']['output']>;
role: TeamsAppTeamMemberRoleChoices;
user?: Maybe<User>;
};
export type TeamMutation = {
__typename?: 'TeamMutation';
createTeamAddress?: Maybe<CreateTeamAddressMutation>;
deleteTeamAddress?: Maybe<DeleteTeamAddressMutation>;
inviteMember?: Maybe<InviteMemberMutation>;
setSelectedLocation?: Maybe<SetSelectedLocationMutation>;
};
export type TeamMutationCreateTeamAddressArgs = {
input: CreateTeamAddressInput;
};
export type TeamMutationDeleteTeamAddressArgs = {
uuid: Scalars['String']['input'];
};
export type TeamMutationInviteMemberArgs = {
input: InviteMemberInput;
};
export type TeamMutationSetSelectedLocationArgs = {
input: SetSelectedLocationInput;
};
export type TeamQuery = {
__typename?: 'TeamQuery';
getTeam?: Maybe<Team>;
team?: Maybe<Team>;
teamAddresses?: Maybe<Array<Maybe<TeamAddress>>>;
teamMembers?: Maybe<Array<Maybe<TeamMember>>>;
};
export type TeamQueryGetTeamArgs = {
teamId: Scalars['String']['input'];
};
/** An enumeration. */
export enum TeamsAppTeamMemberRoleChoices {
/** Администратор */
Admin = 'ADMIN',
/** Менеджер */
Manager = 'MANAGER',
/** Участник */
Member = 'MEMBER',
/** Владелец */
Owner = 'OWNER'
}
export type User = {
__typename?: 'User';
avatarId?: Maybe<Scalars['String']['output']>;
createdAt?: Maybe<Scalars['String']['output']>;
email: Scalars['String']['output'];
firstName?: Maybe<Scalars['String']['output']>;
id?: Maybe<Scalars['String']['output']>;
lastName?: Maybe<Scalars['String']['output']>;
phone?: Maybe<Scalars['String']['output']>;
/** Обязательное поле. Не более 150 символов. Только буквы, цифры и символы @/./+/-/_. */
username: Scalars['String']['output'];
};
export type CreateTeamAddressMutationVariables = Exact<{
input: CreateTeamAddressInput;
}>;
export type CreateTeamAddressMutation = { __typename?: 'TeamMutation', createTeamAddress?: { __typename?: 'CreateTeamAddressMutation', success?: boolean | null, message?: string | null, workflowId?: string | null } | null };
export type DeleteTeamAddressMutationVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type DeleteTeamAddressMutation = { __typename?: 'TeamMutation', deleteTeamAddress?: { __typename?: 'DeleteTeamAddressMutation', success?: boolean | null, message?: string | null } | null };
export type GetTeamQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTeamQuery = { __typename?: 'TeamQuery', team?: { __typename?: 'Team', uuid: string, name: string, selectedLocation?: { __typename?: 'SelectedLocation', type?: string | null, uuid?: string | null } | null } | null };
export type GetTeamAddressesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTeamAddressesQuery = { __typename?: 'TeamQuery', teamAddresses?: Array<{ __typename?: 'TeamAddress', uuid: string, name: string, address: string, latitude?: number | null, longitude?: number | null, countryCode?: string | null, isDefault?: boolean | null } | null> | null };
export type GetTeamMembersQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTeamMembersQuery = { __typename?: 'TeamQuery', teamMembers?: Array<{ __typename?: 'TeamMember', role: TeamsAppTeamMemberRoleChoices, joinedAt?: string | null, user?: { __typename?: 'User', id?: string | null, firstName?: string | null, lastName?: string | null, phone?: string | null, avatarId?: string | null } | null } | null> | null };
export type InviteMemberMutationVariables = Exact<{
input: InviteMemberInput;
}>;
export type InviteMemberMutation = { __typename?: 'TeamMutation', inviteMember?: { __typename?: 'InviteMemberMutation', success?: boolean | null, message?: string | null } | null };
export type SetSelectedLocationMutationVariables = Exact<{
input: SetSelectedLocationInput;
}>;
export type SetSelectedLocationMutation = { __typename?: 'TeamMutation', setSelectedLocation?: { __typename?: 'SetSelectedLocationMutation', success?: boolean | null, message?: string | null, selectedLocation?: { __typename?: 'SelectedLocation', type?: string | null, uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null } | null } | null };
export const CreateTeamAddressDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateTeamAddress"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateTeamAddressInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createTeamAddress"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"workflowId"}}]}}]}}]} as unknown as DocumentNode<CreateTeamAddressMutation, CreateTeamAddressMutationVariables>;
export const DeleteTeamAddressDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteTeamAddress"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteTeamAddress"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}}]} as unknown as DocumentNode<DeleteTeamAddressMutation, DeleteTeamAddressMutationVariables>;
export const GetTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"selectedLocation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"uuid"}}]}}]}}]}}]} as unknown as DocumentNode<GetTeamQuery, GetTeamQueryVariables>;
export const GetTeamAddressesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamAddresses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamAddresses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"isDefault"}}]}}]}}]} as unknown as DocumentNode<GetTeamAddressesQuery, GetTeamAddressesQueryVariables>;
export const GetTeamMembersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamMembers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"avatarId"}}]}}]}}]}}]} as unknown as DocumentNode<GetTeamMembersQuery, GetTeamMembersQueryVariables>;
export const InviteMemberDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InviteMember"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"InviteMemberInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inviteMember"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}}]} as unknown as DocumentNode<InviteMemberMutation, InviteMemberMutationVariables>;
export const SetSelectedLocationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetSelectedLocation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SetSelectedLocationInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setSelectedLocation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"selectedLocation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}}]}}]}}]} as unknown as DocumentNode<SetSelectedLocationMutation, SetSelectedLocationMutationVariables>;

View File

@@ -0,0 +1,108 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
DateTime: { input: string; output: string; }
JSONString: { input: any; output: any; }
};
export type CreateKycRequestRussia = {
__typename?: 'CreateKYCRequestRussia';
kycRequest?: Maybe<KycRequestType>;
success?: Maybe<Scalars['Boolean']['output']>;
};
export type KycRequestRussiaInput = {
address: Scalars['String']['input'];
bankName: Scalars['String']['input'];
bik: Scalars['String']['input'];
companyFullName: Scalars['String']['input'];
companyName: Scalars['String']['input'];
contactEmail: Scalars['String']['input'];
contactPerson: Scalars['String']['input'];
contactPhone: Scalars['String']['input'];
correspondentAccount?: InputMaybe<Scalars['String']['input']>;
inn: Scalars['String']['input'];
kpp?: InputMaybe<Scalars['String']['input']>;
ogrn?: InputMaybe<Scalars['String']['input']>;
};
export type KycRequestType = {
__typename?: 'KYCRequestType';
approvedAt?: Maybe<Scalars['DateTime']['output']>;
approvedBy?: Maybe<Scalars['String']['output']>;
contactEmail: Scalars['String']['output'];
contactPerson: Scalars['String']['output'];
contactPhone: Scalars['String']['output'];
countryCode: Scalars['String']['output'];
countryData?: Maybe<Scalars['JSONString']['output']>;
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
objectId?: Maybe<Scalars['Int']['output']>;
score: Scalars['Int']['output'];
teamName: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
userId: Scalars['String']['output'];
uuid: Scalars['String']['output'];
workflowStatus?: Maybe<Scalars['String']['output']>;
};
/** User mutations - ID token authentication */
export type UserMutation = {
__typename?: 'UserMutation';
createKycRequestRussia?: Maybe<CreateKycRequestRussia>;
};
/** User mutations - ID token authentication */
export type UserMutationCreateKycRequestRussiaArgs = {
input: KycRequestRussiaInput;
};
/** User schema - ID token authentication */
export type UserQuery = {
__typename?: 'UserQuery';
kycRequest?: Maybe<KycRequestType>;
kycRequests?: Maybe<Array<Maybe<KycRequestType>>>;
};
/** User schema - ID token authentication */
export type UserQueryKycRequestArgs = {
uuid: Scalars['String']['input'];
};
export type CreateKycRequestRussiaMutationVariables = Exact<{
input: KycRequestRussiaInput;
}>;
export type CreateKycRequestRussiaMutation = { __typename?: 'UserMutation', createKycRequestRussia?: { __typename?: 'CreateKYCRequestRussia', success?: boolean | null, kycRequest?: { __typename?: 'KYCRequestType', uuid: string, contactEmail: string, createdAt: string, countryData?: any | null } | null } | null };
export type GetKycRequestRussiaQueryVariables = Exact<{
uuid: Scalars['String']['input'];
}>;
export type GetKycRequestRussiaQuery = { __typename?: 'UserQuery', kycRequest?: { __typename?: 'KYCRequestType', uuid: string, userId: string, teamName: string, countryCode: string, contactPerson: string, contactEmail: string, contactPhone: string, approvedBy?: string | null, approvedAt?: string | null, createdAt: string, updatedAt: string, countryData?: any | null } | null };
export type GetKycRequestsRussiaQueryVariables = Exact<{ [key: string]: never; }>;
export type GetKycRequestsRussiaQuery = { __typename?: 'UserQuery', kycRequests?: Array<{ __typename?: 'KYCRequestType', uuid: string, userId: string, teamName: string, countryCode: string, contactPerson: string, contactEmail: string, contactPhone: string, approvedBy?: string | null, approvedAt?: string | null, createdAt: string, updatedAt: string, countryData?: any | null } | null> | null };
export const CreateKycRequestRussiaDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateKYCRequestRussia"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"KYCRequestRussiaInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createKycRequestRussia"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"kycRequest"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"contactEmail"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"countryData"}}]}}]}}]}}]} as unknown as DocumentNode<CreateKycRequestRussiaMutation, CreateKycRequestRussiaMutationVariables>;
export const GetKycRequestRussiaDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetKYCRequestRussia"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kycRequest"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"teamName"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"contactPerson"}},{"kind":"Field","name":{"kind":"Name","value":"contactEmail"}},{"kind":"Field","name":{"kind":"Name","value":"contactPhone"}},{"kind":"Field","name":{"kind":"Name","value":"approvedBy"}},{"kind":"Field","name":{"kind":"Name","value":"approvedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"countryData"}}]}}]}}]} as unknown as DocumentNode<GetKycRequestRussiaQuery, GetKycRequestRussiaQueryVariables>;
export const GetKycRequestsRussiaDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetKYCRequestsRussia"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kycRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"teamName"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"contactPerson"}},{"kind":"Field","name":{"kind":"Name","value":"contactEmail"}},{"kind":"Field","name":{"kind":"Name","value":"contactPhone"}},{"kind":"Field","name":{"kind":"Name","value":"approvedBy"}},{"kind":"Field","name":{"kind":"Name","value":"approvedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"countryData"}}]}}]}}]} as unknown as DocumentNode<GetKycRequestsRussiaQuery, GetKycRequestsRussiaQueryVariables>;

View File

@@ -0,0 +1,189 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
DateTime: { input: string; output: string; }
};
export type CreateTeamInput = {
name: Scalars['String']['input'];
teamType?: InputMaybe<Scalars['String']['input']>;
};
export type CreateTeamMutation = {
__typename?: 'CreateTeamMutation';
team?: Maybe<Team>;
};
export type SelectedLocation = {
__typename?: 'SelectedLocation';
latitude?: Maybe<Scalars['Float']['output']>;
longitude?: Maybe<Scalars['Float']['output']>;
name?: Maybe<Scalars['String']['output']>;
type?: Maybe<Scalars['String']['output']>;
uuid?: Maybe<Scalars['String']['output']>;
};
export type SwitchTeamMutation = {
__typename?: 'SwitchTeamMutation';
user?: Maybe<User>;
};
export type Team = {
__typename?: 'Team';
createdAt: Scalars['DateTime']['output'];
id?: Maybe<Scalars['String']['output']>;
logtoOrgId?: Maybe<Scalars['String']['output']>;
name: Scalars['String']['output'];
selectedLocation?: Maybe<SelectedLocation>;
teamType?: Maybe<Scalars['String']['output']>;
uuid: Scalars['String']['output'];
};
export type TeamInvitation = {
__typename?: 'TeamInvitation';
createdAt?: Maybe<Scalars['String']['output']>;
email?: Maybe<Scalars['String']['output']>;
expiresAt?: Maybe<Scalars['String']['output']>;
invitedBy?: Maybe<Scalars['String']['output']>;
role?: Maybe<Scalars['String']['output']>;
status?: Maybe<Scalars['String']['output']>;
uuid: Scalars['String']['output'];
};
export type TeamMember = {
__typename?: 'TeamMember';
joinedAt?: Maybe<Scalars['String']['output']>;
role?: Maybe<Scalars['String']['output']>;
user?: Maybe<User>;
uuid: Scalars['String']['output'];
};
export type TeamWithMembers = {
__typename?: 'TeamWithMembers';
createdAt: Scalars['DateTime']['output'];
id?: Maybe<Scalars['String']['output']>;
invitations?: Maybe<Array<Maybe<TeamInvitation>>>;
members?: Maybe<Array<Maybe<TeamMember>>>;
name: Scalars['String']['output'];
uuid: Scalars['String']['output'];
};
export type UpdateUserInput = {
avatarId?: InputMaybe<Scalars['String']['input']>;
firstName?: InputMaybe<Scalars['String']['input']>;
lastName?: InputMaybe<Scalars['String']['input']>;
phone?: InputMaybe<Scalars['String']['input']>;
};
export type UpdateUserMutation = {
__typename?: 'UpdateUserMutation';
user?: Maybe<User>;
};
export type User = {
__typename?: 'User';
activeTeam?: Maybe<Team>;
activeTeamId?: Maybe<Scalars['String']['output']>;
avatarId?: Maybe<Scalars['String']['output']>;
email: Scalars['String']['output'];
firstName?: Maybe<Scalars['String']['output']>;
id?: Maybe<Scalars['String']['output']>;
lastName?: Maybe<Scalars['String']['output']>;
phone?: Maybe<Scalars['String']['output']>;
teams?: Maybe<Array<Maybe<Team>>>;
/** Обязательное поле. Не более 150 символов. Только буквы, цифры и символы @/./+/-/_. */
username: Scalars['String']['output'];
};
export type UserMutation = {
__typename?: 'UserMutation';
createTeam?: Maybe<CreateTeamMutation>;
switchTeam?: Maybe<SwitchTeamMutation>;
updateUser?: Maybe<UpdateUserMutation>;
};
export type UserMutationCreateTeamArgs = {
input: CreateTeamInput;
};
export type UserMutationSwitchTeamArgs = {
teamId: Scalars['String']['input'];
};
export type UserMutationUpdateUserArgs = {
input: UpdateUserInput;
userId: Scalars['String']['input'];
};
export type UserQuery = {
__typename?: 'UserQuery';
getTeam?: Maybe<TeamWithMembers>;
me?: Maybe<User>;
};
export type UserQueryGetTeamArgs = {
teamId: Scalars['String']['input'];
};
export type CreateTeamMutationVariables = Exact<{
input: CreateTeamInput;
}>;
export type CreateTeamMutation = { __typename?: 'UserMutation', createTeam?: { __typename?: 'CreateTeamMutation', team?: { __typename?: 'Team', id?: string | null, name: string, teamType?: string | null } | null } | null };
export type GetMeQueryVariables = Exact<{ [key: string]: never; }>;
export type GetMeQuery = { __typename?: 'UserQuery', me?: { __typename?: 'User', id?: string | null, firstName?: string | null, lastName?: string | null, activeTeamId?: string | null, activeTeam?: { __typename?: 'Team', id?: string | null, name: string, logtoOrgId?: string | null, teamType?: string | null, selectedLocation?: { __typename?: 'SelectedLocation', type?: string | null, uuid?: string | null, name?: string | null, latitude?: number | null, longitude?: number | null } | null } | null, teams?: Array<{ __typename?: 'Team', id?: string | null, name: string, logtoOrgId?: string | null, teamType?: string | null } | null> | null } | null };
export type GetMeProfileQueryVariables = Exact<{ [key: string]: never; }>;
export type GetMeProfileQuery = { __typename?: 'UserQuery', me?: { __typename?: 'User', id?: string | null, firstName?: string | null, lastName?: string | null, phone?: string | null, avatarId?: string | null, activeTeamId?: string | null, activeTeam?: { __typename?: 'Team', id?: string | null, name: string } | null } | null };
export type GetTeamQueryVariables = Exact<{
teamId: Scalars['String']['input'];
}>;
export type GetTeamQuery = { __typename?: 'UserQuery', getTeam?: { __typename?: 'TeamWithMembers', id?: string | null, name: string, members?: Array<{ __typename?: 'TeamMember', role?: string | null, joinedAt?: string | null, user?: { __typename?: 'User', id?: string | null, firstName?: string | null, lastName?: string | null } | null } | null> | null, invitations?: Array<{ __typename?: 'TeamInvitation', uuid: string, email?: string | null, role?: string | null, status?: string | null, createdAt?: string | null } | null> | null } | null };
export type SwitchTeamMutationVariables = Exact<{
teamId: Scalars['String']['input'];
}>;
export type SwitchTeamMutation = { __typename?: 'UserMutation', switchTeam?: { __typename?: 'SwitchTeamMutation', user?: { __typename?: 'User', id?: string | null, firstName?: string | null, lastName?: string | null, activeTeamId?: string | null, activeTeam?: { __typename?: 'Team', id?: string | null, name: string } | null } | null } | null };
export type UpdateUserMutationVariables = Exact<{
userId: Scalars['String']['input'];
input: UpdateUserInput;
}>;
export type UpdateUserMutation = { __typename?: 'UserMutation', updateUser?: { __typename?: 'UpdateUserMutation', user?: { __typename?: 'User', id?: string | null, firstName?: string | null, lastName?: string | null, phone?: string | null, avatarId?: string | null, activeTeamId?: string | null, activeTeam?: { __typename?: 'Team', id?: string | null, name: string } | null } | null } | null };
export const CreateTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateTeamInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"teamType"}}]}}]}}]}}]} as unknown as DocumentNode<CreateTeamMutation, CreateTeamMutationVariables>;
export const GetMeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMe"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeamId"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logtoOrgId"}},{"kind":"Field","name":{"kind":"Name","value":"teamType"}},{"kind":"Field","name":{"kind":"Name","value":"selectedLocation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logtoOrgId"}},{"kind":"Field","name":{"kind":"Name","value":"teamType"}}]}}]}}]}}]} as unknown as DocumentNode<GetMeQuery, GetMeQueryVariables>;
export const GetMeProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMeProfile"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"avatarId"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeamId"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]} as unknown as DocumentNode<GetMeProfileQuery, GetMeProfileQueryVariables>;
export const GetTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"members"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}}]}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"invitations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode<GetTeamQuery, GetTeamQueryVariables>;
export const SwitchTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SwitchTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"switchTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeamId"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode<SwitchTeamMutation, SwitchTeamMutationVariables>;
export const UpdateUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateUserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"avatarId"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeamId"}},{"kind":"Field","name":{"kind":"Name","value":"activeTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode<UpdateUserMutation, UpdateUserMutationVariables>;

View File

@@ -0,0 +1,11 @@
export const useActiveTeam = () => {
const activeTeamId = useState<string | null>('activeTeamId', () => null)
const activeLogtoOrgId = useState<string | null>('activeLogtoOrgId', () => null)
const setActiveTeam = (teamId: string | null, logtoOrgId?: string | null) => {
activeTeamId.value = teamId
activeLogtoOrgId.value = logtoOrgId ?? null
}
return { activeTeamId, activeLogtoOrgId, setActiveTeam }
}

View File

@@ -0,0 +1,81 @@
/**
* Auth composable using @logto/nuxt
*
* Uses useLogtoTokens() for token management with SSR→client sync.
*/
export const useAuth = () => {
const { getToken, initTokens, idToken } = useLogtoTokens()
const me = useState<{ id?: string | null } | null>('me', () => null)
const isAuthenticated = computed(() => !!me.value?.id)
const loggedIn = isAuthenticated
/**
* Get access token for a resource.
* Tokens are synced from SSR via useState, auto-refreshes if expired.
*/
const getAccessToken = async (resource: string, _organizationId?: string): Promise<string> => {
return getToken(resource as Parameters<typeof getToken>[0])
}
const getOrganizationToken = getAccessToken
/**
* Get ID token.
* Uses useState for SSR→client sync, falls back to API on client if needed.
*/
const getIdToken = async (): Promise<string | null> => {
// SSR or client with synced token
if (idToken.value) {
return idToken.value
}
// Client fallback - fetch from API
if (!import.meta.server) {
const response = await $fetch<{ id_token: string | null }>('/api/auth/id-token')
return response.id_token
}
return null
}
/**
* Get ID token claims (decoded).
*/
const getIdTokenClaims = async () => {
const response = await $fetch<{ claims: Record<string, unknown> | null }>('/api/auth/id-token-claims')
return response.claims
}
const signIn = async (_redirectUri?: string) => {
await navigateTo('/sign-in', { external: true })
}
const login = signIn
const signOut = async (_logoutRedirectUri?: string) => {
await navigateTo('/sign-out', { external: true })
}
const logout = signOut
const fetch = async () => {
// Initialize tokens on SSR
await initTokens()
}
return {
isAuthenticated,
loggedIn,
user: me,
signIn,
login,
signOut,
logout,
fetch,
getAccessToken,
getOrganizationToken,
getIdToken,
getIdTokenClaims,
}
}

View File

@@ -0,0 +1,100 @@
import { GetNodesDocument } from '~/composables/graphql/public/geo-generated'
const PAGE_SIZE = 24
// Shared state across list and map views
const items = ref<any[]>([])
const total = ref(0)
const selectedFilter = ref('all')
const isLoading = ref(false)
const isLoadingMore = ref(false)
const isInitialized = ref(false)
export function useCatalogHubs() {
const { t } = useI18n()
const { execute } = useGraphQL()
const filters = computed(() => [
{ id: 'all', label: t('catalogHubsSection.filters.all') },
{ id: 'auto', label: t('catalogHubsSection.filters.auto') },
{ id: 'rail', label: t('catalogHubsSection.filters.rail') },
{ id: 'sea', label: t('catalogHubsSection.filters.sea') },
{ id: 'air', label: t('catalogHubsSection.filters.air') }
])
const itemsWithCoords = computed(() =>
items.value.filter(h => h.latitude && h.longitude)
)
const itemsByCountry = computed(() => {
const grouped = new Map<string, any[]>()
items.value.forEach(hub => {
const country = hub.country || t('catalogMap.labels.country_unknown')
if (!grouped.has(country)) grouped.set(country, [])
grouped.get(country)!.push(hub)
})
return Array.from(grouped.entries())
.map(([name, hubsList]) => ({ name, hubs: hubsList }))
.sort((a, b) => a.name.localeCompare(b.name))
})
const canLoadMore = computed(() => items.value.length < total.value)
const fetchPage = async (offset: number, replace = false) => {
if (replace) isLoading.value = true
try {
const transportType = selectedFilter.value === 'all' ? null : selectedFilter.value
const data = await execute(
GetNodesDocument,
{ limit: PAGE_SIZE, offset, transportType },
'public',
'geo'
)
const next = data?.nodes || []
items.value = replace ? next : items.value.concat(next)
total.value = data?.nodesCount ?? total.value
isInitialized.value = true
} finally {
isLoading.value = false
}
}
const loadMore = async () => {
if (isLoadingMore.value) return
isLoadingMore.value = true
try {
await fetchPage(items.value.length)
} finally {
isLoadingMore.value = false
}
}
// При смене фильтра - перезагрузка
watch(selectedFilter, () => {
if (isInitialized.value) {
fetchPage(0, true)
}
})
// Initialize data if not already loaded
const init = async () => {
if (!isInitialized.value && items.value.length === 0) {
await fetchPage(0, true)
}
}
return {
items,
total,
selectedFilter,
filters,
isLoading,
isLoadingMore,
itemsWithCoords,
itemsByCountry,
canLoadMore,
fetchPage,
loadMore,
init
}
}

View File

@@ -0,0 +1,92 @@
import { GetOffersDocument } from '~/composables/graphql/public/exchange-generated'
const PAGE_SIZE = 24
// Shared state across list and map views
const items = ref<any[]>([])
const total = ref(0)
const selectedFilter = ref('all')
const isLoading = ref(false)
const isLoadingMore = ref(false)
const isInitialized = ref(false)
export function useCatalogOffers() {
const { t } = useI18n()
const { execute } = useGraphQL()
const filters = computed(() => [
{ id: 'all', label: t('catalogOffersSection.filters.all') },
{ id: 'active', label: t('catalogOffersSection.filters.active') }
])
const itemsWithCoords = computed(() =>
items.value
.filter(offer => offer.locationLatitude && offer.locationLongitude)
.map(offer => ({
uuid: offer.uuid,
name: offer.productName || offer.title,
latitude: offer.locationLatitude,
longitude: offer.locationLongitude,
country: offer.locationCountry
}))
)
const canLoadMore = computed(() => items.value.length < total.value)
const fetchPage = async (offset: number, replace = false) => {
if (replace) isLoading.value = true
try {
const status = selectedFilter.value === 'active' ? 'active' : null
const data = await execute(
GetOffersDocument,
{ limit: PAGE_SIZE, offset, status },
'public',
'exchange'
)
const next = data?.getOffers || []
items.value = replace ? next : items.value.concat(next)
total.value = data?.getOffersCount ?? total.value
isInitialized.value = true
} finally {
isLoading.value = false
}
}
const loadMore = async () => {
if (isLoadingMore.value) return
isLoadingMore.value = true
try {
await fetchPage(items.value.length)
} finally {
isLoadingMore.value = false
}
}
// При смене фильтра - перезагрузка
watch(selectedFilter, () => {
if (isInitialized.value) {
fetchPage(0, true)
}
})
// Initialize data if not already loaded
const init = async () => {
if (!isInitialized.value && items.value.length === 0) {
await fetchPage(0, true)
}
}
return {
items,
total,
selectedFilter,
filters,
isLoading,
isLoadingMore,
itemsWithCoords,
canLoadMore,
fetchPage,
loadMore,
init
}
}

View File

@@ -0,0 +1,84 @@
import { GetSupplierProfilesDocument } from '~/composables/graphql/public/exchange-generated'
const PAGE_SIZE = 24
// Shared state across list and map views
const items = ref<any[]>([])
const total = ref(0)
const selectedFilter = ref('all')
const isLoading = ref(false)
const isLoadingMore = ref(false)
const isInitialized = ref(false)
export function useCatalogSuppliers() {
const { t } = useI18n()
const { execute } = useGraphQL()
const filters = computed(() => [
{ id: 'all', label: t('catalogSuppliersSection.filters.all') },
{ id: 'verified', label: t('catalogSuppliersSection.filters.verified') }
])
const itemsWithCoords = computed(() =>
items.value.filter(s => s.latitude && s.longitude)
)
const canLoadMore = computed(() => items.value.length < total.value)
const fetchPage = async (offset: number, replace = false) => {
if (replace) isLoading.value = true
try {
const isVerified = selectedFilter.value === 'verified' ? true : null
const data = await execute(
GetSupplierProfilesDocument,
{ limit: PAGE_SIZE, offset, isVerified },
'public',
'exchange'
)
const next = data?.getSupplierProfiles || []
items.value = replace ? next : items.value.concat(next)
total.value = data?.getSupplierProfilesCount ?? total.value
isInitialized.value = true
} finally {
isLoading.value = false
}
}
const loadMore = async () => {
if (isLoadingMore.value) return
isLoadingMore.value = true
try {
await fetchPage(items.value.length)
} finally {
isLoadingMore.value = false
}
}
// При смене фильтра - перезагрузка
watch(selectedFilter, () => {
if (isInitialized.value) {
fetchPage(0, true)
}
})
// Initialize data if not already loaded
const init = async () => {
if (!isInitialized.value && items.value.length === 0) {
await fetchPage(0, true)
}
}
return {
items,
total,
selectedFilter,
filters,
isLoading,
isLoadingMore,
itemsWithCoords,
canLoadMore,
fetchPage,
loadMore,
init
}
}

View File

@@ -0,0 +1,119 @@
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
type Endpoint = 'user' | 'team' | 'public'
type Api = 'teams' | 'exchange' | 'kyc' | 'orders' | 'geo' | 'billing'
const RESOURCE_MAP: Record<Api, string> = {
teams: 'https://teams.optovia.ru',
orders: 'https://orders.optovia.ru',
kyc: 'https://kyc.optovia.ru',
exchange: 'https://exchange.optovia.ru',
geo: 'https://geo.optovia.ru',
billing: 'https://billing.optovia.ru'
}
const CLIENT_MAP: Record<string, string> = {
'public:exchange': 'default',
'public:geo': 'publicGeo',
'user:teams': 'teamsUser',
'user:kyc': 'kycUser',
'team:teams': 'teamsTeam',
'team:exchange': 'exchangeTeam',
'team:orders': 'ordersTeam',
'team:billing': 'billingTeam'
}
export const useGraphQL = () => {
const auth = useAuth()
const { activeLogtoOrgId } = useActiveTeam()
const getClientId = (endpoint: Endpoint, api: Api): string => {
return CLIENT_MAP[`${endpoint}:${api}`] || 'default'
}
const getTokenType = (endpoint: Endpoint): 'id' | 'access' | 'none' => {
if (endpoint === 'user') return 'id'
if (endpoint === 'team') return 'access'
return 'none'
}
const getAuthContext = async (endpoint: Endpoint, api: Api) => {
const tokenType = getTokenType(endpoint)
if (tokenType === 'none') return {}
let token: string | null = null
if (tokenType === 'id') {
try {
token = (await auth.getIdToken()) ?? null
}
catch (e) {
console.warn('Failed to get ID token:', e)
}
}
else if (tokenType === 'access') {
try {
token = await auth.getAccessToken(RESOURCE_MAP[api], activeLogtoOrgId.value || undefined)
}
catch (e) {
console.warn('Failed to get access token:', e)
}
}
if (!token) {
throw new Error('User not authenticated')
}
return { headers: { Authorization: `Bearer ${token}` } }
}
const execute = async <TResult, TVariables extends Record<string, unknown>>(
document: TypedDocumentNode<TResult, TVariables>,
variables: TVariables,
endpoint: Endpoint,
api: Api
): Promise<TResult> => {
const clientId = getClientId(endpoint, api)
const { client } = useApolloClient(clientId)
const context = await getAuthContext(endpoint, api)
const result = await client.query({
query: document,
variables,
context,
fetchPolicy: 'network-only'
})
if (result.errors?.length) {
throw new Error(result.errors[0]?.message || 'GraphQL error')
}
return result.data as TResult
}
const mutate = async <TResult, TVariables extends Record<string, unknown>>(
document: TypedDocumentNode<TResult, TVariables>,
variables: TVariables,
endpoint: Endpoint,
api: Api
): Promise<TResult> => {
const clientId = getClientId(endpoint, api)
const { client } = useApolloClient(clientId)
const context = await getAuthContext(endpoint, api)
const result = await client.mutate({
mutation: document,
variables,
context
})
if (result.errors?.length) {
throw new Error(result.errors[0]?.message || 'GraphQL error')
}
return result.data as TResult
}
return { execute, mutate }
}

View File

@@ -0,0 +1,205 @@
const RESOURCES = {
teams: 'https://teams.optovia.ru',
exchange: 'https://exchange.optovia.ru',
orders: 'https://orders.optovia.ru',
kyc: 'https://kyc.optovia.ru',
billing: 'https://billing.optovia.ru'
} as const
type ResourceKey = keyof typeof RESOURCES
type ResourceUrl = typeof RESOURCES[ResourceKey]
interface TokenInfo {
token: string
expiresAt: number
}
interface RefreshResponse {
tokens: Partial<Record<ResourceKey, TokenInfo>>
}
// Buffer before expiry to trigger refresh (60 seconds)
const EXPIRY_BUFFER_MS = 60 * 1000
/**
* Composable for managing Logto access tokens and ID token.
* Uses useState for SSR→client sync and auto-refreshes when tokens expire.
*/
export const useLogtoTokens = () => {
const tokens = useState<Partial<Record<ResourceKey, TokenInfo>>>('logto-tokens', () => ({}))
const idToken = useState<string | null>('logto-id-token', () => null)
const isRefreshing = ref(false)
let refreshPromise: Promise<void> | null = null
/**
* Get organization ID from Logto user (first organization)
*/
const getOrganizationId = (): string | undefined => {
if (import.meta.server) {
const nuxtApp = useNuxtApp()
const context = nuxtApp.ssrContext?.event.context as {
logtoUser?: { organizations?: string[] }
logtoOrgId?: string
} | undefined
return context?.logtoOrgId || context?.logtoUser?.organizations?.[0]
}
const orgId = useState<string | null>('logto-org-id', () => null)
return orgId.value || undefined
}
/**
* Initialize tokens on SSR - fetches all tokens from Logto client
*/
const initTokens = async () => {
if (import.meta.server) {
const nuxtApp = useNuxtApp()
const client = nuxtApp.ssrContext?.event.context.logtoClient
const organizationId = getOrganizationId()
if (client) {
const results: Partial<Record<ResourceKey, TokenInfo>> = {}
await Promise.all(
(Object.entries(RESOURCES) as [ResourceKey, string][]).map(async ([key, resource]) => {
try {
// Pass organizationId to get organization-scoped token
const token = await client.getAccessToken(resource, organizationId)
if (token) {
results[key] = {
token,
expiresAt: decodeTokenExpiry(token)
}
}
}
catch {
// Token not available
}
})
)
tokens.value = results
// Also fetch ID token for SSR
try {
const token = await client.getIdToken()
if (token) {
idToken.value = token
}
}
catch {
// ID token not available
}
}
}
}
/**
* Decode JWT to get expiry timestamp
*/
function decodeTokenExpiry(token: string): number {
try {
const payload = token.split('.')[1]
if (payload) {
const json = atob(payload.replace(/-/g, '+').replace(/_/g, '/'))
const decoded = JSON.parse(json)
if (decoded.exp) {
return decoded.exp * 1000
}
}
}
catch {
// ignore
}
return Date.now() + 3600 * 1000
}
/**
* Check if token is expired or about to expire
*/
const isTokenExpired = (tokenInfo: TokenInfo | undefined): boolean => {
if (!tokenInfo) return true
return tokenInfo.expiresAt <= Date.now() + EXPIRY_BUFFER_MS
}
/**
* Refresh all tokens from server
*/
const refreshTokens = async (): Promise<void> => {
// Deduplicate concurrent refresh calls
if (refreshPromise) {
return refreshPromise
}
isRefreshing.value = true
refreshPromise = (async () => {
try {
const response = await $fetch<RefreshResponse>('/api/auth/refresh', {
method: 'POST'
})
tokens.value = response.tokens
}
finally {
isRefreshing.value = false
refreshPromise = null
}
})()
return refreshPromise
}
/**
* Get access token for a resource URL.
* Auto-refreshes if token is expired.
*/
const getToken = async (resourceUrl: ResourceUrl): Promise<string> => {
// Find resource key by URL
const entry = Object.entries(RESOURCES).find(([, url]) => url === resourceUrl)
if (!entry) {
throw new Error(`Unknown resource: ${resourceUrl}`)
}
const key = entry[0] as ResourceKey
const tokenInfo = tokens.value[key]
// If expired, refresh all tokens
if (isTokenExpired(tokenInfo)) {
await refreshTokens()
}
const refreshedToken = tokens.value[key]
if (!refreshedToken?.token) {
throw new Error(`No token available for ${resourceUrl}`)
}
return refreshedToken.token
}
/**
* Get token by resource key (teams, exchange, orders, kyc)
*/
const getTokenByKey = async (key: ResourceKey): Promise<string> => {
const tokenInfo = tokens.value[key]
if (isTokenExpired(tokenInfo)) {
await refreshTokens()
}
const refreshedToken = tokens.value[key]
if (!refreshedToken?.token) {
throw new Error(`No token available for ${key}`)
}
return refreshedToken.token
}
return {
tokens: readonly(tokens),
idToken: readonly(idToken),
isRefreshing: readonly(isRefreshing),
initTokens,
getToken,
getTokenByKey,
refreshTokens
}
}

View File

@@ -0,0 +1,81 @@
import type { Map as MapboxMap } from 'mapbox-gl'
interface FlyThroughSpaceOptions {
targetCenter: [number, number]
targetZoom?: number
totalDuration?: number
minZoom?: number // Minimum zoom (higher altitude)
}
export const useMapboxFlyAnimation = () => {
const isAnimating = ref(false)
const flyThroughSpace = async (
map: MapboxMap,
options: FlyThroughSpaceOptions
): Promise<void> => {
const {
targetCenter,
targetZoom = 12,
totalDuration = 5000,
minZoom = 3
} = options
// Stop any ongoing animation
if (isAnimating.value) {
map.stop()
}
isAnimating.value = true
const currentCenter = map.getCenter()
// Phase 1: lift-off (35% of time)
const phase1Duration = totalDuration * 0.35
await new Promise<void>(resolve => {
map.easeTo({
center: [
(currentCenter.lng + targetCenter[0]) / 2,
(currentCenter.lat + targetCenter[1]) / 2
],
zoom: minZoom,
duration: phase1Duration,
easing: (t) => t * (2 - t) // ease out
})
setTimeout(resolve, phase1Duration)
})
// Phase 2: move + descent (65% of time)
const phase2Duration = totalDuration * 0.65
await new Promise<void>(resolve => {
map.easeTo({
center: targetCenter,
zoom: targetZoom,
duration: phase2Duration,
easing: (t) => t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2 // ease in-out
})
setTimeout(resolve, phase2Duration)
})
isAnimating.value = false
}
const setupGlobeAtmosphere = (map: MapboxMap) => {
map.setFog({
color: 'rgb(186, 210, 235)',
'high-color': 'rgb(36, 92, 223)',
'horizon-blend': 0.02,
'space-color': 'rgb(11, 11, 25)',
'star-intensity': 0.6
})
}
return {
flyThroughSpace,
setupGlobeAtmosphere,
isAnimating
}
}

View File

@@ -0,0 +1,16 @@
export const useMockLogto = () => {
return {
isAuthenticated: ref(true),
getIdTokenClaims: () => Promise.resolve({
sub: 'mock-user-id-123',
email: 'test@optovia.ru',
username: 'testuser'
}),
signIn: (redirectUri: string) => {
console.log('Mock signIn to:', redirectUri)
},
signOut: () => {
console.log('Mock signOut')
}
}
}

138
app/composables/useNovu.ts Normal file
View File

@@ -0,0 +1,138 @@
import { Novu } from '@novu/js'
interface NovuNotification {
id: string
content: string
read: boolean
seen: boolean
createdAt: string
payload?: Record<string, unknown>
cta?: {
type: string
data: {
url?: string
}
}
}
let novuInstance: Novu | null = null
export const useNovu = () => {
const config = useRuntimeConfig()
const notifications = ref<NovuNotification[]>([])
const unreadCount = ref(0)
const isLoading = ref(false)
const isInitialized = ref(false)
const init = (subscriberId: string) => {
if (novuInstance || !subscriberId) return
const appId = config.public.novuAppId
const backendUrl = config.public.novuBackendUrl
const socketUrl = config.public.novuSocketUrl
if (!appId || !backendUrl) {
console.warn('[useNovu] Missing configuration: novuAppId or novuBackendUrl')
return
}
novuInstance = new Novu({
subscriberId,
applicationIdentifier: appId,
backendUrl,
socketUrl: socketUrl || undefined
})
isInitialized.value = true
// Subscribe to realtime updates
novuInstance.on('notifications.notification_received', () => {
loadNotifications()
})
// Load initial data
loadNotifications()
}
const loadNotifications = async () => {
if (!novuInstance) return
isLoading.value = true
try {
const result = await novuInstance.notifications.list({ limit: 20 })
const data = Array.isArray(result?.data)
? result.data
: (result?.data?.notifications || [])
notifications.value = data as NovuNotification[]
unreadCount.value = notifications.value.filter((n: NovuNotification) => !n.read).length
} catch (error) {
console.error('[useNovu] Failed to load notifications:', error)
} finally {
isLoading.value = false
}
}
const markAsRead = async (notificationId: string) => {
if (!novuInstance) return
try {
await novuInstance.notifications.read({ notificationId })
// Update locally
const notification = notifications.value.find((n: NovuNotification) => n.id === notificationId)
if (notification) {
notification.read = true
unreadCount.value = notifications.value.filter((n: NovuNotification) => !n.read).length
}
} catch (error) {
console.error('[useNovu] Failed to mark as read:', error)
}
}
const markAllAsRead = async () => {
if (!novuInstance) return
try {
await novuInstance.notifications.readAll()
notifications.value.forEach((n: NovuNotification) => { n.read = true })
unreadCount.value = 0
} catch (error) {
console.error('[useNovu] Failed to mark all as read:', error)
}
}
const markAsSeen = async (notificationId: string) => {
if (!novuInstance) return
try {
await novuInstance.notifications.archive({ notificationId })
const notification = notifications.value.find((n: NovuNotification) => n.id === notificationId)
if (notification) {
notification.seen = true
}
} catch (error) {
console.error('[useNovu] Failed to mark as seen:', error)
}
}
const destroy = () => {
if (novuInstance) {
novuInstance = null
isInitialized.value = false
notifications.value = []
unreadCount.value = 0
}
}
return {
init,
destroy,
notifications,
unreadCount,
isLoading,
isInitialized,
markAsRead,
markAllAsRead,
markAsSeen,
loadNotifications
}
}

View File

@@ -0,0 +1,57 @@
export const useOrdersRestAPI = () => {
const config = useRuntimeConfig()
const getTeamOrders = async (teamUuid) => {
try {
const response = await $fetch(`${config.public.odooApiUrl}/fastapi/orders/api/v1/orders/team/${teamUuid}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
return response
} catch (error) {
console.error('Error fetching team orders:', error)
throw error
}
}
const getOrderByUuid = async (orderUuid) => {
try {
const response = await $fetch(`${config.public.odooApiUrl}/fastapi/orders/api/v1/orders/${orderUuid}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
return response
} catch (error) {
console.error('Error fetching order:', error)
throw error
}
}
const getCompanies = async () => {
try {
const response = await $fetch(`${config.public.odooApiUrl}/fastapi/companies/api/v1/companies`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
return response
} catch (error) {
console.error('Error fetching companies:', error)
throw error
}
}
return {
getTeamOrders,
getOrderByUuid,
getCompanies
}
}

View File

@@ -0,0 +1,20 @@
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
/**
* SSR-friendly обёртка над useGraphQL.execute.
* Выполняет запрос на сервере (и на клиенте при навигации), возвращает useAsyncData-результат.
*/
export const useServerQuery = async <TResult, TVariables extends Record<string, unknown>>(
key: string,
document: TypedDocumentNode<TResult, TVariables>,
variables: TVariables,
endpoint: 'user' | 'team' | 'public',
api: 'teams' | 'exchange' | 'kyc' | 'orders' | 'geo' | 'billing'
) => {
const { execute } = useGraphQL()
return useAsyncData(key, () => execute(document, variables, endpoint, api), {
server: true,
lazy: false,
immediate: true
})
}

View File

@@ -0,0 +1,73 @@
const items = ref<any[]>([])
const isLoading = ref(false)
const isInitialized = ref(false)
export function useTeamAddresses() {
const { t } = useI18n()
const { execute, mutate } = useGraphQL()
const itemsWithCoords = computed(() =>
items.value
.filter(a => a.latitude && a.longitude)
.map(a => ({
uuid: a.uuid,
name: a.name,
latitude: a.latitude,
longitude: a.longitude,
country: a.countryCode
}))
)
const load = async () => {
isLoading.value = true
try {
const { GetTeamAddressesDocument } = await import('~/composables/graphql/team/teams-generated')
const data = await execute(GetTeamAddressesDocument, {}, 'team', 'teams')
items.value = data?.teamAddresses || []
isInitialized.value = true
} catch (e) {
console.error('Failed to load addresses', e)
} finally {
isLoading.value = false
}
}
const deleteAddress = async (uuid: string) => {
if (!confirm(t('profileAddresses.actions.confirm_delete'))) return false
try {
const { DeleteTeamAddressDocument } = await import('~/composables/graphql/team/teams-generated')
const result = await mutate(DeleteTeamAddressDocument, { uuid }, 'team', 'teams')
if (result.deleteTeamAddress?.success) {
await load()
return true
}
} catch (e) {
console.error('Failed to delete address', e)
}
return false
}
const init = async () => {
if (!isInitialized.value && items.value.length === 0) {
await load()
}
}
// ISO code to emoji flag
const isoToEmoji = (code: string | null | undefined): string => {
if (!code) return '🌍'
return code.toUpperCase().split('').map(char => String.fromCodePoint(0x1F1E6 - 65 + char.charCodeAt(0))).join('')
}
return {
items,
isLoading,
itemsWithCoords,
load,
deleteAddress,
init,
isoToEmoji
}
}

View File

@@ -0,0 +1,99 @@
const items = ref<any[]>([])
const isLoading = ref(false)
const isInitialized = ref(false)
export function useTeamOrders() {
const { t } = useI18n()
const { execute } = useGraphQL()
const filters = computed(() => [
{ key: 'all', label: t('ordersList.filters.all') },
{ key: 'pending', label: t('ordersList.filters.pending') },
{ key: 'processing', label: t('ordersList.filters.processing') },
{ key: 'in_transit', label: t('ordersList.filters.in_transit') },
{ key: 'delivered', label: t('ordersList.filters.delivered') }
])
const selectedFilter = ref('all')
const filteredItems = computed(() => {
if (selectedFilter.value === 'all') return items.value
return items.value.filter(order => order.status === selectedFilter.value)
})
const routesForMap = computed(() =>
filteredItems.value
.map(order => ({
uuid: order.uuid,
name: order.name,
status: order.status,
stages: (order.stages || [])
.filter((s: any) => s.stageType === 'transport' && s.sourceLatitude && s.destinationLatitude)
.map((s: any) => ({
fromLat: s.sourceLatitude,
fromLon: s.sourceLongitude,
toLat: s.destinationLatitude,
toLon: s.destinationLongitude,
fromName: s.sourceLocationName,
toName: s.destinationLocationName,
transportType: s.transportType
}))
}))
.filter(order => order.stages.length > 0)
)
const load = async () => {
isLoading.value = true
try {
const { GetTeamOrdersDocument } = await import('~/composables/graphql/team/orders-generated')
const data = await execute(GetTeamOrdersDocument, {}, 'team', 'orders')
items.value = data?.getTeamOrders || []
isInitialized.value = true
} catch (e) {
console.error('Failed to load orders', e)
} finally {
isLoading.value = false
}
}
const init = async () => {
if (!isInitialized.value && items.value.length === 0) {
await load()
}
}
const getStatusVariant = (status: string) => {
const variants: Record<string, string> = {
pending: 'warning',
processing: 'primary',
in_transit: 'info',
delivered: 'success',
cancelled: 'error'
}
return variants[status] || 'muted'
}
const getStatusText = (status: string) => {
const texts: Record<string, string> = {
pending: t('ordersDetail.status.pending'),
processing: t('ordersDetail.status.processing'),
in_transit: t('ordersDetail.status.in_transit'),
delivered: t('ordersDetail.status.delivered'),
cancelled: t('ordersDetail.status.cancelled')
}
return texts[status] || status || t('ordersDetail.status.unknown')
}
return {
items,
filteredItems,
isLoading,
filters,
selectedFilter,
routesForMap,
load,
init,
getStatusVariant,
getStatusText
}
}

View File

@@ -0,0 +1,294 @@
/**
* Composable for TerminusDB:
* - Load schema by ID via GraphQL introspection
* - Convert schema to FormKit format
*/
import type { FormKitSchemaNode } from '@formkit/core'
// Types for TerminusDB GraphQL introspection
interface TerminusField {
name: string
type: {
name: string | null
kind: string
ofType?: {
name: string | null
kind: string
enumValues?: Array<{ name: string }>
}
enumValues?: Array<{ name: string }>
}
}
interface TerminusType {
name: string
kind: string
description: string | null
fields: TerminusField[] | null
enumValues: Array<{ name: string }> | null
}
// Map GraphQL scalar types to FormKit types
const graphqlToFormKit: Record<string, string> = {
'String': 'text',
'Int': 'number',
'Float': 'number',
'Boolean': 'checkbox',
'DateTime': 'datetime-local',
'Date': 'date',
'BigInt': 'number',
'Decimal': 'number',
}
export function useTerminus() {
const config = useRuntimeConfig()
// TerminusDB GraphQL endpoint
const getEndpoint = (): string => {
return (config.public.terminusGraphql as string) || 'https://terminus.optovia.ru/api/graphql/admin/optovia'
}
// Basic auth header
const getAuthHeader = () => {
// admin:optovia_admin_2024 in base64
return 'Basic ' + btoa('admin:optovia_admin_2024')
}
/**
* Load schema from TerminusDB via GraphQL introspection
*/
async function getSchema(schemaId: string): Promise<TerminusType | null> {
try {
const endpoint = getEndpoint()
// GraphQL introspection query for a specific type
const query = `
query IntrospectionQuery {
__type(name: "${schemaId}") {
name
kind
description
fields {
name
type {
name
kind
ofType {
name
kind
enumValues {
name
}
}
enumValues {
name
}
}
}
}
}
`
const response = await fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': getAuthHeader(),
},
body: JSON.stringify({ query }),
})
const result = await response.json() as { data: { __type: TerminusType | null } }
return result.data?.__type || null
} catch (error) {
console.error('Failed to load schema from TerminusDB:', error)
return null
}
}
/**
* Fetch all enums from schema via introspection
*/
async function getEnums(): Promise<Record<string, string[]>> {
try {
const endpoint = getEndpoint()
// Get all types and filter enums
const query = `
query IntrospectionQuery {
__schema {
types {
name
kind
enumValues {
name
}
}
}
}
`
const response = await fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': getAuthHeader(),
},
body: JSON.stringify({ query }),
})
const result = await response.json() as { data: { __schema: { types: TerminusType[] } } }
const enums: Record<string, string[]> = {}
for (const type of result.data?.__schema?.types || []) {
// Keep only our enums (exclude system __)
if (type.kind === 'ENUM' && !type.name.startsWith('__') && type.enumValues) {
enums[type.name] = type.enumValues.map(e => e.name)
}
}
return enums
} catch (error) {
console.error('Failed to load enums from TerminusDB:', error)
return {}
}
}
/**
* Convert TerminusDB type to FormKit schema
*/
function schemaToFormKit(
terminusType: TerminusType,
enums: Record<string, string[]>
): FormKitSchemaNode[] {
const formkitSchema: FormKitSchemaNode[] = []
if (!terminusType.fields) return formkitSchema
// System fields to skip (TerminusDB internal fields start with _)
const skipFields = ['id', '_id', '_type', '_json']
// Also skip path fields like _path_to_Cocoa, _path_to_Coffee, etc.
const isPathField = (name: string) => name.startsWith('_path_to_')
for (const field of terminusType.fields) {
if (skipFields.includes(field.name) || isPathField(field.name)) continue
const formkitField = parseFieldType(field, enums)
if (formkitField) {
formkitSchema.push(formkitField)
}
}
return formkitSchema
}
/**
* Parse field type and build FormKit node
*/
function parseFieldType(
field: TerminusField,
enums: Record<string, string[]>
): FormKitSchemaNode | null {
const { name, type } = field
// Determine actual type (may be wrapped in NON_NULL or LIST)
let actualType = type
let required = false
if (type.kind === 'NON_NULL') {
required = true
actualType = type.ofType as typeof type
}
// Enum?
if (actualType.kind === 'ENUM' && actualType.name) {
const enumValues = actualType.enumValues?.map(e => e.name) || enums[actualType.name] || []
return createSelectField(name, enumValues, required)
}
// Scalar type
if (actualType.kind === 'SCALAR' && actualType.name) {
return createInputField(name, actualType.name, required)
}
// LIST -> textarea
if (actualType.kind === 'LIST') {
return {
$formkit: 'textarea',
name,
label: formatLabel(name),
help: 'Enter values separated by comma',
validation: required ? 'required' : undefined,
}
}
return null
}
/**
* Create input field
*/
function createInputField(
fieldName: string,
graphqlType: string,
required: boolean
): FormKitSchemaNode {
const formkitType = graphqlToFormKit[graphqlType] || 'text'
const field: FormKitSchemaNode = {
$formkit: formkitType,
name: fieldName,
label: formatLabel(fieldName),
validation: required ? 'required' : undefined,
}
// For Float/Decimal add step
if (graphqlType === 'Float' || graphqlType === 'Decimal') {
(field as Record<string, unknown>).step = '0.01'
}
return field
}
/**
* Create select field from enum
*/
function createSelectField(
fieldName: string,
options: string[],
required: boolean
): FormKitSchemaNode {
return {
$formkit: 'select',
name: fieldName,
label: formatLabel(fieldName),
validation: required ? 'required' : undefined,
placeholder: 'Select...',
options: options.map(opt => ({
value: opt,
label: formatLabel(opt),
})),
}
}
/**
* Format field name to human-readable label
*/
function formatLabel(fieldName: string): string {
return fieldName
.replace(/_/g, ' ')
.replace(/([A-Z])/g, ' $1')
.replace(/^\w/, c => c.toUpperCase())
.trim()
}
return {
getSchema,
getEnums,
schemaToFormKit,
formatLabel,
getEndpoint,
}
}