@adaptic/backend 0.0.1055 → 0.0.1057
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Account.cjs +14 -0
- package/AccountLinkingRequest.cjs +14 -0
- package/AccountRiskMetrics.cjs +11 -0
- package/AdaConversation.cjs +14 -0
- package/Alert.cjs +11 -0
- package/Allocation.cjs +11 -0
- package/AlpacaAccount.cjs +36 -0
- package/Authenticator.cjs +14 -0
- package/AutoFollowRule.cjs +14 -0
- package/BrokerageAccount.cjs +11 -0
- package/Customer.cjs +14 -0
- package/DeskDecision.cjs +11 -0
- package/FeatureFlagOverride.cjs +14 -0
- package/Follow.cjs +14 -0
- package/Fund.cjs +56 -0
- package/FundAssignment.cjs +14 -0
- package/Investor.cjs +14 -0
- package/LinkedProvider.cjs +14 -0
- package/LlmConfiguration.cjs +14 -0
- package/Mandate.cjs +14 -0
- package/MandateApproval.cjs +14 -0
- package/MandateVersion.cjs +14 -0
- package/NotificationDelivery.cjs +14 -0
- package/NotificationPreference.cjs +14 -0
- package/OrgMembership.cjs +14 -0
- package/PolicyOverlay.cjs +64 -0
- package/PushSubscription.cjs +14 -0
- package/RiskEscalationEvent.cjs +33 -0
- package/Session.cjs +14 -0
- package/Strategy.cjs +28 -0
- package/StrategyHealthSnapshot.cjs +11 -0
- package/StrategySubscription.cjs +11 -0
- package/TradingPolicy.cjs +6 -0
- package/User.cjs +11 -0
- package/UserTotp.cjs +14 -0
- package/WaitlistEntry.cjs +14 -0
- package/esm/Account.mjs +14 -0
- package/esm/AccountLinkingRequest.mjs +14 -0
- package/esm/AccountRiskMetrics.mjs +11 -0
- package/esm/AdaConversation.mjs +14 -0
- package/esm/Alert.mjs +11 -0
- package/esm/Allocation.mjs +11 -0
- package/esm/AlpacaAccount.mjs +36 -0
- package/esm/Authenticator.mjs +14 -0
- package/esm/AutoFollowRule.mjs +14 -0
- package/esm/BrokerageAccount.mjs +11 -0
- package/esm/Customer.mjs +14 -0
- package/esm/DeskDecision.mjs +11 -0
- package/esm/FeatureFlagOverride.mjs +14 -0
- package/esm/Follow.mjs +14 -0
- package/esm/Fund.mjs +56 -0
- package/esm/FundAssignment.mjs +14 -0
- package/esm/Investor.mjs +14 -0
- package/esm/LinkedProvider.mjs +14 -0
- package/esm/LlmConfiguration.mjs +14 -0
- package/esm/Mandate.mjs +14 -0
- package/esm/MandateApproval.mjs +14 -0
- package/esm/MandateVersion.mjs +14 -0
- package/esm/NotificationDelivery.mjs +14 -0
- package/esm/NotificationPreference.mjs +14 -0
- package/esm/OrgMembership.mjs +14 -0
- package/esm/PolicyOverlay.mjs +64 -0
- package/esm/PushSubscription.mjs +14 -0
- package/esm/RiskEscalationEvent.mjs +33 -0
- package/esm/Session.mjs +14 -0
- package/esm/Strategy.mjs +28 -0
- package/esm/StrategyHealthSnapshot.mjs +11 -0
- package/esm/StrategySubscription.mjs +11 -0
- package/esm/TradingPolicy.mjs +6 -0
- package/esm/User.mjs +11 -0
- package/esm/UserTotp.mjs +14 -0
- package/esm/WaitlistEntry.mjs +14 -0
- package/esm/auth/membership-write-authority.d.ts +110 -0
- package/esm/auth/membership-write-authority.mjs +125 -0
- package/esm/auth/mutation-authorization.d.ts +19 -3
- package/esm/auth/mutation-authorization.mjs +21 -2
- package/esm/auth/nested-write-policy.d.ts +4 -0
- package/esm/auth/nested-write-policy.mjs +19 -0
- package/esm/auth/tenancy-scope.d.ts +2 -1
- package/esm/auth/tenancy-scope.mjs +2 -1
- package/esm/generated/typeStrings/PolicyOverlay.d.ts +1 -1
- package/esm/generated/typeStrings/PolicyOverlay.mjs +18 -0
- package/esm/generated/typeStrings/TradingPolicy.d.ts +1 -1
- package/esm/generated/typeStrings/TradingPolicy.mjs +18 -0
- package/esm/generated/typeStrings/index.d.ts +2 -2
- package/esm/generated/typegraphql-prisma/enhance.mjs +18 -18
- package/esm/generated/typegraphql-prisma/enums/TradingPolicyScalarFieldEnum.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/enums/TradingPolicyScalarFieldEnum.mjs +1 -0
- package/esm/generated/typegraphql-prisma/models/TradingPolicy.d.ts +20 -0
- package/esm/generated/typegraphql-prisma/models/TradingPolicy.mjs +27 -0
- package/esm/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/FindFirstTradingPolicyArgs.d.ts +1 -1
- package/esm/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/FindFirstTradingPolicyOrThrowArgs.d.ts +1 -1
- package/esm/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/FindManyTradingPolicyArgs.d.ts +1 -1
- package/esm/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/GroupByTradingPolicyArgs.d.ts +1 -1
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCountOrderByAggregateInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCountOrderByAggregateInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateManyInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateManyInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutAlpacaAccountInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutAlpacaAccountInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutOverlaysInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutOverlaysInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithAggregationInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithAggregationInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithRelationInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithRelationInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyScalarWhereWithAggregatesInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyScalarWhereWithAggregatesInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateManyMutationInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateManyMutationInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutAlpacaAccountInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutAlpacaAccountInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutOverlaysInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutOverlaysInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereUniqueInput.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereUniqueInput.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/outputs/CreateManyAndReturnTradingPolicy.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/outputs/CreateManyAndReturnTradingPolicy.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyCountAggregate.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyCountAggregate.mjs +7 -0
- package/esm/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyGroupBy.d.ts +1 -0
- package/esm/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyGroupBy.mjs +7 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.mjs +2 -0
- package/esm/middleware/__tests__/mutation-auth-guard.harness.d.ts +2 -0
- package/esm/middleware/__tests__/mutation-auth-guard.harness.mjs +141 -10
- package/esm/middleware/mutation-account-facts.d.ts +3 -0
- package/esm/middleware/mutation-account-facts.mjs +2 -0
- package/esm/middleware/mutation-auth-guard.d.ts +4 -2
- package/esm/middleware/mutation-auth-guard.mjs +20 -2
- package/esm/middleware/mutation-membership-facts.d.ts +133 -0
- package/esm/middleware/mutation-membership-facts.mjs +271 -0
- package/esm/middleware/mutation-tenant-facts.d.ts +4 -2
- package/esm/middleware/mutation-tenant-facts.mjs +4 -2
- package/esm/middleware/trading-policy-audit.d.ts +16 -4
- package/esm/middleware/trading-policy-audit.mjs +40 -11
- package/esm/readers/index.d.ts +10 -0
- package/esm/readers/index.mjs +10 -0
- package/esm/readers/intraday-lane-prefs.d.ts +45 -0
- package/esm/readers/intraday-lane-prefs.mjs +71 -0
- package/esm/tests/trading-policy-lane-fields-roundtrip.harness.d.ts +14 -0
- package/esm/tests/trading-policy-lane-fields-roundtrip.harness.mjs +107 -0
- package/generated/typeStrings/PolicyOverlay.cjs +18 -0
- package/generated/typeStrings/PolicyOverlay.d.ts +1 -1
- package/generated/typeStrings/TradingPolicy.cjs +18 -0
- package/generated/typeStrings/TradingPolicy.d.ts +1 -1
- package/generated/typeStrings/index.d.ts +2 -2
- package/generated/typegraphql-prisma/enhance.cjs +18 -18
- package/generated/typegraphql-prisma/enums/TradingPolicyScalarFieldEnum.cjs +1 -0
- package/generated/typegraphql-prisma/enums/TradingPolicyScalarFieldEnum.d.ts +1 -0
- package/generated/typegraphql-prisma/models/TradingPolicy.cjs +7 -0
- package/generated/typegraphql-prisma/models/TradingPolicy.d.ts +20 -0
- package/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/FindFirstTradingPolicyArgs.d.ts +1 -1
- package/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/FindFirstTradingPolicyOrThrowArgs.d.ts +1 -1
- package/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/FindManyTradingPolicyArgs.d.ts +1 -1
- package/generated/typegraphql-prisma/resolvers/crud/TradingPolicy/args/GroupByTradingPolicyArgs.d.ts +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCountOrderByAggregateInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCountOrderByAggregateInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateManyInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateManyInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutAlpacaAccountInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutAlpacaAccountInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutOverlaysInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyCreateWithoutOverlaysInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithAggregationInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithAggregationInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithRelationInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyOrderByWithRelationInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyScalarWhereWithAggregatesInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyScalarWhereWithAggregatesInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateManyMutationInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateManyMutationInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutAlpacaAccountInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutAlpacaAccountInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutOverlaysInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyUpdateWithoutOverlaysInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereUniqueInput.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradingPolicyWhereUniqueInput.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyAndReturnTradingPolicy.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyAndReturnTradingPolicy.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyCountAggregate.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyCountAggregate.d.ts +1 -0
- package/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyGroupBy.cjs +6 -0
- package/generated/typegraphql-prisma/resolvers/outputs/TradingPolicyGroupBy.d.ts +1 -0
- package/index.cjs +2 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/esm/User.mjs
CHANGED
|
@@ -786,6 +786,7 @@ export const User = {
|
|
|
786
786
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
787
787
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
788
788
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
789
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
789
790
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
790
791
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
791
792
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -13400,6 +13401,7 @@ export const User = {
|
|
|
13400
13401
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
13401
13402
|
set: item.tradingPolicy.dayTradeOnly
|
|
13402
13403
|
} : undefined,
|
|
13404
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
13403
13405
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
13404
13406
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
13405
13407
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -13609,6 +13611,7 @@ export const User = {
|
|
|
13609
13611
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
13610
13612
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
13611
13613
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
13614
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
13612
13615
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
13613
13616
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
13614
13617
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -15099,6 +15102,7 @@ export const User = {
|
|
|
15099
15102
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
15100
15103
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
15101
15104
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
15105
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
15102
15106
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
15103
15107
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
15104
15108
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -55280,6 +55284,7 @@ export const User = {
|
|
|
55280
55284
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
55281
55285
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
55282
55286
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
55287
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
55283
55288
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
55284
55289
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
55285
55290
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -67594,6 +67599,7 @@ export const User = {
|
|
|
67594
67599
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
67595
67600
|
set: item.tradingPolicy.dayTradeOnly
|
|
67596
67601
|
} : undefined,
|
|
67602
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
67597
67603
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
67598
67604
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
67599
67605
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -67803,6 +67809,7 @@ export const User = {
|
|
|
67803
67809
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
67804
67810
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
67805
67811
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
67812
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
67806
67813
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
67807
67814
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
67808
67815
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -69293,6 +69300,7 @@ export const User = {
|
|
|
69293
69300
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
69294
69301
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
69295
69302
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
69303
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
69296
69304
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
69297
69305
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
69298
69306
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -110589,6 +110597,7 @@ export const User = {
|
|
|
110589
110597
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
110590
110598
|
set: item.tradingPolicy.dayTradeOnly
|
|
110591
110599
|
} : undefined,
|
|
110600
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
110592
110601
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
110593
110602
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
110594
110603
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -110798,6 +110807,7 @@ export const User = {
|
|
|
110798
110807
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
110799
110808
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
110800
110809
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
110810
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
110801
110811
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
110802
110812
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
110803
110813
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -112288,6 +112298,7 @@ export const User = {
|
|
|
112288
112298
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
112289
112299
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
112290
112300
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
112301
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
112291
112302
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
112292
112303
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
112293
112304
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
package/esm/UserTotp.mjs
CHANGED
|
@@ -379,6 +379,7 @@ export const UserTotp = {
|
|
|
379
379
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
380
380
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
381
381
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
382
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
382
383
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
383
384
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
384
385
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -4120,6 +4121,7 @@ export const UserTotp = {
|
|
|
4120
4121
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
4121
4122
|
set: item.tradingPolicy.dayTradeOnly
|
|
4122
4123
|
} : undefined,
|
|
4124
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
4123
4125
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
4124
4126
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
4125
4127
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -4248,6 +4250,7 @@ export const UserTotp = {
|
|
|
4248
4250
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
4249
4251
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
4250
4252
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
4253
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
4251
4254
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
4252
4255
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
4253
4256
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -5067,6 +5070,7 @@ export const UserTotp = {
|
|
|
5067
5070
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
5068
5071
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
5069
5072
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
5073
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
5070
5074
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
5071
5075
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
5072
5076
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -12481,6 +12485,7 @@ export const UserTotp = {
|
|
|
12481
12485
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
12482
12486
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
12483
12487
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
12488
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
12484
12489
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
12485
12490
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
12486
12491
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -15653,6 +15658,7 @@ export const UserTotp = {
|
|
|
15653
15658
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
15654
15659
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
15655
15660
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
15661
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
15656
15662
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
15657
15663
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
15658
15664
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -19105,6 +19111,7 @@ export const UserTotp = {
|
|
|
19105
19111
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
19106
19112
|
set: item.tradingPolicy.dayTradeOnly
|
|
19107
19113
|
} : undefined,
|
|
19114
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
19108
19115
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
19109
19116
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
19110
19117
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -19233,6 +19240,7 @@ export const UserTotp = {
|
|
|
19233
19240
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
19234
19241
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
19235
19242
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
19243
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
19236
19244
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
19237
19245
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
19238
19246
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -20052,6 +20060,7 @@ export const UserTotp = {
|
|
|
20052
20060
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
20053
20061
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
20054
20062
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
20063
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
20055
20064
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
20056
20065
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
20057
20066
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -27466,6 +27475,7 @@ export const UserTotp = {
|
|
|
27466
27475
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
27467
27476
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
27468
27477
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
27478
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
27469
27479
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
27470
27480
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
27471
27481
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -31066,6 +31076,7 @@ export const UserTotp = {
|
|
|
31066
31076
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
31067
31077
|
set: item.tradingPolicy.dayTradeOnly
|
|
31068
31078
|
} : undefined,
|
|
31079
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
31069
31080
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
31070
31081
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
31071
31082
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -31194,6 +31205,7 @@ export const UserTotp = {
|
|
|
31194
31205
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
31195
31206
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
31196
31207
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
31208
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
31197
31209
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
31198
31210
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
31199
31211
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -32013,6 +32025,7 @@ export const UserTotp = {
|
|
|
32013
32025
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
32014
32026
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
32015
32027
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
32028
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
32016
32029
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
32017
32030
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
32018
32031
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -39427,6 +39440,7 @@ export const UserTotp = {
|
|
|
39427
39440
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
39428
39441
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
39429
39442
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
39443
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
39430
39444
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
39431
39445
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
39432
39446
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
package/esm/WaitlistEntry.mjs
CHANGED
|
@@ -399,6 +399,7 @@ export const WaitlistEntry = {
|
|
|
399
399
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
400
400
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
401
401
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
402
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
402
403
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
403
404
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
404
405
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -4152,6 +4153,7 @@ export const WaitlistEntry = {
|
|
|
4152
4153
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
4153
4154
|
set: item.tradingPolicy.dayTradeOnly
|
|
4154
4155
|
} : undefined,
|
|
4156
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
4155
4157
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
4156
4158
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
4157
4159
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -4280,6 +4282,7 @@ export const WaitlistEntry = {
|
|
|
4280
4282
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
4281
4283
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
4282
4284
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
4285
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
4283
4286
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
4284
4287
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
4285
4288
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -5099,6 +5102,7 @@ export const WaitlistEntry = {
|
|
|
5099
5102
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
5100
5103
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
5101
5104
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
5105
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
5102
5106
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
5103
5107
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
5104
5108
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -12424,6 +12428,7 @@ export const WaitlistEntry = {
|
|
|
12424
12428
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
12425
12429
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
12426
12430
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
12431
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
12427
12432
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
12428
12433
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
12429
12434
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -15620,6 +15625,7 @@ export const WaitlistEntry = {
|
|
|
15620
15625
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
15621
15626
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
15622
15627
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
15628
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
15623
15629
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
15624
15630
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
15625
15631
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -19081,6 +19087,7 @@ export const WaitlistEntry = {
|
|
|
19081
19087
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
19082
19088
|
set: item.tradingPolicy.dayTradeOnly
|
|
19083
19089
|
} : undefined,
|
|
19090
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
19084
19091
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
19085
19092
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
19086
19093
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -19209,6 +19216,7 @@ export const WaitlistEntry = {
|
|
|
19209
19216
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
19210
19217
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
19211
19218
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
19219
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
19212
19220
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
19213
19221
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
19214
19222
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -20028,6 +20036,7 @@ export const WaitlistEntry = {
|
|
|
20028
20036
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
20029
20037
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
20030
20038
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
20039
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
20031
20040
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
20032
20041
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
20033
20042
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -27353,6 +27362,7 @@ export const WaitlistEntry = {
|
|
|
27353
27362
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
27354
27363
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
27355
27364
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
27365
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
27356
27366
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
27357
27367
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
27358
27368
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -30986,6 +30996,7 @@ export const WaitlistEntry = {
|
|
|
30986
30996
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? {
|
|
30987
30997
|
set: item.tradingPolicy.dayTradeOnly
|
|
30988
30998
|
} : undefined,
|
|
30999
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
30989
31000
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
30990
31001
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
30991
31002
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -31114,6 +31125,7 @@ export const WaitlistEntry = {
|
|
|
31114
31125
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
31115
31126
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
31116
31127
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
31128
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
31117
31129
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
31118
31130
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
31119
31131
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -31933,6 +31945,7 @@ export const WaitlistEntry = {
|
|
|
31933
31945
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
31934
31946
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
31935
31947
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
31948
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
31936
31949
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
31937
31950
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
31938
31951
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -39258,6 +39271,7 @@ export const WaitlistEntry = {
|
|
|
39258
39271
|
maxOrdersPerWindow: item.tradingPolicy.maxOrdersPerWindow !== undefined ? item.tradingPolicy.maxOrdersPerWindow : undefined,
|
|
39259
39272
|
orderWindowSeconds: item.tradingPolicy.orderWindowSeconds !== undefined ? item.tradingPolicy.orderWindowSeconds : undefined,
|
|
39260
39273
|
dayTradeOnly: item.tradingPolicy.dayTradeOnly !== undefined ? item.tradingPolicy.dayTradeOnly : undefined,
|
|
39274
|
+
intradayLanePrefs: item.tradingPolicy.intradayLanePrefs !== undefined ? item.tradingPolicy.intradayLanePrefs : undefined,
|
|
39261
39275
|
riskBudgetPrefs: item.tradingPolicy.riskBudgetPrefs !== undefined ? item.tradingPolicy.riskBudgetPrefs : undefined,
|
|
39262
39276
|
signalConsumptionPrefs: item.tradingPolicy.signalConsumptionPrefs !== undefined ? item.tradingPolicy.signalConsumptionPrefs : undefined,
|
|
39263
39277
|
executionPrefs: item.tradingPolicy.executionPrefs !== undefined ? item.tradingPolicy.executionPrefs : undefined,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may write an entitlement row — pure decision logic.
|
|
3
|
+
*
|
|
4
|
+
* `OrgMembership.role` and `FundAssignment.role` are the authority the rest of
|
|
5
|
+
* the system reads: the platform derives a person's personas from them at
|
|
6
|
+
* sign-in, the tenancy scope derives which organizations and funds they reach,
|
|
7
|
+
* and fund entitlement admits writes to every brokerage account bridged to a
|
|
8
|
+
* fund. Being inside a tenant is therefore not enough to write one of these
|
|
9
|
+
* rows. A plain member who could write them could make themselves OWNER of
|
|
10
|
+
* their organization, or MANAGER of any fund in it, and every downstream
|
|
11
|
+
* authority would follow.
|
|
12
|
+
*
|
|
13
|
+
* A user principal may write an entitlement row only with authority over the
|
|
14
|
+
* tenant the row belongs to:
|
|
15
|
+
*
|
|
16
|
+
* - **OrgMembership** — the caller holds OWNER or ADMIN in that organization.
|
|
17
|
+
* A row whose role is OWNER, before or after the write, needs OWNER: an
|
|
18
|
+
* ADMIN who could grant OWNER could grant it to themselves, and an ADMIN who
|
|
19
|
+
* could demote or remove an OWNER could take the organization from them.
|
|
20
|
+
* - **FundAssignment** — the caller holds OWNER or ADMIN in the fund's
|
|
21
|
+
* organization, or a MANAGER assignment on that same fund. MANAGER is the
|
|
22
|
+
* highest fund role and is the role that runs the fund's team, so admitting
|
|
23
|
+
* it lets no one rise above what they already hold, and it confers nothing
|
|
24
|
+
* on any other fund.
|
|
25
|
+
*
|
|
26
|
+
* One self-service write is admitted without that authority, because the
|
|
27
|
+
* backend can prove from its own rows that nothing is being taken from
|
|
28
|
+
* anyone: the **first owner**. A caller makes themselves OWNER of an
|
|
29
|
+
* organization that is not deleted and has no members and no funds. That is
|
|
30
|
+
* the state an organization is in the moment its creator has written it; once
|
|
31
|
+
* anyone holds a membership, or the organization holds a fund, the exception
|
|
32
|
+
* closes, and an organization with neither has nothing in it to claim.
|
|
33
|
+
*
|
|
34
|
+
* Joining an organization any other way (an invitation, an email-domain
|
|
35
|
+
* match) rests on proof the backend cannot verify from rows the caller is
|
|
36
|
+
* unable to write — an invitation is a single-use token, and a user's email
|
|
37
|
+
* address is a column of their own row — so those memberships are written by
|
|
38
|
+
* a service principal after the platform has checked the proof.
|
|
39
|
+
*
|
|
40
|
+
* Everything here is decided from facts read from the database for this
|
|
41
|
+
* mutation (`src/middleware/mutation-membership-facts.ts`), never from the
|
|
42
|
+
* token's claims.
|
|
43
|
+
*
|
|
44
|
+
* @module auth/membership-write-authority
|
|
45
|
+
*/
|
|
46
|
+
/** An entitlement model. */
|
|
47
|
+
export type MembershipModel = 'OrgMembership' | 'FundAssignment';
|
|
48
|
+
/** Whether a model is one of the entitlement models this module decides. */
|
|
49
|
+
export declare function isMembershipModel(model: string): model is MembershipModel;
|
|
50
|
+
/** The organization role that owns an organization. */
|
|
51
|
+
export declare const ORG_OWNER_ROLE = "OWNER";
|
|
52
|
+
/** Organization roles that may manage memberships and fund assignments. */
|
|
53
|
+
export declare const ORG_MANAGEMENT_ROLES: ReadonlySet<string>;
|
|
54
|
+
/** The fund role that may manage its own fund's assignments. */
|
|
55
|
+
export declare const FUND_MANAGER_ROLE = "MANAGER";
|
|
56
|
+
/** What one side of an entitlement write does to one row. */
|
|
57
|
+
export interface MembershipRowWrite {
|
|
58
|
+
/** Whether the row is being created, or an existing row changed or removed. */
|
|
59
|
+
readonly side: 'create' | 'existing';
|
|
60
|
+
/** The organization the row belongs to (for a fund assignment, its fund's). */
|
|
61
|
+
readonly organizationId: string;
|
|
62
|
+
/** For a fund assignment: the fund. */
|
|
63
|
+
readonly fundId?: string;
|
|
64
|
+
/** The person the row is for. */
|
|
65
|
+
readonly memberUserId: string;
|
|
66
|
+
/**
|
|
67
|
+
* Every role the row holds before or after the write: the payload's role
|
|
68
|
+
* (or the column default) for a create; the stored role, and the new one
|
|
69
|
+
* if the write sets it, for an existing row.
|
|
70
|
+
*/
|
|
71
|
+
readonly rolesTouched: readonly string[];
|
|
72
|
+
/** Whether the write sets the row's free-form `permissions`. */
|
|
73
|
+
readonly setsPermissions: boolean;
|
|
74
|
+
}
|
|
75
|
+
/** What the caller holds in the row's tenant, read from the database. */
|
|
76
|
+
export interface CallerStanding {
|
|
77
|
+
/** The caller's OrgMembership role in the row's organization, or `null`. */
|
|
78
|
+
readonly orgRole: string | null;
|
|
79
|
+
/** For a fund assignment: the caller's FundAssignment role on that fund, or `null`. */
|
|
80
|
+
readonly fundRole: string | null;
|
|
81
|
+
}
|
|
82
|
+
/** The facts a first-owner OrgMembership create is decided on. */
|
|
83
|
+
export interface FirstOwnerFacts {
|
|
84
|
+
readonly organizationDeleted: boolean;
|
|
85
|
+
readonly organizationMemberCount: number;
|
|
86
|
+
readonly organizationFundCount: number;
|
|
87
|
+
}
|
|
88
|
+
/** Why an entitlement write was admitted or refused. */
|
|
89
|
+
export type MembershipVerdict = 'membership_org_admin' | 'membership_fund_manager' | 'membership_first_owner' | 'tenant_out_of_scope' | 'membership_role_insufficient' | 'membership_owner_requires_owner';
|
|
90
|
+
/** The verdicts that admit the write. */
|
|
91
|
+
export declare const ADMITTING_MEMBERSHIP_VERDICTS: ReadonlySet<MembershipVerdict>;
|
|
92
|
+
/**
|
|
93
|
+
* Whether a write could be a first-owner create: the caller making
|
|
94
|
+
* themselves a member of an organization they do not belong to. The
|
|
95
|
+
* first-owner facts are read only for this shape.
|
|
96
|
+
*/
|
|
97
|
+
export declare function isFirstOwnerCandidate(model: MembershipModel, write: MembershipRowWrite, callerId: string, standing: CallerStanding): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Decide one side of an entitlement write. Pure; performs no I/O.
|
|
100
|
+
*
|
|
101
|
+
* @param model - The entitlement model written.
|
|
102
|
+
* @param write - What the write does to the row.
|
|
103
|
+
* @param callerId - The user principal's subject.
|
|
104
|
+
* @param standing - What the caller holds in the row's tenant.
|
|
105
|
+
* @param firstOwner - The first-owner facts, read only for an
|
|
106
|
+
* {@link isFirstOwnerCandidate} write; `null` otherwise.
|
|
107
|
+
* @returns The verdict.
|
|
108
|
+
*/
|
|
109
|
+
export declare function decideMembershipWrite(model: MembershipModel, write: MembershipRowWrite, callerId: string, standing: CallerStanding, firstOwner: FirstOwnerFacts | null): MembershipVerdict;
|
|
110
|
+
//# sourceMappingURL=membership-write-authority.d.ts.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may write an entitlement row — pure decision logic.
|
|
3
|
+
*
|
|
4
|
+
* `OrgMembership.role` and `FundAssignment.role` are the authority the rest of
|
|
5
|
+
* the system reads: the platform derives a person's personas from them at
|
|
6
|
+
* sign-in, the tenancy scope derives which organizations and funds they reach,
|
|
7
|
+
* and fund entitlement admits writes to every brokerage account bridged to a
|
|
8
|
+
* fund. Being inside a tenant is therefore not enough to write one of these
|
|
9
|
+
* rows. A plain member who could write them could make themselves OWNER of
|
|
10
|
+
* their organization, or MANAGER of any fund in it, and every downstream
|
|
11
|
+
* authority would follow.
|
|
12
|
+
*
|
|
13
|
+
* A user principal may write an entitlement row only with authority over the
|
|
14
|
+
* tenant the row belongs to:
|
|
15
|
+
*
|
|
16
|
+
* - **OrgMembership** — the caller holds OWNER or ADMIN in that organization.
|
|
17
|
+
* A row whose role is OWNER, before or after the write, needs OWNER: an
|
|
18
|
+
* ADMIN who could grant OWNER could grant it to themselves, and an ADMIN who
|
|
19
|
+
* could demote or remove an OWNER could take the organization from them.
|
|
20
|
+
* - **FundAssignment** — the caller holds OWNER or ADMIN in the fund's
|
|
21
|
+
* organization, or a MANAGER assignment on that same fund. MANAGER is the
|
|
22
|
+
* highest fund role and is the role that runs the fund's team, so admitting
|
|
23
|
+
* it lets no one rise above what they already hold, and it confers nothing
|
|
24
|
+
* on any other fund.
|
|
25
|
+
*
|
|
26
|
+
* One self-service write is admitted without that authority, because the
|
|
27
|
+
* backend can prove from its own rows that nothing is being taken from
|
|
28
|
+
* anyone: the **first owner**. A caller makes themselves OWNER of an
|
|
29
|
+
* organization that is not deleted and has no members and no funds. That is
|
|
30
|
+
* the state an organization is in the moment its creator has written it; once
|
|
31
|
+
* anyone holds a membership, or the organization holds a fund, the exception
|
|
32
|
+
* closes, and an organization with neither has nothing in it to claim.
|
|
33
|
+
*
|
|
34
|
+
* Joining an organization any other way (an invitation, an email-domain
|
|
35
|
+
* match) rests on proof the backend cannot verify from rows the caller is
|
|
36
|
+
* unable to write — an invitation is a single-use token, and a user's email
|
|
37
|
+
* address is a column of their own row — so those memberships are written by
|
|
38
|
+
* a service principal after the platform has checked the proof.
|
|
39
|
+
*
|
|
40
|
+
* Everything here is decided from facts read from the database for this
|
|
41
|
+
* mutation (`src/middleware/mutation-membership-facts.ts`), never from the
|
|
42
|
+
* token's claims.
|
|
43
|
+
*
|
|
44
|
+
* @module auth/membership-write-authority
|
|
45
|
+
*/
|
|
46
|
+
/** Whether a model is one of the entitlement models this module decides. */
|
|
47
|
+
export function isMembershipModel(model) {
|
|
48
|
+
return model === 'OrgMembership' || model === 'FundAssignment';
|
|
49
|
+
}
|
|
50
|
+
/** The organization role that owns an organization. */
|
|
51
|
+
export const ORG_OWNER_ROLE = 'OWNER';
|
|
52
|
+
/** Organization roles that may manage memberships and fund assignments. */
|
|
53
|
+
export const ORG_MANAGEMENT_ROLES = new Set([
|
|
54
|
+
ORG_OWNER_ROLE,
|
|
55
|
+
'ADMIN',
|
|
56
|
+
]);
|
|
57
|
+
/** The fund role that may manage its own fund's assignments. */
|
|
58
|
+
export const FUND_MANAGER_ROLE = 'MANAGER';
|
|
59
|
+
/** The verdicts that admit the write. */
|
|
60
|
+
export const ADMITTING_MEMBERSHIP_VERDICTS = new Set([
|
|
61
|
+
'membership_org_admin',
|
|
62
|
+
'membership_fund_manager',
|
|
63
|
+
'membership_first_owner',
|
|
64
|
+
]);
|
|
65
|
+
/**
|
|
66
|
+
* Whether a write could be a first-owner create: the caller making
|
|
67
|
+
* themselves a member of an organization they do not belong to. The
|
|
68
|
+
* first-owner facts are read only for this shape.
|
|
69
|
+
*/
|
|
70
|
+
export function isFirstOwnerCandidate(model, write, callerId, standing) {
|
|
71
|
+
return (model === 'OrgMembership' &&
|
|
72
|
+
write.side === 'create' &&
|
|
73
|
+
write.memberUserId === callerId &&
|
|
74
|
+
standing.orgRole === null);
|
|
75
|
+
}
|
|
76
|
+
/** Whether a create makes the caller the plain first OWNER of an empty organization. */
|
|
77
|
+
function isFirstOwner(write, facts) {
|
|
78
|
+
return (write.rolesTouched.length === 1 &&
|
|
79
|
+
write.rolesTouched[0] === ORG_OWNER_ROLE &&
|
|
80
|
+
!write.setsPermissions &&
|
|
81
|
+
!facts.organizationDeleted &&
|
|
82
|
+
facts.organizationMemberCount === 0 &&
|
|
83
|
+
facts.organizationFundCount === 0);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Decide one side of an entitlement write. Pure; performs no I/O.
|
|
87
|
+
*
|
|
88
|
+
* @param model - The entitlement model written.
|
|
89
|
+
* @param write - What the write does to the row.
|
|
90
|
+
* @param callerId - The user principal's subject.
|
|
91
|
+
* @param standing - What the caller holds in the row's tenant.
|
|
92
|
+
* @param firstOwner - The first-owner facts, read only for an
|
|
93
|
+
* {@link isFirstOwnerCandidate} write; `null` otherwise.
|
|
94
|
+
* @returns The verdict.
|
|
95
|
+
*/
|
|
96
|
+
export function decideMembershipWrite(model, write, callerId, standing, firstOwner) {
|
|
97
|
+
const { orgRole, fundRole } = standing;
|
|
98
|
+
if (model === 'OrgMembership') {
|
|
99
|
+
if (orgRole === ORG_OWNER_ROLE)
|
|
100
|
+
return 'membership_org_admin';
|
|
101
|
+
if (orgRole !== null && ORG_MANAGEMENT_ROLES.has(orgRole)) {
|
|
102
|
+
return write.rolesTouched.includes(ORG_OWNER_ROLE)
|
|
103
|
+
? 'membership_owner_requires_owner'
|
|
104
|
+
: 'membership_org_admin';
|
|
105
|
+
}
|
|
106
|
+
if (orgRole !== null)
|
|
107
|
+
return 'membership_role_insufficient';
|
|
108
|
+
if (firstOwner !== null &&
|
|
109
|
+
isFirstOwnerCandidate(model, write, callerId, standing) &&
|
|
110
|
+
isFirstOwner(write, firstOwner)) {
|
|
111
|
+
return 'membership_first_owner';
|
|
112
|
+
}
|
|
113
|
+
return 'tenant_out_of_scope';
|
|
114
|
+
}
|
|
115
|
+
if (orgRole !== null && ORG_MANAGEMENT_ROLES.has(orgRole)) {
|
|
116
|
+
return 'membership_org_admin';
|
|
117
|
+
}
|
|
118
|
+
if (fundRole === FUND_MANAGER_ROLE)
|
|
119
|
+
return 'membership_fund_manager';
|
|
120
|
+
if (orgRole !== null || fundRole !== null) {
|
|
121
|
+
return 'membership_role_insufficient';
|
|
122
|
+
}
|
|
123
|
+
return 'tenant_out_of_scope';
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=membership-write-authority.js.map
|