From 191272e8f048de8e5d1bbd0cafbc015473799b01 Mon Sep 17 00:00:00 2001 From: acaldas Date: Fri, 30 Aug 2024 21:03:13 +0100 Subject: [PATCH] feat: added operations and initialState to getDocument query --- .../graphql/server/generated/drive/nexus.ts | 2428 +++++++---------- .../server/generated/drive/schema.graphql | 3 + .../graphql/server/generated/index/nexus.ts | 13 + .../server/generated/index/schema.graphql | 5 + api/src/modules/budget-statement/resolvers.ts | 1 + api/src/modules/document-drive/resolvers.ts | 1 + api/src/modules/document/model.ts | 7 +- api/src/modules/document/resolvers.ts | 7 +- .../modules/real-world-assets/resolvers.ts | 133 +- api/src/modules/scope-framework/resolvers.ts | 1 + 10 files changed, 1112 insertions(+), 1487 deletions(-) diff --git a/api/src/graphql/server/generated/drive/nexus.ts b/api/src/graphql/server/generated/drive/nexus.ts index 89fceafa..071a4de1 100644 --- a/api/src/graphql/server/generated/drive/nexus.ts +++ b/api/src/graphql/server/generated/drive/nexus.ts @@ -3,29 +3,21 @@ * Do not make changes to this file directly */ -import type { connectionPluginCore, core } from 'nexus'; -import type { - ArgsValidationConfig, - HasTypeField -} from 'nexus-validation-plugin/utils'; -import type { FieldAuthorizeResolver } from 'nexus/dist/plugins/fieldAuthorizePlugin'; -import type { Context } from './../../drive/context'; + +import type { Context } from "./../../drive/context" +import type { FieldAuthorizeResolver } from "nexus/dist/plugins/fieldAuthorizePlugin" +import type { core, connectionPluginCore } from "nexus" +import type { ArgsValidationConfig, HasTypeField } from "nexus-validation-plugin/utils" declare global { interface NexusGenCustomInputMethods { /** * Date custom scalar type */ - date( - fieldName: FieldName, - opts?: core.CommonInputFieldConfig - ): void; // "Date"; + date(fieldName: FieldName, opts?: core.CommonInputFieldConfig): void // "Date"; /** * Attachment custom scalar type */ - attachment( - fieldName: FieldName, - opts?: core.CommonInputFieldConfig - ): void; // "Attachment"; + attachment(fieldName: FieldName, opts?: core.CommonInputFieldConfig): void // "Attachment"; } } declare global { @@ -33,17 +25,11 @@ declare global { /** * Date custom scalar type */ - date( - fieldName: FieldName, - ...opts: core.ScalarOutSpread - ): void; // "Date"; + date(fieldName: FieldName, ...opts: core.ScalarOutSpread): void // "Date"; /** * Attachment custom scalar type */ - attachment( - fieldName: FieldName, - ...opts: core.ScalarOutSpread - ): void; // "Attachment"; + attachment(fieldName: FieldName, ...opts: core.ScalarOutSpread): void // "Attachment"; /** * Adds a Relay-style connection to the type, with numerous options for configuration * @@ -52,45 +38,40 @@ declare global { connectionField( fieldName: FieldName, config: connectionPluginCore.ConnectionFieldConfig - ): void; + ): void } } + declare global { interface NexusGen extends NexusGenTypes {} } export interface NexusGenInputs { - InputListenerFilter: { - // input type + InputListenerFilter: { // input type branch?: Array | null; // [String] documentId?: Array | null; // [String] documentType?: Array | null; // [String] scope?: Array | null; // [String] - }; - InputOperationContext: { - // input type + } + InputOperationContext: { // input type signer?: NexusGenInputs['InputOperationSigner'] | null; // InputOperationSigner - }; - InputOperationSigner: { - // input type + } + InputOperationSigner: { // input type app: NexusGenInputs['InputOperationSignerApp']; // InputOperationSignerApp! signatures: string[][]; // [[String!]!]! user: NexusGenInputs['InputOperationSignerUser']; // InputOperationSignerUser! - }; - InputOperationSignerApp: { - // input type + } + InputOperationSignerApp: { // input type key: string; // String! name: string; // String! - }; - InputOperationSignerUser: { - // input type + } + InputOperationSignerUser: { // input type address: string; // String! chainId: number; // Int! networkId: string; // String! - }; - InputOperationUpdate: { - // input type + } + InputOperationUpdate: { // input type context?: NexusGenInputs['InputOperationContext'] | null; // InputOperationContext hash: string; // String! id?: string | null; // String @@ -99,116 +80,78 @@ export interface NexusGenInputs { skip?: number | null; // Int timestamp: string; // String! type: string; // String! - }; - InputStrandUpdate: { - // input type + } + InputStrandUpdate: { // input type branch: string; // String! documentId?: string | null; // String driveId: string; // String! operations: NexusGenInputs['InputOperationUpdate'][]; // [InputOperationUpdate!]! scope: string; // String! - }; - ListenerRevisionInput: { - // input type + } + ListenerRevisionInput: { // input type branch: string; // String! documentId: string; // String! driveId: string; // String! revision: number; // Int! scope: string; // String! status: NexusGenEnums['UpdateStatus']; // UpdateStatus! - }; - SessionInput: { - // input type + } + SessionInput: { // input type allowedOrigins: string; // String! expiryDurationSeconds?: number | null; // Int name: string; // String! - }; - SetEndInput: { - // input type + } + SetEndInput: { // input type end: string; // String! - }; - SetIdInput: { - // input type + } + SetIdInput: { // input type id: string; // ID! - }; - SetOwnerIdInput: { - // input type + } + SetOwnerIdInput: { // input type ownerId: string; // ID! - }; - SetOwnerTypeInput: { - // input type + } + SetOwnerTypeInput: { // input type ownerType: string; // String! - }; - SetPeriodInput: { - // input type + } + SetPeriodInput: { // input type period: string; // String! - }; - SetStartInput: { - // input type + } + SetStartInput: { // input type start: string; // String! - }; + } } export interface NexusGenEnums { - AssetType: 'Cash' | 'FixedIncome'; - AuditReportStatus: - | 'Approved' - | 'ApprovedWithComments' - | 'Escalated' - | 'NeedsAction'; - BudgetStatus: 'Draft' | 'Escalated' | 'Final' | 'Review'; - GroupTransactionType: - | 'AssetPurchase' - | 'AssetSale' - | 'FeesIncome' - | 'FeesPayment' - | 'InterestIncome' - | 'InterestPayment' - | 'PrincipalDraw' - | 'PrincipalReturn'; - ScopeFrameworkElementType: - | 'Article' - | 'Core' - | 'Scope' - | 'Section' - | 'TypeSpecification'; - TransmitterType: - | 'Internal' - | 'MatrixConnect' - | 'PullResponder' - | 'RESTWebhook' - | 'SecureConnect' - | 'SwitchboardPush'; - TriggerType: 'PullResponder'; - TypeSpecificationComponentCategory: - | 'Accessory' - | 'Immutable' - | 'Primary' - | 'Supporting'; - UpdateStatus: 'CONFLICT' | 'ERROR' | 'MISSING' | 'SUCCESS'; + AssetType: "Cash" | "FixedIncome" + AuditReportStatus: "Approved" | "ApprovedWithComments" | "Escalated" | "NeedsAction" + BudgetStatus: "Draft" | "Escalated" | "Final" | "Review" + GroupTransactionType: "AssetPurchase" | "AssetSale" | "FeesIncome" | "FeesPayment" | "InterestIncome" | "InterestPayment" | "PrincipalDraw" | "PrincipalReturn" + ScopeFrameworkElementType: "Article" | "Core" | "Scope" | "Section" | "TypeSpecification" + TransmitterType: "Internal" | "MatrixConnect" | "PullResponder" | "RESTWebhook" | "SecureConnect" | "SwitchboardPush" + TriggerType: "PullResponder" + TypeSpecificationComponentCategory: "Accessory" | "Immutable" | "Primary" | "Supporting" + UpdateStatus: "CONFLICT" | "ERROR" | "MISSING" | "SUCCESS" } export interface NexusGenScalars { - String: string; - Int: number; - Float: number; - Boolean: boolean; - ID: string; - Attachment: any; - Date: any; - DateTime: any; - Unknown: any; + String: string + Int: number + Float: number + Boolean: boolean + ID: string + Attachment: any + Date: any + DateTime: any + Unknown: any } export interface NexusGenObjects { - Account: { - // root type + Account: { // root type id: string; // ID! label?: string | null; // String reference: string; // String! - }; - AccountSnapshot: { - // root type + } + AccountSnapshot: { // root type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -217,12 +160,9 @@ export interface NexusGenObjects { operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['AccountSnapshotState']; // AccountSnapshotState! - }; - AccountSnapshotState: { - // root type - actualsComparison?: Array< - NexusGenRootTypes['ActualsComparison'] | null - > | null; // [ActualsComparison] + } + AccountSnapshotState: { // root type + actualsComparison?: Array | null; // [ActualsComparison] end?: string | null; // String id: string; // ID! ownerId?: string | null; // ID @@ -230,47 +170,38 @@ export interface NexusGenObjects { period?: string | null; // String snapshotAccount?: Array | null; // [SnapshotAccount] start?: string | null; // String - }; - ActualsComparison: { - // root type + } + ActualsComparison: { // root type currency?: string | null; // String month?: string | null; // String netExpenses?: NexusGenRootTypes['ActualsComparisonNetExpenses'] | null; // ActualsComparisonNetExpenses reportedActuals?: number | null; // Float - }; - ActualsComparisonNetExpenses: { - // root type - offChainIncluded?: - | NexusGenRootTypes['ActualsComparisonNetExpensesItem'] - | null; // ActualsComparisonNetExpensesItem + } + ActualsComparisonNetExpenses: { // root type + offChainIncluded?: NexusGenRootTypes['ActualsComparisonNetExpensesItem'] | null; // ActualsComparisonNetExpensesItem onChainOnly: NexusGenRootTypes['ActualsComparisonNetExpensesItem']; // ActualsComparisonNetExpensesItem! - }; - ActualsComparisonNetExpensesItem: { - // root type + } + ActualsComparisonNetExpensesItem: { // root type amount?: number | null; // Float difference?: number | null; // Float - }; - AddElementInput: { - // root type + } + AddElementInput: { // root type components?: NexusGenRootTypes['ElementComponents'] | null; // ElementComponents id: string; // String! name?: string | null; // String path: string; // String! type: NexusGenEnums['ScopeFrameworkElementType']; // ScopeFrameworkElementType! - }; - ArticleComponent: { - // root type + } + ArticleComponent: { // root type content?: string | null; // String - }; - AuditReport: { - // root type + } + AuditReport: { // root type report: NexusGenScalars['Attachment']; // Attachment! status: NexusGenEnums['AuditReportStatus']; // AuditReportStatus! timestamp: NexusGenScalars['Date']; // Date! - }; + } Auth: {}; - BaseTransaction: { - // root type + BaseTransaction: { // root type accountId?: string | null; // ID amount: number; // Float! assetId: string; // ID! @@ -280,26 +211,24 @@ export interface NexusGenObjects { id: string; // ID! settlementTime?: NexusGenScalars['DateTime'] | null; // DateTime tradeTime?: NexusGenScalars['DateTime'] | null; // DateTime - }; - BudgetStatement: { - // root type + } + BudgetStatement: { // root type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['BudgetStatementState']; // BudgetStatementState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['BudgetStatementState']; // BudgetStatementState! - }; - BudgetStatementAccount: { - // root type + } + BudgetStatementAccount: { // root type address: string; // String! lineItems: NexusGenRootTypes['LineItem'][]; // [LineItem!]! name: string; // String! - }; - BudgetStatementState: { - // root type + } + BudgetStatementState: { // root type accounts: NexusGenRootTypes['BudgetStatementAccount'][]; // [BudgetStatementAccount!]! auditReports: NexusGenRootTypes['AuditReport'][]; // [AuditReport!]! comments: NexusGenRootTypes['Comment'][]; // [Comment!]! @@ -308,42 +237,36 @@ export interface NexusGenObjects { owner?: NexusGenRootTypes['Owner'] | null; // Owner quoteCurrency?: string | null; // String vesting: NexusGenRootTypes['Vesting'][]; // [Vesting!]! - }; - Cash: { - // root type + } + Cash: { // root type balance: number; // Float! currency: string; // String! id: string; // ID! spvId: string; // ID! type: NexusGenEnums['AssetType']; // AssetType! - }; - Challenge: { - // root type + } + Challenge: { // root type hex: string; // String! message: string; // String! nonce: string; // String! - }; - Comment: { - // root type + } + Comment: { // root type author: NexusGenRootTypes['CommentAuthor']; // CommentAuthor! comment: string; // String! key: string; // String! status: NexusGenEnums['BudgetStatus']; // BudgetStatus! timestamp: NexusGenScalars['Date']; // Date! - }; - CommentAuthor: { - // root type + } + CommentAuthor: { // root type id?: string | null; // String ref?: string | null; // String roleLabel?: string | null; // String username?: string | null; // String - }; - CoreComponent: { - // root type + } + CoreComponent: { // root type content?: string | null; // String - }; - CoreUnit: { - // root type + } + CoreUnit: { // root type code?: string | null; // String descriptionParagraph?: string | null; // String descriptionParagraphImageSource?: string | null; // String @@ -352,9 +275,8 @@ export interface NexusGenObjects { imageSource?: string | null; // String name?: string | null; // String shortCode?: string | null; // String - }; - DefaultDocument: { - // root type + } + DefaultDocument: { // root type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -362,9 +284,8 @@ export interface NexusGenObjects { name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! - }; - DefaultOperation: { - // root type + } + DefaultOperation: { // root type hash: string; // String! id?: string | null; // String index: number; // Int! @@ -372,44 +293,40 @@ export interface NexusGenObjects { skip: number; // Int! timestamp: NexusGenScalars['Date']; // Date! type: string; // String! - }; - DocumentDrive: { - // root type + } + DocumentDrive: { // root type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['DocumentDriveState']; // DocumentDriveState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['DocumentDriveState']; // DocumentDriveState! - }; - DocumentDriveLocalState: { - // root type + } + DocumentDriveLocalState: { // root type availableOffline: boolean; // Boolean! listeners: NexusGenRootTypes['Listener'][]; // [Listener!]! sharingType?: string | null; // String triggers: NexusGenRootTypes['Trigger'][]; // [Trigger!]! - }; - DocumentDriveState: { - // root type + } + DocumentDriveState: { // root type icon?: string | null; // String id: string; // ID! name: string; // String! nodes: NexusGenRootTypes['Node'][]; // [Node!]! slug?: string | null; // String - }; - FileNode: { - // root type + } + FileNode: { // root type documentType: string; // String! id: string; // String! kind: string; // String! name: string; // String! parentFolder?: string | null; // String synchronizationUnits: NexusGenRootTypes['SynchronizationUnit'][]; // [SynchronizationUnit!]! - }; - FixedIncome: { - // root type + } + FixedIncome: { // root type CUSIP?: string | null; // String ISIN?: string | null; // String assetProceeds: number; // Float! @@ -427,31 +344,26 @@ export interface NexusGenObjects { spvId: string; // ID! totalDiscount: number; // Float! type: NexusGenEnums['AssetType']; // AssetType! - }; - FixedIncomeType: { - // root type + } + FixedIncomeType: { // root type id: string; // ID! name: string; // String! - }; - FolderNode: { - // root type + } + FolderNode: { // root type id: string; // String! kind: string; // String! name: string; // String! parentFolder?: string | null; // String - }; - Ftes: { - // root type + } + Ftes: { // root type forecast: NexusGenRootTypes['FtesForecast'][]; // [FtesForecast!]! value: number; // Float! - }; - FtesForecast: { - // root type + } + FtesForecast: { // root type month: string; // String! value: number; // Float! - }; - GroupTransaction: { - // root type + } + GroupTransaction: { // root type cashBalanceChange: number; // Float! cashTransaction: NexusGenRootTypes['BaseTransaction']; // BaseTransaction! entryTime: NexusGenScalars['DateTime']; // DateTime! @@ -462,9 +374,8 @@ export interface NexusGenObjects { txRef?: string | null; // String type: NexusGenEnums['GroupTransactionType']; // GroupTransactionType! unitPrice?: number | null; // Float - }; - LineItem: { - // root type + } + LineItem: { // root type actual?: number | null; // Float budgetCap?: number | null; // Float category?: NexusGenRootTypes['LineItemCategory'] | null; // LineItemCategory @@ -473,50 +384,43 @@ export interface NexusGenObjects { group?: NexusGenRootTypes['LineItemGroup'] | null; // LineItemGroup headcountExpense: boolean; // Boolean! payment?: number | null; // Float - }; - LineItemCategory: { - // root type + } + LineItemCategory: { // root type id: string; // String! ref: string; // String! title: string; // String! - }; - LineItemForecast: { - // root type + } + LineItemForecast: { // root type budgetCap: number; // Float! month: string; // String! value: number; // Float! - }; - LineItemGroup: { - // root type + } + LineItemGroup: { // root type color: string; // String! id: string; // String! ref: string; // String! title: string; // String! - }; - Listener: { - // root type + } + Listener: { // root type block: boolean; // Boolean! callInfo?: NexusGenRootTypes['ListenerCallInfo'] | null; // ListenerCallInfo filter: NexusGenRootTypes['ListenerFilter']; // ListenerFilter! label?: string | null; // String listenerId: string; // ID! system: boolean; // Boolean! - }; - ListenerCallInfo: { - // root type + } + ListenerCallInfo: { // root type data?: string | null; // String name?: string | null; // String transmitterType?: NexusGenEnums['TransmitterType'] | null; // TransmitterType - }; - ListenerFilter: { - // root type + } + ListenerFilter: { // root type branch?: string[] | null; // [String!] documentId?: string[] | null; // [ID!] documentType: string[]; // [String!]! scope?: string[] | null; // [String!] - }; - ListenerRevision: { - // root type + } + ListenerRevision: { // root type branch: string; // String! documentId?: string | null; // String driveId: string; // String! @@ -524,36 +428,30 @@ export interface NexusGenObjects { revision: number; // Int! scope: string; // String! status: NexusGenEnums['UpdateStatus']; // UpdateStatus! - }; - MoveElementInput: { - // root type + } + MoveElementInput: { // root type id: string; // ID! newParentId: string; // ID! - }; + } Mutation: {}; - OperationContext: { - // root type + OperationContext: { // root type signer?: NexusGenRootTypes['OperationSigner'] | null; // OperationSigner - }; - OperationSigner: { - // root type + } + OperationSigner: { // root type app: NexusGenRootTypes['OperationSignerApp']; // OperationSignerApp! signatures: string[][]; // [[String!]!]! user: NexusGenRootTypes['OperationSignerUser']; // OperationSignerUser! - }; - OperationSignerApp: { - // root type + } + OperationSignerApp: { // root type key: string; // String! name: string; // String! - }; - OperationSignerUser: { - // root type + } + OperationSignerUser: { // root type address: string; // String! chainId: number; // Int! networkId: string; // String! - }; - OperationUpdate: { - // root type + } + OperationUpdate: { // root type context?: NexusGenRootTypes['OperationContext'] | null; // OperationContext hash: string; // String! id?: string | null; // String @@ -562,22 +460,19 @@ export interface NexusGenObjects { skip: number; // Int! timestamp: string; // String! type: string; // String! - }; - Owner: { - // root type + } + Owner: { // root type id?: string | null; // String ref?: string | null; // String title?: string | null; // String - }; - PullResponderTriggerData: { - // root type + } + PullResponderTriggerData: { // root type interval: string; // String! listenerId: string; // ID! url: string; // String! - }; + } Query: {}; - RealWorldAssets: { - // root type + RealWorldAssets: { // root type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -587,9 +482,8 @@ export interface NexusGenObjects { operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['RealWorldAssetsState']; // RealWorldAssetsState! - }; - RealWorldAssetsState: { - // root type + } + RealWorldAssetsState: { // root type accounts: NexusGenRootTypes['Account'][]; // [Account!]! fixedIncomeTypes: NexusGenRootTypes['FixedIncomeType'][]; // [FixedIncomeType!]! portfolio: NexusGenRootTypes['Asset'][]; // [Asset!]! @@ -597,58 +491,50 @@ export interface NexusGenObjects { serviceProviderFeeTypes: NexusGenRootTypes['ServiceProviderFeeType'][]; // [ServiceProviderFeeType!]! spvs: NexusGenRootTypes['Spv'][]; // [Spv!]! transactions: NexusGenRootTypes['GroupTransaction'][]; // [GroupTransaction!]! - }; - RemoveElementInput: { - // root type + } + RemoveElementInput: { // root type id: string; // ID! - }; - ReorderElementsInput: { - // root type + } + ReorderElementsInput: { // root type order: string[]; // [ID!]! parentElementId: string; // ID! - }; - ScopeComponent: { - // root type + } + ScopeComponent: { // root type content?: string | null; // String - }; - ScopeFramework: { - // root type + } + ScopeFramework: { // root type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['ScopeFrameworkState']; // ScopeFrameworkState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['ScopeFrameworkState']; // ScopeFrameworkState! - }; - ScopeFrameworkElement: { - // root type + } + ScopeFrameworkElement: { // root type components?: NexusGenRootTypes['ElementComponents'] | null; // ElementComponents id: string; // ID! name?: string | null; // String path: string; // String! type?: NexusGenEnums['ScopeFrameworkElementType'] | null; // ScopeFrameworkElementType version: number; // Int! - }; - ScopeFrameworkState: { - // root type + } + ScopeFrameworkState: { // root type elements: NexusGenRootTypes['ScopeFrameworkElement'][]; // [ScopeFrameworkElement!]! rootPath: string; // String! - }; - SectionComponent: { - // root type + } + SectionComponent: { // root type content?: string | null; // String - }; - ServiceProviderFeeType: { - // root type + } + ServiceProviderFeeType: { // root type accountId: string; // ID! feeType: string; // String! id: string; // ID! name: string; // String! - }; - Session: { - // root type + } + Session: { // root type allowedOrigins?: string | null; // String createdAt: NexusGenScalars['Date']; // Date! createdBy: string; // String! @@ -658,34 +544,26 @@ export interface NexusGenObjects { referenceExpiryDate?: NexusGenScalars['Date'] | null; // Date referenceTokenId: string; // String! revokedAt?: NexusGenScalars['Date'] | null; // Date - }; - SessionOutput: { - // root type + } + SessionOutput: { // root type session: NexusGenRootTypes['Session']; // Session! token: string; // String! - }; - SetRootPathInput: { - // root type + } + SetRootPathInput: { // root type newRootPath: string; // String! - }; - SnapshotAccount: { - // root type + } + SnapshotAccount: { // root type accountAddress?: string | null; // String accountLabel?: string | null; // String accountType?: string | null; // String groupAccountId?: string | null; // ID id: string; // ID! offChain?: boolean | null; // Boolean - snapshotAccountBalance?: Array< - NexusGenRootTypes['SnapshotAccountBalance'] | null - > | null; // [SnapshotAccountBalance] - snapshotAccountTransaction?: Array< - NexusGenRootTypes['SnapshotAccountTransaction'] | null - > | null; // [SnapshotAccountTransaction] + snapshotAccountBalance?: Array | null; // [SnapshotAccountBalance] + snapshotAccountTransaction?: Array | null; // [SnapshotAccountTransaction] upstreamAccountId?: string | null; // ID - }; - SnapshotAccountBalance: { - // root type + } + SnapshotAccountBalance: { // root type id?: string | null; // ID includesOffChain?: boolean | null; // Boolean inflow?: number | null; // Float @@ -693,9 +571,8 @@ export interface NexusGenObjects { newBalance?: number | null; // Float outflow?: number | null; // Float token?: string | null; // String - }; - SnapshotAccountTransaction: { - // root type + } + SnapshotAccountTransaction: { // root type amount?: number | null; // Float block?: number | null; // Int counterParty?: string | null; // String @@ -705,72 +582,61 @@ export interface NexusGenObjects { token?: string | null; // String txHash?: string | null; // String txLabel?: string | null; // String - }; - Spv: { - // root type + } + Spv: { // root type id: string; // ID! name: string; // String! - }; - StrandUpdate: { - // root type + } + StrandUpdate: { // root type branch: string; // String! documentId: string; // String! driveId: string; // String! operations: NexusGenRootTypes['OperationUpdate'][]; // [OperationUpdate!]! scope: string; // String! - }; + } SwitchboardDrive: {}; SwitchboardHost: {}; Sync: {}; - SynchronizationUnit: { - // root type + SynchronizationUnit: { // root type branch: string; // String! scope: string; // String! syncId: string; // ID! - }; - TransactionFee: { - // root type + } + TransactionFee: { // root type amount: number; // Float! id: string; // ID! serviceProviderFeeTypeId: string; // ID! - }; - Trigger: { - // root type + } + Trigger: { // root type data?: NexusGenRootTypes['TriggerData'] | null; // TriggerData id: string; // ID! type: NexusGenEnums['TriggerType']; // TriggerType! - }; - TypeSpecificationComponent: { - // root type + } + TypeSpecificationComponent: { // root type additionalLogic?: string | null; // String category?: NexusGenEnums['TypeSpecificationComponentCategory'] | null; // TypeSpecificationComponentCategory documentIdentifierRules?: string | null; // String name?: string | null; // String overview?: string | null; // String typeAuthority?: string | null; // String - }; - UpdateElementComponentsInput: { - // root type + } + UpdateElementComponentsInput: { // root type components?: NexusGenRootTypes['ElementComponents'] | null; // ElementComponents id: string; // ID! - }; - UpdateElementNameInput: { - // root type + } + UpdateElementNameInput: { // root type id: string; // ID! name?: string | null; // String - }; - UpdateElementTypeInput: { - // root type + } + UpdateElementTypeInput: { // root type id: string; // ID! type: NexusGenEnums['ScopeFrameworkElementType']; // ScopeFrameworkElementType! - }; - User: { - // root type + } + User: { // root type address: string; // String! createdAt: NexusGenScalars['Date']; // Date! - }; - Vesting: { - // root type + } + Vesting: { // root type amount: string; // String! amountOld: string; // String! comment: string; // String! @@ -778,55 +644,33 @@ export interface NexusGenObjects { date: string; // String! key: string; // String! vested: boolean; // Boolean! - }; + } } export interface NexusGenInterfaces { - IDocument: - | NexusGenRootTypes['AccountSnapshot'] - | NexusGenRootTypes['BudgetStatement'] - | NexusGenRootTypes['DefaultDocument'] - | NexusGenRootTypes['DocumentDrive'] - | NexusGenRootTypes['RealWorldAssets'] - | NexusGenRootTypes['ScopeFramework']; + IDocument: NexusGenRootTypes['AccountSnapshot'] | NexusGenRootTypes['BudgetStatement'] | NexusGenRootTypes['DefaultDocument'] | NexusGenRootTypes['DocumentDrive'] | NexusGenRootTypes['RealWorldAssets'] | NexusGenRootTypes['ScopeFramework']; IOperation: NexusGenRootTypes['DefaultOperation']; - IRealWorldAssetsState: - | NexusGenRootTypes['RealWorldAssetsPortfolio'] - | NexusGenRootTypes['RealWorldAssetsState']; Node: NexusGenRootTypes['FileNode'] | NexusGenRootTypes['FolderNode']; - System: - | NexusGenRootTypes['SwitchboardDrive'] - | NexusGenRootTypes['SwitchboardHost']; + System: NexusGenRootTypes['SwitchboardDrive'] | NexusGenRootTypes['SwitchboardHost']; } export interface NexusGenUnions { Asset: NexusGenRootTypes['Cash'] | NexusGenRootTypes['FixedIncome']; - ElementComponents: - | NexusGenRootTypes['ArticleComponent'] - | NexusGenRootTypes['CoreComponent'] - | NexusGenRootTypes['ScopeComponent'] - | NexusGenRootTypes['SectionComponent'] - | NexusGenRootTypes['TypeSpecificationComponent']; + ElementComponents: NexusGenRootTypes['ArticleComponent'] | NexusGenRootTypes['CoreComponent'] | NexusGenRootTypes['ScopeComponent'] | NexusGenRootTypes['SectionComponent'] | NexusGenRootTypes['TypeSpecificationComponent']; TriggerData: NexusGenRootTypes['PullResponderTriggerData']; } -export type NexusGenRootTypes = NexusGenInterfaces & - NexusGenObjects & - NexusGenUnions; +export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions -export type NexusGenAllTypes = NexusGenRootTypes & - NexusGenScalars & - NexusGenEnums; +export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars & NexusGenEnums export interface NexusGenFieldTypes { - Account: { - // field return type + Account: { // field return type id: string; // ID! label: string | null; // String reference: string; // String! - }; - AccountSnapshot: { - // field return type + } + AccountSnapshot: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -835,12 +679,9 @@ export interface NexusGenFieldTypes { operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['AccountSnapshotState']; // AccountSnapshotState! - }; - AccountSnapshotState: { - // field return type - actualsComparison: Array< - NexusGenRootTypes['ActualsComparison'] | null - > | null; // [ActualsComparison] + } + AccountSnapshotState: { // field return type + actualsComparison: Array | null; // [ActualsComparison] end: string | null; // String id: string; // ID! ownerId: string | null; // ID @@ -848,51 +689,41 @@ export interface NexusGenFieldTypes { period: string | null; // String snapshotAccount: Array | null; // [SnapshotAccount] start: string | null; // String - }; - ActualsComparison: { - // field return type + } + ActualsComparison: { // field return type currency: string | null; // String month: string | null; // String netExpenses: NexusGenRootTypes['ActualsComparisonNetExpenses'] | null; // ActualsComparisonNetExpenses reportedActuals: number | null; // Float - }; - ActualsComparisonNetExpenses: { - // field return type - offChainIncluded: - | NexusGenRootTypes['ActualsComparisonNetExpensesItem'] - | null; // ActualsComparisonNetExpensesItem + } + ActualsComparisonNetExpenses: { // field return type + offChainIncluded: NexusGenRootTypes['ActualsComparisonNetExpensesItem'] | null; // ActualsComparisonNetExpensesItem onChainOnly: NexusGenRootTypes['ActualsComparisonNetExpensesItem']; // ActualsComparisonNetExpensesItem! - }; - ActualsComparisonNetExpensesItem: { - // field return type + } + ActualsComparisonNetExpensesItem: { // field return type amount: number | null; // Float difference: number | null; // Float - }; - AddElementInput: { - // field return type + } + AddElementInput: { // field return type components: NexusGenRootTypes['ElementComponents'] | null; // ElementComponents id: string; // String! name: string | null; // String path: string; // String! type: NexusGenEnums['ScopeFrameworkElementType']; // ScopeFrameworkElementType! - }; - ArticleComponent: { - // field return type + } + ArticleComponent: { // field return type content: string | null; // String - }; - AuditReport: { - // field return type + } + AuditReport: { // field return type report: NexusGenScalars['Attachment']; // Attachment! status: NexusGenEnums['AuditReportStatus']; // AuditReportStatus! timestamp: NexusGenScalars['Date']; // Date! - }; - Auth: { - // field return type + } + Auth: { // field return type me: NexusGenRootTypes['User'] | null; // User sessions: Array | null; // [Session] - }; - BaseTransaction: { - // field return type + } + BaseTransaction: { // field return type accountId: string | null; // ID amount: number; // Float! assetId: string; // ID! @@ -902,26 +733,24 @@ export interface NexusGenFieldTypes { id: string; // ID! settlementTime: NexusGenScalars['DateTime'] | null; // DateTime tradeTime: NexusGenScalars['DateTime'] | null; // DateTime - }; - BudgetStatement: { - // field return type + } + BudgetStatement: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['BudgetStatementState']; // BudgetStatementState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['BudgetStatementState']; // BudgetStatementState! - }; - BudgetStatementAccount: { - // field return type + } + BudgetStatementAccount: { // field return type address: string; // String! lineItems: NexusGenRootTypes['LineItem'][]; // [LineItem!]! name: string; // String! - }; - BudgetStatementState: { - // field return type + } + BudgetStatementState: { // field return type accounts: NexusGenRootTypes['BudgetStatementAccount'][]; // [BudgetStatementAccount!]! auditReports: NexusGenRootTypes['AuditReport'][]; // [AuditReport!]! comments: NexusGenRootTypes['Comment'][]; // [Comment!]! @@ -930,42 +759,36 @@ export interface NexusGenFieldTypes { owner: NexusGenRootTypes['Owner'] | null; // Owner quoteCurrency: string | null; // String vesting: NexusGenRootTypes['Vesting'][]; // [Vesting!]! - }; - Cash: { - // field return type + } + Cash: { // field return type balance: number; // Float! currency: string; // String! id: string; // ID! spvId: string; // ID! type: NexusGenEnums['AssetType']; // AssetType! - }; - Challenge: { - // field return type + } + Challenge: { // field return type hex: string; // String! message: string; // String! nonce: string; // String! - }; - Comment: { - // field return type + } + Comment: { // field return type author: NexusGenRootTypes['CommentAuthor']; // CommentAuthor! comment: string; // String! key: string; // String! status: NexusGenEnums['BudgetStatus']; // BudgetStatus! timestamp: NexusGenScalars['Date']; // Date! - }; - CommentAuthor: { - // field return type + } + CommentAuthor: { // field return type id: string | null; // String ref: string | null; // String roleLabel: string | null; // String username: string | null; // String - }; - CoreComponent: { - // field return type + } + CoreComponent: { // field return type content: string | null; // String - }; - CoreUnit: { - // field return type + } + CoreUnit: { // field return type code: string | null; // String descriptionParagraph: string | null; // String descriptionParagraphImageSource: string | null; // String @@ -974,9 +797,8 @@ export interface NexusGenFieldTypes { imageSource: string | null; // String name: string | null; // String shortCode: string | null; // String - }; - DefaultDocument: { - // field return type + } + DefaultDocument: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -984,9 +806,8 @@ export interface NexusGenFieldTypes { name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! - }; - DefaultOperation: { - // field return type + } + DefaultOperation: { // field return type hash: string; // String! id: string | null; // String index: number; // Int! @@ -994,44 +815,40 @@ export interface NexusGenFieldTypes { skip: number; // Int! timestamp: NexusGenScalars['Date']; // Date! type: string; // String! - }; - DocumentDrive: { - // field return type + } + DocumentDrive: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['DocumentDriveState']; // DocumentDriveState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['DocumentDriveState']; // DocumentDriveState! - }; - DocumentDriveLocalState: { - // field return type + } + DocumentDriveLocalState: { // field return type availableOffline: boolean; // Boolean! listeners: NexusGenRootTypes['Listener'][]; // [Listener!]! sharingType: string | null; // String triggers: NexusGenRootTypes['Trigger'][]; // [Trigger!]! - }; - DocumentDriveState: { - // field return type + } + DocumentDriveState: { // field return type icon: string | null; // String id: string; // ID! name: string; // String! nodes: NexusGenRootTypes['Node'][]; // [Node!]! slug: string | null; // String - }; - FileNode: { - // field return type + } + FileNode: { // field return type documentType: string; // String! id: string; // String! kind: string; // String! name: string; // String! parentFolder: string | null; // String synchronizationUnits: NexusGenRootTypes['SynchronizationUnit'][]; // [SynchronizationUnit!]! - }; - FixedIncome: { - // field return type + } + FixedIncome: { // field return type CUSIP: string | null; // String ISIN: string | null; // String assetProceeds: number; // Float! @@ -1049,31 +866,26 @@ export interface NexusGenFieldTypes { spvId: string; // ID! totalDiscount: number; // Float! type: NexusGenEnums['AssetType']; // AssetType! - }; - FixedIncomeType: { - // field return type + } + FixedIncomeType: { // field return type id: string; // ID! name: string; // String! - }; - FolderNode: { - // field return type + } + FolderNode: { // field return type id: string; // String! kind: string; // String! name: string; // String! parentFolder: string | null; // String - }; - Ftes: { - // field return type + } + Ftes: { // field return type forecast: NexusGenRootTypes['FtesForecast'][]; // [FtesForecast!]! value: number; // Float! - }; - FtesForecast: { - // field return type + } + FtesForecast: { // field return type month: string; // String! value: number; // Float! - }; - GroupTransaction: { - // field return type + } + GroupTransaction: { // field return type cashBalanceChange: number; // Float! cashTransaction: NexusGenRootTypes['BaseTransaction']; // BaseTransaction! entryTime: NexusGenScalars['DateTime']; // DateTime! @@ -1084,9 +896,8 @@ export interface NexusGenFieldTypes { txRef: string | null; // String type: NexusGenEnums['GroupTransactionType']; // GroupTransactionType! unitPrice: number | null; // Float - }; - LineItem: { - // field return type + } + LineItem: { // field return type actual: number | null; // Float budgetCap: number | null; // Float category: NexusGenRootTypes['LineItemCategory'] | null; // LineItemCategory @@ -1095,50 +906,43 @@ export interface NexusGenFieldTypes { group: NexusGenRootTypes['LineItemGroup'] | null; // LineItemGroup headcountExpense: boolean; // Boolean! payment: number | null; // Float - }; - LineItemCategory: { - // field return type + } + LineItemCategory: { // field return type id: string; // String! ref: string; // String! title: string; // String! - }; - LineItemForecast: { - // field return type + } + LineItemForecast: { // field return type budgetCap: number; // Float! month: string; // String! value: number; // Float! - }; - LineItemGroup: { - // field return type + } + LineItemGroup: { // field return type color: string; // String! id: string; // String! ref: string; // String! title: string; // String! - }; - Listener: { - // field return type + } + Listener: { // field return type block: boolean; // Boolean! callInfo: NexusGenRootTypes['ListenerCallInfo'] | null; // ListenerCallInfo filter: NexusGenRootTypes['ListenerFilter']; // ListenerFilter! label: string | null; // String listenerId: string; // ID! system: boolean; // Boolean! - }; - ListenerCallInfo: { - // field return type + } + ListenerCallInfo: { // field return type data: string | null; // String name: string | null; // String transmitterType: NexusGenEnums['TransmitterType'] | null; // TransmitterType - }; - ListenerFilter: { - // field return type + } + ListenerFilter: { // field return type branch: string[] | null; // [String!] documentId: string[] | null; // [ID!] documentType: string[]; // [String!]! scope: string[] | null; // [String!] - }; - ListenerRevision: { - // field return type + } + ListenerRevision: { // field return type branch: string; // String! documentId: string | null; // String driveId: string; // String! @@ -1146,14 +950,12 @@ export interface NexusGenFieldTypes { revision: number; // Int! scope: string; // String! status: NexusGenEnums['UpdateStatus']; // UpdateStatus! - }; - MoveElementInput: { - // field return type + } + MoveElementInput: { // field return type id: string; // ID! newParentId: string; // ID! - }; - Mutation: { - // field return type + } + Mutation: { // field return type acknowledge: boolean | null; // Boolean createChallenge: NexusGenRootTypes['Challenge'] | null; // Challenge createSession: NexusGenRootTypes['SessionOutput'] | null; // SessionOutput @@ -1162,30 +964,25 @@ export interface NexusGenFieldTypes { registerPullResponderListener: NexusGenRootTypes['Listener'] | null; // Listener revokeSession: NexusGenRootTypes['Session'] | null; // Session solveChallenge: NexusGenRootTypes['SessionOutput'] | null; // SessionOutput - }; - OperationContext: { - // field return type + } + OperationContext: { // field return type signer: NexusGenRootTypes['OperationSigner'] | null; // OperationSigner - }; - OperationSigner: { - // field return type + } + OperationSigner: { // field return type app: NexusGenRootTypes['OperationSignerApp']; // OperationSignerApp! signatures: string[][]; // [[String!]!]! user: NexusGenRootTypes['OperationSignerUser']; // OperationSignerUser! - }; - OperationSignerApp: { - // field return type + } + OperationSignerApp: { // field return type key: string; // String! name: string; // String! - }; - OperationSignerUser: { - // field return type + } + OperationSignerUser: { // field return type address: string; // String! chainId: number; // Int! networkId: string; // String! - }; - OperationUpdate: { - // field return type + } + OperationUpdate: { // field return type context: NexusGenRootTypes['OperationContext'] | null; // OperationContext hash: string; // String! id: string | null; // String @@ -1194,21 +991,18 @@ export interface NexusGenFieldTypes { skip: number; // Int! timestamp: string; // String! type: string; // String! - }; - Owner: { - // field return type + } + Owner: { // field return type id: string | null; // String ref: string | null; // String title: string | null; // String - }; - PullResponderTriggerData: { - // field return type + } + PullResponderTriggerData: { // field return type interval: string; // String! listenerId: string; // ID! url: string; // String! - }; - Query: { - // field return type + } + Query: { // field return type coreUnit: NexusGenRootTypes['CoreUnit'] | null; // CoreUnit coreUnits: Array | null; // [CoreUnit] document: NexusGenRootTypes['IDocument'] | null; // IDocument @@ -1216,9 +1010,8 @@ export interface NexusGenFieldTypes { drive: NexusGenRootTypes['DocumentDriveState'] | null; // DocumentDriveState rwaPortfolios: Array | null; // [RealWorldAssets] system: NexusGenRootTypes['SwitchboardDrive'] | null; // SwitchboardDrive - }; - RealWorldAssets: { - // field return type + } + RealWorldAssets: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -1228,9 +1021,8 @@ export interface NexusGenFieldTypes { operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['RealWorldAssetsState']; // RealWorldAssetsState! - }; - RealWorldAssetsState: { - // field return type + } + RealWorldAssetsState: { // field return type accounts: NexusGenRootTypes['Account'][]; // [Account!]! fixedIncomeTypes: NexusGenRootTypes['FixedIncomeType'][]; // [FixedIncomeType!]! portfolio: NexusGenRootTypes['Asset'][]; // [Asset!]! @@ -1238,58 +1030,50 @@ export interface NexusGenFieldTypes { serviceProviderFeeTypes: NexusGenRootTypes['ServiceProviderFeeType'][]; // [ServiceProviderFeeType!]! spvs: NexusGenRootTypes['Spv'][]; // [Spv!]! transactions: NexusGenRootTypes['GroupTransaction'][]; // [GroupTransaction!]! - }; - RemoveElementInput: { - // field return type + } + RemoveElementInput: { // field return type id: string; // ID! - }; - ReorderElementsInput: { - // field return type + } + ReorderElementsInput: { // field return type order: string[]; // [ID!]! parentElementId: string; // ID! - }; - ScopeComponent: { - // field return type + } + ScopeComponent: { // field return type content: string | null; // String - }; - ScopeFramework: { - // field return type + } + ScopeFramework: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['ScopeFrameworkState']; // ScopeFrameworkState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! state: NexusGenRootTypes['ScopeFrameworkState']; // ScopeFrameworkState! - }; - ScopeFrameworkElement: { - // field return type + } + ScopeFrameworkElement: { // field return type components: NexusGenRootTypes['ElementComponents'] | null; // ElementComponents id: string; // ID! name: string | null; // String path: string; // String! type: NexusGenEnums['ScopeFrameworkElementType'] | null; // ScopeFrameworkElementType version: number; // Int! - }; - ScopeFrameworkState: { - // field return type + } + ScopeFrameworkState: { // field return type elements: NexusGenRootTypes['ScopeFrameworkElement'][]; // [ScopeFrameworkElement!]! rootPath: string; // String! - }; - SectionComponent: { - // field return type + } + SectionComponent: { // field return type content: string | null; // String - }; - ServiceProviderFeeType: { - // field return type + } + ServiceProviderFeeType: { // field return type accountId: string; // ID! feeType: string; // String! id: string; // ID! name: string; // String! - }; - Session: { - // field return type + } + Session: { // field return type allowedOrigins: string | null; // String createdAt: NexusGenScalars['Date']; // Date! createdBy: string; // String! @@ -1299,34 +1083,26 @@ export interface NexusGenFieldTypes { referenceExpiryDate: NexusGenScalars['Date'] | null; // Date referenceTokenId: string; // String! revokedAt: NexusGenScalars['Date'] | null; // Date - }; - SessionOutput: { - // field return type + } + SessionOutput: { // field return type session: NexusGenRootTypes['Session']; // Session! token: string; // String! - }; - SetRootPathInput: { - // field return type + } + SetRootPathInput: { // field return type newRootPath: string; // String! - }; - SnapshotAccount: { - // field return type + } + SnapshotAccount: { // field return type accountAddress: string | null; // String accountLabel: string | null; // String accountType: string | null; // String groupAccountId: string | null; // ID id: string; // ID! offChain: boolean | null; // Boolean - snapshotAccountBalance: Array< - NexusGenRootTypes['SnapshotAccountBalance'] | null - > | null; // [SnapshotAccountBalance] - snapshotAccountTransaction: Array< - NexusGenRootTypes['SnapshotAccountTransaction'] | null - > | null; // [SnapshotAccountTransaction] + snapshotAccountBalance: Array | null; // [SnapshotAccountBalance] + snapshotAccountTransaction: Array | null; // [SnapshotAccountTransaction] upstreamAccountId: string | null; // ID - }; - SnapshotAccountBalance: { - // field return type + } + SnapshotAccountBalance: { // field return type id: string | null; // ID includesOffChain: boolean | null; // Boolean inflow: number | null; // Float @@ -1334,9 +1110,8 @@ export interface NexusGenFieldTypes { newBalance: number | null; // Float outflow: number | null; // Float token: string | null; // String - }; - SnapshotAccountTransaction: { - // field return type + } + SnapshotAccountTransaction: { // field return type amount: number | null; // Float block: number | null; // Int counterParty: string | null; // String @@ -1346,82 +1121,68 @@ export interface NexusGenFieldTypes { token: string | null; // String txHash: string | null; // String txLabel: string | null; // String - }; - Spv: { - // field return type + } + Spv: { // field return type id: string; // ID! name: string; // String! - }; - StrandUpdate: { - // field return type + } + StrandUpdate: { // field return type branch: string; // String! documentId: string; // String! driveId: string; // String! operations: NexusGenRootTypes['OperationUpdate'][]; // [OperationUpdate!]! scope: string; // String! - }; - SwitchboardDrive: { - // field return type + } + SwitchboardDrive: { // field return type auth: NexusGenRootTypes['Auth'] | null; // Auth sync: NexusGenRootTypes['Sync'] | null; // Sync - }; - SwitchboardHost: { - // field return type + } + SwitchboardHost: { // field return type auth: NexusGenRootTypes['Auth'] | null; // Auth - }; - Sync: { - // field return type + } + Sync: { // field return type strands: Array | null; // [StrandUpdate] - }; - SynchronizationUnit: { - // field return type + } + SynchronizationUnit: { // field return type branch: string; // String! scope: string; // String! syncId: string; // ID! - }; - TransactionFee: { - // field return type + } + TransactionFee: { // field return type amount: number; // Float! id: string; // ID! serviceProviderFeeTypeId: string; // ID! - }; - Trigger: { - // field return type + } + Trigger: { // field return type data: NexusGenRootTypes['TriggerData'] | null; // TriggerData id: string; // ID! type: NexusGenEnums['TriggerType']; // TriggerType! - }; - TypeSpecificationComponent: { - // field return type + } + TypeSpecificationComponent: { // field return type additionalLogic: string | null; // String category: NexusGenEnums['TypeSpecificationComponentCategory'] | null; // TypeSpecificationComponentCategory documentIdentifierRules: string | null; // String name: string | null; // String overview: string | null; // String typeAuthority: string | null; // String - }; - UpdateElementComponentsInput: { - // field return type + } + UpdateElementComponentsInput: { // field return type components: NexusGenRootTypes['ElementComponents'] | null; // ElementComponents id: string; // ID! - }; - UpdateElementNameInput: { - // field return type + } + UpdateElementNameInput: { // field return type id: string; // ID! name: string | null; // String - }; - UpdateElementTypeInput: { - // field return type + } + UpdateElementTypeInput: { // field return type id: string; // ID! type: NexusGenEnums['ScopeFrameworkElementType']; // ScopeFrameworkElementType! - }; - User: { - // field return type + } + User: { // field return type address: string; // String! createdAt: NexusGenScalars['Date']; // Date! - }; - Vesting: { - // field return type + } + Vesting: { // field return type amount: string; // String! amountOld: string; // String! comment: string; // String! @@ -1429,9 +1190,8 @@ export interface NexusGenFieldTypes { date: string; // String! key: string; // String! vested: boolean; // Boolean! - }; - IDocument: { - // field return type + } + IDocument: { // field return type created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! @@ -1439,9 +1199,8 @@ export interface NexusGenFieldTypes { name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! revision: number; // Int! - }; - IOperation: { - // field return type + } + IOperation: { // field return type hash: string; // String! id: string | null; // String index: number; // Int! @@ -1449,771 +1208,644 @@ export interface NexusGenFieldTypes { skip: number; // Int! timestamp: NexusGenScalars['Date']; // Date! type: string; // String! - }; - IRealWorldAssetsState: { - // field return type - accounts: NexusGenRootTypes['Account'][]; // [Account!]! - fixedIncomeTypes: NexusGenRootTypes['FixedIncomeType'][]; // [FixedIncomeType!]! - portfolio: NexusGenRootTypes['Asset'][]; // [Asset!]! - principalLenderAccountId: string; // ID! - serviceProviderFeeTypes: NexusGenRootTypes['ServiceProviderFeeType'][]; // [ServiceProviderFeeType!]! - spvs: NexusGenRootTypes['Spv'][]; // [Spv!]! - transactions: NexusGenRootTypes['GroupTransaction'][]; // [GroupTransaction!]! - }; - Node: { - // field return type + } + Node: { // field return type id: string; // String! kind: string; // String! name: string; // String! parentFolder: string | null; // String - }; - System: { - // field return type + } + System: { // field return type auth: NexusGenRootTypes['Auth'] | null; // Auth - }; + } } export interface NexusGenFieldTypeNames { - Account: { - // field return type name - id: 'ID'; - label: 'String'; - reference: 'String'; - }; - AccountSnapshot: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - state: 'AccountSnapshotState'; - }; - AccountSnapshotState: { - // field return type name - actualsComparison: 'ActualsComparison'; - end: 'String'; - id: 'ID'; - ownerId: 'ID'; - ownerType: 'String'; - period: 'String'; - snapshotAccount: 'SnapshotAccount'; - start: 'String'; - }; - ActualsComparison: { - // field return type name - currency: 'String'; - month: 'String'; - netExpenses: 'ActualsComparisonNetExpenses'; - reportedActuals: 'Float'; - }; - ActualsComparisonNetExpenses: { - // field return type name - offChainIncluded: 'ActualsComparisonNetExpensesItem'; - onChainOnly: 'ActualsComparisonNetExpensesItem'; - }; - ActualsComparisonNetExpensesItem: { - // field return type name - amount: 'Float'; - difference: 'Float'; - }; - AddElementInput: { - // field return type name - components: 'ElementComponents'; - id: 'String'; - name: 'String'; - path: 'String'; - type: 'ScopeFrameworkElementType'; - }; - ArticleComponent: { - // field return type name - content: 'String'; - }; - AuditReport: { - // field return type name - report: 'Attachment'; - status: 'AuditReportStatus'; - timestamp: 'Date'; - }; - Auth: { - // field return type name - me: 'User'; - sessions: 'Session'; - }; - BaseTransaction: { - // field return type name - accountId: 'ID'; - amount: 'Float'; - assetId: 'ID'; - assetType: 'AssetType'; - counterPartyAccountId: 'ID'; - entryTime: 'DateTime'; - id: 'ID'; - settlementTime: 'DateTime'; - tradeTime: 'DateTime'; - }; - BudgetStatement: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - state: 'BudgetStatementState'; - }; - BudgetStatementAccount: { - // field return type name - address: 'String'; - lineItems: 'LineItem'; - name: 'String'; - }; - BudgetStatementState: { - // field return type name - accounts: 'BudgetStatementAccount'; - auditReports: 'AuditReport'; - comments: 'Comment'; - ftes: 'Ftes'; - month: 'String'; - owner: 'Owner'; - quoteCurrency: 'String'; - vesting: 'Vesting'; - }; - Cash: { - // field return type name - balance: 'Float'; - currency: 'String'; - id: 'ID'; - spvId: 'ID'; - type: 'AssetType'; - }; - Challenge: { - // field return type name - hex: 'String'; - message: 'String'; - nonce: 'String'; - }; - Comment: { - // field return type name - author: 'CommentAuthor'; - comment: 'String'; - key: 'String'; - status: 'BudgetStatus'; - timestamp: 'Date'; - }; - CommentAuthor: { - // field return type name - id: 'String'; - ref: 'String'; - roleLabel: 'String'; - username: 'String'; - }; - CoreComponent: { - // field return type name - content: 'String'; - }; - CoreUnit: { - // field return type name - code: 'String'; - descriptionParagraph: 'String'; - descriptionParagraphImageSource: 'String'; - descriptionSentence: 'String'; - id: 'String'; - imageSource: 'String'; - name: 'String'; - shortCode: 'String'; - }; - DefaultDocument: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - }; - DefaultOperation: { - // field return type name - hash: 'String'; - id: 'String'; - index: 'Int'; - inputText: 'String'; - skip: 'Int'; - timestamp: 'Date'; - type: 'String'; - }; - DocumentDrive: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - state: 'DocumentDriveState'; - }; - DocumentDriveLocalState: { - // field return type name - availableOffline: 'Boolean'; - listeners: 'Listener'; - sharingType: 'String'; - triggers: 'Trigger'; - }; - DocumentDriveState: { - // field return type name - icon: 'String'; - id: 'ID'; - name: 'String'; - nodes: 'Node'; - slug: 'String'; - }; - FileNode: { - // field return type name - documentType: 'String'; - id: 'String'; - kind: 'String'; - name: 'String'; - parentFolder: 'String'; - synchronizationUnits: 'SynchronizationUnit'; - }; - FixedIncome: { - // field return type name - CUSIP: 'String'; - ISIN: 'String'; - assetProceeds: 'Float'; - coupon: 'Float'; - fixedIncomeTypeId: 'ID'; - id: 'ID'; - maturity: 'DateTime'; - name: 'String'; - notional: 'Float'; - purchaseDate: 'DateTime'; - purchasePrice: 'Float'; - purchaseProceeds: 'Float'; - realizedSurplus: 'Float'; - salesProceeds: 'Float'; - spvId: 'ID'; - totalDiscount: 'Float'; - type: 'AssetType'; - }; - FixedIncomeType: { - // field return type name - id: 'ID'; - name: 'String'; - }; - FolderNode: { - // field return type name - id: 'String'; - kind: 'String'; - name: 'String'; - parentFolder: 'String'; - }; - Ftes: { - // field return type name - forecast: 'FtesForecast'; - value: 'Float'; - }; - FtesForecast: { - // field return type name - month: 'String'; - value: 'Float'; - }; - GroupTransaction: { - // field return type name - cashBalanceChange: 'Float'; - cashTransaction: 'BaseTransaction'; - entryTime: 'DateTime'; - fees: 'TransactionFee'; - fixedIncomeTransaction: 'BaseTransaction'; - id: 'ID'; - serviceProviderFeeTypeId: 'ID'; - txRef: 'String'; - type: 'GroupTransactionType'; - unitPrice: 'Float'; - }; - LineItem: { - // field return type name - actual: 'Float'; - budgetCap: 'Float'; - category: 'LineItemCategory'; - comment: 'String'; - forecast: 'LineItemForecast'; - group: 'LineItemGroup'; - headcountExpense: 'Boolean'; - payment: 'Float'; - }; - LineItemCategory: { - // field return type name - id: 'String'; - ref: 'String'; - title: 'String'; - }; - LineItemForecast: { - // field return type name - budgetCap: 'Float'; - month: 'String'; - value: 'Float'; - }; - LineItemGroup: { - // field return type name - color: 'String'; - id: 'String'; - ref: 'String'; - title: 'String'; - }; - Listener: { - // field return type name - block: 'Boolean'; - callInfo: 'ListenerCallInfo'; - filter: 'ListenerFilter'; - label: 'String'; - listenerId: 'ID'; - system: 'Boolean'; - }; - ListenerCallInfo: { - // field return type name - data: 'String'; - name: 'String'; - transmitterType: 'TransmitterType'; - }; - ListenerFilter: { - // field return type name - branch: 'String'; - documentId: 'ID'; - documentType: 'String'; - scope: 'String'; - }; - ListenerRevision: { - // field return type name - branch: 'String'; - documentId: 'String'; - driveId: 'String'; - error: 'String'; - revision: 'Int'; - scope: 'String'; - status: 'UpdateStatus'; - }; - MoveElementInput: { - // field return type name - id: 'ID'; - newParentId: 'ID'; - }; - Mutation: { - // field return type name - acknowledge: 'Boolean'; - createChallenge: 'Challenge'; - createSession: 'SessionOutput'; - deletePullResponderListener: 'Boolean'; - pushUpdates: 'ListenerRevision'; - registerPullResponderListener: 'Listener'; - revokeSession: 'Session'; - solveChallenge: 'SessionOutput'; - }; - OperationContext: { - // field return type name - signer: 'OperationSigner'; - }; - OperationSigner: { - // field return type name - app: 'OperationSignerApp'; - signatures: 'String'; - user: 'OperationSignerUser'; - }; - OperationSignerApp: { - // field return type name - key: 'String'; - name: 'String'; - }; - OperationSignerUser: { - // field return type name - address: 'String'; - chainId: 'Int'; - networkId: 'String'; - }; - OperationUpdate: { - // field return type name - context: 'OperationContext'; - hash: 'String'; - id: 'String'; - index: 'Int'; - input: 'String'; - skip: 'Int'; - timestamp: 'String'; - type: 'String'; - }; - Owner: { - // field return type name - id: 'String'; - ref: 'String'; - title: 'String'; - }; - PullResponderTriggerData: { - // field return type name - interval: 'String'; - listenerId: 'ID'; - url: 'String'; - }; - Query: { - // field return type name - coreUnit: 'CoreUnit'; - coreUnits: 'CoreUnit'; - document: 'IDocument'; - documents: 'IDocument'; - drive: 'DocumentDriveState'; - rwaPortfolios: 'RealWorldAssets'; - system: 'SwitchboardDrive'; - }; - RealWorldAssets: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - initialState: 'RealWorldAssetsState'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - state: 'RealWorldAssetsState'; - }; - RealWorldAssetsState: { - // field return type name - accounts: 'Account'; - fixedIncomeTypes: 'FixedIncomeType'; - portfolio: 'Asset'; - principalLenderAccountId: 'ID'; - serviceProviderFeeTypes: 'ServiceProviderFeeType'; - spvs: 'Spv'; - transactions: 'GroupTransaction'; - }; - RemoveElementInput: { - // field return type name - id: 'ID'; - }; - ReorderElementsInput: { - // field return type name - order: 'ID'; - parentElementId: 'ID'; - }; - ScopeComponent: { - // field return type name - content: 'String'; - }; - ScopeFramework: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - state: 'ScopeFrameworkState'; - }; - ScopeFrameworkElement: { - // field return type name - components: 'ElementComponents'; - id: 'ID'; - name: 'String'; - path: 'String'; - type: 'ScopeFrameworkElementType'; - version: 'Int'; - }; - ScopeFrameworkState: { - // field return type name - elements: 'ScopeFrameworkElement'; - rootPath: 'String'; - }; - SectionComponent: { - // field return type name - content: 'String'; - }; - ServiceProviderFeeType: { - // field return type name - accountId: 'ID'; - feeType: 'String'; - id: 'ID'; - name: 'String'; - }; - Session: { - // field return type name - allowedOrigins: 'String'; - createdAt: 'Date'; - createdBy: 'String'; - id: 'String'; - isUserCreated: 'Boolean'; - name: 'String'; - referenceExpiryDate: 'Date'; - referenceTokenId: 'String'; - revokedAt: 'Date'; - }; - SessionOutput: { - // field return type name - session: 'Session'; - token: 'String'; - }; - SetRootPathInput: { - // field return type name - newRootPath: 'String'; - }; - SnapshotAccount: { - // field return type name - accountAddress: 'String'; - accountLabel: 'String'; - accountType: 'String'; - groupAccountId: 'ID'; - id: 'ID'; - offChain: 'Boolean'; - snapshotAccountBalance: 'SnapshotAccountBalance'; - snapshotAccountTransaction: 'SnapshotAccountTransaction'; - upstreamAccountId: 'ID'; - }; - SnapshotAccountBalance: { - // field return type name - id: 'ID'; - includesOffChain: 'Boolean'; - inflow: 'Float'; - initialBalance: 'Float'; - newBalance: 'Float'; - outflow: 'Float'; - token: 'String'; - }; - SnapshotAccountTransaction: { - // field return type name - amount: 'Float'; - block: 'Int'; - counterParty: 'String'; - counterPartyName: 'String'; - id: 'ID'; - timestamp: 'String'; - token: 'String'; - txHash: 'String'; - txLabel: 'String'; - }; - Spv: { - // field return type name - id: 'ID'; - name: 'String'; - }; - StrandUpdate: { - // field return type name - branch: 'String'; - documentId: 'String'; - driveId: 'String'; - operations: 'OperationUpdate'; - scope: 'String'; - }; - SwitchboardDrive: { - // field return type name - auth: 'Auth'; - sync: 'Sync'; - }; - SwitchboardHost: { - // field return type name - auth: 'Auth'; - }; - Sync: { - // field return type name - strands: 'StrandUpdate'; - }; - SynchronizationUnit: { - // field return type name - branch: 'String'; - scope: 'String'; - syncId: 'ID'; - }; - TransactionFee: { - // field return type name - amount: 'Float'; - id: 'ID'; - serviceProviderFeeTypeId: 'ID'; - }; - Trigger: { - // field return type name - data: 'TriggerData'; - id: 'ID'; - type: 'TriggerType'; - }; - TypeSpecificationComponent: { - // field return type name - additionalLogic: 'String'; - category: 'TypeSpecificationComponentCategory'; - documentIdentifierRules: 'String'; - name: 'String'; - overview: 'String'; - typeAuthority: 'String'; - }; - UpdateElementComponentsInput: { - // field return type name - components: 'ElementComponents'; - id: 'ID'; - }; - UpdateElementNameInput: { - // field return type name - id: 'ID'; - name: 'String'; - }; - UpdateElementTypeInput: { - // field return type name - id: 'ID'; - type: 'ScopeFrameworkElementType'; - }; - User: { - // field return type name - address: 'String'; - createdAt: 'Date'; - }; - Vesting: { - // field return type name - amount: 'String'; - amountOld: 'String'; - comment: 'String'; - currency: 'String'; - date: 'String'; - key: 'String'; - vested: 'Boolean'; - }; - IDocument: { - // field return type name - created: 'Date'; - documentType: 'String'; - id: 'String'; - lastModified: 'Date'; - name: 'String'; - operations: 'DefaultOperation'; - revision: 'Int'; - }; - IOperation: { - // field return type name - hash: 'String'; - id: 'String'; - index: 'Int'; - inputText: 'String'; - skip: 'Int'; - timestamp: 'Date'; - type: 'String'; - }; - IRealWorldAssetsState: { - // field return type name - accounts: 'Account'; - fixedIncomeTypes: 'FixedIncomeType'; - portfolio: 'Asset'; - principalLenderAccountId: 'ID'; - serviceProviderFeeTypes: 'ServiceProviderFeeType'; - spvs: 'Spv'; - transactions: 'GroupTransaction'; - }; - Node: { - // field return type name - id: 'String'; - kind: 'String'; - name: 'String'; - parentFolder: 'String'; - }; - System: { - // field return type name - auth: 'Auth'; - }; + Account: { // field return type name + id: 'ID' + label: 'String' + reference: 'String' + } + AccountSnapshot: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + state: 'AccountSnapshotState' + } + AccountSnapshotState: { // field return type name + actualsComparison: 'ActualsComparison' + end: 'String' + id: 'ID' + ownerId: 'ID' + ownerType: 'String' + period: 'String' + snapshotAccount: 'SnapshotAccount' + start: 'String' + } + ActualsComparison: { // field return type name + currency: 'String' + month: 'String' + netExpenses: 'ActualsComparisonNetExpenses' + reportedActuals: 'Float' + } + ActualsComparisonNetExpenses: { // field return type name + offChainIncluded: 'ActualsComparisonNetExpensesItem' + onChainOnly: 'ActualsComparisonNetExpensesItem' + } + ActualsComparisonNetExpensesItem: { // field return type name + amount: 'Float' + difference: 'Float' + } + AddElementInput: { // field return type name + components: 'ElementComponents' + id: 'String' + name: 'String' + path: 'String' + type: 'ScopeFrameworkElementType' + } + ArticleComponent: { // field return type name + content: 'String' + } + AuditReport: { // field return type name + report: 'Attachment' + status: 'AuditReportStatus' + timestamp: 'Date' + } + Auth: { // field return type name + me: 'User' + sessions: 'Session' + } + BaseTransaction: { // field return type name + accountId: 'ID' + amount: 'Float' + assetId: 'ID' + assetType: 'AssetType' + counterPartyAccountId: 'ID' + entryTime: 'DateTime' + id: 'ID' + settlementTime: 'DateTime' + tradeTime: 'DateTime' + } + BudgetStatement: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + initialState: 'BudgetStatementState' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + state: 'BudgetStatementState' + } + BudgetStatementAccount: { // field return type name + address: 'String' + lineItems: 'LineItem' + name: 'String' + } + BudgetStatementState: { // field return type name + accounts: 'BudgetStatementAccount' + auditReports: 'AuditReport' + comments: 'Comment' + ftes: 'Ftes' + month: 'String' + owner: 'Owner' + quoteCurrency: 'String' + vesting: 'Vesting' + } + Cash: { // field return type name + balance: 'Float' + currency: 'String' + id: 'ID' + spvId: 'ID' + type: 'AssetType' + } + Challenge: { // field return type name + hex: 'String' + message: 'String' + nonce: 'String' + } + Comment: { // field return type name + author: 'CommentAuthor' + comment: 'String' + key: 'String' + status: 'BudgetStatus' + timestamp: 'Date' + } + CommentAuthor: { // field return type name + id: 'String' + ref: 'String' + roleLabel: 'String' + username: 'String' + } + CoreComponent: { // field return type name + content: 'String' + } + CoreUnit: { // field return type name + code: 'String' + descriptionParagraph: 'String' + descriptionParagraphImageSource: 'String' + descriptionSentence: 'String' + id: 'String' + imageSource: 'String' + name: 'String' + shortCode: 'String' + } + DefaultDocument: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + } + DefaultOperation: { // field return type name + hash: 'String' + id: 'String' + index: 'Int' + inputText: 'String' + skip: 'Int' + timestamp: 'Date' + type: 'String' + } + DocumentDrive: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + initialState: 'DocumentDriveState' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + state: 'DocumentDriveState' + } + DocumentDriveLocalState: { // field return type name + availableOffline: 'Boolean' + listeners: 'Listener' + sharingType: 'String' + triggers: 'Trigger' + } + DocumentDriveState: { // field return type name + icon: 'String' + id: 'ID' + name: 'String' + nodes: 'Node' + slug: 'String' + } + FileNode: { // field return type name + documentType: 'String' + id: 'String' + kind: 'String' + name: 'String' + parentFolder: 'String' + synchronizationUnits: 'SynchronizationUnit' + } + FixedIncome: { // field return type name + CUSIP: 'String' + ISIN: 'String' + assetProceeds: 'Float' + coupon: 'Float' + fixedIncomeTypeId: 'ID' + id: 'ID' + maturity: 'DateTime' + name: 'String' + notional: 'Float' + purchaseDate: 'DateTime' + purchasePrice: 'Float' + purchaseProceeds: 'Float' + realizedSurplus: 'Float' + salesProceeds: 'Float' + spvId: 'ID' + totalDiscount: 'Float' + type: 'AssetType' + } + FixedIncomeType: { // field return type name + id: 'ID' + name: 'String' + } + FolderNode: { // field return type name + id: 'String' + kind: 'String' + name: 'String' + parentFolder: 'String' + } + Ftes: { // field return type name + forecast: 'FtesForecast' + value: 'Float' + } + FtesForecast: { // field return type name + month: 'String' + value: 'Float' + } + GroupTransaction: { // field return type name + cashBalanceChange: 'Float' + cashTransaction: 'BaseTransaction' + entryTime: 'DateTime' + fees: 'TransactionFee' + fixedIncomeTransaction: 'BaseTransaction' + id: 'ID' + serviceProviderFeeTypeId: 'ID' + txRef: 'String' + type: 'GroupTransactionType' + unitPrice: 'Float' + } + LineItem: { // field return type name + actual: 'Float' + budgetCap: 'Float' + category: 'LineItemCategory' + comment: 'String' + forecast: 'LineItemForecast' + group: 'LineItemGroup' + headcountExpense: 'Boolean' + payment: 'Float' + } + LineItemCategory: { // field return type name + id: 'String' + ref: 'String' + title: 'String' + } + LineItemForecast: { // field return type name + budgetCap: 'Float' + month: 'String' + value: 'Float' + } + LineItemGroup: { // field return type name + color: 'String' + id: 'String' + ref: 'String' + title: 'String' + } + Listener: { // field return type name + block: 'Boolean' + callInfo: 'ListenerCallInfo' + filter: 'ListenerFilter' + label: 'String' + listenerId: 'ID' + system: 'Boolean' + } + ListenerCallInfo: { // field return type name + data: 'String' + name: 'String' + transmitterType: 'TransmitterType' + } + ListenerFilter: { // field return type name + branch: 'String' + documentId: 'ID' + documentType: 'String' + scope: 'String' + } + ListenerRevision: { // field return type name + branch: 'String' + documentId: 'String' + driveId: 'String' + error: 'String' + revision: 'Int' + scope: 'String' + status: 'UpdateStatus' + } + MoveElementInput: { // field return type name + id: 'ID' + newParentId: 'ID' + } + Mutation: { // field return type name + acknowledge: 'Boolean' + createChallenge: 'Challenge' + createSession: 'SessionOutput' + deletePullResponderListener: 'Boolean' + pushUpdates: 'ListenerRevision' + registerPullResponderListener: 'Listener' + revokeSession: 'Session' + solveChallenge: 'SessionOutput' + } + OperationContext: { // field return type name + signer: 'OperationSigner' + } + OperationSigner: { // field return type name + app: 'OperationSignerApp' + signatures: 'String' + user: 'OperationSignerUser' + } + OperationSignerApp: { // field return type name + key: 'String' + name: 'String' + } + OperationSignerUser: { // field return type name + address: 'String' + chainId: 'Int' + networkId: 'String' + } + OperationUpdate: { // field return type name + context: 'OperationContext' + hash: 'String' + id: 'String' + index: 'Int' + input: 'String' + skip: 'Int' + timestamp: 'String' + type: 'String' + } + Owner: { // field return type name + id: 'String' + ref: 'String' + title: 'String' + } + PullResponderTriggerData: { // field return type name + interval: 'String' + listenerId: 'ID' + url: 'String' + } + Query: { // field return type name + coreUnit: 'CoreUnit' + coreUnits: 'CoreUnit' + document: 'IDocument' + documents: 'IDocument' + drive: 'DocumentDriveState' + rwaPortfolios: 'RealWorldAssets' + system: 'SwitchboardDrive' + } + RealWorldAssets: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + initialState: 'RealWorldAssetsState' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + state: 'RealWorldAssetsState' + } + RealWorldAssetsState: { // field return type name + accounts: 'Account' + fixedIncomeTypes: 'FixedIncomeType' + portfolio: 'Asset' + principalLenderAccountId: 'ID' + serviceProviderFeeTypes: 'ServiceProviderFeeType' + spvs: 'Spv' + transactions: 'GroupTransaction' + } + RemoveElementInput: { // field return type name + id: 'ID' + } + ReorderElementsInput: { // field return type name + order: 'ID' + parentElementId: 'ID' + } + ScopeComponent: { // field return type name + content: 'String' + } + ScopeFramework: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + initialState: 'ScopeFrameworkState' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + state: 'ScopeFrameworkState' + } + ScopeFrameworkElement: { // field return type name + components: 'ElementComponents' + id: 'ID' + name: 'String' + path: 'String' + type: 'ScopeFrameworkElementType' + version: 'Int' + } + ScopeFrameworkState: { // field return type name + elements: 'ScopeFrameworkElement' + rootPath: 'String' + } + SectionComponent: { // field return type name + content: 'String' + } + ServiceProviderFeeType: { // field return type name + accountId: 'ID' + feeType: 'String' + id: 'ID' + name: 'String' + } + Session: { // field return type name + allowedOrigins: 'String' + createdAt: 'Date' + createdBy: 'String' + id: 'String' + isUserCreated: 'Boolean' + name: 'String' + referenceExpiryDate: 'Date' + referenceTokenId: 'String' + revokedAt: 'Date' + } + SessionOutput: { // field return type name + session: 'Session' + token: 'String' + } + SetRootPathInput: { // field return type name + newRootPath: 'String' + } + SnapshotAccount: { // field return type name + accountAddress: 'String' + accountLabel: 'String' + accountType: 'String' + groupAccountId: 'ID' + id: 'ID' + offChain: 'Boolean' + snapshotAccountBalance: 'SnapshotAccountBalance' + snapshotAccountTransaction: 'SnapshotAccountTransaction' + upstreamAccountId: 'ID' + } + SnapshotAccountBalance: { // field return type name + id: 'ID' + includesOffChain: 'Boolean' + inflow: 'Float' + initialBalance: 'Float' + newBalance: 'Float' + outflow: 'Float' + token: 'String' + } + SnapshotAccountTransaction: { // field return type name + amount: 'Float' + block: 'Int' + counterParty: 'String' + counterPartyName: 'String' + id: 'ID' + timestamp: 'String' + token: 'String' + txHash: 'String' + txLabel: 'String' + } + Spv: { // field return type name + id: 'ID' + name: 'String' + } + StrandUpdate: { // field return type name + branch: 'String' + documentId: 'String' + driveId: 'String' + operations: 'OperationUpdate' + scope: 'String' + } + SwitchboardDrive: { // field return type name + auth: 'Auth' + sync: 'Sync' + } + SwitchboardHost: { // field return type name + auth: 'Auth' + } + Sync: { // field return type name + strands: 'StrandUpdate' + } + SynchronizationUnit: { // field return type name + branch: 'String' + scope: 'String' + syncId: 'ID' + } + TransactionFee: { // field return type name + amount: 'Float' + id: 'ID' + serviceProviderFeeTypeId: 'ID' + } + Trigger: { // field return type name + data: 'TriggerData' + id: 'ID' + type: 'TriggerType' + } + TypeSpecificationComponent: { // field return type name + additionalLogic: 'String' + category: 'TypeSpecificationComponentCategory' + documentIdentifierRules: 'String' + name: 'String' + overview: 'String' + typeAuthority: 'String' + } + UpdateElementComponentsInput: { // field return type name + components: 'ElementComponents' + id: 'ID' + } + UpdateElementNameInput: { // field return type name + id: 'ID' + name: 'String' + } + UpdateElementTypeInput: { // field return type name + id: 'ID' + type: 'ScopeFrameworkElementType' + } + User: { // field return type name + address: 'String' + createdAt: 'Date' + } + Vesting: { // field return type name + amount: 'String' + amountOld: 'String' + comment: 'String' + currency: 'String' + date: 'String' + key: 'String' + vested: 'Boolean' + } + IDocument: { // field return type name + created: 'Date' + documentType: 'String' + id: 'String' + lastModified: 'Date' + name: 'String' + operations: 'DefaultOperation' + revision: 'Int' + } + IOperation: { // field return type name + hash: 'String' + id: 'String' + index: 'Int' + inputText: 'String' + skip: 'Int' + timestamp: 'Date' + type: 'String' + } + Node: { // field return type name + id: 'String' + kind: 'String' + name: 'String' + parentFolder: 'String' + } + System: { // field return type name + auth: 'Auth' + } } export interface NexusGenArgTypes { Mutation: { - acknowledge: { - // args + acknowledge: { // args listenerId: string; // String! revisions?: Array | null; // [ListenerRevisionInput] - }; - createChallenge: { - // args + } + createChallenge: { // args address: string; // String! - }; - createSession: { - // args + } + createSession: { // args session: NexusGenInputs['SessionInput']; // SessionInput! - }; - deletePullResponderListener: { - // args + } + deletePullResponderListener: { // args listenerId: string; // String! - }; - pushUpdates: { - // args + } + pushUpdates: { // args strands?: NexusGenInputs['InputStrandUpdate'][] | null; // [InputStrandUpdate!] - }; - registerPullResponderListener: { - // args + } + registerPullResponderListener: { // args filter: NexusGenInputs['InputListenerFilter']; // InputListenerFilter! - }; - revokeSession: { - // args + } + revokeSession: { // args sessionId: string; // String! - }; - solveChallenge: { - // args + } + solveChallenge: { // args nonce: string; // String! signature: string; // String! - }; - }; + } + } Query: { - coreUnit: { - // args + coreUnit: { // args id?: string | null; // String - }; - document: { - // args + } + document: { // args id: string; // String! - }; - rwaPortfolios: { - // args + } + rwaPortfolios: { // args id?: string | null; // String - }; - }; + } + } Sync: { - strands: { - // args + strands: { // args listenerId?: string | null; // ID since?: NexusGenScalars['Date'] | null; // Date - }; - }; + } + } } export interface NexusGenAbstractTypeMembers { - Asset: 'Cash' | 'FixedIncome'; - ElementComponents: - | 'ArticleComponent' - | 'CoreComponent' - | 'ScopeComponent' - | 'SectionComponent' - | 'TypeSpecificationComponent'; - TriggerData: 'PullResponderTriggerData'; - IDocument: - | 'AccountSnapshot' - | 'BudgetStatement' - | 'DefaultDocument' - | 'DocumentDrive' - | 'RealWorldAssets' - | 'ScopeFramework'; - IOperation: 'DefaultOperation'; - IRealWorldAssetsState: 'RealWorldAssetsPortfolio' | 'RealWorldAssetsState'; - Node: 'FileNode' | 'FolderNode'; - System: 'SwitchboardDrive' | 'SwitchboardHost'; + Asset: "Cash" | "FixedIncome" + ElementComponents: "ArticleComponent" | "CoreComponent" | "ScopeComponent" | "SectionComponent" | "TypeSpecificationComponent" + TriggerData: "PullResponderTriggerData" + IDocument: "AccountSnapshot" | "BudgetStatement" | "DefaultDocument" | "DocumentDrive" | "RealWorldAssets" | "ScopeFramework" + IOperation: "DefaultOperation" + Node: "FileNode" | "FolderNode" + System: "SwitchboardDrive" | "SwitchboardHost" } export interface NexusGenTypeInterfaces { - AccountSnapshot: 'IDocument'; - BudgetStatement: 'IDocument'; - DefaultDocument: 'IDocument'; - DefaultOperation: 'IOperation'; - DocumentDrive: 'IDocument'; - FileNode: 'Node'; - FolderNode: 'Node'; - RealWorldAssets: 'IDocument'; - ScopeFramework: 'IDocument'; - SwitchboardDrive: 'System'; - SwitchboardHost: 'System'; + AccountSnapshot: "IDocument" + BudgetStatement: "IDocument" + DefaultDocument: "IDocument" + DefaultOperation: "IOperation" + DocumentDrive: "IDocument" + FileNode: "Node" + FolderNode: "Node" + RealWorldAssets: "IDocument" + ScopeFramework: "IDocument" + SwitchboardDrive: "System" + SwitchboardHost: "System" } export type NexusGenObjectNames = keyof NexusGenObjects; @@ -2230,23 +1862,15 @@ export type NexusGenUnionNames = keyof NexusGenUnions; export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; -export type NexusGenAbstractsUsingStrategyResolveType = - | 'Asset' - | 'ElementComponents' - | 'IDocument' - | 'IOperation' - | 'IRealWorldAssetsState' - | 'Node' - | 'System' - | 'TriggerData'; +export type NexusGenAbstractsUsingStrategyResolveType = "Asset" | "ElementComponents" | "IDocument" | "IOperation" | "Node" | "System" | "TriggerData"; export type NexusGenFeaturesConfig = { abstractTypeStrategies: { - isTypeOf: false; - resolveType: true; - __typename: false; - }; -}; + isTypeOf: false + resolveType: true + __typename: false + } +} export interface NexusGenTypes { context: Context; @@ -2264,19 +1888,9 @@ export interface NexusGenTypes { interfaceNames: NexusGenInterfaceNames; scalarNames: NexusGenScalarNames; unionNames: NexusGenUnionNames; - allInputTypes: - | NexusGenTypes['inputNames'] - | NexusGenTypes['enumNames'] - | NexusGenTypes['scalarNames']; - allOutputTypes: - | NexusGenTypes['objectNames'] - | NexusGenTypes['enumNames'] - | NexusGenTypes['unionNames'] - | NexusGenTypes['interfaceNames'] - | NexusGenTypes['scalarNames']; - allNamedTypes: - | NexusGenTypes['allInputTypes'] - | NexusGenTypes['allOutputTypes']; + allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames']; + allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames']; + allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames']; abstractTypeMembers: NexusGenAbstractTypeMembers; objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf; @@ -2284,13 +1898,13 @@ export interface NexusGenTypes { features: NexusGenFeaturesConfig; } + declare global { - interface NexusGenPluginTypeConfig {} - interface NexusGenPluginInputTypeConfig {} - interface NexusGenPluginFieldConfig< - TypeName extends string, - FieldName extends string - > { + interface NexusGenPluginTypeConfig { + } + interface NexusGenPluginInputTypeConfig { + } + interface NexusGenPluginFieldConfig { /** * Authorization for an individual field. Returning "true" * or "Promise" means the field can be accessed. @@ -2299,19 +1913,21 @@ declare global { * Returning or throwing an error will also prevent the * resolver from executing. */ - authorize?: FieldAuthorizeResolver; - + authorize?: FieldAuthorizeResolver + /** * Async validation function. Reject when validation fails. Resolve otherwise. */ - validate?: NexusGenArgTypes extends HasTypeField - ? ArgsValidationConfig - : never; - } - interface NexusGenPluginInputFieldConfig< - TypeName extends string, - FieldName extends string - > {} - interface NexusGenPluginSchemaConfig {} - interface NexusGenPluginArgConfig {} -} + validate?: + NexusGenArgTypes extends HasTypeField + ? ArgsValidationConfig + : never + + } + interface NexusGenPluginInputFieldConfig { + } + interface NexusGenPluginSchemaConfig { + } + interface NexusGenPluginArgConfig { + } +} \ No newline at end of file diff --git a/api/src/graphql/server/generated/drive/schema.graphql b/api/src/graphql/server/generated/drive/schema.graphql index d19b968a..82aa9561 100644 --- a/api/src/graphql/server/generated/drive/schema.graphql +++ b/api/src/graphql/server/generated/drive/schema.graphql @@ -103,6 +103,7 @@ type BudgetStatement implements IDocument { created: Date! documentType: String! id: String! + initialState: BudgetStatementState! lastModified: Date! name: String! operations: [DefaultOperation!]! @@ -207,6 +208,7 @@ type DocumentDrive implements IDocument { created: Date! documentType: String! id: String! + initialState: DocumentDriveState! lastModified: Date! name: String! operations: [DefaultOperation!]! @@ -560,6 +562,7 @@ type ScopeFramework implements IDocument { created: Date! documentType: String! id: String! + initialState: ScopeFrameworkState! lastModified: Date! name: String! operations: [DefaultOperation!]! diff --git a/api/src/graphql/server/generated/index/nexus.ts b/api/src/graphql/server/generated/index/nexus.ts index 2126c927..16488e0c 100644 --- a/api/src/graphql/server/generated/index/nexus.ts +++ b/api/src/graphql/server/generated/index/nexus.ts @@ -109,6 +109,8 @@ export interface NexusGenObjects { hash: string; // String! id?: string | null; // String index: number; // Int! + inputText: string; // String! + skip: number; // Int! timestamp: NexusGenScalars['Date']; // Date! type: string; // String! } @@ -116,6 +118,7 @@ export interface NexusGenObjects { created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['DocumentDriveState']; // DocumentDriveState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! @@ -250,6 +253,8 @@ export interface NexusGenFieldTypes { hash: string; // String! id: string | null; // String index: number; // Int! + inputText: string; // String! + skip: number; // Int! timestamp: NexusGenScalars['Date']; // Date! type: string; // String! } @@ -257,6 +262,7 @@ export interface NexusGenFieldTypes { created: NexusGenScalars['Date']; // Date! documentType: string; // String! id: string; // String! + initialState: NexusGenRootTypes['DocumentDriveState']; // DocumentDriveState! lastModified: NexusGenScalars['Date']; // Date! name: string; // String! operations: NexusGenRootTypes['DefaultOperation'][]; // [DefaultOperation!]! @@ -376,6 +382,8 @@ export interface NexusGenFieldTypes { hash: string; // String! id: string | null; // String index: number; // Int! + inputText: string; // String! + skip: number; // Int! timestamp: NexusGenScalars['Date']; // Date! type: string; // String! } @@ -418,6 +426,8 @@ export interface NexusGenFieldTypeNames { hash: 'String' id: 'String' index: 'Int' + inputText: 'String' + skip: 'Int' timestamp: 'Date' type: 'String' } @@ -425,6 +435,7 @@ export interface NexusGenFieldTypeNames { created: 'Date' documentType: 'String' id: 'String' + initialState: 'DocumentDriveState' lastModified: 'Date' name: 'String' operations: 'DefaultOperation' @@ -544,6 +555,8 @@ export interface NexusGenFieldTypeNames { hash: 'String' id: 'String' index: 'Int' + inputText: 'String' + skip: 'Int' timestamp: 'Date' type: 'String' } diff --git a/api/src/graphql/server/generated/index/schema.graphql b/api/src/graphql/server/generated/index/schema.graphql index 1e89161e..683d2768 100644 --- a/api/src/graphql/server/generated/index/schema.graphql +++ b/api/src/graphql/server/generated/index/schema.graphql @@ -39,6 +39,8 @@ type DefaultOperation implements IOperation { hash: String! id: String index: Int! + inputText: String! + skip: Int! timestamp: Date! type: String! } @@ -47,6 +49,7 @@ type DocumentDrive implements IDocument { created: Date! documentType: String! id: String! + initialState: DocumentDriveState! lastModified: Date! name: String! operations: [DefaultOperation!]! @@ -111,6 +114,8 @@ interface IOperation { hash: String! id: String index: Int! + inputText: String! + skip: Int! timestamp: Date! type: String! } diff --git a/api/src/modules/budget-statement/resolvers.ts b/api/src/modules/budget-statement/resolvers.ts index 8506719b..c114bd97 100644 --- a/api/src/modules/budget-statement/resolvers.ts +++ b/api/src/modules/budget-statement/resolvers.ts @@ -137,5 +137,6 @@ export const BudgetStatementDocument = objectType({ definition(t) { t.implements(documentModelInterface); t.nonNull.field('state', { type: BudgetStatementState }); + t.nonNull.field('initialState', { type: BudgetStatementState }); } }); diff --git a/api/src/modules/document-drive/resolvers.ts b/api/src/modules/document-drive/resolvers.ts index fe02ef93..3202d337 100644 --- a/api/src/modules/document-drive/resolvers.ts +++ b/api/src/modules/document-drive/resolvers.ts @@ -156,5 +156,6 @@ export const DocumentDriveDocument = objectType({ definition(t) { t.implements(documentModelInterface); t.nonNull.field('state', { type: DocumentDriveState }); + t.nonNull.field('initialState', { type: DocumentDriveState }); } }); diff --git a/api/src/modules/document/model.ts b/api/src/modules/document/model.ts index 85a38d26..0ad2e5cf 100644 --- a/api/src/modules/document/model.ts +++ b/api/src/modules/document/model.ts @@ -263,7 +263,12 @@ export function getDocumentDriveCRUD(prisma: Prisma.TransactionClient) { id: documentId, revision: document.revision.global, state: document.state.global, - operations: document.operations.global + operations: document.operations.global.map(op => ({ + ...op, + inputText: + typeof op.input === 'string' ? op.input : JSON.stringify(op.input) + })), + initialState: document.initialState.state.global }; return response; }, diff --git a/api/src/modules/document/resolvers.ts b/api/src/modules/document/resolvers.ts index 5e3576d3..b041a09b 100644 --- a/api/src/modules/document/resolvers.ts +++ b/api/src/modules/document/resolvers.ts @@ -11,9 +11,11 @@ export const operationModelInterface = interfaceType({ definition(t) { t.nonNull.string('type'); t.nonNull.int('index'); + t.nonNull.int('skip'); t.nonNull.field('timestamp', { type: GQLDateBase }); t.nonNull.string('hash'); t.string('id'); + t.nonNull.string('inputText'); }, resolveType: e => { return 'DefaultOperation'; @@ -85,13 +87,12 @@ export const documentsQuery = queryField('documents', { try { const docIds = await ctx.prisma.document.getDocuments(ctx.driveId); const docs = await Promise.all( - docIds.map(doc => { - return ctx.prisma.document.getDocument(ctx.driveId!, doc); - }) + docIds.map(doc => ctx.prisma.document.getDocument(ctx.driveId!, doc)) ); return docs; } catch (e: any) { logger.error({ msg: e.message }); + throw e; } } }); diff --git a/api/src/modules/real-world-assets/resolvers.ts b/api/src/modules/real-world-assets/resolvers.ts index 2d5fbafe..169ff8bb 100644 --- a/api/src/modules/real-world-assets/resolvers.ts +++ b/api/src/modules/real-world-assets/resolvers.ts @@ -1,17 +1,21 @@ +/* eslint-disable @typescript-eslint/no-use-before-define */ import { enumType, - interfaceType, list, objectType, queryField, + scalarType, stringArg, unionType } from 'nexus'; + +import { utils } from 'document-model-libs/real-world-assets'; import { getChildLogger } from '../../logger'; -import { documentModelInterface } from '../document'; -import { GQLDateBase } from '../system'; +import { documentModelInterface } from '../document/resolvers'; -const logger = getChildLogger({ msgPrefix: 'REAL WORLD ASSETS RESOLVER' }); +export const logger = getChildLogger({ + msgPrefix: 'REAL WORLD ASSETS RESOLVER' +}); export const Account = objectType({ name: 'Account', @@ -28,9 +32,9 @@ export const BaseTransaction = objectType({ t.nonNull.field('assetType', { type: AssetType }); t.nonNull.id('assetId'); t.nonNull.float('amount'); - t.nonNull.field('entryTime', { type: GQLDateBase }); - t.field('tradeTime', { type: GQLDateBase }); - t.field('settlementTime', { type: GQLDateBase }); + t.nonNull.field('entryTime', { type: DateTime }); + t.field('tradeTime', { type: DateTime }); + t.field('settlementTime', { type: DateTime }); t.id('accountId'); t.id('counterPartyAccountId'); } @@ -39,69 +43,47 @@ export const Cash = objectType({ name: 'Cash', definition(t) { t.nonNull.id('id'); - t.id('spvId'); - t.field('spv', { type: Spv }); + t.nonNull.field('type', { type: AssetType }); + t.nonNull.id('spvId'); t.nonNull.string('currency'); t.nonNull.float('balance'); } }); - -export const FixedIncomeType = objectType({ - name: 'FixedIncomeType', +export const FixedIncome = objectType({ + name: 'FixedIncome', definition(t) { t.nonNull.id('id'); + t.nonNull.field('type', { type: AssetType }); + t.nonNull.id('fixedIncomeTypeId'); t.nonNull.string('name'); + t.nonNull.id('spvId'); + t.nonNull.field('purchaseDate', { type: DateTime }); + t.nonNull.float('notional'); + t.nonNull.float('assetProceeds'); + t.nonNull.float('purchaseProceeds'); + t.nonNull.float('salesProceeds'); + t.nonNull.float('purchasePrice'); + t.nonNull.float('totalDiscount'); + t.nonNull.float('realizedSurplus'); + t.field('maturity', { type: DateTime }); + t.string('ISIN'); + t.string('CUSIP'); + t.float('coupon'); } }); - -export const AssetType = enumType({ - name: 'AssetType', - members: ['Cash', 'FixedIncome'] -}); - -export const Spv = objectType({ - name: 'Spv', +export const FixedIncomeType = objectType({ + name: 'FixedIncomeType', definition(t) { t.nonNull.id('id'); t.nonNull.string('name'); } }); - -export const FixedIncome = objectType({ - name: 'FixedIncome', - definition(t) { - t.id('id'); - t.nonNull.field('type', { type: AssetType }); - t.id('fixedIncomeTypeId'); - t.field('fixedIncomeType', { type: FixedIncomeType }); - t.string('name'); - t.id('spvId'); - t.field('spv', { type: Spv }); - t.field('purchaseDate', { type: GQLDateBase }); - t.float('notional'); - t.float('assetProceeds'); - t.float('purchaseProceeds'); - t.float('salesProceeds'); - t.float('purchasePrice'); - t.float('totalDiscount'); - t.float('realizedSurplus'); - t.field('maturity', { type: GQLDateBase }); - t.string('ISIN'); - t.string('CUSIP'); - t.float('coupon'); - t.field('currentValue', { - type: 'Float', - args: { date: GQLDateBase }, - }); - } -}); - export const GroupTransaction = objectType({ name: 'GroupTransaction', definition(t) { t.nonNull.id('id'); t.nonNull.field('type', { type: GroupTransactionType }); - t.nonNull.field('entryTime', { type: GQLDateBase }); + t.nonNull.field('entryTime', { type: DateTime }); t.nonNull.float('cashBalanceChange'); t.float('unitPrice'); t.list.nonNull.field('fees', { type: TransactionFee }); @@ -111,9 +93,8 @@ export const GroupTransaction = objectType({ t.string('txRef'); } }); - -export const RealWorldAssetsStateInterface = interfaceType({ - name: 'IRealWorldAssetsState', +export const RealWorldAssetsState = objectType({ + name: 'RealWorldAssetsState', definition(t) { t.nonNull.list.nonNull.field('accounts', { type: Account }); t.nonNull.id('principalLenderAccountId'); @@ -124,17 +105,8 @@ export const RealWorldAssetsStateInterface = interfaceType({ t.nonNull.list.nonNull.field('fixedIncomeTypes', { type: FixedIncomeType }); t.nonNull.list.nonNull.field('portfolio', { type: Asset }); t.nonNull.list.nonNull.field('transactions', { type: GroupTransaction }); - }, - resolveType: () => null -}); - -export const RealWorldAssetsState = objectType({ - name: 'RealWorldAssetsState', - definition(t) { - t.implements(RealWorldAssetsStateInterface); } }); - export const ServiceProviderFeeType = objectType({ name: 'ServiceProviderFeeType', definition(t) { @@ -144,7 +116,13 @@ export const ServiceProviderFeeType = objectType({ t.nonNull.id('accountId'); } }); - +export const Spv = objectType({ + name: 'Spv', + definition(t) { + t.nonNull.id('id'); + t.nonNull.string('name'); + } +}); export const TransactionFee = objectType({ name: 'TransactionFee', definition(t) { @@ -159,15 +137,13 @@ export const Asset = unionType({ definition(t) { t.members(FixedIncome, Cash); }, - resolveType: (asset: any) => { - if (asset.name) { - return 'FixedIncome'; - } - - return 'Cash'; - } + resolveType: t => t.type }); +export const AssetType = enumType({ + name: 'AssetType', + members: ['Cash', 'FixedIncome'] +}); export const GroupTransactionType = enumType({ name: 'GroupTransactionType', members: [ @@ -182,11 +158,13 @@ export const GroupTransactionType = enumType({ ] }); -export const RealWorldAssetsPortfolio = objectType({ - name: 'RealWorldAssetsPortfolio', - definition(t) { - t.nonNull.id('id'); - t.implements(RealWorldAssetsStateInterface); +export const DateTime = scalarType({ + name: 'DateTime', + serialize(value) { + return new Date(value as string).toISOString(); + }, + parseValue(value) { + return utils.dateValidator.safeParse(value); } }); @@ -195,11 +173,12 @@ export const RealWorldAssetsDocument = objectType({ definition(t) { t.implements(documentModelInterface); t.nonNull.field('state', { type: RealWorldAssetsState }); + t.nonNull.field('initialState', { type: RealWorldAssetsState }); } }); export const rwaQuery = queryField('rwaPortfolios', { - type: list(RealWorldAssetsPortfolio), + type: list(RealWorldAssetsDocument), args: { id: stringArg() }, diff --git a/api/src/modules/scope-framework/resolvers.ts b/api/src/modules/scope-framework/resolvers.ts index 81f53660..d4d32438 100644 --- a/api/src/modules/scope-framework/resolvers.ts +++ b/api/src/modules/scope-framework/resolvers.ts @@ -162,5 +162,6 @@ export const ScopeFrameworkDocument = objectType({ definition(t) { t.implements(documentModelInterface); t.nonNull.field('state', { type: ScopeFrameworkState }); + t.nonNull.field('initialState', { type: ScopeFrameworkState }); } });