diff --git a/client/packages/common/src/authentication/api/operations.generated.ts b/client/packages/common/src/authentication/api/operations.generated.ts index 27c261d2e3..e3931e0c0f 100644 --- a/client/packages/common/src/authentication/api/operations.generated.ts +++ b/client/packages/common/src/authentication/api/operations.generated.ts @@ -3,7 +3,7 @@ import * as Types from '@openmsupply-client/common'; import { GraphQLClient, RequestOptions } from 'graphql-request'; import gql from 'graphql-tag'; type GraphQLClientRequestHeaders = RequestOptions['requestHeaders']; -export type UserStoreNodeFragment = { __typename: 'UserStoreNode', code: string, id: string, nameId: string, name: string, storeMode: Types.StoreModeNodeType, createdDate?: string | null, homeCurrencyCode?: string | null, isDisabled: boolean, preferences: { __typename: 'StorePreferenceNode', id: string, responseRequisitionRequiresAuthorisation: boolean, requestRequisitionRequiresAuthorisation: boolean, packToOne: boolean, omProgramModule: boolean, vaccineModule: boolean, issueInForeignCurrency: boolean, monthlyConsumptionLookBackPeriod: number, monthsLeadTime: number, monthsOverstock: number, monthsUnderstock: number, monthsItemsExpire: number, stocktakeFrequency: number } }; +export type UserStoreNodeFragment = { __typename: 'UserStoreNode', code: string, id: string, nameId: string, name: string, storeMode: Types.StoreModeNodeType, createdDate?: string | null, homeCurrencyCode?: string | null, isDisabled: boolean, preferences: { __typename: 'StorePreferenceNode', id: string, responseRequisitionRequiresAuthorisation: boolean, requestRequisitionRequiresAuthorisation: boolean, packToOne: boolean, omProgramModule: boolean, vaccineModule: boolean, issueInForeignCurrency: boolean, monthlyConsumptionLookBackPeriod: number, monthsLeadTime: number, monthsOverstock: number, monthsUnderstock: number, monthsItemsExpire: number, stocktakeFrequency: number, extraFieldsInRequisition: boolean } }; export type AuthTokenQueryVariables = Types.Exact<{ username: Types.Scalars['String']['input']; @@ -16,7 +16,7 @@ export type AuthTokenQuery = { __typename: 'Queries', authToken: { __typename: ' export type MeQueryVariables = Types.Exact<{ [key: string]: never; }>; -export type MeQuery = { __typename: 'Queries', me: { __typename: 'UserNode', email?: string | null, language: Types.LanguageType, username: string, userId: string, firstName?: string | null, lastName?: string | null, phoneNumber?: string | null, jobTitle?: string | null, defaultStore?: { __typename: 'UserStoreNode', code: string, id: string, nameId: string, name: string, storeMode: Types.StoreModeNodeType, createdDate?: string | null, homeCurrencyCode?: string | null, isDisabled: boolean, preferences: { __typename: 'StorePreferenceNode', id: string, responseRequisitionRequiresAuthorisation: boolean, requestRequisitionRequiresAuthorisation: boolean, packToOne: boolean, omProgramModule: boolean, vaccineModule: boolean, issueInForeignCurrency: boolean, monthlyConsumptionLookBackPeriod: number, monthsLeadTime: number, monthsOverstock: number, monthsUnderstock: number, monthsItemsExpire: number, stocktakeFrequency: number } } | null, stores: { __typename: 'UserStoreConnector', totalCount: number, nodes: Array<{ __typename: 'UserStoreNode', code: string, id: string, nameId: string, name: string, storeMode: Types.StoreModeNodeType, createdDate?: string | null, homeCurrencyCode?: string | null, isDisabled: boolean, preferences: { __typename: 'StorePreferenceNode', id: string, responseRequisitionRequiresAuthorisation: boolean, requestRequisitionRequiresAuthorisation: boolean, packToOne: boolean, omProgramModule: boolean, vaccineModule: boolean, issueInForeignCurrency: boolean, monthlyConsumptionLookBackPeriod: number, monthsLeadTime: number, monthsOverstock: number, monthsUnderstock: number, monthsItemsExpire: number, stocktakeFrequency: number } }> } } }; +export type MeQuery = { __typename: 'Queries', me: { __typename: 'UserNode', email?: string | null, language: Types.LanguageType, username: string, userId: string, firstName?: string | null, lastName?: string | null, phoneNumber?: string | null, jobTitle?: string | null, defaultStore?: { __typename: 'UserStoreNode', code: string, id: string, nameId: string, name: string, storeMode: Types.StoreModeNodeType, createdDate?: string | null, homeCurrencyCode?: string | null, isDisabled: boolean, preferences: { __typename: 'StorePreferenceNode', id: string, responseRequisitionRequiresAuthorisation: boolean, requestRequisitionRequiresAuthorisation: boolean, packToOne: boolean, omProgramModule: boolean, vaccineModule: boolean, issueInForeignCurrency: boolean, monthlyConsumptionLookBackPeriod: number, monthsLeadTime: number, monthsOverstock: number, monthsUnderstock: number, monthsItemsExpire: number, stocktakeFrequency: number, extraFieldsInRequisition: boolean } } | null, stores: { __typename: 'UserStoreConnector', totalCount: number, nodes: Array<{ __typename: 'UserStoreNode', code: string, id: string, nameId: string, name: string, storeMode: Types.StoreModeNodeType, createdDate?: string | null, homeCurrencyCode?: string | null, isDisabled: boolean, preferences: { __typename: 'StorePreferenceNode', id: string, responseRequisitionRequiresAuthorisation: boolean, requestRequisitionRequiresAuthorisation: boolean, packToOne: boolean, omProgramModule: boolean, vaccineModule: boolean, issueInForeignCurrency: boolean, monthlyConsumptionLookBackPeriod: number, monthsLeadTime: number, monthsOverstock: number, monthsUnderstock: number, monthsItemsExpire: number, stocktakeFrequency: number, extraFieldsInRequisition: boolean } }> } } }; export type IsCentralServerQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -75,6 +75,7 @@ export const UserStoreNodeFragmentDoc = gql` monthsUnderstock monthsItemsExpire stocktakeFrequency + extraFieldsInRequisition } createdDate homeCurrencyCode diff --git a/client/packages/common/src/authentication/api/operations.graphql b/client/packages/common/src/authentication/api/operations.graphql index 0407136c61..549526ea96 100644 --- a/client/packages/common/src/authentication/api/operations.graphql +++ b/client/packages/common/src/authentication/api/operations.graphql @@ -18,6 +18,7 @@ fragment UserStoreNode on UserStoreNode { monthsUnderstock monthsItemsExpire stocktakeFrequency + extraFieldsInRequisition } createdDate homeCurrencyCode diff --git a/client/packages/common/src/types/schema.ts b/client/packages/common/src/types/schema.ts index 9cab1ca79b..255447a41b 100644 --- a/client/packages/common/src/types/schema.ts +++ b/client/packages/common/src/types/schema.ts @@ -2350,6 +2350,45 @@ export type InboundInvoiceCounts = { notDelivered: Scalars['Int']['output']; }; +export type IndicatorColumnNode = { + __typename: 'IndicatorColumnNode'; + columnNumber: Scalars['Int']['output']; + name: Scalars['String']['output']; + value?: Maybe; + valueType: IndicatorValueTypeNode; +}; + + +export type IndicatorColumnNodeValueArgs = { + customerNameLinkId: Scalars['String']['input']; + periodId: Scalars['String']['input']; + storeId: Scalars['String']['input']; +}; + +export type IndicatorLineNode = { + __typename: 'IndicatorLineNode'; + columns: Array; + line: IndicatorLineRowNode; +}; + +export type IndicatorLineRowNode = { + __typename: 'IndicatorLineRowNode'; + code: Scalars['String']['output']; + lineNumber: Scalars['Int']['output']; + name: Scalars['String']['output']; +}; + +export type IndicatorValueNode = { + __typename: 'IndicatorValueNode'; + id: Scalars['String']['output']; + value: Scalars['String']['output']; +}; + +export enum IndicatorValueTypeNode { + Number = 'NUMBER', + String = 'STRING' +} + export type InitialisationStatusNode = { __typename: 'InitialisationStatusNode'; siteName?: Maybe; @@ -4048,6 +4087,7 @@ export type Mutations = { updateInboundShipment: UpdateInboundShipmentResponse; updateInboundShipmentLine: UpdateInboundShipmentLineResponse; updateInboundShipmentServiceLine: UpdateInboundShipmentServiceLineResponse; + updateIndicatorValue: UpdateIndicatorValueResponse; updateLabelPrinterSettings: UpdateLabelPrinterSettingsResponse; updateLocation: UpdateLocationResponse; updateLogLevel: UpsertLogLevelResponse; @@ -4566,6 +4606,12 @@ export type MutationsUpdateInboundShipmentServiceLineArgs = { }; +export type MutationsUpdateIndicatorValueArgs = { + input: UpdateIndicatorValueInput; + storeId: Scalars['String']['input']; +}; + + export type MutationsUpdateLabelPrinterSettingsArgs = { input: LabelPrinterSettingsInput; }; @@ -5400,6 +5446,37 @@ export type ProgramFilterInput = { name?: InputMaybe; }; +export type ProgramIndicatorConnector = { + __typename: 'ProgramIndicatorConnector'; + nodes: Array; + totalCount: Scalars['Int']['output']; +}; + +export type ProgramIndicatorFilterInput = { + id?: InputMaybe; + programId?: InputMaybe; +}; + +export type ProgramIndicatorNode = { + __typename: 'ProgramIndicatorNode'; + code?: Maybe; + id: Scalars['String']['output']; + lineAndColumns: Array; + program: ProgramNode; +}; + +export type ProgramIndicatorResponse = ProgramIndicatorConnector; + +export enum ProgramIndicatorSortFieldInput { + Code = 'code', + ProgramId = 'programId' +} + +export type ProgramIndicatorSortInput = { + desc?: InputMaybe; + key: ProgramIndicatorSortFieldInput; +}; + export type ProgramNode = { __typename: 'ProgramNode'; id: Scalars['String']['output']; @@ -5564,6 +5641,7 @@ export type Queries = { plugins: Array; programEnrolments: ProgramEnrolmentResponse; programEvents: ProgramEventResponse; + programIndicators: ProgramIndicatorResponse; programs: ProgramsResponse; rAndRForm: RnRFormResponse; rAndRForms: RnRFormsResponse; @@ -6054,6 +6132,13 @@ export type QueriesProgramEventsArgs = { }; +export type QueriesProgramIndicatorsArgs = { + filter?: InputMaybe; + sort?: InputMaybe; + storeId: Scalars['String']['input']; +}; + + export type QueriesProgramsArgs = { filter?: InputMaybe; page?: InputMaybe; @@ -6341,7 +6426,7 @@ export type RecordBelongsToAnotherStore = DeleteAssetErrorInterface & DeleteAsse description: Scalars['String']['output']; }; -export type RecordNotFound = AddFromMasterListErrorInterface & AddToInboundShipmentFromMasterListErrorInterface & AddToOutboundShipmentFromMasterListErrorInterface & AllocateOutboundShipmentUnallocatedLineErrorInterface & CreateRequisitionShipmentErrorInterface & DeleteAssetCatalogueItemErrorInterface & DeleteAssetErrorInterface & DeleteAssetLogReasonErrorInterface & DeleteCustomerReturnErrorInterface & DeleteErrorInterface & DeleteInboundShipmentErrorInterface & DeleteInboundShipmentLineErrorInterface & DeleteInboundShipmentServiceLineErrorInterface & DeleteLocationErrorInterface & DeleteOutboundShipmentLineErrorInterface & DeleteOutboundShipmentServiceLineErrorInterface & DeleteOutboundShipmentUnallocatedLineErrorInterface & DeletePrescriptionErrorInterface & DeletePrescriptionLineErrorInterface & DeleteRequestRequisitionErrorInterface & DeleteRequestRequisitionLineErrorInterface & DeleteResponseRequisitionErrorInterface & DeleteResponseRequisitionLineErrorInterface & DeleteSupplierReturnErrorInterface & DeleteVaccineCourseErrorInterface & NodeErrorInterface & RequisitionLineChartErrorInterface & RequisitionLineStatsErrorInterface & ScannedDataParseErrorInterface & SupplyRequestedQuantityErrorInterface & UpdateAssetErrorInterface & UpdateErrorInterface & UpdateInboundShipmentErrorInterface & UpdateInboundShipmentLineErrorInterface & UpdateInboundShipmentServiceLineErrorInterface & UpdateLocationErrorInterface & UpdateNameErrorInterface & UpdateNamePropertiesErrorInterface & UpdateOutboundShipmentLineErrorInterface & UpdateOutboundShipmentServiceLineErrorInterface & UpdateOutboundShipmentUnallocatedLineErrorInterface & UpdatePrescriptionErrorInterface & UpdatePrescriptionLineErrorInterface & UpdateRequestRequisitionErrorInterface & UpdateRequestRequisitionLineErrorInterface & UpdateResponseRequisitionErrorInterface & UpdateResponseRequisitionLineErrorInterface & UpdateReturnOtherPartyErrorInterface & UpdateSensorErrorInterface & UpdateStockLineErrorInterface & UseSuggestedQuantityErrorInterface & { +export type RecordNotFound = AddFromMasterListErrorInterface & AddToInboundShipmentFromMasterListErrorInterface & AddToOutboundShipmentFromMasterListErrorInterface & AllocateOutboundShipmentUnallocatedLineErrorInterface & CreateRequisitionShipmentErrorInterface & DeleteAssetCatalogueItemErrorInterface & DeleteAssetErrorInterface & DeleteAssetLogReasonErrorInterface & DeleteCustomerReturnErrorInterface & DeleteErrorInterface & DeleteInboundShipmentErrorInterface & DeleteInboundShipmentLineErrorInterface & DeleteInboundShipmentServiceLineErrorInterface & DeleteLocationErrorInterface & DeleteOutboundShipmentLineErrorInterface & DeleteOutboundShipmentServiceLineErrorInterface & DeleteOutboundShipmentUnallocatedLineErrorInterface & DeletePrescriptionErrorInterface & DeletePrescriptionLineErrorInterface & DeleteRequestRequisitionErrorInterface & DeleteRequestRequisitionLineErrorInterface & DeleteResponseRequisitionErrorInterface & DeleteResponseRequisitionLineErrorInterface & DeleteSupplierReturnErrorInterface & DeleteVaccineCourseErrorInterface & NodeErrorInterface & RequisitionLineChartErrorInterface & RequisitionLineStatsErrorInterface & ScannedDataParseErrorInterface & SupplyRequestedQuantityErrorInterface & UpdateAssetErrorInterface & UpdateErrorInterface & UpdateInboundShipmentErrorInterface & UpdateInboundShipmentLineErrorInterface & UpdateInboundShipmentServiceLineErrorInterface & UpdateIndicatorValueErrorInterface & UpdateLocationErrorInterface & UpdateNameErrorInterface & UpdateNamePropertiesErrorInterface & UpdateOutboundShipmentLineErrorInterface & UpdateOutboundShipmentServiceLineErrorInterface & UpdateOutboundShipmentUnallocatedLineErrorInterface & UpdatePrescriptionErrorInterface & UpdatePrescriptionLineErrorInterface & UpdateRequestRequisitionErrorInterface & UpdateRequestRequisitionLineErrorInterface & UpdateResponseRequisitionErrorInterface & UpdateResponseRequisitionLineErrorInterface & UpdateReturnOtherPartyErrorInterface & UpdateSensorErrorInterface & UpdateStockLineErrorInterface & UseSuggestedQuantityErrorInterface & { __typename: 'RecordNotFound'; description: Scalars['String']['output']; }; @@ -7240,6 +7325,7 @@ export type StoreNodeNameArgs = { export type StorePreferenceNode = { __typename: 'StorePreferenceNode'; + extraFieldsInRequisition: Scalars['Boolean']['output']; id: Scalars['String']['output']; issueInForeignCurrency: Scalars['Boolean']['output']; monthlyConsumptionLookBackPeriod: Scalars['Float']['output']; @@ -7843,6 +7929,22 @@ export enum UpdateInboundShipmentStatusInput { Verified = 'VERIFIED' } +export type UpdateIndicatorValueError = { + __typename: 'UpdateIndicatorValueError'; + error: UpdateIndicatorValueErrorInterface; +}; + +export type UpdateIndicatorValueErrorInterface = { + description: Scalars['String']['output']; +}; + +export type UpdateIndicatorValueInput = { + id: Scalars['String']['input']; + value: Scalars['String']['input']; +}; + +export type UpdateIndicatorValueResponse = IndicatorValueNode | UpdateIndicatorValueError; + export type UpdateLabelPrinterSettingsError = { __typename: 'UpdateLabelPrinterSettingsError'; error: Scalars['String']['output'];