@investment-finder/api-contract 0.1.0
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/dist/allocation.d.ts +39 -0
- package/dist/allocation.d.ts.map +1 -0
- package/dist/allocation.js +36 -0
- package/dist/allocation.js.map +1 -0
- package/dist/auth.d.ts +35 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +26 -0
- package/dist/auth.js.map +1 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +14 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/portfolios.d.ts +30 -0
- package/dist/portfolios.d.ts.map +1 -0
- package/dist/portfolios.js +25 -0
- package/dist/portfolios.js.map +1 -0
- package/dist/proposals.d.ts +192 -0
- package/dist/proposals.d.ts.map +1 -0
- package/dist/proposals.js +64 -0
- package/dist/proposals.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AllocationMarketSchema: z.ZodObject<{
|
|
3
|
+
vix: z.ZodNullable<z.ZodNumber>;
|
|
4
|
+
fearGreed: z.ZodNullable<z.ZodNumber>;
|
|
5
|
+
buyCompositeZ: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6
|
+
sellCompositeZ: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const AllocationPostureResponseSchema: z.ZodObject<{
|
|
9
|
+
mode: z.ZodString;
|
|
10
|
+
action: z.ZodString;
|
|
11
|
+
bandLabel: z.ZodString;
|
|
12
|
+
targetMinPct: z.ZodNumber;
|
|
13
|
+
targetMaxPct: z.ZodNumber;
|
|
14
|
+
targetMidPct: z.ZodNumber;
|
|
15
|
+
targetCashReserveUsd: z.ZodNumber;
|
|
16
|
+
targetGrossExposurePct: z.ZodNumber;
|
|
17
|
+
targetDeployedUsd: z.ZodNumber;
|
|
18
|
+
actualCashPct: z.ZodNullable<z.ZodNumber>;
|
|
19
|
+
actualMarginPct: z.ZodNullable<z.ZodNumber>;
|
|
20
|
+
totalValue: z.ZodNumber;
|
|
21
|
+
cashValue: z.ZodNumber;
|
|
22
|
+
trueCashUsd: z.ZodNumber;
|
|
23
|
+
cashEquivalentUsd: z.ZodNumber;
|
|
24
|
+
deployedCapitalUsd: z.ZodNumber;
|
|
25
|
+
deploymentGapUsd: z.ZodNumber;
|
|
26
|
+
marginDebtUsd: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
confirmation: z.ZodString;
|
|
28
|
+
status: z.ZodString;
|
|
29
|
+
stale: z.ZodBoolean;
|
|
30
|
+
systemState: z.ZodString;
|
|
31
|
+
market: z.ZodObject<{
|
|
32
|
+
vix: z.ZodNullable<z.ZodNumber>;
|
|
33
|
+
fearGreed: z.ZodNullable<z.ZodNumber>;
|
|
34
|
+
buyCompositeZ: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
sellCompositeZ: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type AllocationPostureResponse = z.infer<typeof AllocationPostureResponseSchema>;
|
|
39
|
+
//# sourceMappingURL=allocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allocation.d.ts","sourceRoot":"","sources":["../src/allocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwB1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AllocationPostureResponseSchema = exports.AllocationMarketSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.AllocationMarketSchema = zod_1.z.object({
|
|
6
|
+
vix: zod_1.z.number().nullable(),
|
|
7
|
+
fearGreed: zod_1.z.number().nullable(),
|
|
8
|
+
buyCompositeZ: zod_1.z.number().nullable().optional(),
|
|
9
|
+
sellCompositeZ: zod_1.z.number().nullable().optional(),
|
|
10
|
+
});
|
|
11
|
+
exports.AllocationPostureResponseSchema = zod_1.z.object({
|
|
12
|
+
mode: zod_1.z.string(),
|
|
13
|
+
action: zod_1.z.string(),
|
|
14
|
+
bandLabel: zod_1.z.string(),
|
|
15
|
+
targetMinPct: zod_1.z.number(),
|
|
16
|
+
targetMaxPct: zod_1.z.number(),
|
|
17
|
+
targetMidPct: zod_1.z.number(),
|
|
18
|
+
targetCashReserveUsd: zod_1.z.number(),
|
|
19
|
+
targetGrossExposurePct: zod_1.z.number(),
|
|
20
|
+
targetDeployedUsd: zod_1.z.number(),
|
|
21
|
+
actualCashPct: zod_1.z.number().nullable(),
|
|
22
|
+
actualMarginPct: zod_1.z.number().nullable(),
|
|
23
|
+
totalValue: zod_1.z.number(),
|
|
24
|
+
cashValue: zod_1.z.number(),
|
|
25
|
+
trueCashUsd: zod_1.z.number(),
|
|
26
|
+
cashEquivalentUsd: zod_1.z.number(),
|
|
27
|
+
deployedCapitalUsd: zod_1.z.number(),
|
|
28
|
+
deploymentGapUsd: zod_1.z.number(),
|
|
29
|
+
marginDebtUsd: zod_1.z.number().nullable(),
|
|
30
|
+
confirmation: zod_1.z.string(),
|
|
31
|
+
status: zod_1.z.string(),
|
|
32
|
+
stale: zod_1.z.boolean(),
|
|
33
|
+
systemState: zod_1.z.string(),
|
|
34
|
+
market: exports.AllocationMarketSchema,
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=allocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allocation.js","sourceRoot":"","sources":["../src/allocation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC/C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE;IAChC,sBAAsB,EAAE,OAAC,CAAC,MAAM,EAAE;IAClC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC9B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC5B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE;IAClB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,MAAM,EAAE,8BAAsB;CAC/B,CAAC,CAAC"}
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AuthRequestCodeBodySchema: z.ZodObject<{
|
|
3
|
+
chatId: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const AuthVerifyCodeBodySchema: z.ZodObject<{
|
|
6
|
+
chatId: z.ZodString;
|
|
7
|
+
code: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const AuthRequestCodeResponseSchema: z.ZodObject<{
|
|
10
|
+
ok: z.ZodLiteral<true>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const SessionUserDtoSchema: z.ZodObject<{
|
|
13
|
+
userId: z.ZodNumber;
|
|
14
|
+
chatId: z.ZodString;
|
|
15
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const AuthVerifyCodeResponseSchema: z.ZodObject<{
|
|
18
|
+
userId: z.ZodNumber;
|
|
19
|
+
chatId: z.ZodString;
|
|
20
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
accessToken: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const AuthSessionResponseSchema: z.ZodObject<{
|
|
24
|
+
userId: z.ZodNumber;
|
|
25
|
+
chatId: z.ZodString;
|
|
26
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
isAdmin: z.ZodBoolean;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type AuthRequestCodeBody = z.infer<typeof AuthRequestCodeBodySchema>;
|
|
30
|
+
export type AuthVerifyCodeBody = z.infer<typeof AuthVerifyCodeBodySchema>;
|
|
31
|
+
export type AuthRequestCodeResponse = z.infer<typeof AuthRequestCodeResponseSchema>;
|
|
32
|
+
export type SessionUserDto = z.infer<typeof SessionUserDtoSchema>;
|
|
33
|
+
export type AuthVerifyCodeResponse = z.infer<typeof AuthVerifyCodeResponseSchema>;
|
|
34
|
+
export type AuthSessionResponse = z.infer<typeof AuthSessionResponseSchema>;
|
|
35
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;iBAEvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;iBAEpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthSessionResponseSchema = exports.AuthVerifyCodeResponseSchema = exports.SessionUserDtoSchema = exports.AuthRequestCodeResponseSchema = exports.AuthVerifyCodeBodySchema = exports.AuthRequestCodeBodySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.AuthRequestCodeBodySchema = zod_1.z.object({
|
|
6
|
+
chatId: zod_1.z.string().regex(/^\d+$/),
|
|
7
|
+
});
|
|
8
|
+
exports.AuthVerifyCodeBodySchema = zod_1.z.object({
|
|
9
|
+
chatId: zod_1.z.string().regex(/^\d+$/),
|
|
10
|
+
code: zod_1.z.string().regex(/^\d{6}$/),
|
|
11
|
+
});
|
|
12
|
+
exports.AuthRequestCodeResponseSchema = zod_1.z.object({
|
|
13
|
+
ok: zod_1.z.literal(true),
|
|
14
|
+
});
|
|
15
|
+
exports.SessionUserDtoSchema = zod_1.z.object({
|
|
16
|
+
userId: zod_1.z.number().int().positive(),
|
|
17
|
+
chatId: zod_1.z.string(),
|
|
18
|
+
displayName: zod_1.z.string().nullable().optional(),
|
|
19
|
+
});
|
|
20
|
+
exports.AuthVerifyCodeResponseSchema = exports.SessionUserDtoSchema.extend({
|
|
21
|
+
accessToken: zod_1.z.string().min(1),
|
|
22
|
+
});
|
|
23
|
+
exports.AuthSessionResponseSchema = exports.SessionUserDtoSchema.extend({
|
|
24
|
+
isAdmin: zod_1.z.boolean(),
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;CAClC,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IACjC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;CAClC,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACpB,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,4BAAoB,CAAC,MAAM,CAAC;IACtE,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,4BAAoB,CAAC,MAAM,CAAC;IACnE,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ApiErrorBodySchema: z.ZodObject<{
|
|
3
|
+
error: z.ZodOptional<z.ZodString>;
|
|
4
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type ApiErrorBody = z.infer<typeof ApiErrorBodySchema>;
|
|
7
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;iBAO3B,CAAC;AAEL,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiErrorBodySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const NEST_ERROR_MESSAGE_SCHEMA = zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]);
|
|
6
|
+
exports.ApiErrorBodySchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
error: zod_1.z.string().optional(),
|
|
9
|
+
message: NEST_ERROR_MESSAGE_SCHEMA.optional(),
|
|
10
|
+
})
|
|
11
|
+
.refine((body) => body.error !== undefined || body.message !== undefined, {
|
|
12
|
+
message: 'error or message is required',
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,yBAAyB,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AAEhE,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,OAAO,EAAE,yBAAyB,CAAC,QAAQ,EAAE;CAC9C,CAAC;KACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;IACxE,OAAO,EAAE,8BAA8B;CACxC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AuthRequestCodeBodySchema, AuthVerifyCodeBodySchema, AuthRequestCodeResponseSchema, SessionUserDtoSchema, AuthVerifyCodeResponseSchema, AuthSessionResponseSchema, type AuthRequestCodeBody, type AuthVerifyCodeBody, type AuthRequestCodeResponse, type SessionUserDto, type AuthVerifyCodeResponse, type AuthSessionResponse, } from './auth.js';
|
|
2
|
+
export { ProposalStateApiEnum, ProposalDirectionApiEnum, RecommendationTierApiEnum, ProposalComponentSchema, ProposalInboxItemSchema, ProposalsInboxResponseSchema, ProposalDetailResponseSchema, ProposalActionKindApiEnum, ProposalRejectReasonApiEnum, ProposalRejectBodySchema, ProposalExecuteBodySchema, ProposalArmBodySchema, ProposalActionResponseSchema, type ProposalStateApi, type ProposalDirectionApi, type RecommendationTierApi, type ProposalComponent, type ProposalInboxItem, type ProposalsInboxResponse, type ProposalDetailResponse, type ProposalActionKindApi, type ProposalRejectReasonApi, type ProposalRejectBody, type ProposalExecuteBody, type ProposalArmBody, type ProposalActionResponse, } from './proposals.js';
|
|
3
|
+
export { PortfolioSummarySchema, PortfoliosListResponseSchema, PortfolioValuationResponseSchema, type PortfolioSummary, type PortfoliosListResponse, type PortfolioValuationResponse, } from './portfolios.js';
|
|
4
|
+
export { AllocationMarketSchema, AllocationPostureResponseSchema, type AllocationPostureResponse, } from './allocation.js';
|
|
5
|
+
export { ApiErrorBodySchema, type ApiErrorBody } from './errors.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,gCAAgC,EAChC,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAChC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,sBAAsB,EACtB,+BAA+B,EAC/B,KAAK,yBAAyB,GAC/B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiErrorBodySchema = exports.AllocationPostureResponseSchema = exports.AllocationMarketSchema = exports.PortfolioValuationResponseSchema = exports.PortfoliosListResponseSchema = exports.PortfolioSummarySchema = exports.ProposalActionResponseSchema = exports.ProposalArmBodySchema = exports.ProposalExecuteBodySchema = exports.ProposalRejectBodySchema = exports.ProposalRejectReasonApiEnum = exports.ProposalActionKindApiEnum = exports.ProposalDetailResponseSchema = exports.ProposalsInboxResponseSchema = exports.ProposalInboxItemSchema = exports.ProposalComponentSchema = exports.RecommendationTierApiEnum = exports.ProposalDirectionApiEnum = exports.ProposalStateApiEnum = exports.AuthSessionResponseSchema = exports.AuthVerifyCodeResponseSchema = exports.SessionUserDtoSchema = exports.AuthRequestCodeResponseSchema = exports.AuthVerifyCodeBodySchema = exports.AuthRequestCodeBodySchema = void 0;
|
|
4
|
+
var auth_js_1 = require("./auth.js");
|
|
5
|
+
Object.defineProperty(exports, "AuthRequestCodeBodySchema", { enumerable: true, get: function () { return auth_js_1.AuthRequestCodeBodySchema; } });
|
|
6
|
+
Object.defineProperty(exports, "AuthVerifyCodeBodySchema", { enumerable: true, get: function () { return auth_js_1.AuthVerifyCodeBodySchema; } });
|
|
7
|
+
Object.defineProperty(exports, "AuthRequestCodeResponseSchema", { enumerable: true, get: function () { return auth_js_1.AuthRequestCodeResponseSchema; } });
|
|
8
|
+
Object.defineProperty(exports, "SessionUserDtoSchema", { enumerable: true, get: function () { return auth_js_1.SessionUserDtoSchema; } });
|
|
9
|
+
Object.defineProperty(exports, "AuthVerifyCodeResponseSchema", { enumerable: true, get: function () { return auth_js_1.AuthVerifyCodeResponseSchema; } });
|
|
10
|
+
Object.defineProperty(exports, "AuthSessionResponseSchema", { enumerable: true, get: function () { return auth_js_1.AuthSessionResponseSchema; } });
|
|
11
|
+
var proposals_js_1 = require("./proposals.js");
|
|
12
|
+
Object.defineProperty(exports, "ProposalStateApiEnum", { enumerable: true, get: function () { return proposals_js_1.ProposalStateApiEnum; } });
|
|
13
|
+
Object.defineProperty(exports, "ProposalDirectionApiEnum", { enumerable: true, get: function () { return proposals_js_1.ProposalDirectionApiEnum; } });
|
|
14
|
+
Object.defineProperty(exports, "RecommendationTierApiEnum", { enumerable: true, get: function () { return proposals_js_1.RecommendationTierApiEnum; } });
|
|
15
|
+
Object.defineProperty(exports, "ProposalComponentSchema", { enumerable: true, get: function () { return proposals_js_1.ProposalComponentSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "ProposalInboxItemSchema", { enumerable: true, get: function () { return proposals_js_1.ProposalInboxItemSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "ProposalsInboxResponseSchema", { enumerable: true, get: function () { return proposals_js_1.ProposalsInboxResponseSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "ProposalDetailResponseSchema", { enumerable: true, get: function () { return proposals_js_1.ProposalDetailResponseSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "ProposalActionKindApiEnum", { enumerable: true, get: function () { return proposals_js_1.ProposalActionKindApiEnum; } });
|
|
20
|
+
Object.defineProperty(exports, "ProposalRejectReasonApiEnum", { enumerable: true, get: function () { return proposals_js_1.ProposalRejectReasonApiEnum; } });
|
|
21
|
+
Object.defineProperty(exports, "ProposalRejectBodySchema", { enumerable: true, get: function () { return proposals_js_1.ProposalRejectBodySchema; } });
|
|
22
|
+
Object.defineProperty(exports, "ProposalExecuteBodySchema", { enumerable: true, get: function () { return proposals_js_1.ProposalExecuteBodySchema; } });
|
|
23
|
+
Object.defineProperty(exports, "ProposalArmBodySchema", { enumerable: true, get: function () { return proposals_js_1.ProposalArmBodySchema; } });
|
|
24
|
+
Object.defineProperty(exports, "ProposalActionResponseSchema", { enumerable: true, get: function () { return proposals_js_1.ProposalActionResponseSchema; } });
|
|
25
|
+
var portfolios_js_1 = require("./portfolios.js");
|
|
26
|
+
Object.defineProperty(exports, "PortfolioSummarySchema", { enumerable: true, get: function () { return portfolios_js_1.PortfolioSummarySchema; } });
|
|
27
|
+
Object.defineProperty(exports, "PortfoliosListResponseSchema", { enumerable: true, get: function () { return portfolios_js_1.PortfoliosListResponseSchema; } });
|
|
28
|
+
Object.defineProperty(exports, "PortfolioValuationResponseSchema", { enumerable: true, get: function () { return portfolios_js_1.PortfolioValuationResponseSchema; } });
|
|
29
|
+
var allocation_js_1 = require("./allocation.js");
|
|
30
|
+
Object.defineProperty(exports, "AllocationMarketSchema", { enumerable: true, get: function () { return allocation_js_1.AllocationMarketSchema; } });
|
|
31
|
+
Object.defineProperty(exports, "AllocationPostureResponseSchema", { enumerable: true, get: function () { return allocation_js_1.AllocationPostureResponseSchema; } });
|
|
32
|
+
var errors_js_1 = require("./errors.js");
|
|
33
|
+
Object.defineProperty(exports, "ApiErrorBodySchema", { enumerable: true, get: function () { return errors_js_1.ApiErrorBodySchema; } });
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAamB;AAZjB,oHAAA,yBAAyB,OAAA;AACzB,mHAAA,wBAAwB,OAAA;AACxB,wHAAA,6BAA6B,OAAA;AAC7B,+GAAA,oBAAoB,OAAA;AACpB,uHAAA,4BAA4B,OAAA;AAC5B,oHAAA,yBAAyB,OAAA;AAS3B,+CA2BwB;AA1BtB,oHAAA,oBAAoB,OAAA;AACpB,wHAAA,wBAAwB,OAAA;AACxB,yHAAA,yBAAyB,OAAA;AACzB,uHAAA,uBAAuB,OAAA;AACvB,uHAAA,uBAAuB,OAAA;AACvB,4HAAA,4BAA4B,OAAA;AAC5B,4HAAA,4BAA4B,OAAA;AAC5B,yHAAA,yBAAyB,OAAA;AACzB,2HAAA,2BAA2B,OAAA;AAC3B,wHAAA,wBAAwB,OAAA;AACxB,yHAAA,yBAAyB,OAAA;AACzB,qHAAA,qBAAqB,OAAA;AACrB,4HAAA,4BAA4B,OAAA;AAgB9B,iDAOyB;AANvB,uHAAA,sBAAsB,OAAA;AACtB,6HAAA,4BAA4B,OAAA;AAC5B,iIAAA,gCAAgC,OAAA;AAMlC,iDAIyB;AAHvB,uHAAA,sBAAsB,OAAA;AACtB,gIAAA,+BAA+B,OAAA;AAIjC,yCAAoE;AAA3D,+GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PortfolioSummarySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
isDefault: z.ZodBoolean;
|
|
6
|
+
kind: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const PortfoliosListResponseSchema: z.ZodObject<{
|
|
9
|
+
portfolios: z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodNumber;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
isDefault: z.ZodBoolean;
|
|
13
|
+
kind: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const PortfolioValuationResponseSchema: z.ZodObject<{
|
|
17
|
+
portfolioId: z.ZodNumber;
|
|
18
|
+
totalValue: z.ZodNumber;
|
|
19
|
+
cashValue: z.ZodNumber;
|
|
20
|
+
trueCashUsd: z.ZodNumber;
|
|
21
|
+
cashEquivalentUsd: z.ZodNumber;
|
|
22
|
+
deployedCapitalUsd: z.ZodNumber;
|
|
23
|
+
realizedPnl: z.ZodNumber;
|
|
24
|
+
unrealizedPnl: z.ZodNumber;
|
|
25
|
+
openPositionCount: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type PortfolioSummary = z.infer<typeof PortfolioSummarySchema>;
|
|
28
|
+
export type PortfoliosListResponse = z.infer<typeof PortfoliosListResponseSchema>;
|
|
29
|
+
export type PortfolioValuationResponse = z.infer<typeof PortfolioValuationResponseSchema>;
|
|
30
|
+
//# sourceMappingURL=portfolios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolios.d.ts","sourceRoot":"","sources":["../src/portfolios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;iBAEvC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;iBAU3C,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PortfolioValuationResponseSchema = exports.PortfoliosListResponseSchema = exports.PortfolioSummarySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PortfolioSummarySchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.number().int().positive(),
|
|
7
|
+
name: zod_1.z.string(),
|
|
8
|
+
isDefault: zod_1.z.boolean(),
|
|
9
|
+
kind: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
exports.PortfoliosListResponseSchema = zod_1.z.object({
|
|
12
|
+
portfolios: zod_1.z.array(exports.PortfolioSummarySchema),
|
|
13
|
+
});
|
|
14
|
+
exports.PortfolioValuationResponseSchema = zod_1.z.object({
|
|
15
|
+
portfolioId: zod_1.z.number().int().positive(),
|
|
16
|
+
totalValue: zod_1.z.number(),
|
|
17
|
+
cashValue: zod_1.z.number(),
|
|
18
|
+
trueCashUsd: zod_1.z.number(),
|
|
19
|
+
cashEquivalentUsd: zod_1.z.number(),
|
|
20
|
+
deployedCapitalUsd: zod_1.z.number(),
|
|
21
|
+
realizedPnl: zod_1.z.number(),
|
|
22
|
+
unrealizedPnl: zod_1.z.number(),
|
|
23
|
+
openPositionCount: zod_1.z.number().int().nonnegative(),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=portfolios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolios.js","sourceRoot":"","sources":["../src/portfolios.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;IACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,8BAAsB,CAAC;CAC5C,CAAC,CAAC;AAEU,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACvD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC9B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAClD,CAAC,CAAC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ProposalStateApiEnum: z.ZodEnum<{
|
|
3
|
+
proposed: "proposed";
|
|
4
|
+
armed: "armed";
|
|
5
|
+
rejected: "rejected";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ProposalDirectionApiEnum: z.ZodEnum<{
|
|
8
|
+
long: "long";
|
|
9
|
+
short: "short";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const RecommendationTierApiEnum: z.ZodEnum<{
|
|
12
|
+
watch: "watch";
|
|
13
|
+
recommendation: "recommendation";
|
|
14
|
+
strong_recommendation: "strong_recommendation";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const ProposalComponentSchema: z.ZodObject<{
|
|
17
|
+
analyzerKind: z.ZodString;
|
|
18
|
+
strength: z.ZodNumber;
|
|
19
|
+
signalName: z.ZodString;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export declare const ProposalInboxItemSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodNumber;
|
|
23
|
+
tickerSymbol: z.ZodString;
|
|
24
|
+
direction: z.ZodEnum<{
|
|
25
|
+
long: "long";
|
|
26
|
+
short: "short";
|
|
27
|
+
}>;
|
|
28
|
+
state: z.ZodEnum<{
|
|
29
|
+
proposed: "proposed";
|
|
30
|
+
armed: "armed";
|
|
31
|
+
rejected: "rejected";
|
|
32
|
+
}>;
|
|
33
|
+
conviction: z.ZodNumber;
|
|
34
|
+
recommendationTier: z.ZodEnum<{
|
|
35
|
+
watch: "watch";
|
|
36
|
+
recommendation: "recommendation";
|
|
37
|
+
strong_recommendation: "strong_recommendation";
|
|
38
|
+
}>;
|
|
39
|
+
recommendationLabel: z.ZodString;
|
|
40
|
+
armingBlockerSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const ProposalsInboxResponseSchema: z.ZodObject<{
|
|
43
|
+
proposed: z.ZodArray<z.ZodObject<{
|
|
44
|
+
id: z.ZodNumber;
|
|
45
|
+
tickerSymbol: z.ZodString;
|
|
46
|
+
direction: z.ZodEnum<{
|
|
47
|
+
long: "long";
|
|
48
|
+
short: "short";
|
|
49
|
+
}>;
|
|
50
|
+
state: z.ZodEnum<{
|
|
51
|
+
proposed: "proposed";
|
|
52
|
+
armed: "armed";
|
|
53
|
+
rejected: "rejected";
|
|
54
|
+
}>;
|
|
55
|
+
conviction: z.ZodNumber;
|
|
56
|
+
recommendationTier: z.ZodEnum<{
|
|
57
|
+
watch: "watch";
|
|
58
|
+
recommendation: "recommendation";
|
|
59
|
+
strong_recommendation: "strong_recommendation";
|
|
60
|
+
}>;
|
|
61
|
+
recommendationLabel: z.ZodString;
|
|
62
|
+
armingBlockerSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
armed: z.ZodArray<z.ZodObject<{
|
|
65
|
+
id: z.ZodNumber;
|
|
66
|
+
tickerSymbol: z.ZodString;
|
|
67
|
+
direction: z.ZodEnum<{
|
|
68
|
+
long: "long";
|
|
69
|
+
short: "short";
|
|
70
|
+
}>;
|
|
71
|
+
state: z.ZodEnum<{
|
|
72
|
+
proposed: "proposed";
|
|
73
|
+
armed: "armed";
|
|
74
|
+
rejected: "rejected";
|
|
75
|
+
}>;
|
|
76
|
+
conviction: z.ZodNumber;
|
|
77
|
+
recommendationTier: z.ZodEnum<{
|
|
78
|
+
watch: "watch";
|
|
79
|
+
recommendation: "recommendation";
|
|
80
|
+
strong_recommendation: "strong_recommendation";
|
|
81
|
+
}>;
|
|
82
|
+
recommendationLabel: z.ZodString;
|
|
83
|
+
armingBlockerSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export declare const ProposalDetailResponseSchema: z.ZodObject<{
|
|
87
|
+
id: z.ZodNumber;
|
|
88
|
+
tickerSymbol: z.ZodString;
|
|
89
|
+
direction: z.ZodEnum<{
|
|
90
|
+
long: "long";
|
|
91
|
+
short: "short";
|
|
92
|
+
}>;
|
|
93
|
+
state: z.ZodEnum<{
|
|
94
|
+
proposed: "proposed";
|
|
95
|
+
armed: "armed";
|
|
96
|
+
rejected: "rejected";
|
|
97
|
+
}>;
|
|
98
|
+
conviction: z.ZodNumber;
|
|
99
|
+
recommendationTier: z.ZodEnum<{
|
|
100
|
+
watch: "watch";
|
|
101
|
+
recommendation: "recommendation";
|
|
102
|
+
strong_recommendation: "strong_recommendation";
|
|
103
|
+
}>;
|
|
104
|
+
recommendationLabel: z.ZodString;
|
|
105
|
+
components: z.ZodArray<z.ZodObject<{
|
|
106
|
+
analyzerKind: z.ZodString;
|
|
107
|
+
strength: z.ZodNumber;
|
|
108
|
+
signalName: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
armingBlockerSummary: z.ZodNullable<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
export type ProposalStateApi = z.infer<typeof ProposalStateApiEnum>;
|
|
113
|
+
export type ProposalDirectionApi = z.infer<typeof ProposalDirectionApiEnum>;
|
|
114
|
+
export type RecommendationTierApi = z.infer<typeof RecommendationTierApiEnum>;
|
|
115
|
+
export type ProposalComponent = z.infer<typeof ProposalComponentSchema>;
|
|
116
|
+
export type ProposalInboxItem = z.infer<typeof ProposalInboxItemSchema>;
|
|
117
|
+
export type ProposalsInboxResponse = z.infer<typeof ProposalsInboxResponseSchema>;
|
|
118
|
+
export type ProposalDetailResponse = z.infer<typeof ProposalDetailResponseSchema>;
|
|
119
|
+
export declare const ProposalActionKindApiEnum: z.ZodEnum<{
|
|
120
|
+
arm: "arm";
|
|
121
|
+
reject: "reject";
|
|
122
|
+
skip: "skip";
|
|
123
|
+
execute: "execute";
|
|
124
|
+
}>;
|
|
125
|
+
export declare const ProposalRejectReasonApiEnum: z.ZodEnum<{
|
|
126
|
+
near_high: "near_high";
|
|
127
|
+
macro_geopolitical_risk: "macro_geopolitical_risk";
|
|
128
|
+
already_exposed: "already_exposed";
|
|
129
|
+
bad_thesis: "bad_thesis";
|
|
130
|
+
overextended: "overextended";
|
|
131
|
+
data_quality: "data_quality";
|
|
132
|
+
not_interested: "not_interested";
|
|
133
|
+
}>;
|
|
134
|
+
export declare const ProposalRejectBodySchema: z.ZodObject<{
|
|
135
|
+
reasonCodes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
136
|
+
near_high: "near_high";
|
|
137
|
+
macro_geopolitical_risk: "macro_geopolitical_risk";
|
|
138
|
+
already_exposed: "already_exposed";
|
|
139
|
+
bad_thesis: "bad_thesis";
|
|
140
|
+
overextended: "overextended";
|
|
141
|
+
data_quality: "data_quality";
|
|
142
|
+
not_interested: "not_interested";
|
|
143
|
+
}>>>;
|
|
144
|
+
note: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export declare const ProposalExecuteBodySchema: z.ZodObject<{
|
|
147
|
+
portfolioId: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
export declare const ProposalArmBodySchema: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
150
|
+
export declare const ProposalActionResponseSchema: z.ZodObject<{
|
|
151
|
+
action: z.ZodEnum<{
|
|
152
|
+
arm: "arm";
|
|
153
|
+
reject: "reject";
|
|
154
|
+
skip: "skip";
|
|
155
|
+
execute: "execute";
|
|
156
|
+
}>;
|
|
157
|
+
message: z.ZodString;
|
|
158
|
+
proposal: z.ZodObject<{
|
|
159
|
+
id: z.ZodNumber;
|
|
160
|
+
tickerSymbol: z.ZodString;
|
|
161
|
+
direction: z.ZodEnum<{
|
|
162
|
+
long: "long";
|
|
163
|
+
short: "short";
|
|
164
|
+
}>;
|
|
165
|
+
state: z.ZodEnum<{
|
|
166
|
+
proposed: "proposed";
|
|
167
|
+
armed: "armed";
|
|
168
|
+
rejected: "rejected";
|
|
169
|
+
}>;
|
|
170
|
+
conviction: z.ZodNumber;
|
|
171
|
+
recommendationTier: z.ZodEnum<{
|
|
172
|
+
watch: "watch";
|
|
173
|
+
recommendation: "recommendation";
|
|
174
|
+
strong_recommendation: "strong_recommendation";
|
|
175
|
+
}>;
|
|
176
|
+
recommendationLabel: z.ZodString;
|
|
177
|
+
components: z.ZodArray<z.ZodObject<{
|
|
178
|
+
analyzerKind: z.ZodString;
|
|
179
|
+
strength: z.ZodNumber;
|
|
180
|
+
signalName: z.ZodString;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
armingBlockerSummary: z.ZodNullable<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
positionId: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export type ProposalActionKindApi = z.infer<typeof ProposalActionKindApiEnum>;
|
|
187
|
+
export type ProposalRejectReasonApi = z.infer<typeof ProposalRejectReasonApiEnum>;
|
|
188
|
+
export type ProposalRejectBody = z.infer<typeof ProposalRejectBodySchema>;
|
|
189
|
+
export type ProposalExecuteBody = z.infer<typeof ProposalExecuteBodySchema>;
|
|
190
|
+
export type ProposalArmBody = z.infer<typeof ProposalArmBodySchema>;
|
|
191
|
+
export type ProposalActionResponse = z.infer<typeof ProposalActionResponseSchema>;
|
|
192
|
+
//# sourceMappingURL=proposals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposals.d.ts","sourceRoot":"","sources":["../src/proposals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;EAA4C,CAAC;AAE9E,eAAO,MAAM,wBAAwB;;;EAA4B,CAAC;AAElE,eAAO,MAAM,yBAAyB;;;;EAIpC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;iBASlC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;EAKpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;EAQtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAGnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH,eAAO,MAAM,qBAAqB,+CAA0B,CAAC;AAE7D,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKvC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE9E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,2BAA2B,CACnC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProposalActionResponseSchema = exports.ProposalArmBodySchema = exports.ProposalExecuteBodySchema = exports.ProposalRejectBodySchema = exports.ProposalRejectReasonApiEnum = exports.ProposalActionKindApiEnum = exports.ProposalDetailResponseSchema = exports.ProposalsInboxResponseSchema = exports.ProposalInboxItemSchema = exports.ProposalComponentSchema = exports.RecommendationTierApiEnum = exports.ProposalDirectionApiEnum = exports.ProposalStateApiEnum = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ProposalStateApiEnum = zod_1.z.enum(['proposed', 'armed', 'rejected']);
|
|
6
|
+
exports.ProposalDirectionApiEnum = zod_1.z.enum(['long', 'short']);
|
|
7
|
+
exports.RecommendationTierApiEnum = zod_1.z.enum([
|
|
8
|
+
'watch',
|
|
9
|
+
'recommendation',
|
|
10
|
+
'strong_recommendation',
|
|
11
|
+
]);
|
|
12
|
+
exports.ProposalComponentSchema = zod_1.z.object({
|
|
13
|
+
analyzerKind: zod_1.z.string(),
|
|
14
|
+
strength: zod_1.z.number(),
|
|
15
|
+
signalName: zod_1.z.string(),
|
|
16
|
+
});
|
|
17
|
+
exports.ProposalInboxItemSchema = zod_1.z.object({
|
|
18
|
+
id: zod_1.z.number().int().positive(),
|
|
19
|
+
tickerSymbol: zod_1.z.string(),
|
|
20
|
+
direction: exports.ProposalDirectionApiEnum,
|
|
21
|
+
state: exports.ProposalStateApiEnum,
|
|
22
|
+
conviction: zod_1.z.number(),
|
|
23
|
+
recommendationTier: exports.RecommendationTierApiEnum,
|
|
24
|
+
recommendationLabel: zod_1.z.string(),
|
|
25
|
+
armingBlockerSummary: zod_1.z.string().nullable().optional(),
|
|
26
|
+
});
|
|
27
|
+
exports.ProposalsInboxResponseSchema = zod_1.z.object({
|
|
28
|
+
proposed: zod_1.z.array(exports.ProposalInboxItemSchema),
|
|
29
|
+
armed: zod_1.z.array(exports.ProposalInboxItemSchema),
|
|
30
|
+
});
|
|
31
|
+
exports.ProposalDetailResponseSchema = exports.ProposalInboxItemSchema.extend({
|
|
32
|
+
components: zod_1.z.array(exports.ProposalComponentSchema),
|
|
33
|
+
armingBlockerSummary: zod_1.z.string().nullable(),
|
|
34
|
+
});
|
|
35
|
+
exports.ProposalActionKindApiEnum = zod_1.z.enum([
|
|
36
|
+
'arm',
|
|
37
|
+
'reject',
|
|
38
|
+
'skip',
|
|
39
|
+
'execute',
|
|
40
|
+
]);
|
|
41
|
+
exports.ProposalRejectReasonApiEnum = zod_1.z.enum([
|
|
42
|
+
'near_high',
|
|
43
|
+
'macro_geopolitical_risk',
|
|
44
|
+
'already_exposed',
|
|
45
|
+
'bad_thesis',
|
|
46
|
+
'overextended',
|
|
47
|
+
'data_quality',
|
|
48
|
+
'not_interested',
|
|
49
|
+
]);
|
|
50
|
+
exports.ProposalRejectBodySchema = zod_1.z.object({
|
|
51
|
+
reasonCodes: zod_1.z.array(exports.ProposalRejectReasonApiEnum).optional(),
|
|
52
|
+
note: zod_1.z.string().max(500).optional(),
|
|
53
|
+
});
|
|
54
|
+
exports.ProposalExecuteBodySchema = zod_1.z.object({
|
|
55
|
+
portfolioId: zod_1.z.number().int().positive().optional(),
|
|
56
|
+
});
|
|
57
|
+
exports.ProposalArmBodySchema = zod_1.z.object({}).optional();
|
|
58
|
+
exports.ProposalActionResponseSchema = zod_1.z.object({
|
|
59
|
+
action: exports.ProposalActionKindApiEnum,
|
|
60
|
+
message: zod_1.z.string(),
|
|
61
|
+
proposal: exports.ProposalDetailResponseSchema,
|
|
62
|
+
positionId: zod_1.z.number().int().positive().optional(),
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=proposals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proposals.js","sourceRoot":"","sources":["../src/proposals.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,oBAAoB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjE,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAErD,QAAA,yBAAyB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC9C,OAAO;IACP,gBAAgB;IAChB,uBAAuB;CACxB,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,gCAAwB;IACnC,KAAK,EAAE,4BAAoB;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,kBAAkB,EAAE,iCAAyB;IAC7C,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC/B,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC;CACxC,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,+BAAuB,CAAC,MAAM,CAAC;IACzE,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC;IAC5C,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAoBU,QAAA,yBAAyB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC9C,KAAK;IACL,QAAQ;IACR,MAAM;IACN,SAAS;CACV,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,OAAC,CAAC,IAAI,CAAC;IAChD,WAAW;IACX,yBAAyB;IACzB,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,cAAc;IACd,gBAAgB;CACjB,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,mCAA2B,CAAC,CAAC,QAAQ,EAAE;IAC5D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;AAEhD,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,iCAAyB;IACjC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,oCAA4B;IACtC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@investment-finder/api-contract",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Zod schemas for the Investment Finder /api/v1 JSON API",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc -p tsconfig.build.json",
|
|
23
|
+
"test": "jest"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=24 <25"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"zod": "^4.3.6"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/jest": "^30.0.0",
|
|
33
|
+
"@types/node": "^24.0.0",
|
|
34
|
+
"jest": "^30.0.0",
|
|
35
|
+
"ts-jest": "^29.2.5",
|
|
36
|
+
"typescript": "^5.7.3"
|
|
37
|
+
},
|
|
38
|
+
"jest": {
|
|
39
|
+
"moduleFileExtensions": [
|
|
40
|
+
"js",
|
|
41
|
+
"json",
|
|
42
|
+
"ts"
|
|
43
|
+
],
|
|
44
|
+
"rootDir": ".",
|
|
45
|
+
"testRegex": "__tests__/.*\\.spec\\.ts$",
|
|
46
|
+
"transform": {
|
|
47
|
+
"^.+\\.(t|j)s$": "ts-jest"
|
|
48
|
+
},
|
|
49
|
+
"moduleNameMapper": {
|
|
50
|
+
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
51
|
+
},
|
|
52
|
+
"testEnvironment": "node"
|
|
53
|
+
}
|
|
54
|
+
}
|