@0xmonaco/types 0.8.8 → 0.8.11

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.
Files changed (51) hide show
  1. package/README.md +5 -3
  2. package/dist/api/index.d.ts +7 -0
  3. package/dist/applications/index.d.ts +47 -5
  4. package/dist/applications/index.js +2 -1
  5. package/dist/applications/requests.d.ts +78 -0
  6. package/dist/applications/requests.js +7 -0
  7. package/dist/applications/responses.d.ts +211 -1
  8. package/dist/applications/responses.js +3 -1
  9. package/dist/auth/index.d.ts +6 -12
  10. package/dist/auth/index.js +2 -2
  11. package/dist/auth/responses.d.ts +0 -11
  12. package/dist/delegated-agents/index.d.ts +17 -1
  13. package/dist/faucet/index.d.ts +54 -0
  14. package/dist/faucet/index.js +10 -0
  15. package/dist/index.d.ts +4 -0
  16. package/dist/index.js +4 -0
  17. package/dist/margin-accounts/index.d.ts +18 -14
  18. package/dist/market/index.d.ts +116 -0
  19. package/dist/positions/index.d.ts +1 -0
  20. package/dist/profile/index.d.ts +88 -1
  21. package/dist/sdk/index.d.ts +21 -0
  22. package/dist/sub-accounts/index.d.ts +145 -0
  23. package/dist/sub-accounts/index.js +9 -0
  24. package/dist/trading/index.d.ts +6 -6
  25. package/dist/trading/responses.d.ts +8 -27
  26. package/dist/validation/margin-accounts.d.ts +7 -9
  27. package/dist/validation/margin-accounts.js +7 -9
  28. package/dist/validation/profile.d.ts +7 -0
  29. package/dist/validation/profile.js +7 -0
  30. package/dist/validation/trading.d.ts +8 -33
  31. package/dist/validation/trading.js +42 -33
  32. package/dist/validation/vault.d.ts +4 -0
  33. package/dist/validation/vault.js +2 -0
  34. package/dist/vault/index.d.ts +13 -1
  35. package/dist/whitelist/index.d.ts +44 -0
  36. package/dist/whitelist/index.js +10 -0
  37. package/dist/wire/assert.d.ts +54 -0
  38. package/dist/wire/assert.js +0 -0
  39. package/dist/wire/audit.d.ts +47 -0
  40. package/dist/wire/audit.js +43 -0
  41. package/dist/wire/coverage.d.ts +1 -0
  42. package/dist/wire/coverage.js +0 -0
  43. package/dist/wire/index.d.ts +21 -0
  44. package/dist/wire/index.js +2 -0
  45. package/dist/wire/operations.d.ts +15 -0
  46. package/dist/wire/operations.js +94 -0
  47. package/dist/wire/schema.d.ts +8460 -0
  48. package/dist/wire/schema.js +4 -0
  49. package/dist/withdrawals/index.d.ts +43 -0
  50. package/dist/withdrawals/index.js +0 -0
  51. package/package.json +6 -2
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Generated wire-types layer (MON-1476 drift tripwire).
3
+ *
4
+ * `schema.ts` is generated from `docs/src/proto-openapi/api/openapi.yaml` by
5
+ * `make ts-wire-gen` — do not edit it by hand. This barrel re-exports the
6
+ * generated `paths` / `components` / `operations` interfaces plus the
7
+ * {@link WireSchema} / {@link WireCovered} helpers the ergonomic types use to
8
+ * stay in sync with the spec.
9
+ *
10
+ * Consumers import the raw spec types from the `@0xmonaco/types/wire` subpath;
11
+ * the ergonomic types in the rest of the package are the supported surface.
12
+ *
13
+ * It also exports the generated runtime `OPERATION_IDS` list and the
14
+ * `auditSurface` helper that power the MON-1489 endpoint-coverage gate.
15
+ */
16
+ export type { Expect, MissingWireFields, WireCovered, WireSchema, WireSchemas } from "./assert";
17
+ export type { CoverageAudit, SurfaceClassification } from "./audit";
18
+ export { auditSurface } from "./audit";
19
+ export type { OperationId } from "./operations";
20
+ export { OPERATION_IDS } from "./operations";
21
+ export type { components, operations, paths } from "./schema";
@@ -0,0 +1,2 @@
1
+ export { auditSurface } from "./audit";
2
+ export { OPERATION_IDS } from "./operations";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * GENERATED — DO NOT EDIT BY HAND.
3
+ *
4
+ * Runtime list of every OpenAPI operationId in the canonical spec
5
+ * (docs/src/proto-openapi/api/openapi.yaml), emitted by `make ts-wire-gen`
6
+ * (scripts/gen-operation-ids.ts) alongside the type-only `schema.ts`.
7
+ *
8
+ * The MON-1489 endpoint-coverage gate iterates this list to assert that every
9
+ * operationId is classified (covered or intentionally excluded) on each
10
+ * hand-written SDK surface. CI regenerates it and fails on a diff, identical to
11
+ * the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
12
+ */
13
+ export declare const OPERATION_IDS: readonly ["add_position_margin", "attach_position_tp_sl", "authenticate_backend", "batch_cancel_all", "batch_cancel_all_by_pair", "batch_cancel_orders", "batch_create_orders", "batch_replace_orders", "cancel_conditional_order", "cancel_order", "close_position", "create_challenge", "create_delegated_session", "create_order", "create_sub_account_limit", "delete_sub_account_limit", "get_application_config", "get_application_stats", "get_available_collateral", "get_candles", "get_funding_state", "get_index_price", "get_margin_account_movements", "get_margin_account_summary", "get_mark_price", "get_market_metadata", "get_market_stats", "get_open_interest", "get_order_by_id", "get_orderbook_snapshot", "get_orders", "get_perp_market_config", "get_perp_market_summary", "get_portfolio_chart", "get_portfolio_stats", "get_position", "get_position_risk", "get_screener", "get_sub_account_limits", "get_trade_by_id", "get_trades", "get_trading_pair_by_id", "get_user_balance_by_asset", "get_user_balances", "get_user_movements", "get_user_profile", "get_user_trades", "get_withdrawal", "health_check", "initiate_withdrawal", "list_application_balances", "list_application_movements", "list_application_orders", "list_application_users", "list_conditional_orders", "list_delegated_agent_owners", "list_delegated_agents", "list_funding_history", "list_funding_payments", "list_margin_accounts", "list_position_history", "list_positions", "list_sub_accounts_with_balances", "list_trading_pairs", "mint_tokens", "reduce_position_margin", "refresh_session", "replace_order", "revoke_delegated_agent", "revoke_session", "simulate_auto_margin_order_risk", "simulate_fees", "simulate_order_risk", "submit_whitelist", "transfer_collateral_from_margin_account", "transfer_collateral_to_auto_margin_account", "transfer_collateral_to_margin_account", "update_sub_account_limit", "upsert_delegated_agent", "verify_signature"];
14
+ /** Union of every OpenAPI operationId in the spec. */
15
+ export type OperationId = (typeof OPERATION_IDS)[number];
@@ -0,0 +1,94 @@
1
+ /**
2
+ * GENERATED — DO NOT EDIT BY HAND.
3
+ *
4
+ * Runtime list of every OpenAPI operationId in the canonical spec
5
+ * (docs/src/proto-openapi/api/openapi.yaml), emitted by `make ts-wire-gen`
6
+ * (scripts/gen-operation-ids.ts) alongside the type-only `schema.ts`.
7
+ *
8
+ * The MON-1489 endpoint-coverage gate iterates this list to assert that every
9
+ * operationId is classified (covered or intentionally excluded) on each
10
+ * hand-written SDK surface. CI regenerates it and fails on a diff, identical to
11
+ * the `schema.ts` wire-types tripwire (MON-1476), so it can never go stale.
12
+ */
13
+ export const OPERATION_IDS = [
14
+ "add_position_margin",
15
+ "attach_position_tp_sl",
16
+ "authenticate_backend",
17
+ "batch_cancel_all",
18
+ "batch_cancel_all_by_pair",
19
+ "batch_cancel_orders",
20
+ "batch_create_orders",
21
+ "batch_replace_orders",
22
+ "cancel_conditional_order",
23
+ "cancel_order",
24
+ "close_position",
25
+ "create_challenge",
26
+ "create_delegated_session",
27
+ "create_order",
28
+ "create_sub_account_limit",
29
+ "delete_sub_account_limit",
30
+ "get_application_config",
31
+ "get_application_stats",
32
+ "get_available_collateral",
33
+ "get_candles",
34
+ "get_funding_state",
35
+ "get_index_price",
36
+ "get_margin_account_movements",
37
+ "get_margin_account_summary",
38
+ "get_mark_price",
39
+ "get_market_metadata",
40
+ "get_market_stats",
41
+ "get_open_interest",
42
+ "get_order_by_id",
43
+ "get_orderbook_snapshot",
44
+ "get_orders",
45
+ "get_perp_market_config",
46
+ "get_perp_market_summary",
47
+ "get_portfolio_chart",
48
+ "get_portfolio_stats",
49
+ "get_position",
50
+ "get_position_risk",
51
+ "get_screener",
52
+ "get_sub_account_limits",
53
+ "get_trade_by_id",
54
+ "get_trades",
55
+ "get_trading_pair_by_id",
56
+ "get_user_balance_by_asset",
57
+ "get_user_balances",
58
+ "get_user_movements",
59
+ "get_user_profile",
60
+ "get_user_trades",
61
+ "get_withdrawal",
62
+ "health_check",
63
+ "initiate_withdrawal",
64
+ "list_application_balances",
65
+ "list_application_movements",
66
+ "list_application_orders",
67
+ "list_application_users",
68
+ "list_conditional_orders",
69
+ "list_delegated_agent_owners",
70
+ "list_delegated_agents",
71
+ "list_funding_history",
72
+ "list_funding_payments",
73
+ "list_margin_accounts",
74
+ "list_position_history",
75
+ "list_positions",
76
+ "list_sub_accounts_with_balances",
77
+ "list_trading_pairs",
78
+ "mint_tokens",
79
+ "reduce_position_margin",
80
+ "refresh_session",
81
+ "replace_order",
82
+ "revoke_delegated_agent",
83
+ "revoke_session",
84
+ "simulate_auto_margin_order_risk",
85
+ "simulate_fees",
86
+ "simulate_order_risk",
87
+ "submit_whitelist",
88
+ "transfer_collateral_from_margin_account",
89
+ "transfer_collateral_to_auto_margin_account",
90
+ "transfer_collateral_to_margin_account",
91
+ "update_sub_account_limit",
92
+ "upsert_delegated_agent",
93
+ "verify_signature",
94
+ ];