@polyester/sdk 0.36.0-devnet-20261119184734 → 0.36.0-devnet-20261120015159
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/CHANGELOG.md +18 -2
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.d.ts +55 -3
- package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
- package/dist/gen/ai/v1/assistant_pb.js +8 -1
- package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
- package/dist/gen/auth/v1/account_scope_pb.d.ts +40 -0
- package/dist/gen/auth/v1/account_scope_pb.d.ts.map +1 -0
- package/dist/gen/auth/v1/account_scope_pb.js +46 -0
- package/dist/gen/auth/v1/account_scope_pb.js.map +1 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts +3 -31
- package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/address_book_pb.js +8 -38
- package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +15 -14
- package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/auth_pb.js +16 -15
- package/dist/gen/auth/v1/auth_pb.js.map +1 -1
- package/dist/gen/auth/v1/connected_apps_pb.d.ts +59 -58
- package/dist/gen/auth/v1/connected_apps_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/connected_apps_pb.js +38 -37
- package/dist/gen/auth/v1/connected_apps_pb.js.map +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +27 -1
- package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/policies_pb.js +27 -1
- package/dist/gen/auth/v1/policies_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +228 -2
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js +32 -8
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/changelog/v1/changelog_pb.d.ts +16 -4
- package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -1
- package/dist/gen/changelog/v1/changelog_pb.js.map +1 -1
- package/dist/gen/index.d.ts +7 -5
- package/dist/gen/index.js +7 -5
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +288 -2
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.js +115 -2
- package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +78 -25
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +36 -7
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +35 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/gen/strategies/v1/strategies_pb.d.ts +2928 -0
- package/dist/gen/strategies/v1/strategies_pb.d.ts.map +1 -0
- package/dist/gen/strategies/v1/strategies_pb.js +818 -0
- package/dist/gen/strategies/v1/strategies_pb.js.map +1 -0
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +38 -17
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +4 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +312 -132
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js +31 -26
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +28 -13
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js +2 -2
- package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +109 -2
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts.map +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js +23 -3
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +3 -2
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +61 -11
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +4 -2
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/services/account-activity/account-activity.schemas.d.ts +6 -6
- package/dist/services/address-book/address-book.codecs.js +1 -0
- package/dist/services/address-book/address-book.codecs.js.map +1 -1
- package/dist/services/address-book/address-book.js +1 -1
- package/dist/services/api-keys/api-keys.js +1 -1
- package/dist/services/assistant/assistant-events.schemas.d.ts +141 -43
- package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
- package/dist/services/assistant/assistant-events.schemas.js +15 -5
- package/dist/services/assistant/assistant-events.schemas.js.map +1 -1
- package/dist/services/assistant/assistant.codecs.d.ts +5 -2
- package/dist/services/assistant/assistant.codecs.d.ts.map +1 -1
- package/dist/services/assistant/assistant.codecs.js +10 -2
- package/dist/services/assistant/assistant.codecs.js.map +1 -1
- package/dist/services/assistant/assistant.schemas.d.ts +2 -2
- package/dist/services/auth/auth.js +1 -1
- package/dist/services/auth/auth.js.map +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +16 -16
- package/dist/services/balances/balances.js +1 -1
- package/dist/services/balances/balances.schemas.d.ts +3 -3
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/changelog/changelog.schemas.d.ts +38 -38
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
- package/dist/services/claims/claims.schemas.d.ts +2 -2
- package/dist/services/connected-apps/connected-apps.d.ts +4 -4
- package/dist/services/connected-apps/connected-apps.d.ts.map +1 -1
- package/dist/services/connected-apps/connected-apps.js +13 -13
- package/dist/services/connected-apps/connected-apps.js.map +1 -1
- package/dist/services/connected-apps/connected-apps.schemas.d.ts +7 -7
- package/dist/services/connected-apps/connected-apps.schemas.d.ts.map +1 -1
- package/dist/services/connected-apps/connected-apps.schemas.js +10 -10
- package/dist/services/connected-apps/connected-apps.schemas.js.map +1 -1
- package/dist/services/connected-apps/connected-apps.types.d.ts +2 -2
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +8 -8
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +6 -6
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +94 -94
- package/dist/services/market-data/market-data.codecs.d.ts +9 -1
- package/dist/services/market-data/market-data.codecs.d.ts.map +1 -1
- package/dist/services/market-data/market-data.codecs.js +14 -1
- package/dist/services/market-data/market-data.codecs.js.map +1 -1
- package/dist/services/market-data/market-data.d.ts +9 -1
- package/dist/services/market-data/market-data.d.ts.map +1 -1
- package/dist/services/market-data/market-data.js +14 -1
- package/dist/services/market-data/market-data.js.map +1 -1
- package/dist/services/market-data/market-data.schemas.d.ts +40 -2
- package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
- package/dist/services/market-data/market-data.schemas.js +43 -8
- package/dist/services/market-data/market-data.schemas.js.map +1 -1
- package/dist/services/market-data/market-data.types.d.ts +3 -3
- package/dist/services/notifications/notifications.schemas.d.ts +4 -4
- package/dist/services/orderbook/orderbook.d.ts.map +1 -1
- package/dist/services/orderbook/orderbook.js +5 -19
- package/dist/services/orderbook/orderbook.js.map +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +6 -6
- package/dist/services/orders/orders-batch.schemas.d.ts +72 -72
- package/dist/services/orders/orders-input.schemas.d.ts +10 -10
- package/dist/services/orders/orders-output.schemas.d.ts +16 -16
- package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-output.schemas.js +1 -1
- package/dist/services/orders/orders-output.schemas.js.map +1 -1
- package/dist/services/orders/orders.d.ts +5 -0
- package/dist/services/orders/orders.d.ts.map +1 -1
- package/dist/services/orders/orders.js +5 -0
- package/dist/services/orders/orders.js.map +1 -1
- package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
- package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
- package/dist/services/policies/shared.codecs.js +13 -4
- package/dist/services/policies/shared.codecs.js.map +1 -1
- package/dist/services/policies/shared.d.ts +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.js +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
- package/dist/services/strategies/service.d.ts +8 -0
- package/dist/services/strategies/service.d.ts.map +1 -0
- package/dist/services/strategies/service.js +9 -0
- package/dist/services/strategies/service.js.map +1 -0
- package/dist/services/strategies/strategies.codecs.d.ts +15 -0
- package/dist/services/strategies/strategies.codecs.d.ts.map +1 -0
- package/dist/services/strategies/strategies.codecs.js +50 -0
- package/dist/services/strategies/strategies.codecs.js.map +1 -0
- package/dist/services/strategies/strategies.d.ts +75 -0
- package/dist/services/strategies/strategies.d.ts.map +1 -0
- package/dist/services/strategies/strategies.js +135 -0
- package/dist/services/strategies/strategies.js.map +1 -0
- package/dist/services/strategies/strategies.schemas.d.ts +568 -0
- package/dist/services/strategies/strategies.schemas.d.ts.map +1 -0
- package/dist/services/strategies/strategies.schemas.js +408 -0
- package/dist/services/strategies/strategies.schemas.js.map +1 -0
- package/dist/services/strategies/strategies.types.d.ts +3 -0
- package/dist/services/subaccounts/subaccounts.js +2 -2
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +8 -8
- package/dist/services/system/system.schemas.d.ts +13 -13
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts +29 -2
- package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +74 -11
- package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +85 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js +56 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +3 -3
- package/dist/services/trading-withdraws/wallet-message.js +29 -1
- package/dist/services/trading-withdraws/wallet-message.js.map +1 -1
- package/dist/services/transfers/transfers.js +1 -1
- package/dist/services/transfers/transfers.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +44 -44
- package/dist/shared/connect-error-mapping.d.ts.map +1 -1
- package/dist/shared/connect-error-mapping.js +5 -0
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/error-detail.d.ts +25 -2
- package/dist/shared/error-detail.d.ts.map +1 -1
- package/dist/shared/error-detail.js +1 -0
- package/dist/shared/error-detail.js.map +1 -1
- package/dist/shared/error-details/strategies.js +36 -0
- package/dist/shared/error-details/strategies.js.map +1 -0
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +6 -4
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ type EquityGroupBy = v.InferOutput<typeof EquityGroupBySchema>;
|
|
|
57
57
|
declare const BalanceHistoryInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
58
58
|
readonly range: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1d", "7d", "30d", "90d", "180d", "365d"], undefined>, v.TransformAction<"1d" | "7d" | "30d" | "90d" | "180d" | "365d", BalanceRange$1.DAY_1 | BalanceRange$1.DAY_7 | BalanceRange$1.DAY_30 | BalanceRange$1.DAY_90 | BalanceRange$1.DAY_180 | BalanceRange$1.DAY_365>]>;
|
|
59
59
|
readonly ledger: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, 0>;
|
|
60
|
-
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"
|
|
60
|
+
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"funding" | "trading", AccountCode.FUNDING | AccountCode.TRADING>]>, undefined>, readonly []>;
|
|
61
61
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
62
62
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
63
63
|
}, undefined>], undefined>, undefined>;
|
|
@@ -112,14 +112,14 @@ declare function createBalanceHistoryResponseSchema(): v.SchemaWithPipe<readonly
|
|
|
112
112
|
points: number;
|
|
113
113
|
series: {
|
|
114
114
|
assetId: number;
|
|
115
|
-
accountCode: "unspecified" | "
|
|
115
|
+
accountCode: "unspecified" | "funding" | "trading";
|
|
116
116
|
balance: string[];
|
|
117
117
|
}[];
|
|
118
118
|
}>]>;
|
|
119
119
|
type BalanceHistoryResponse = v.InferOutput<ReturnType<typeof createBalanceHistoryResponseSchema>>;
|
|
120
120
|
declare const EquityHistoryInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
121
121
|
readonly range: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1d", "7d", "30d", "90d", "180d", "365d"], undefined>, v.TransformAction<"1d" | "7d" | "30d" | "90d" | "180d" | "365d", BalanceRange$1.DAY_1 | BalanceRange$1.DAY_7 | BalanceRange$1.DAY_30 | BalanceRange$1.DAY_90 | BalanceRange$1.DAY_180 | BalanceRange$1.DAY_365>]>;
|
|
122
|
-
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"
|
|
122
|
+
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"funding" | "trading", AccountCode.FUNDING | AccountCode.TRADING>]>, undefined>, readonly []>;
|
|
123
123
|
readonly groupBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["account", "asset"], undefined>, "account">, v.TransformAction<"account" | "asset", EquityGroupBy$1.GROUP_BY_ACCOUNT | EquityGroupBy$1.GROUP_BY_ASSET>]>;
|
|
124
124
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
125
125
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -11,7 +11,7 @@ type TimestampInit = {
|
|
|
11
11
|
};
|
|
12
12
|
declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
13
13
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
14
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
14
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">>]>;
|
|
15
15
|
readonly tsSec: v.BigintSchema<undefined>;
|
|
16
16
|
readonly open: v.BigintSchema<undefined>;
|
|
17
17
|
readonly high: v.BigintSchema<undefined>;
|
|
@@ -22,7 +22,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
22
22
|
readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
23
23
|
}, undefined>, v.TransformAction<{
|
|
24
24
|
symbolId: number;
|
|
25
|
-
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
25
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">;
|
|
26
26
|
tsSec: bigint;
|
|
27
27
|
open: bigint;
|
|
28
28
|
high: bigint;
|
|
@@ -33,7 +33,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
33
33
|
isClosed: boolean;
|
|
34
34
|
}, {
|
|
35
35
|
symbolId: number;
|
|
36
|
-
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
36
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">;
|
|
37
37
|
time: number;
|
|
38
38
|
open: string;
|
|
39
39
|
high: string;
|
|
@@ -46,7 +46,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
46
46
|
declare const createCandleRowIntSchema: typeof createCandleRowSchema;
|
|
47
47
|
declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
48
48
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
49
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
49
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">>]>;
|
|
50
50
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
51
51
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
52
52
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
@@ -63,7 +63,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
63
63
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
64
64
|
}, undefined>, v.TransformAction<{
|
|
65
65
|
symbolId: number;
|
|
66
|
-
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
66
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">;
|
|
67
67
|
tsSec: bigint[];
|
|
68
68
|
open: bigint[];
|
|
69
69
|
high: bigint[];
|
|
@@ -80,7 +80,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
80
80
|
nextPageToken: string;
|
|
81
81
|
}, {
|
|
82
82
|
symbolId: number;
|
|
83
|
-
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
83
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">;
|
|
84
84
|
time: number[];
|
|
85
85
|
open: string[];
|
|
86
86
|
high: string[];
|
|
@@ -100,7 +100,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
100
100
|
}>]>;
|
|
101
101
|
declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
102
102
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
103
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
103
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">>]>;
|
|
104
104
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
105
105
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
106
106
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
@@ -117,7 +117,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
117
117
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
118
118
|
}, undefined>, v.TransformAction<{
|
|
119
119
|
symbolId: number;
|
|
120
|
-
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
120
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">;
|
|
121
121
|
tsSec: bigint[];
|
|
122
122
|
open: bigint[];
|
|
123
123
|
high: bigint[];
|
|
@@ -134,7 +134,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
134
134
|
nextPageToken: string;
|
|
135
135
|
}, {
|
|
136
136
|
symbolId: number;
|
|
137
|
-
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
137
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo">;
|
|
138
138
|
tsSec: number[];
|
|
139
139
|
open: string[];
|
|
140
140
|
high: string[];
|
|
@@ -158,7 +158,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
|
|
|
158
158
|
type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
|
|
159
159
|
declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
160
160
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
161
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1mo"], undefined>, v.TransformAction<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "
|
|
161
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "3d" | "1w" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_3 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_2 | Timeframe$1.HOUR_4 | Timeframe$1.HOUR_6 | Timeframe$1.HOUR_8 | Timeframe$1.HOUR_12 | Timeframe$1.DAY_1 | Timeframe$1.DAY_3 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
|
|
162
162
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 10000, undefined>]>, undefined>;
|
|
163
163
|
readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
164
164
|
readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -31,7 +31,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
31
31
|
}, undefined>, v.CheckAction<{
|
|
32
32
|
categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
|
|
33
33
|
actionRequired?: boolean | undefined;
|
|
34
|
-
surfaces: ("assistant" | "
|
|
34
|
+
surfaces: ("assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
35
35
|
audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
|
|
36
36
|
startTime?: number | undefined;
|
|
37
37
|
endTime?: number | undefined;
|
|
@@ -42,7 +42,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
42
42
|
}, "endTime: must be after startTime">, v.TransformAction<{
|
|
43
43
|
categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
|
|
44
44
|
actionRequired?: boolean | undefined;
|
|
45
|
-
surfaces: ("assistant" | "
|
|
45
|
+
surfaces: ("assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
46
46
|
audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
|
|
47
47
|
startTime?: number | undefined;
|
|
48
48
|
endTime?: number | undefined;
|
|
@@ -77,10 +77,10 @@ declare const ChangelogChangeSchema: v.ObjectSchema<{
|
|
|
77
77
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
78
78
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
79
79
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
80
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
80
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
81
81
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
82
82
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
83
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
83
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
84
84
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
85
85
|
readonly seconds: v.BigintSchema<undefined>;
|
|
86
86
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -95,7 +95,7 @@ type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;
|
|
|
95
95
|
declare const ChangelogSectionSchema: v.ObjectSchema<{
|
|
96
96
|
readonly heading: v.StringSchema<undefined>;
|
|
97
97
|
readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
-
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
98
|
+
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
|
|
99
99
|
readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
100
100
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
101
101
|
readonly title: v.StringSchema<undefined>;
|
|
@@ -105,10 +105,10 @@ declare const ChangelogSectionSchema: v.ObjectSchema<{
|
|
|
105
105
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
106
106
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
107
107
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
108
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
108
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
109
109
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
110
110
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
111
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
111
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
112
112
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
113
113
|
readonly seconds: v.BigintSchema<undefined>;
|
|
114
114
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -283,7 +283,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
283
283
|
readonly sections: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
284
284
|
readonly heading: v.StringSchema<undefined>;
|
|
285
285
|
readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
286
|
-
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
286
|
+
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
|
|
287
287
|
readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
288
288
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
289
289
|
readonly title: v.StringSchema<undefined>;
|
|
@@ -293,10 +293,10 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
293
293
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
294
294
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
295
295
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
296
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
296
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
297
297
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
298
298
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
299
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
299
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
300
300
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
301
301
|
readonly seconds: v.BigintSchema<undefined>;
|
|
302
302
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -332,7 +332,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
332
332
|
sections: {
|
|
333
333
|
heading: string;
|
|
334
334
|
summary?: string | undefined;
|
|
335
|
-
surface: "unspecified" | "assistant" | "
|
|
335
|
+
surface: "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
|
|
336
336
|
changes: {
|
|
337
337
|
id: string;
|
|
338
338
|
title: string;
|
|
@@ -342,10 +342,10 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
342
342
|
actionRequired: boolean;
|
|
343
343
|
migrationGuidance?: string | undefined;
|
|
344
344
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
345
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
345
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
346
346
|
environmentExceptions: {
|
|
347
347
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
348
|
-
availability: "unspecified" | "
|
|
348
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
349
349
|
liveAt?: number | undefined;
|
|
350
350
|
}[];
|
|
351
351
|
}[];
|
|
@@ -354,7 +354,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
354
354
|
sections: {
|
|
355
355
|
heading: string;
|
|
356
356
|
summary?: string | undefined;
|
|
357
|
-
surface: "unspecified" | "assistant" | "
|
|
357
|
+
surface: "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
|
|
358
358
|
changes: {
|
|
359
359
|
id: string;
|
|
360
360
|
title: string;
|
|
@@ -364,10 +364,10 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
364
364
|
actionRequired: boolean;
|
|
365
365
|
migrationGuidance?: string | undefined;
|
|
366
366
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
367
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
367
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
368
368
|
environmentExceptions: {
|
|
369
369
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
370
|
-
availability: "unspecified" | "
|
|
370
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
371
371
|
liveAt?: number | undefined;
|
|
372
372
|
}[];
|
|
373
373
|
}[];
|
|
@@ -403,10 +403,10 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
403
403
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
404
404
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
405
405
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
406
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
406
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
407
407
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
408
408
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
409
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
409
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
410
410
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
411
411
|
readonly seconds: v.BigintSchema<undefined>;
|
|
412
412
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -435,10 +435,10 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
435
435
|
actionRequired: boolean;
|
|
436
436
|
migrationGuidance?: string | undefined;
|
|
437
437
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
438
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
438
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
439
439
|
environmentExceptions: {
|
|
440
440
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
441
|
-
availability: "unspecified" | "
|
|
441
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
442
442
|
liveAt?: number | undefined;
|
|
443
443
|
}[];
|
|
444
444
|
};
|
|
@@ -457,10 +457,10 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
457
457
|
actionRequired: boolean;
|
|
458
458
|
migrationGuidance?: string | undefined;
|
|
459
459
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
460
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
460
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
461
461
|
environmentExceptions: {
|
|
462
462
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
463
|
-
availability: "unspecified" | "
|
|
463
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
464
464
|
liveAt?: number | undefined;
|
|
465
465
|
}[];
|
|
466
466
|
}>]>;
|
|
@@ -477,10 +477,10 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
477
477
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
478
478
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
479
479
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
480
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
480
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
481
481
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
482
482
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
483
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
483
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
484
484
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
485
485
|
readonly seconds: v.BigintSchema<undefined>;
|
|
486
486
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -509,10 +509,10 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
509
509
|
actionRequired: boolean;
|
|
510
510
|
migrationGuidance?: string | undefined;
|
|
511
511
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
512
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
512
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
513
513
|
environmentExceptions: {
|
|
514
514
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
515
|
-
availability: "unspecified" | "
|
|
515
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
516
516
|
liveAt?: number | undefined;
|
|
517
517
|
}[];
|
|
518
518
|
};
|
|
@@ -531,10 +531,10 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
531
531
|
actionRequired: boolean;
|
|
532
532
|
migrationGuidance?: string | undefined;
|
|
533
533
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
534
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
534
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
535
535
|
environmentExceptions: {
|
|
536
536
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
537
|
-
availability: "unspecified" | "
|
|
537
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
538
538
|
liveAt?: number | undefined;
|
|
539
539
|
}[];
|
|
540
540
|
}>]>, undefined>, readonly []>;
|
|
@@ -683,10 +683,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
683
683
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
684
684
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
685
685
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
686
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "
|
|
686
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
687
687
|
readonly environmentExceptions: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
688
688
|
readonly environment: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "devnet" | "testnet" | "mainnet">]>;
|
|
689
|
-
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
689
|
+
readonly availability: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "unavailable" | "ahead" | "pending">]>;
|
|
690
690
|
readonly liveAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
691
691
|
readonly seconds: v.BigintSchema<undefined>;
|
|
692
692
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -708,10 +708,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
708
708
|
actionRequired: boolean;
|
|
709
709
|
migrationGuidance?: string | undefined;
|
|
710
710
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
711
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
711
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
712
712
|
environmentExceptions: {
|
|
713
713
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
714
|
-
availability: "unspecified" | "
|
|
714
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
715
715
|
liveAt?: number | undefined;
|
|
716
716
|
}[];
|
|
717
717
|
};
|
|
@@ -728,10 +728,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
728
728
|
actionRequired: boolean;
|
|
729
729
|
migrationGuidance?: string | undefined;
|
|
730
730
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
731
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
731
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
732
732
|
environmentExceptions: {
|
|
733
733
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
734
|
-
availability: "unspecified" | "
|
|
734
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
735
735
|
liveAt?: number | undefined;
|
|
736
736
|
}[];
|
|
737
737
|
}>]>, undefined>, readonly []>;
|
|
@@ -770,10 +770,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
770
770
|
actionRequired: boolean;
|
|
771
771
|
migrationGuidance?: string | undefined;
|
|
772
772
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
773
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
773
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
774
774
|
environmentExceptions: {
|
|
775
775
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
776
|
-
availability: "unspecified" | "
|
|
776
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
777
777
|
liveAt?: number | undefined;
|
|
778
778
|
}[];
|
|
779
779
|
}[];
|
|
@@ -794,10 +794,10 @@ declare const ChangelogDeploymentGroupSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
794
794
|
actionRequired: boolean;
|
|
795
795
|
migrationGuidance?: string | undefined;
|
|
796
796
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
797
|
-
surfaces: ("unspecified" | "assistant" | "
|
|
797
|
+
surfaces: ("unspecified" | "assistant" | "api" | "rewards" | "funding" | "trading" | "accounts" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
798
798
|
environmentExceptions: {
|
|
799
799
|
environment: "unspecified" | "devnet" | "testnet" | "mainnet";
|
|
800
|
-
availability: "unspecified" | "
|
|
800
|
+
availability: "unspecified" | "unavailable" | "ahead" | "pending";
|
|
801
801
|
liveAt?: number | undefined;
|
|
802
802
|
}[];
|
|
803
803
|
}[];
|
|
@@ -427,7 +427,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
|
|
|
427
427
|
readonly seasonResultUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
428
428
|
readonly subaccounts: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
|
|
429
429
|
/** Values computed from partial evidence; show them with an approximation marker. */
|
|
430
|
-
readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
430
|
+
readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "tools" | "deposits" | "withdrawals" | "volume" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "transfers" | "season_result">]>, undefined>, readonly []>;
|
|
431
431
|
}, undefined>;
|
|
432
432
|
/**
|
|
433
433
|
* One frozen season recap of a root account and all of its subaccounts. An absent USD value
|
|
@@ -36,7 +36,7 @@ declare const DailyClaimTransferSchema: v.ObjectSchema<{
|
|
|
36
36
|
}, undefined>;
|
|
37
37
|
type DailyClaimTransfer = v.InferOutput<typeof DailyClaimTransferSchema>;
|
|
38
38
|
declare const DailyClaimStatusSchema: v.ObjectSchema<{
|
|
39
|
-
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
39
|
+
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "available" | "processing" | "claimed" | "unavailable" | "payout_delayed">]>;
|
|
40
40
|
readonly resetAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
41
41
|
readonly seconds: v.BigintSchema<undefined>;
|
|
42
42
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -76,7 +76,7 @@ declare const DailyClaimStatusSchema: v.ObjectSchema<{
|
|
|
76
76
|
type DailyClaimStatus = v.InferOutput<typeof DailyClaimStatusSchema>;
|
|
77
77
|
declare const ClaimDailyRewardResultSchema: v.ObjectSchema<{
|
|
78
78
|
readonly claimId: v.StringSchema<undefined>;
|
|
79
|
-
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
79
|
+
readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "available" | "processing" | "claimed" | "unavailable" | "payout_delayed">]>;
|
|
80
80
|
readonly claimedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
81
81
|
readonly seconds: v.BigintSchema<undefined>;
|
|
82
82
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthApiTransports } from "../../shared/transports.js";
|
|
2
2
|
import { PolyesterMutationOptions, PolyesterRequestOptions } from "../../shared/request-options.js";
|
|
3
|
-
import {
|
|
3
|
+
import { AppConnectionRequest, AppConnectionRequestInput, AppConnectionRequestRedirect, ConnectedApp, RevokeConnectedAppInput } from "./connected-apps.schemas.js";
|
|
4
4
|
//#region src/services/connected-apps/connected-apps.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Connects outside apps, such as an AI assistant, to the account with OAuth ("Sign in with
|
|
@@ -17,7 +17,7 @@ declare class ConnectedAppsService {
|
|
|
17
17
|
* Reads a pending app connection request to show the consent page. An unknown, expired or
|
|
18
18
|
* already answered request throws `ResourceNotFoundError`.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
getConnectionRequest(input: AppConnectionRequestInput, options?: PolyesterRequestOptions): Promise<AppConnectionRequest>;
|
|
21
21
|
/**
|
|
22
22
|
* Approves a pending app connection request; send the browser to the returned `redirectUrl`,
|
|
23
23
|
* which carries a one-time authorization code valid for 60 seconds. Needs MFA enrolled and a
|
|
@@ -25,13 +25,13 @@ declare class ConnectedAppsService {
|
|
|
25
25
|
* `ResourceNotFoundError`; an account with 20 connected apps throws `PreconditionFailedError`
|
|
26
26
|
* (`AUTH_CONNECTED_APP_LIMIT_REACHED`).
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
approveConnectionRequest(input: AppConnectionRequestInput, options?: PolyesterMutationOptions): Promise<AppConnectionRequestRedirect>;
|
|
29
29
|
/**
|
|
30
30
|
* Denies a pending app connection request; send the browser to the returned `redirectUrl`,
|
|
31
31
|
* which carries the `access_denied` error. An unknown, expired or already answered request
|
|
32
32
|
* throws `ResourceNotFoundError`.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
denyConnectionRequest(input: AppConnectionRequestInput, options?: PolyesterRequestOptions): Promise<AppConnectionRequestRedirect>;
|
|
35
35
|
/** Lists the apps connected to the account, newest first; at most 20. */
|
|
36
36
|
list(options?: PolyesterRequestOptions): Promise<ConnectedApp[]>;
|
|
37
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected-apps.d.ts","names":[],"sources":["../../../src/services/connected-apps/connected-apps.ts"],"mappings":";;;;;;;;;;;;cA8Ba;;EAGG,YAAA,YAAY;;;;;EAQlB,
|
|
1
|
+
{"version":3,"file":"connected-apps.d.ts","names":[],"sources":["../../../src/services/connected-apps/connected-apps.ts"],"mappings":";;;;;;;;;;;;cA8Ba;;EAGG,YAAA,YAAY;;;;;EAQlB,qBACF,OAAO,2BACP,UAAU,0BACX,QAAQ;;;;;;;;EAgBL,yBACF,OAAO,2BACP,UAAU,2BACX,QAAQ;;;;;;EAcL,sBACF,OAAO,2BACP,UAAU,0BACX,QAAQ;;EAUL,KAAK,UAAU,0BAA0B,QAAQ;;;;;;EAUjD,OAAO,OAAO,yBAAyB,UAAU,0BAA0B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parse } from "../../shared/validation.js";
|
|
2
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
3
|
import { ConnectedAppService } from "../../gen/auth/v1/connected_apps_pb.js";
|
|
4
|
-
import {
|
|
4
|
+
import { AppConnectionRequestInputSchema, AppConnectionRequestRedirectSchema, AppConnectionRequestSchema, ConnectedAppsSchema, RevokeConnectedAppInputSchema } from "./connected-apps.schemas.js";
|
|
5
5
|
import { createClient } from "@connectrpc/connect";
|
|
6
6
|
//#region src/services/connected-apps/connected-apps.ts
|
|
7
7
|
/**
|
|
@@ -21,10 +21,10 @@ var ConnectedAppsService = class {
|
|
|
21
21
|
* Reads a pending app connection request to show the consent page. An unknown, expired or
|
|
22
22
|
* already answered request throws `ResourceNotFoundError`.
|
|
23
23
|
*/
|
|
24
|
-
async
|
|
25
|
-
const request = parse(
|
|
26
|
-
const response = await this.#client.
|
|
27
|
-
return parse(
|
|
24
|
+
async getConnectionRequest(input, options) {
|
|
25
|
+
const request = parse(AppConnectionRequestInputSchema, input);
|
|
26
|
+
const response = await this.#client.getAppConnectionRequest(request, toConnectCallOptions(options));
|
|
27
|
+
return parse(AppConnectionRequestSchema, response.connectionRequest);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Approves a pending app connection request; send the browser to the returned `redirectUrl`,
|
|
@@ -33,20 +33,20 @@ var ConnectedAppsService = class {
|
|
|
33
33
|
* `ResourceNotFoundError`; an account with 20 connected apps throws `PreconditionFailedError`
|
|
34
34
|
* (`AUTH_CONNECTED_APP_LIMIT_REACHED`).
|
|
35
35
|
*/
|
|
36
|
-
async
|
|
37
|
-
const request = parse(
|
|
38
|
-
const response = await this.#client.
|
|
39
|
-
return parse(
|
|
36
|
+
async approveConnectionRequest(input, options) {
|
|
37
|
+
const request = parse(AppConnectionRequestInputSchema, input);
|
|
38
|
+
const response = await this.#client.approveAppConnectionRequest(request, toConnectCallOptions(options));
|
|
39
|
+
return parse(AppConnectionRequestRedirectSchema, response);
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Denies a pending app connection request; send the browser to the returned `redirectUrl`,
|
|
43
43
|
* which carries the `access_denied` error. An unknown, expired or already answered request
|
|
44
44
|
* throws `ResourceNotFoundError`.
|
|
45
45
|
*/
|
|
46
|
-
async
|
|
47
|
-
const request = parse(
|
|
48
|
-
const response = await this.#client.
|
|
49
|
-
return parse(
|
|
46
|
+
async denyConnectionRequest(input, options) {
|
|
47
|
+
const request = parse(AppConnectionRequestInputSchema, input);
|
|
48
|
+
const response = await this.#client.denyAppConnectionRequest(request, toConnectCallOptions(options));
|
|
49
|
+
return parse(AppConnectionRequestRedirectSchema, response);
|
|
50
50
|
}
|
|
51
51
|
/** Lists the apps connected to the account, newest first; at most 20. */
|
|
52
52
|
async list(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected-apps.js","names":["#client","Proto.ConnectedAppService"],"sources":["../../../src/services/connected-apps/connected-apps.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/connected_apps_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n
|
|
1
|
+
{"version":3,"file":"connected-apps.js","names":["#client","Proto.ConnectedAppService"],"sources":["../../../src/services/connected-apps/connected-apps.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/connected_apps_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n AppConnectionRequestInputSchema,\n AppConnectionRequestRedirectSchema,\n AppConnectionRequestSchema,\n ConnectedAppsSchema,\n RevokeConnectedAppInputSchema,\n type AppConnectionRequest,\n type AppConnectionRequestInput,\n type AppConnectionRequestRedirect,\n type ConnectedApp,\n type RevokeConnectedAppInput,\n} from \"./connected-apps.schemas.js\";\n\n/**\n * Connects outside apps, such as an AI assistant, to the account with OAuth (\"Sign in with\n * Polyester\"), and lists and disconnects them. Session only: the website's consent page and\n * settings call these, and API keys are refused. A connected app uses the account as the\n * signed-in website does, for the scopes granted; it never moves money out of the account or\n * changes its security settings. A connection lasts until it is disconnected or expires; signing\n * out does not end it.\n */\nexport class ConnectedAppsService {\n #client: Client<typeof Proto.ConnectedAppService>;\n\n constructor(transports: AuthApiTransports) {\n this.#client = createClient(Proto.ConnectedAppService, transports.authApi);\n }\n\n /**\n * Reads a pending app connection request to show the consent page. An unknown, expired or\n * already answered request throws `ResourceNotFoundError`.\n */\n async getConnectionRequest(\n input: AppConnectionRequestInput,\n options?: PolyesterRequestOptions,\n ): Promise<AppConnectionRequest> {\n const request = parse(AppConnectionRequestInputSchema, input);\n const response = await this.#client.getAppConnectionRequest(\n request,\n toConnectCallOptions(options),\n );\n return parse(AppConnectionRequestSchema, response.connectionRequest);\n }\n\n /**\n * Approves a pending app connection request; send the browser to the returned `redirectUrl`,\n * which carries a one-time authorization code valid for 60 seconds. Needs MFA enrolled and a\n * fresh `stepUpToken`. An unknown, expired or already answered request throws\n * `ResourceNotFoundError`; an account with 20 connected apps throws `PreconditionFailedError`\n * (`AUTH_CONNECTED_APP_LIMIT_REACHED`).\n */\n async approveConnectionRequest(\n input: AppConnectionRequestInput,\n options?: PolyesterMutationOptions,\n ): Promise<AppConnectionRequestRedirect> {\n const request = parse(AppConnectionRequestInputSchema, input);\n const response = await this.#client.approveAppConnectionRequest(\n request,\n toConnectCallOptions(options),\n );\n return parse(AppConnectionRequestRedirectSchema, response);\n }\n\n /**\n * Denies a pending app connection request; send the browser to the returned `redirectUrl`,\n * which carries the `access_denied` error. An unknown, expired or already answered request\n * throws `ResourceNotFoundError`.\n */\n async denyConnectionRequest(\n input: AppConnectionRequestInput,\n options?: PolyesterRequestOptions,\n ): Promise<AppConnectionRequestRedirect> {\n const request = parse(AppConnectionRequestInputSchema, input);\n const response = await this.#client.denyAppConnectionRequest(\n request,\n toConnectCallOptions(options),\n );\n return parse(AppConnectionRequestRedirectSchema, response);\n }\n\n /** Lists the apps connected to the account, newest first; at most 20. */\n async list(options?: PolyesterRequestOptions): Promise<ConnectedApp[]> {\n const response = await this.#client.listConnectedApps({}, toConnectCallOptions(options));\n return parse(ConnectedAppsSchema, response.apps);\n }\n\n /**\n * Disconnects an app; its access and refresh tokens stop working at once. Disconnecting an\n * app already disconnected or expired succeeds; an ID that is not one of the account's\n * connected apps throws `ResourceNotFoundError`.\n */\n async revoke(input: RevokeConnectedAppInput, options?: PolyesterRequestOptions): Promise<void> {\n const request = parse(RevokeConnectedAppInputSchema, input);\n await this.#client.revokeConnectedApp(request, toConnectCallOptions(options));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AA8BA,IAAa,uBAAb,MAAkC;CAC9B;CAEA,YAAY,YAA+B;EACvC,KAAKA,UAAU,aAAaC,qBAA2B,WAAW,OAAO;CAC7E;;;;;CAMA,MAAM,qBACF,OACA,SAC6B;EAC7B,MAAM,UAAU,MAAM,iCAAiC,KAAK;EAC5D,MAAM,WAAW,MAAM,KAAKD,QAAQ,wBAChC,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,4BAA4B,SAAS,iBAAiB;CACvE;;;;;;;;CASA,MAAM,yBACF,OACA,SACqC;EACrC,MAAM,UAAU,MAAM,iCAAiC,KAAK;EAC5D,MAAM,WAAW,MAAM,KAAKA,QAAQ,4BAChC,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,oCAAoC,QAAQ;CAC7D;;;;;;CAOA,MAAM,sBACF,OACA,SACqC;EACrC,MAAM,UAAU,MAAM,iCAAiC,KAAK;EAC5D,MAAM,WAAW,MAAM,KAAKA,QAAQ,yBAChC,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,oCAAoC,QAAQ;CAC7D;;CAGA,MAAM,KAAK,SAA4D;EACnE,MAAM,WAAW,MAAM,KAAKA,QAAQ,kBAAkB,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACvF,OAAO,MAAM,qBAAqB,SAAS,IAAI;CACnD;;;;;;CAOA,MAAM,OAAO,OAAgC,SAAkD;EAC3F,MAAM,UAAU,MAAM,+BAA+B,KAAK;EAC1D,MAAM,KAAKA,QAAQ,mBAAmB,SAAS,qBAAqB,OAAO,CAAC;CAChF;AACJ"}
|