Skip to content

Commit

Permalink
fix: staging environment
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Jun 27, 2024
1 parent 94b1d06 commit 0847819
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 107 deletions.
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"document-drive": "1.0.0-alpha.79",
"document-model": "1.5.0",
"document-model-libs": "^1.61.0",
"document-model": "1.7.0",
"document-model-libs": "^1.67.0",
"dotenv": "^16.4.5",
"esbuild": "^0.21.2",
"ethers": "^5.7.2",
Expand Down
24 changes: 12 additions & 12 deletions api/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 16 additions & 15 deletions api/src/graphql/server/generated/drive/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ export interface NexusGenInputs {
}

export interface NexusGenEnums {
AssetType: "Cash" | "FixedIncome"
AuditReportStatus: "Approved" | "ApprovedWithComments" | "Escalated" | "NeedsAction"
BudgetStatus: "Draft" | "Escalated" | "Final" | "Review"
GroupTransactionType: "AssetPurchase" | "AssetSale" | "FeesPayment" | "InterestDraw" | "InterestPayment" | "InterestReturn" | "PrincipalDraw" | "PrincipalReturn"
GroupTransactionType: "AssetPurchase" | "AssetSale" | "FeesIncome" | "FeesPayment" | "InterestIncome" | "InterestPayment" | "PrincipalDraw" | "PrincipalReturn"
ScopeFrameworkElementType: "Article" | "Core" | "Scope" | "Section" | "TypeSpecification"
TransmitterType: "Internal" | "MatrixConnect" | "PullResponder" | "RESTWebhook" | "SecureConnect" | "SwitchboardPush"
TypeSpecificationComponentCategory: "Accessory" | "Immutable" | "Primary" | "Supporting"
Expand Down Expand Up @@ -201,12 +202,12 @@ export interface NexusGenObjects {
accountId?: string | null; // ID
amount: number; // Float!
assetId: string; // ID!
assetType: NexusGenEnums['AssetType']; // AssetType!
counterPartyAccountId?: string | null; // ID
entryTime: NexusGenScalars['Date']; // Date!
id: string; // ID!
settlementTime?: NexusGenScalars['Date'] | null; // Date
tradeTime?: NexusGenScalars['Date'] | null; // Date
txRef?: string | null; // String
}
BudgetStatement: { // root type
created: NexusGenScalars['Date']; // Date!
Expand Down Expand Up @@ -309,7 +310,6 @@ export interface NexusGenObjects {
purchasePrice?: number | null; // Float
purchaseProceeds?: number | null; // Float
realizedSurplus?: number | null; // Float
salesProceeds?: number | null; // Float
spv?: NexusGenRootTypes['Spv'] | null; // Spv
spvId?: string | null; // ID
totalDiscount?: number | null; // Float
Expand All @@ -328,14 +328,15 @@ export interface NexusGenObjects {
}
GroupTransaction: { // root type
cashBalanceChange: number; // Float!
cashTransaction?: NexusGenRootTypes['BaseTransaction'] | null; // BaseTransaction
cashTransaction: NexusGenRootTypes['BaseTransaction']; // BaseTransaction!
entryTime: NexusGenScalars['Date']; // Date!
feeTransactions?: NexusGenRootTypes['BaseTransaction'][] | null; // [BaseTransaction!]
fees?: NexusGenRootTypes['TransactionFee'][] | null; // [TransactionFee!]
fixedIncomeTransaction?: NexusGenRootTypes['BaseTransaction'] | null; // BaseTransaction
id: string; // ID!
interestTransaction?: NexusGenRootTypes['BaseTransaction'] | null; // BaseTransaction
serviceProviderFeeTypeId?: string | null; // ID
txRef?: string | null; // String
type: NexusGenEnums['GroupTransactionType']; // GroupTransactionType!
unitPrice?: number | null; // Float
}
LineItem: { // root type
actual?: number | null; // Float
Expand Down Expand Up @@ -688,12 +689,12 @@ export interface NexusGenFieldTypes {
accountId: string | null; // ID
amount: number; // Float!
assetId: string; // ID!
assetType: NexusGenEnums['AssetType']; // AssetType!
counterPartyAccountId: string | null; // ID
entryTime: NexusGenScalars['Date']; // Date!
id: string; // ID!
settlementTime: NexusGenScalars['Date'] | null; // Date
tradeTime: NexusGenScalars['Date'] | null; // Date
txRef: string | null; // String
}
BudgetStatement: { // field return type
created: NexusGenScalars['Date']; // Date!
Expand Down Expand Up @@ -796,7 +797,6 @@ export interface NexusGenFieldTypes {
purchasePrice: number | null; // Float
purchaseProceeds: number | null; // Float
realizedSurplus: number | null; // Float
salesProceeds: number | null; // Float
spv: NexusGenRootTypes['Spv'] | null; // Spv
spvId: string | null; // ID
totalDiscount: number | null; // Float
Expand All @@ -815,14 +815,15 @@ export interface NexusGenFieldTypes {
}
GroupTransaction: { // field return type
cashBalanceChange: number; // Float!
cashTransaction: NexusGenRootTypes['BaseTransaction'] | null; // BaseTransaction
cashTransaction: NexusGenRootTypes['BaseTransaction']; // BaseTransaction!
entryTime: NexusGenScalars['Date']; // Date!
feeTransactions: NexusGenRootTypes['BaseTransaction'][] | null; // [BaseTransaction!]
fees: NexusGenRootTypes['TransactionFee'][] | null; // [TransactionFee!]
fixedIncomeTransaction: NexusGenRootTypes['BaseTransaction'] | null; // BaseTransaction
id: string; // ID!
interestTransaction: NexusGenRootTypes['BaseTransaction'] | null; // BaseTransaction
serviceProviderFeeTypeId: string | null; // ID
txRef: string | null; // String
type: NexusGenEnums['GroupTransactionType']; // GroupTransactionType!
unitPrice: number | null; // Float
}
LineItem: { // field return type
actual: number | null; // Float
Expand Down Expand Up @@ -1211,12 +1212,12 @@ export interface NexusGenFieldTypeNames {
accountId: 'ID'
amount: 'Float'
assetId: 'ID'
assetType: 'AssetType'
counterPartyAccountId: 'ID'
entryTime: 'Date'
id: 'ID'
settlementTime: 'Date'
tradeTime: 'Date'
txRef: 'String'
}
BudgetStatement: { // field return type name
created: 'Date'
Expand Down Expand Up @@ -1319,7 +1320,6 @@ export interface NexusGenFieldTypeNames {
purchasePrice: 'Float'
purchaseProceeds: 'Float'
realizedSurplus: 'Float'
salesProceeds: 'Float'
spv: 'Spv'
spvId: 'ID'
totalDiscount: 'Float'
Expand All @@ -1340,12 +1340,13 @@ export interface NexusGenFieldTypeNames {
cashBalanceChange: 'Float'
cashTransaction: 'BaseTransaction'
entryTime: 'Date'
feeTransactions: 'BaseTransaction'
fees: 'TransactionFee'
fixedIncomeTransaction: 'BaseTransaction'
id: 'ID'
interestTransaction: 'BaseTransaction'
serviceProviderFeeTypeId: 'ID'
txRef: 'String'
type: 'GroupTransactionType'
unitPrice: 'Float'
}
LineItem: { // field return type name
actual: 'Float'
Expand Down
19 changes: 12 additions & 7 deletions api/src/graphql/server/generated/drive/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ type ArticleComponent {

union Asset = Cash | FixedIncome

enum AssetType {
Cash
FixedIncome
}

"""Attachment custom scalar type"""
scalar Attachment

Expand All @@ -86,12 +91,12 @@ type BaseTransaction {
accountId: ID
amount: Float!
assetId: ID!
assetType: AssetType!
counterPartyAccountId: ID
entryTime: Date!
id: ID!
settlementTime: Date
tradeTime: Date
txRef: String
}

type BudgetStatement implements IDocument {
Expand Down Expand Up @@ -219,7 +224,6 @@ type FixedIncome {
purchasePrice: Float
purchaseProceeds: Float
realizedSurplus: Float
salesProceeds: Float
spv: Spv
spvId: ID
totalDiscount: Float
Expand All @@ -242,23 +246,24 @@ type FtesForecast {

type GroupTransaction {
cashBalanceChange: Float!
cashTransaction: BaseTransaction
cashTransaction: BaseTransaction!
entryTime: Date!
feeTransactions: [BaseTransaction!]
fees: [TransactionFee!]
fixedIncomeTransaction: BaseTransaction
id: ID!
interestTransaction: BaseTransaction
serviceProviderFeeTypeId: ID
txRef: String
type: GroupTransactionType!
unitPrice: Float
}

enum GroupTransactionType {
AssetPurchase
AssetSale
FeesIncome
FeesPayment
InterestDraw
InterestIncome
InterestPayment
InterestReturn
PrincipalDraw
PrincipalReturn
}
Expand Down
1 change: 1 addition & 0 deletions api/src/modules/document-drive/drive-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export const InputOperationUpdate = inputObjectType({
t.nonNull.int('index');
t.int('skip');
t.nonNull.string('type');
t.nonNull.string('id');
t.nonNull.string('input');
t.nonNull.string('hash');
t.nonNull.string('timestamp');
Expand Down
22 changes: 14 additions & 8 deletions api/src/modules/real-world-assets/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export const BaseTransaction = objectType({
name: "BaseTransaction",
definition(t) {
t.nonNull.id("id")
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.string("txRef")
t.id("accountId")
t.id("counterPartyAccountId")
}
Expand Down Expand Up @@ -58,7 +58,6 @@ export const FixedIncome = objectType({
t.string("ISIN")
t.string("CUSIP")
t.float("coupon")
t.float("salesProceeds")
}
})
export const FixedIncomeType = objectType({
Expand All @@ -75,11 +74,12 @@ export const GroupTransaction = objectType({
t.nonNull.field("type", { type: GroupTransactionType })
t.nonNull.field("entryTime", { type: GQLDateBase })
t.nonNull.float("cashBalanceChange")
t.float("unitPrice")
t.list.nonNull.field("fees", { type: TransactionFee })
t.field("cashTransaction", { type: BaseTransaction })
t.nonNull.field("cashTransaction", { type: BaseTransaction })
t.field("fixedIncomeTransaction", { type: BaseTransaction })
t.list.nonNull.field("feeTransactions", { type: BaseTransaction })
t.field("interestTransaction", { type: BaseTransaction })
t.id("serviceProviderFeeTypeId")
t.string("txRef")
}
})
export const RealWorldAssetsStateInterface = interfaceType({
Expand All @@ -90,7 +90,7 @@ export const RealWorldAssetsStateInterface = interfaceType({
t.nonNull.list.nonNull.field("spvs", { type: Spv })
t.nonNull.list.nonNull.field("serviceProviderFeeTypes", { type: ServiceProviderFeeType })
t.nonNull.list.nonNull.field("fixedIncomeTypes", { type: FixedIncomeType })
t.nonNull.list.nonNull.field("portfolio", { type: AssetUnion })
t.nonNull.list.nonNull.field("portfolio", { type: Asset })
t.nonNull.list.nonNull.field("transactions", { type: GroupTransaction })
}, resolveType: () => "RealWorldAssetsState"
})
Expand Down Expand Up @@ -127,7 +127,8 @@ export const TransactionFee = objectType({
}
})

export const AssetUnion = unionType({

export const Asset = unionType({
name: "Asset",
definition(t) {
t.members(FixedIncome, Cash)
Expand All @@ -141,9 +142,14 @@ export const AssetUnion = unionType({
}
});

export const AssetType = enumType({
name: "AssetType",
members: ['Cash', 'FixedIncome'],
});

export const GroupTransactionType = enumType({
name: "GroupTransactionType",
members: ['AssetPurchase', 'AssetSale', 'InterestDraw', 'InterestReturn', 'FeesPayment', 'PrincipalDraw', 'PrincipalReturn', 'InterestPayment'],
members: ['PrincipalDraw', 'PrincipalReturn', 'AssetPurchase', 'AssetSale', 'InterestIncome', 'InterestPayment', 'FeesIncome', 'FeesPayment'],
});

export const RealWorldAssetsPortfolio = objectType({
Expand Down
Loading

0 comments on commit 0847819

Please sign in to comment.