@0xmonaco/types 0.0.0-develop-20260302144923 → 0.0.0-develop-20260302160702

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.
@@ -89,9 +89,9 @@ export type LedgerEntryType = "CREDIT" | "DEBIT" | "LOCK" | "UNLOCK" | "FEE";
89
89
  export type TransactionType = "DEPOSIT" | "WITHDRAWAL" | "TRADE" | "FEE" | "FUNDING" | "LIQUIDATION" | "INTEREST" | "REWARD";
90
90
  /**
91
91
  * Data source for movements queries.
92
- * - `hot_storage`: From Redis cache (real-time, fast)
92
+ * - `hot_storage`: From Redis cache (real-time, fast) — default
93
93
  * - `cold_storage`: From PostgreSQL (historical, paginated)
94
- * - `both`: Combined from both sources (default)
94
+ * - `both`: Combined from both sources
95
95
  */
96
96
  export type MovementsDataSource = "hot_storage" | "cold_storage" | "both";
97
97
  /**
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export * from "./common.js";
17
17
  export * from "./market.js";
18
+ export * from "./profile.js";
18
19
  export * from "./trading.js";
19
20
  export * from "./vault.js";
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
@@ -17,6 +17,7 @@
17
17
  export * from "./common.js";
18
18
  export * from "./market.js";
19
19
  // Export module-specific schemas
20
+ export * from "./profile.js";
20
21
  export * from "./trading.js";
21
22
  export * from "./vault.js";
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,8BAA8B;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,iCAAiC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,8BAA8B;AAC9B,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,iCAAiC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Profile API Validation Schemas
3
+ *
4
+ * Zod schemas for validating profile API inputs before making requests.
5
+ * Provides clear, actionable error messages for invalid parameters.
6
+ */
7
+ import { z } from "zod";
8
+ /**
9
+ * Ledger entry type validation
10
+ */
11
+ export declare const LedgerEntryTypeSchema: z.ZodEnum<{
12
+ CREDIT: "CREDIT";
13
+ DEBIT: "DEBIT";
14
+ LOCK: "LOCK";
15
+ UNLOCK: "UNLOCK";
16
+ FEE: "FEE";
17
+ }>;
18
+ /**
19
+ * Transaction type validation
20
+ */
21
+ export declare const TransactionTypeSchema: z.ZodEnum<{
22
+ FEE: "FEE";
23
+ DEPOSIT: "DEPOSIT";
24
+ WITHDRAWAL: "WITHDRAWAL";
25
+ TRADE: "TRADE";
26
+ FUNDING: "FUNDING";
27
+ LIQUIDATION: "LIQUIDATION";
28
+ INTEREST: "INTEREST";
29
+ REWARD: "REWARD";
30
+ }>;
31
+ /**
32
+ * Movements data source validation
33
+ */
34
+ export declare const MovementsDataSourceSchema: z.ZodEnum<{
35
+ hot_storage: "hot_storage";
36
+ cold_storage: "cold_storage";
37
+ both: "both";
38
+ }>;
39
+ /**
40
+ * Get User Movements validation schema
41
+ *
42
+ * Validates parameters for fetching paginated user movements.
43
+ * All fields are optional — an empty object or undefined is valid.
44
+ */
45
+ export declare const GetUserMovementsSchema: z.ZodObject<{
46
+ page: z.ZodOptional<z.ZodNumber>;
47
+ limit: z.ZodOptional<z.ZodNumber>;
48
+ entry_type: z.ZodOptional<z.ZodEnum<{
49
+ CREDIT: "CREDIT";
50
+ DEBIT: "DEBIT";
51
+ LOCK: "LOCK";
52
+ UNLOCK: "UNLOCK";
53
+ FEE: "FEE";
54
+ }>>;
55
+ transaction_type: z.ZodOptional<z.ZodEnum<{
56
+ FEE: "FEE";
57
+ DEPOSIT: "DEPOSIT";
58
+ WITHDRAWAL: "WITHDRAWAL";
59
+ TRADE: "TRADE";
60
+ FUNDING: "FUNDING";
61
+ LIQUIDATION: "LIQUIDATION";
62
+ INTEREST: "INTEREST";
63
+ REWARD: "REWARD";
64
+ }>>;
65
+ asset_id: z.ZodOptional<z.ZodUUID>;
66
+ source: z.ZodOptional<z.ZodEnum<{
67
+ hot_storage: "hot_storage";
68
+ cold_storage: "cold_storage";
69
+ both: "both";
70
+ }>>;
71
+ }, z.core.$strip>;
72
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/validation/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;EAEhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;EAEpC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOjC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Profile API Validation Schemas
3
+ *
4
+ * Zod schemas for validating profile API inputs before making requests.
5
+ * Provides clear, actionable error messages for invalid parameters.
6
+ */
7
+ import { z } from "zod";
8
+ import { UUIDSchema } from "./trading.js";
9
+ /**
10
+ * Ledger entry type validation
11
+ */
12
+ export const LedgerEntryTypeSchema = z.enum(["CREDIT", "DEBIT", "LOCK", "UNLOCK", "FEE"], {
13
+ message: 'Entry type must be "CREDIT", "DEBIT", "LOCK", "UNLOCK", or "FEE"',
14
+ });
15
+ /**
16
+ * Transaction type validation
17
+ */
18
+ export const TransactionTypeSchema = z.enum(["DEPOSIT", "WITHDRAWAL", "TRADE", "FEE", "FUNDING", "LIQUIDATION", "INTEREST", "REWARD"], {
19
+ message: 'Transaction type must be "DEPOSIT", "WITHDRAWAL", "TRADE", "FEE", "FUNDING", "LIQUIDATION", "INTEREST", or "REWARD"',
20
+ });
21
+ /**
22
+ * Movements data source validation
23
+ */
24
+ export const MovementsDataSourceSchema = z.enum(["hot_storage", "cold_storage", "both"], {
25
+ message: 'Data source must be "hot_storage", "cold_storage", or "both"',
26
+ });
27
+ /**
28
+ * Get User Movements validation schema
29
+ *
30
+ * Validates parameters for fetching paginated user movements.
31
+ * All fields are optional — an empty object or undefined is valid.
32
+ */
33
+ export const GetUserMovementsSchema = z.object({
34
+ page: z.number().int("Page must be an integer").min(1, "Page must be at least 1").optional(),
35
+ limit: z.number().int("Limit must be an integer").min(1, "Limit must be at least 1").max(100, "Limit cannot exceed 100").optional(),
36
+ entry_type: LedgerEntryTypeSchema.optional(),
37
+ transaction_type: TransactionTypeSchema.optional(),
38
+ asset_id: UUIDSchema.optional(),
39
+ source: MovementsDataSourceSchema.optional(),
40
+ });
41
+ //# sourceMappingURL=profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/validation/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EA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AE,yBAAyB,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "0.0.0-develop-20260302144923",
3
+ "version": "0.0.0-develop-20260302160702",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/contracts": "0.0.0-develop-20260302144923",
23
+ "@0xmonaco/contracts": "0.0.0-develop-20260302160702",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {