@polyester/sdk 0.10.0 → 0.12.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/CHANGELOG.md +24 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts +21 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/address_book_pb.js +1 -1
- package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.d.ts +8 -7
- package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.d.ts +39 -3
- package/dist/gen/auth/v1/mfa_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/mfa_pb.js +1 -1
- package/dist/gen/auth/v1/mfa_pb.js.map +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +8 -4
- package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/policies_pb.js.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts +383 -18
- package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js +253 -38
- package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +3 -2
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +2 -2
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +8 -0
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +2 -2
- package/dist/gen/ratelimit/v1/ratelimit_pb.js +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.js.map +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +3 -0
- 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 +351 -9
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +307 -3
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/services/address-book/address-book.d.ts +3 -1
- package/dist/services/address-book/address-book.d.ts.map +1 -1
- package/dist/services/address-book/address-book.js +3 -1
- package/dist/services/address-book/address-book.js.map +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +6 -0
- package/dist/services/address-book/address-book.schemas.d.ts.map +1 -1
- package/dist/services/address-book/address-book.schemas.js +10 -5
- package/dist/services/address-book/address-book.schemas.js.map +1 -1
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/heatmap/heatmap.schemas.d.ts +9 -9
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/mfa/mfa.d.ts +2 -2
- package/dist/services/mfa/mfa.js +2 -2
- package/dist/services/mfa/mfa.js.map +1 -1
- package/dist/services/mfa/mfa.schemas.d.ts +132 -4
- package/dist/services/mfa/mfa.schemas.d.ts.map +1 -1
- package/dist/services/mfa/mfa.schemas.js +13 -7
- package/dist/services/mfa/mfa.schemas.js.map +1 -1
- package/dist/services/rate-limits/rate-limits.schemas.d.ts +4 -4
- package/dist/services/rate-limits/rate-limits.schemas.js +1 -1
- package/dist/services/rate-limits/rate-limits.schemas.js.map +1 -1
- package/dist/services/subaccounts/index.d.ts +2 -2
- package/dist/services/subaccounts/subaccounts.codecs.js +29 -1
- package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.d.ts +9 -1
- package/dist/services/subaccounts/subaccounts.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.js +19 -2
- package/dist/services/subaccounts/subaccounts.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +43 -3
- package/dist/services/subaccounts/subaccounts.schemas.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.js +28 -3
- package/dist/services/subaccounts/subaccounts.schemas.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.types.d.ts +2 -2
- package/dist/services/trades/trades.d.ts +1 -1
- package/dist/services/trades/trades.js +1 -1
- package/dist/services/trades/trades.js.map +1 -1
- package/dist/services/trades/trades.schemas.d.ts +3 -0
- package/dist/services/trades/trades.schemas.d.ts.map +1 -1
- package/dist/services/trades/trades.schemas.js +2 -1
- package/dist/services/trades/trades.schemas.js.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +351 -4
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +36 -4
- package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
- package/dist/services/triggers/triggers.codecs.js +51 -1
- package/dist/services/triggers/triggers.codecs.js.map +1 -1
- package/dist/wired-services.d.ts.map +1 -1
- package/dist/wired-services.js +2 -1
- package/dist/wired-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -259,17 +259,21 @@ declare const ListInternalTransferWhitelistEntriesInputSchema: v.SchemaWithPipe<
|
|
|
259
259
|
type ListInternalTransferWhitelistEntriesInput = v.InferInput<typeof ListInternalTransferWhitelistEntriesInputSchema>;
|
|
260
260
|
declare const GetAddressBookViewInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
261
261
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 200, undefined>]>, undefined>;
|
|
262
|
+
/** Minimum `viewRevision` (from an invalidation event) the returned view must reach. */
|
|
263
|
+
readonly minimumViewRevision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.RegexAction<string, `${string} must be a decimal integer`>, v.TransformAction<string, bigint>]>, v.CheckAction<bigint, `${string} must be greater than 0`>]>, undefined>;
|
|
262
264
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
263
265
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
264
266
|
}, undefined>], undefined>, undefined>;
|
|
265
267
|
}, undefined>, v.TransformAction<{
|
|
266
268
|
limit?: number | undefined;
|
|
269
|
+
minimumViewRevision?: bigint | undefined;
|
|
267
270
|
account?: "active" | "main" | {
|
|
268
271
|
subaccountId: string;
|
|
269
272
|
} | undefined;
|
|
270
273
|
}, {
|
|
271
274
|
subaccountId: bigint | undefined;
|
|
272
275
|
limit: number | undefined;
|
|
276
|
+
minimumViewRevision: bigint | undefined;
|
|
273
277
|
}>]>;
|
|
274
278
|
type GetAddressBookViewInput = v.InferInput<typeof GetAddressBookViewInputSchema>;
|
|
275
279
|
declare const AddressBookSchema: v.ObjectSchema<{
|
|
@@ -1141,6 +1145,7 @@ declare const AddressBookViewSchema: v.ObjectSchema<{
|
|
|
1141
1145
|
}, undefined>, undefined>, readonly []>;
|
|
1142
1146
|
}, undefined>, undefined>;
|
|
1143
1147
|
readonly recentDestinationsTruncated: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
1148
|
+
readonly viewRevision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>, 0n>;
|
|
1144
1149
|
}, undefined>;
|
|
1145
1150
|
type AddressBookView = v.InferOutput<typeof AddressBookViewSchema>;
|
|
1146
1151
|
declare const AddressBookViewInvalidatedSchema: v.ObjectSchema<{
|
|
@@ -1156,6 +1161,7 @@ declare const AddressBookViewInvalidatedSchema: v.ObjectSchema<{
|
|
|
1156
1161
|
seconds: bigint;
|
|
1157
1162
|
nanos: number;
|
|
1158
1163
|
}, number>]>;
|
|
1164
|
+
readonly viewRevision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>, 0n>;
|
|
1159
1165
|
}, undefined>;
|
|
1160
1166
|
type AddressBookViewInvalidated = v.InferOutput<typeof AddressBookViewInvalidatedSchema>;
|
|
1161
1167
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-book.schemas.d.ts","names":[],"sources":["../../../src/services/address-book/address-book.schemas.ts"],"mappings":";;;;cAoDa,mCAAiC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;KAelC,8BAA8B,EAAE,kBAAkB;cAEjD,mCAAiC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwClC,8BAA8B,EAAE,kBAAkB;iBAE9C,oCAAoC,OAAO;cAkB9C,mCAAiC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0BlC,8BAA8B,EAAE,kBAAkB;cAEjD,mCAAiC,EAAA;;;KAIlC,8BAA8B,EAAE,kBAAkB;cAEjD,iCAA+B,EAAA;;;;KAKhC,4BAA4B,EAAE,kBAAkB;cAE/C,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;KAYhC,4BAA4B,EAAE,kBAAkB;cAE/C,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;;;KAYhC,4BAA4B,EAAE,kBAAkB;cAE/C,iCAA+B,EAAA;;;KAIhC,4BAA4B,EAAE,kBAAkB;cAE/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,4BAA0B,EAAA,YAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAC3B,uBAAuB,EAAE,mBAAmB;cAE3C,sCAAoC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkCrC,iCAAiC,EAAE,mBACpC;cAGE,wCAAsC,EAAA,YAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEvC,mCAAmC,EAAE,mBACtC;cAGE,sCAAoC,EAAA;;;;;;;;;;;;KAOrC,iCAAiC,EAAE,mBACpC;cAGE,6BAA2B,EAAA;;;;;;;;;;;;;;;;;;;;;KAO5B,wBAAwB,EAAE,mBAAmB;cAE5C,8BAA4B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqD7B,yBAAyB,EAAE,mBAAmB;cAE7C,yCAAuC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+CxC,oCAAoC,EAAE,mBACvC;cAGE,uBAAqB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUtB,kBAAkB,EAAE,mBAAmB;cAEtC,kCAAgC,EAAA;;;;;;;;;;;;;;;KAMjC,6BAA6B,EAAE,mBAAmB"}
|
|
@@ -150,10 +150,13 @@ const ListInternalTransferWhitelistEntriesInputSchema = v.pipe(v.strictObject({
|
|
|
150
150
|
})));
|
|
151
151
|
const GetAddressBookViewInputSchema = v.pipe(v.strictObject({
|
|
152
152
|
...AccountScopeInputEntries,
|
|
153
|
-
limit: AddressBookViewLimitSchema
|
|
154
|
-
|
|
153
|
+
limit: AddressBookViewLimitSchema,
|
|
154
|
+
/** Minimum `viewRevision` (from an invalidation event) the returned view must reach. */
|
|
155
|
+
minimumViewRevision: v.optional(positiveBigintStringInputSchema("minimumViewRevision"))
|
|
156
|
+
}), v.transform(({ account, limit, minimumViewRevision }) => ({
|
|
155
157
|
subaccountId: accountScopeToSubaccountId(account),
|
|
156
|
-
limit
|
|
158
|
+
limit,
|
|
159
|
+
minimumViewRevision
|
|
157
160
|
})));
|
|
158
161
|
const CountSchema = v.pipe(v.bigint(), v.transform((value) => Number(value)));
|
|
159
162
|
const AccountScopeSchema = v.object({
|
|
@@ -338,11 +341,13 @@ const AddressBookViewSchema = v.object({
|
|
|
338
341
|
recentDestinations: v.optional(AddressBookRecentDestinationsViewSchema),
|
|
339
342
|
tags: v.optional(v.array(AddressBookTagSummarySchema), []),
|
|
340
343
|
withdrawWhitelist: v.optional(WithdrawWhitelistViewSchema),
|
|
341
|
-
recentDestinationsTruncated: v.optional(v.boolean(), false)
|
|
344
|
+
recentDestinationsTruncated: v.optional(v.boolean(), false),
|
|
345
|
+
viewRevision: v.optional(BigIntStringSchema, 0n)
|
|
342
346
|
});
|
|
343
347
|
const AddressBookViewInvalidatedSchema = v.object({
|
|
344
348
|
scope: v.optional(AccountScopeSchema),
|
|
345
|
-
invalidatedAt: TimestampMsSchema$1
|
|
349
|
+
invalidatedAt: TimestampMsSchema$1,
|
|
350
|
+
viewRevision: v.optional(BigIntStringSchema, 0n)
|
|
346
351
|
});
|
|
347
352
|
//#endregion
|
|
348
353
|
export { AddressBookEntriesSchema, AddressBookEntriesViewSchema, AddressBookEntrySchema, AddressBookRecentDestinationsViewSchema, AddressBookSchema, AddressBookTagSchema, AddressBookTagSummarySchema, AddressBookViewInvalidatedSchema, AddressBookViewSchema, CopyAddressBookEntryInputSchema, CreateAddressBookEntryInputSchema, CreateAddressBookTagInputSchema, DeleteAddressBookEntryInputSchema, DeleteAddressBookTagInputSchema, GetAddressBookViewInputSchema, InternalTransferWhitelistEntriesSchema, InternalTransferWhitelistEntrySchema, ListAddressBookEntriesInputSchema, ListInternalTransferWhitelistEntriesInputSchema, ListTransferCounterpartiesInputSchema, ListTransferDestinationsInputSchema, MirroredWithdrawWhitelistEntrySchema, SubaccountScopedInputSchema, TransferCounterpartiesSchema, TransferCounterpartySchema, TransferDestinationSchema, TransferDestinationsSchema, UpdateAddressBookEntryInputSchema, UpdateAddressBookTagInputSchema, WithdrawWhitelistViewSchema, validateCreateAddressBookEntryInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-book.schemas.js","names":["Proto.AccountScopeType","Proto.DestinationWhitelistStatus","Proto.AddressBookEntryKind","Proto.TransferCounterpartyDirection","Proto.InternalWhitelistResolutionStatus","RequiredTimestampMsSchema"],"sources":["../../../src/services/address-book/address-book.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport * as Proto from \"../../gen/auth/v1/address_book_pb.js\";\nimport { SubaccountRole } from \"../../gen/auth/v1/subaccounts_pb.js\";\nimport {\n OptionalTimestampMsSchema,\n BigIntStringSchema,\n PublicIdSchema,\n TimestampMsSchema as RequiredTimestampMsSchema,\n idInputSchema,\n optionalSubaccountIdInputSchema,\n positiveBigintStringInputSchema,\n} from \"../../shared/schemas.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport {\n ADDRESS_BOOK_ENTRY_KIND_VALUES,\n AccountScopeTypeCodec,\n AddressBookEntryKindCodec,\n DestinationWhitelistStatusCodec,\n InternalWhitelistResolutionStatusCodec,\n TRANSFER_COUNTERPARTY_DIRECTION_VALUES,\n TransferCounterpartyDirectionCodec,\n} from \"./address-book.codecs.js\";\nimport { SubaccountRoleCodec } from \"../subaccounts/subaccounts.codecs.js\";\nimport { buildProtoPatch, defineProtoPatchFields } from \"../../utils/proto-patch.js\";\n\nconst OptionalSubaccountIdSchema = optionalSubaccountIdInputSchema();\nconst IdSchema = idInputSchema;\n\nconst AddressBookLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)),\n);\nconst AddressBookCounterpartyLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst AddressBookViewLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst PageTokenSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\n\nconst TimestampMsSchema = OptionalTimestampMsSchema;\n\nconst AddressBookTagInputSchema = v.strictObject({\n name: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(48)),\n color: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(32)), \"\"),\n});\nconst AddressBookTagInputsSchema = v.pipe(v.array(AddressBookTagInputSchema), v.maxLength(10));\n\nexport const ListAddressBookEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListAddressBookEntriesInput = v.InferInput<typeof ListAddressBookEntriesInputSchema>;\n\nexport const CreateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n label: v.pipe(v.string(), v.trim(), v.minLength(1)),\n note: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n entry: v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"external\"),\n polychainChainId: v.pipe(v.number(), v.integer(), v.gtValue(0)),\n address: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.strictObject({\n kind: v.literal(\"internal\"),\n smartAccountAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n ]),\n tagIds: v.optional(v.array(IdSchema(\"tagId\")), []),\n newTags: v.optional(AddressBookTagInputsSchema, []),\n }),\n v.transform(({ account, entry, ...rest }) => ({\n ...rest,\n subaccountId: accountScopeToSubaccountId(account),\n entry:\n entry.kind === \"external\"\n ? {\n case: \"external\" as const,\n value: {\n polychainChainId: entry.polychainChainId,\n address: entry.address,\n },\n }\n : {\n case: \"internal\" as const,\n value: {\n smartAccountAddress: entry.smartAccountAddress,\n },\n },\n })),\n);\n\nexport type CreateAddressBookEntryInput = v.InferInput<typeof CreateAddressBookEntryInputSchema>;\n\nexport function validateCreateAddressBookEntryInput(input: CreateAddressBookEntryInput): void {\n parse(CreateAddressBookEntryInputSchema, input);\n}\n\ntype AddressBookEntryPatch = {\n label?: string;\n note?: string;\n tagIds?: bigint[];\n newTags?: v.InferOutput<typeof AddressBookTagInputSchema>[];\n};\n\nconst ADDRESS_BOOK_ENTRY_PATCH_FIELDS = defineProtoPatchFields<AddressBookEntryPatch>()({\n label: { path: \"label\", encode: (label) => ({ label }) },\n note: { path: \"note\", encode: (note) => ({ note }) },\n tagIds: { path: \"tag_ids\", encode: (tagIds) => ({ tagIds }) },\n newTags: { path: \"new_tags\", encode: (newTags) => ({ newTags }) },\n});\n\nexport const UpdateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n expectedRevision: positiveBigintStringInputSchema(\"expectedRevision\"),\n label: v.optional(v.pipe(v.string(), v.trim())),\n note: v.optional(v.pipe(v.string(), v.trim())),\n tagIds: v.optional(v.array(IdSchema(\"tagId\"))),\n newTags: v.optional(AddressBookTagInputsSchema),\n }),\n v.check(\n ({ label, note, tagIds, newTags }) =>\n label !== undefined ||\n note !== undefined ||\n tagIds !== undefined ||\n newTags !== undefined,\n \"At least one address-book entry field must be provided\",\n ),\n v.transform(({ addressBookEntryId, expectedRevision, ...input }) => {\n const { patch: entry, updateMask } = buildProtoPatch(\n input,\n ADDRESS_BOOK_ENTRY_PATCH_FIELDS,\n );\n return { addressBookEntryId, entry, updateMask, expectedRevision };\n }),\n);\n\nexport type UpdateAddressBookEntryInput = v.InferInput<typeof UpdateAddressBookEntryInputSchema>;\n\nexport const DeleteAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n});\n\nexport type DeleteAddressBookEntryInput = v.InferInput<typeof DeleteAddressBookEntryInputSchema>;\n\nexport const CopyAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n targetSubaccountId: OptionalSubaccountIdSchema,\n});\n\nexport type CopyAddressBookEntryInput = v.InferInput<typeof CopyAddressBookEntryInputSchema>;\n\nexport const CreateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n name: v.pipe(v.string(), v.trim(), v.minLength(1)),\n color: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type CreateAddressBookTagInput = v.InferInput<typeof CreateAddressBookTagInputSchema>;\n\nexport const UpdateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n tagId: IdSchema(\"tagId\"),\n name: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),\n color: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.check(\n ({ name, color }) => name !== undefined || color !== undefined,\n \"At least one address-book tag field must be provided\",\n ),\n);\n\nexport type UpdateAddressBookTagInput = v.InferInput<typeof UpdateAddressBookTagInputSchema>;\n\nexport const DeleteAddressBookTagInputSchema = v.strictObject({\n tagId: IdSchema(\"tagId\"),\n});\n\nexport type DeleteAddressBookTagInput = v.InferInput<typeof DeleteAddressBookTagInputSchema>;\n\nexport const ListTransferCounterpartiesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n direction: v.optional(v.picklist(TRANSFER_COUNTERPARTY_DIRECTION_VALUES)),\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookCounterpartyLimitSchema,\n }),\n v.transform(({ account, direction, kind, limit }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n direction: direction\n ? TransferCounterpartyDirectionCodec.inputToProto[direction]\n : undefined,\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n })),\n);\n\nexport type ListTransferCounterpartiesInput = v.InferInput<\n typeof ListTransferCounterpartiesInputSchema\n>;\n\nexport const ListTransferDestinationsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListTransferDestinationsInput = v.InferInput<\n typeof ListTransferDestinationsInputSchema\n>;\n\nexport const SubaccountScopedInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n }),\n v.transform(({ account }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type SubaccountScopedInput = v.InferInput<typeof SubaccountScopedInputSchema>;\n\nexport const ListInternalTransferWhitelistEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n })),\n);\n\nexport type ListInternalTransferWhitelistEntriesInput = v.InferInput<\n typeof ListInternalTransferWhitelistEntriesInputSchema\n>;\n\nexport const GetAddressBookViewInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookViewLimitSchema,\n }),\n v.transform(({ account, limit }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n })),\n);\n\nexport type GetAddressBookViewInput = v.InferInput<typeof GetAddressBookViewInputSchema>;\n\nconst CountSchema = v.pipe(\n v.bigint(),\n v.transform((value) => Number(value)),\n);\n\nconst AccountScopeSchema = v.object({\n scopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AccountScopeSchema\",\n \"scope type\",\n ),\n ),\n ),\n rootAccountId: PublicIdSchema,\n subaccountId: PublicIdSchema,\n});\n\nconst ExternalWithdrawAddressSchema = v.object({\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n});\n\nconst InternalTransferAccountSchema = v.object({\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferAccountSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n});\n\nconst AddressBookEntryValueSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"external\"), value: ExternalWithdrawAddressSchema }),\n v.object({ case: v.literal(\"internal\"), value: InternalTransferAccountSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst DestinationWhitelistStatusSchema = v.pipe(\n v.enum(Proto.DestinationWhitelistStatus),\n v.transform((value) =>\n requiredEnumLabel(\n DestinationWhitelistStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.DestinationWhitelistStatusSchema\",\n \"whitelist status\",\n ),\n ),\n);\n\nconst AddressBookEntryKindSchema = v.pipe(\n v.enum(Proto.AddressBookEntryKind),\n v.transform((value) =>\n requiredEnumLabel(\n AddressBookEntryKindCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntryKindSchema\",\n \"entry kind\",\n ),\n ),\n);\n\nconst TransferCounterpartyDirectionSchema = v.pipe(\n v.enum(Proto.TransferCounterpartyDirection),\n v.transform((value) =>\n requiredEnumLabel(\n TransferCounterpartyDirectionCodec.protoToOutput,\n value,\n \"PolyesterClient.TransferCounterpartyDirectionSchema\",\n \"direction\",\n ),\n ),\n);\n\nexport const AddressBookSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n callerRole: v.pipe(\n v.enum(SubaccountRole),\n v.transform((role) =>\n requiredEnumLabel(\n SubaccountRoleCodec.protoToOutput,\n role,\n \"AddressBookEntrySchema\",\n \"caller role\",\n ),\n ),\n ),\n label: v.string(),\n ownerUsername: v.string(),\n smartAccountAddress: v.string(),\n});\n\nexport type AddressBook = v.InferOutput<typeof AddressBookSchema>;\n\nexport const AddressBookTagSummarySchema = v.object({\n tagId: PublicIdSchema,\n name: v.string(),\n color: v.string(),\n});\n\nexport type AddressBookTagSummary = v.InferOutput<typeof AddressBookTagSummarySchema>;\n\nexport const AddressBookTagSchema = v.object({\n tagId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n name: v.string(),\n color: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n});\n\nexport type AddressBookTag = v.InferOutput<typeof AddressBookTagSchema>;\n\nexport const AddressBookEntrySchema = v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n label: v.string(),\n note: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n entry: AddressBookEntryValueSchema,\n tags: v.array(AddressBookTagSchema),\n revision: BigIntStringSchema,\n});\n\nexport type AddressBookEntry = v.InferOutput<typeof AddressBookEntrySchema>;\n\nexport const AddressBookEntriesSchema = v.array(AddressBookEntrySchema);\nexport type AddressBookEntries = v.InferOutput<typeof AddressBookEntriesSchema>;\n\nexport const TransferCounterpartySchema = v.object({\n counterpartyId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n direction: TransferCounterpartyDirectionSchema,\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n firstSeenAt: TimestampMsSchema,\n lastSeenAt: TimestampMsSchema,\n counterparty: AddressBookEntryValueSchema,\n});\n\nexport type TransferCounterparty = v.InferOutput<typeof TransferCounterpartySchema>;\n\nexport const TransferCounterpartiesSchema = v.array(TransferCounterpartySchema);\nexport type TransferCounterparties = v.InferOutput<typeof TransferCounterpartiesSchema>;\n\nexport const TransferDestinationSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n whitelisted: v.boolean(),\n whitelistStatus: DestinationWhitelistStatusSchema,\n addressBookEntry: v.optional(AddressBookEntrySchema),\n destination: AddressBookEntryValueSchema,\n whitelistEffectiveAt: TimestampMsSchema,\n whitelistUpdatedAt: TimestampMsSchema,\n});\n\nexport type TransferDestination = v.InferOutput<typeof TransferDestinationSchema>;\n\nexport const TransferDestinationsSchema = v.array(TransferDestinationSchema);\nexport type TransferDestinations = v.InferOutput<typeof TransferDestinationsSchema>;\n\nexport const InternalTransferWhitelistEntrySchema = v.object({\n entryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n resolutionStatus: v.pipe(\n v.enum(Proto.InternalWhitelistResolutionStatus),\n v.transform((value) =>\n requiredEnumLabel(\n InternalWhitelistResolutionStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"resolution status\",\n ),\n ),\n ),\n});\n\nexport type InternalTransferWhitelistEntry = v.InferOutput<\n typeof InternalTransferWhitelistEntrySchema\n>;\n\nexport const InternalTransferWhitelistEntriesSchema = v.array(InternalTransferWhitelistEntrySchema);\n\nexport type InternalTransferWhitelistEntries = v.InferOutput<\n typeof InternalTransferWhitelistEntriesSchema\n>;\n\nexport const MirroredWithdrawWhitelistEntrySchema = v.object({\n canonicalAddress: v.string(),\n rawAddressHex: v.string(),\n updatedAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n});\n\nexport type MirroredWithdrawWhitelistEntry = v.InferOutput<\n typeof MirroredWithdrawWhitelistEntrySchema\n>;\n\nexport const WithdrawWhitelistViewSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n externalWhitelistRequired: v.boolean(),\n internalWhitelistRequired: v.boolean(),\n activeEntries: v.optional(v.array(MirroredWithdrawWhitelistEntrySchema), []),\n});\n\nexport type WithdrawWhitelistView = v.InferOutput<typeof WithdrawWhitelistViewSchema>;\n\nexport const AddressBookEntriesViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntriesViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookEntriesView = v.InferOutput<typeof AddressBookEntriesViewSchema>;\n\nexport const AddressBookRecentDestinationsViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookRecentDestinationsViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookRecentDestinationsView = v.InferOutput<\n typeof AddressBookRecentDestinationsViewSchema\n>;\n\nexport const AddressBookViewSchema = v.object({\n books: v.optional(v.array(AddressBookSchema), []),\n entries: v.optional(AddressBookEntriesViewSchema),\n recentDestinations: v.optional(AddressBookRecentDestinationsViewSchema),\n tags: v.optional(v.array(AddressBookTagSummarySchema), []),\n withdrawWhitelist: v.optional(WithdrawWhitelistViewSchema),\n recentDestinationsTruncated: v.optional(v.boolean(), false),\n});\n\nexport type AddressBookView = v.InferOutput<typeof AddressBookViewSchema>;\n\nexport const AddressBookViewInvalidatedSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n invalidatedAt: RequiredTimestampMsSchema,\n});\n\nexport type AddressBookViewInvalidated = v.InferOutput<typeof AddressBookViewInvalidatedSchema>;\n"],"mappings":";;;;;;;;;;;AA8BA,MAAM,6BAA6B,gCAAgC;AACnE,MAAM,WAAW;AAEjB,MAAM,yBAAyB,EAAE,SAC7B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,qCAAqC,EAAE,SACzC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,6BAA6B,EAAE,SACjC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,kBAAkB,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AAEnE,MAAM,oBAAoB;AAE1B,MAAM,4BAA4B,EAAE,aAAa;CAC7C,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,CAAC;CAClE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE;AACvE,CAAC;AACD,MAAM,6BAA6B,EAAE,KAAK,EAAE,MAA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AA2B;CACzD,6BAA6B,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAC9D,CAAC;AAID,MAAa,mCAAmC,EAAE,OAAO;CACrD,OAAO,EAAE,SAAS,kBAAkB;CACpC,eAAeK;AACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"address-book.schemas.js","names":["Proto.AccountScopeType","Proto.DestinationWhitelistStatus","Proto.AddressBookEntryKind","Proto.TransferCounterpartyDirection","Proto.InternalWhitelistResolutionStatus","RequiredTimestampMsSchema"],"sources":["../../../src/services/address-book/address-book.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport * as Proto from \"../../gen/auth/v1/address_book_pb.js\";\nimport { SubaccountRole } from \"../../gen/auth/v1/subaccounts_pb.js\";\nimport {\n OptionalTimestampMsSchema,\n BigIntStringSchema,\n PublicIdSchema,\n TimestampMsSchema as RequiredTimestampMsSchema,\n idInputSchema,\n optionalSubaccountIdInputSchema,\n positiveBigintStringInputSchema,\n} from \"../../shared/schemas.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport {\n ADDRESS_BOOK_ENTRY_KIND_VALUES,\n AccountScopeTypeCodec,\n AddressBookEntryKindCodec,\n DestinationWhitelistStatusCodec,\n InternalWhitelistResolutionStatusCodec,\n TRANSFER_COUNTERPARTY_DIRECTION_VALUES,\n TransferCounterpartyDirectionCodec,\n} from \"./address-book.codecs.js\";\nimport { SubaccountRoleCodec } from \"../subaccounts/subaccounts.codecs.js\";\nimport { buildProtoPatch, defineProtoPatchFields } from \"../../utils/proto-patch.js\";\n\nconst OptionalSubaccountIdSchema = optionalSubaccountIdInputSchema();\nconst IdSchema = idInputSchema;\n\nconst AddressBookLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(500)),\n);\nconst AddressBookCounterpartyLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst AddressBookViewLimitSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(200)),\n);\nconst PageTokenSchema = v.optional(v.pipe(v.string(), v.trim()), \"\");\n\nconst TimestampMsSchema = OptionalTimestampMsSchema;\n\nconst AddressBookTagInputSchema = v.strictObject({\n name: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(48)),\n color: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(32)), \"\"),\n});\nconst AddressBookTagInputsSchema = v.pipe(v.array(AddressBookTagInputSchema), v.maxLength(10));\n\nexport const ListAddressBookEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListAddressBookEntriesInput = v.InferInput<typeof ListAddressBookEntriesInputSchema>;\n\nexport const CreateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n label: v.pipe(v.string(), v.trim(), v.minLength(1)),\n note: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n entry: v.variant(\"kind\", [\n v.strictObject({\n kind: v.literal(\"external\"),\n polychainChainId: v.pipe(v.number(), v.integer(), v.gtValue(0)),\n address: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.strictObject({\n kind: v.literal(\"internal\"),\n smartAccountAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n ]),\n tagIds: v.optional(v.array(IdSchema(\"tagId\")), []),\n newTags: v.optional(AddressBookTagInputsSchema, []),\n }),\n v.transform(({ account, entry, ...rest }) => ({\n ...rest,\n subaccountId: accountScopeToSubaccountId(account),\n entry:\n entry.kind === \"external\"\n ? {\n case: \"external\" as const,\n value: {\n polychainChainId: entry.polychainChainId,\n address: entry.address,\n },\n }\n : {\n case: \"internal\" as const,\n value: {\n smartAccountAddress: entry.smartAccountAddress,\n },\n },\n })),\n);\n\nexport type CreateAddressBookEntryInput = v.InferInput<typeof CreateAddressBookEntryInputSchema>;\n\nexport function validateCreateAddressBookEntryInput(input: CreateAddressBookEntryInput): void {\n parse(CreateAddressBookEntryInputSchema, input);\n}\n\ntype AddressBookEntryPatch = {\n label?: string;\n note?: string;\n tagIds?: bigint[];\n newTags?: v.InferOutput<typeof AddressBookTagInputSchema>[];\n};\n\nconst ADDRESS_BOOK_ENTRY_PATCH_FIELDS = defineProtoPatchFields<AddressBookEntryPatch>()({\n label: { path: \"label\", encode: (label) => ({ label }) },\n note: { path: \"note\", encode: (note) => ({ note }) },\n tagIds: { path: \"tag_ids\", encode: (tagIds) => ({ tagIds }) },\n newTags: { path: \"new_tags\", encode: (newTags) => ({ newTags }) },\n});\n\nexport const UpdateAddressBookEntryInputSchema = v.pipe(\n v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n expectedRevision: positiveBigintStringInputSchema(\"expectedRevision\"),\n label: v.optional(v.pipe(v.string(), v.trim())),\n note: v.optional(v.pipe(v.string(), v.trim())),\n tagIds: v.optional(v.array(IdSchema(\"tagId\"))),\n newTags: v.optional(AddressBookTagInputsSchema),\n }),\n v.check(\n ({ label, note, tagIds, newTags }) =>\n label !== undefined ||\n note !== undefined ||\n tagIds !== undefined ||\n newTags !== undefined,\n \"At least one address-book entry field must be provided\",\n ),\n v.transform(({ addressBookEntryId, expectedRevision, ...input }) => {\n const { patch: entry, updateMask } = buildProtoPatch(\n input,\n ADDRESS_BOOK_ENTRY_PATCH_FIELDS,\n );\n return { addressBookEntryId, entry, updateMask, expectedRevision };\n }),\n);\n\nexport type UpdateAddressBookEntryInput = v.InferInput<typeof UpdateAddressBookEntryInputSchema>;\n\nexport const DeleteAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n});\n\nexport type DeleteAddressBookEntryInput = v.InferInput<typeof DeleteAddressBookEntryInputSchema>;\n\nexport const CopyAddressBookEntryInputSchema = v.strictObject({\n addressBookEntryId: IdSchema(\"addressBookEntryId\"),\n targetSubaccountId: OptionalSubaccountIdSchema,\n});\n\nexport type CopyAddressBookEntryInput = v.InferInput<typeof CopyAddressBookEntryInputSchema>;\n\nexport const CreateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n name: v.pipe(v.string(), v.trim(), v.minLength(1)),\n color: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type CreateAddressBookTagInput = v.InferInput<typeof CreateAddressBookTagInputSchema>;\n\nexport const UpdateAddressBookTagInputSchema = v.pipe(\n v.strictObject({\n tagId: IdSchema(\"tagId\"),\n name: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),\n color: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.check(\n ({ name, color }) => name !== undefined || color !== undefined,\n \"At least one address-book tag field must be provided\",\n ),\n);\n\nexport type UpdateAddressBookTagInput = v.InferInput<typeof UpdateAddressBookTagInputSchema>;\n\nexport const DeleteAddressBookTagInputSchema = v.strictObject({\n tagId: IdSchema(\"tagId\"),\n});\n\nexport type DeleteAddressBookTagInput = v.InferInput<typeof DeleteAddressBookTagInputSchema>;\n\nexport const ListTransferCounterpartiesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n direction: v.optional(v.picklist(TRANSFER_COUNTERPARTY_DIRECTION_VALUES)),\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookCounterpartyLimitSchema,\n }),\n v.transform(({ account, direction, kind, limit }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n direction: direction\n ? TransferCounterpartyDirectionCodec.inputToProto[direction]\n : undefined,\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n })),\n);\n\nexport type ListTransferCounterpartiesInput = v.InferInput<\n typeof ListTransferCounterpartiesInputSchema\n>;\n\nexport const ListTransferDestinationsInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n kind: v.optional(v.picklist(ADDRESS_BOOK_ENTRY_KIND_VALUES)),\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, kind, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n kind: kind ? AddressBookEntryKindCodec.inputToProto[kind] : undefined,\n limit,\n pageToken,\n })),\n);\n\nexport type ListTransferDestinationsInput = v.InferInput<\n typeof ListTransferDestinationsInputSchema\n>;\n\nexport const SubaccountScopedInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n }),\n v.transform(({ account }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport type SubaccountScopedInput = v.InferInput<typeof SubaccountScopedInputSchema>;\n\nexport const ListInternalTransferWhitelistEntriesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookLimitSchema,\n pageToken: PageTokenSchema,\n }),\n v.transform(({ account, limit, pageToken }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n pageToken,\n })),\n);\n\nexport type ListInternalTransferWhitelistEntriesInput = v.InferInput<\n typeof ListInternalTransferWhitelistEntriesInputSchema\n>;\n\nexport const GetAddressBookViewInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n limit: AddressBookViewLimitSchema,\n /** Minimum `viewRevision` (from an invalidation event) the returned view must reach. */\n minimumViewRevision: v.optional(positiveBigintStringInputSchema(\"minimumViewRevision\")),\n }),\n v.transform(({ account, limit, minimumViewRevision }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n limit,\n minimumViewRevision,\n })),\n);\n\nexport type GetAddressBookViewInput = v.InferInput<typeof GetAddressBookViewInputSchema>;\n\nconst CountSchema = v.pipe(\n v.bigint(),\n v.transform((value) => Number(value)),\n);\n\nconst AccountScopeSchema = v.object({\n scopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AccountScopeSchema\",\n \"scope type\",\n ),\n ),\n ),\n rootAccountId: PublicIdSchema,\n subaccountId: PublicIdSchema,\n});\n\nconst ExternalWithdrawAddressSchema = v.object({\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n});\n\nconst InternalTransferAccountSchema = v.object({\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferAccountSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n});\n\nconst AddressBookEntryValueSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"external\"), value: ExternalWithdrawAddressSchema }),\n v.object({ case: v.literal(\"internal\"), value: InternalTransferAccountSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst DestinationWhitelistStatusSchema = v.pipe(\n v.enum(Proto.DestinationWhitelistStatus),\n v.transform((value) =>\n requiredEnumLabel(\n DestinationWhitelistStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.DestinationWhitelistStatusSchema\",\n \"whitelist status\",\n ),\n ),\n);\n\nconst AddressBookEntryKindSchema = v.pipe(\n v.enum(Proto.AddressBookEntryKind),\n v.transform((value) =>\n requiredEnumLabel(\n AddressBookEntryKindCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntryKindSchema\",\n \"entry kind\",\n ),\n ),\n);\n\nconst TransferCounterpartyDirectionSchema = v.pipe(\n v.enum(Proto.TransferCounterpartyDirection),\n v.transform((value) =>\n requiredEnumLabel(\n TransferCounterpartyDirectionCodec.protoToOutput,\n value,\n \"PolyesterClient.TransferCounterpartyDirectionSchema\",\n \"direction\",\n ),\n ),\n);\n\nexport const AddressBookSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n callerRole: v.pipe(\n v.enum(SubaccountRole),\n v.transform((role) =>\n requiredEnumLabel(\n SubaccountRoleCodec.protoToOutput,\n role,\n \"AddressBookEntrySchema\",\n \"caller role\",\n ),\n ),\n ),\n label: v.string(),\n ownerUsername: v.string(),\n smartAccountAddress: v.string(),\n});\n\nexport type AddressBook = v.InferOutput<typeof AddressBookSchema>;\n\nexport const AddressBookTagSummarySchema = v.object({\n tagId: PublicIdSchema,\n name: v.string(),\n color: v.string(),\n});\n\nexport type AddressBookTagSummary = v.InferOutput<typeof AddressBookTagSummarySchema>;\n\nexport const AddressBookTagSchema = v.object({\n tagId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n name: v.string(),\n color: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n});\n\nexport type AddressBookTag = v.InferOutput<typeof AddressBookTagSchema>;\n\nexport const AddressBookEntrySchema = v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n label: v.string(),\n note: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n entry: AddressBookEntryValueSchema,\n tags: v.array(AddressBookTagSchema),\n revision: BigIntStringSchema,\n});\n\nexport type AddressBookEntry = v.InferOutput<typeof AddressBookEntrySchema>;\n\nexport const AddressBookEntriesSchema = v.array(AddressBookEntrySchema);\nexport type AddressBookEntries = v.InferOutput<typeof AddressBookEntriesSchema>;\n\nexport const TransferCounterpartySchema = v.object({\n counterpartyId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n direction: TransferCounterpartyDirectionSchema,\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n firstSeenAt: TimestampMsSchema,\n lastSeenAt: TimestampMsSchema,\n counterparty: AddressBookEntryValueSchema,\n});\n\nexport type TransferCounterparty = v.InferOutput<typeof TransferCounterpartySchema>;\n\nexport const TransferCounterpartiesSchema = v.array(TransferCounterpartySchema);\nexport type TransferCounterparties = v.InferOutput<typeof TransferCounterpartiesSchema>;\n\nexport const TransferDestinationSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n kind: AddressBookEntryKindSchema,\n saved: v.boolean(),\n whitelisted: v.boolean(),\n whitelistStatus: DestinationWhitelistStatusSchema,\n addressBookEntry: v.optional(AddressBookEntrySchema),\n destination: AddressBookEntryValueSchema,\n whitelistEffectiveAt: TimestampMsSchema,\n whitelistUpdatedAt: TimestampMsSchema,\n});\n\nexport type TransferDestination = v.InferOutput<typeof TransferDestinationSchema>;\n\nexport const TransferDestinationsSchema = v.array(TransferDestinationSchema);\nexport type TransferDestinations = v.InferOutput<typeof TransferDestinationsSchema>;\n\nexport const InternalTransferWhitelistEntrySchema = v.object({\n entryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n resolutionStatus: v.pipe(\n v.enum(Proto.InternalWhitelistResolutionStatus),\n v.transform((value) =>\n requiredEnumLabel(\n InternalWhitelistResolutionStatusCodec.protoToOutput,\n value,\n \"PolyesterClient.InternalTransferWhitelistEntrySchema\",\n \"resolution status\",\n ),\n ),\n ),\n});\n\nexport type InternalTransferWhitelistEntry = v.InferOutput<\n typeof InternalTransferWhitelistEntrySchema\n>;\n\nexport const InternalTransferWhitelistEntriesSchema = v.array(InternalTransferWhitelistEntrySchema);\n\nexport type InternalTransferWhitelistEntries = v.InferOutput<\n typeof InternalTransferWhitelistEntriesSchema\n>;\n\nexport const MirroredWithdrawWhitelistEntrySchema = v.object({\n canonicalAddress: v.string(),\n rawAddressHex: v.string(),\n updatedAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n});\n\nexport type MirroredWithdrawWhitelistEntry = v.InferOutput<\n typeof MirroredWithdrawWhitelistEntrySchema\n>;\n\nexport const WithdrawWhitelistViewSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n externalWhitelistRequired: v.boolean(),\n internalWhitelistRequired: v.boolean(),\n activeEntries: v.optional(v.array(MirroredWithdrawWhitelistEntrySchema), []),\n});\n\nexport type WithdrawWhitelistView = v.InferOutput<typeof WithdrawWhitelistViewSchema>;\n\nexport const AddressBookEntriesViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n addressBookEntryId: PublicIdSchema,\n scope: v.optional(AccountScopeSchema),\n label: v.string(),\n note: v.string(),\n tagIds: v.optional(v.array(PublicIdSchema), []),\n whitelistStatus: DestinationWhitelistStatusSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookEntriesViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n createdAt: TimestampMsSchema,\n updatedAt: TimestampMsSchema,\n revision: BigIntStringSchema,\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookEntriesView = v.InferOutput<typeof AddressBookEntriesViewSchema>;\n\nexport const AddressBookRecentDestinationsViewSchema = v.object({\n external: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n polychainChainId: v.pipe(v.number(), v.integer()),\n address: v.string(),\n }),\n ),\n [],\n ),\n internal: v.optional(\n v.array(\n v.object({\n scope: v.optional(AccountScopeSchema),\n lastDirection: TransferCounterpartyDirectionSchema,\n saved: v.boolean(),\n addressBookEntryId: PublicIdSchema,\n useCount: CountSchema,\n lastSeenAt: TimestampMsSchema,\n rootAccountId: PublicIdSchema,\n targetAccountId: PublicIdSchema,\n targetScopeType: v.pipe(\n v.enum(Proto.AccountScopeType),\n v.transform((value) =>\n requiredEnumLabel(\n AccountScopeTypeCodec.protoToOutput,\n value,\n \"PolyesterClient.AddressBookRecentDestinationsViewSchema\",\n \"target scope type\",\n ),\n ),\n ),\n smartAccountAddress: v.string(),\n rootUsername: v.string(),\n subaccountLabel: v.string(),\n }),\n ),\n [],\n ),\n});\n\nexport type AddressBookRecentDestinationsView = v.InferOutput<\n typeof AddressBookRecentDestinationsViewSchema\n>;\n\nexport const AddressBookViewSchema = v.object({\n books: v.optional(v.array(AddressBookSchema), []),\n entries: v.optional(AddressBookEntriesViewSchema),\n recentDestinations: v.optional(AddressBookRecentDestinationsViewSchema),\n tags: v.optional(v.array(AddressBookTagSummarySchema), []),\n withdrawWhitelist: v.optional(WithdrawWhitelistViewSchema),\n recentDestinationsTruncated: v.optional(v.boolean(), false),\n viewRevision: v.optional(BigIntStringSchema, 0n),\n});\n\nexport type AddressBookView = v.InferOutput<typeof AddressBookViewSchema>;\n\nexport const AddressBookViewInvalidatedSchema = v.object({\n scope: v.optional(AccountScopeSchema),\n invalidatedAt: RequiredTimestampMsSchema,\n viewRevision: v.optional(BigIntStringSchema, 0n),\n});\n\nexport type AddressBookViewInvalidated = v.InferOutput<typeof AddressBookViewInvalidatedSchema>;\n"],"mappings":";;;;;;;;;;;AA8BA,MAAM,6BAA6B,gCAAgC;AACnE,MAAM,WAAW;AAEjB,MAAM,yBAAyB,EAAE,SAC7B,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,qCAAqC,EAAE,SACzC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,6BAA6B,EAAE,SACjC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CACjE;AACA,MAAM,kBAAkB,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AAEnE,MAAM,oBAAoB;AAE1B,MAAM,4BAA4B,EAAE,aAAa;CAC7C,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,CAAC;CAClE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE;AACvE,CAAC;AACD,MAAM,6BAA6B,EAAE,KAAK,EAAE,MAAM,yBAAyB,GAAG,EAA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AAG,CAAC,CAAC;CACzD,mBAAmB,EAAE,SAAS,2BAA2B;CACzD,6BAA6B,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;CAC1D,cAAc,EAAE,SAAS,oBAAoB,EAAE;AACnD,CAAC;AAID,MAAa,mCAAmC,EAAE,OAAO;CACrD,OAAO,EAAE,SAAS,kBAAkB;CACpC,eAAeK;CACf,cAAc,EAAE,SAAS,oBAAoB,EAAE;AACnD,CAAC"}
|
|
@@ -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.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
14
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
|
|
15
15
|
readonly tsSec: v.BigintSchema<undefined>;
|
|
16
16
|
readonly open: v.BigintSchema<undefined>;
|
|
17
17
|
readonly high: v.BigintSchema<undefined>;
|
|
@@ -21,7 +21,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
21
21
|
readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
22
22
|
}, undefined>, v.TransformAction<{
|
|
23
23
|
symbolId: number;
|
|
24
|
-
timeframe: DecodedEnum<"1d" | "
|
|
24
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
25
25
|
tsSec: bigint;
|
|
26
26
|
open: bigint;
|
|
27
27
|
high: bigint;
|
|
@@ -31,7 +31,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
31
31
|
isClosed: boolean;
|
|
32
32
|
}, {
|
|
33
33
|
symbolId: number;
|
|
34
|
-
timeframe: DecodedEnum<"1d" | "
|
|
34
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
35
35
|
time: number;
|
|
36
36
|
open: string;
|
|
37
37
|
high: string;
|
|
@@ -43,7 +43,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
43
43
|
declare const createCandleRowIntSchema: typeof createCandleRowSchema;
|
|
44
44
|
declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
45
45
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
46
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
46
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
|
|
47
47
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
48
48
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
49
49
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
@@ -59,7 +59,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
59
59
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
60
60
|
}, undefined>, v.TransformAction<{
|
|
61
61
|
symbolId: number;
|
|
62
|
-
timeframe: DecodedEnum<"1d" | "
|
|
62
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
63
63
|
tsSec: bigint[];
|
|
64
64
|
open: bigint[];
|
|
65
65
|
high: bigint[];
|
|
@@ -75,7 +75,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
75
75
|
nextPageToken: string;
|
|
76
76
|
}, {
|
|
77
77
|
symbolId: number;
|
|
78
|
-
timeframe: DecodedEnum<"1d" | "
|
|
78
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
79
79
|
time: number[];
|
|
80
80
|
open: string[];
|
|
81
81
|
high: string[];
|
|
@@ -94,7 +94,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
94
94
|
}>]>;
|
|
95
95
|
declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
96
96
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
97
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
97
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
|
|
98
98
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
99
99
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
100
100
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
@@ -110,7 +110,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
110
110
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
111
111
|
}, undefined>, v.TransformAction<{
|
|
112
112
|
symbolId: number;
|
|
113
|
-
timeframe: DecodedEnum<"1d" | "
|
|
113
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
114
114
|
tsSec: bigint[];
|
|
115
115
|
open: bigint[];
|
|
116
116
|
high: bigint[];
|
|
@@ -126,7 +126,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
126
126
|
nextPageToken: string;
|
|
127
127
|
}, {
|
|
128
128
|
symbolId: number;
|
|
129
|
-
timeframe: DecodedEnum<"1d" | "
|
|
129
|
+
timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
|
|
130
130
|
tsSec: number[];
|
|
131
131
|
open: string[];
|
|
132
132
|
high: string[];
|
|
@@ -149,7 +149,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
|
|
|
149
149
|
type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
|
|
150
150
|
declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
151
151
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>]>;
|
|
152
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "
|
|
152
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
|
|
153
153
|
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>;
|
|
154
154
|
readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
155
155
|
readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -13,7 +13,7 @@ type TimestampInit = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
15
15
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>]>;
|
|
16
|
-
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"
|
|
16
|
+
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1h" | "1m" | "1s" | "5m", HeatmapInterval>]>;
|
|
17
17
|
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<5 | 10 | 20 | 1 | 200 | 1000 | 500 | 100 | 50, HeatmapDepth>]>;
|
|
18
18
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
|
|
19
19
|
readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
|
|
@@ -122,7 +122,7 @@ declare function convertHeatmapDeltaBucket(bucket: OrderbookHeatmapDeltaBucketRa
|
|
|
122
122
|
type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;
|
|
123
123
|
declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
124
124
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
125
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
125
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
|
|
126
126
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
127
127
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
128
128
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -142,7 +142,7 @@ declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
|
142
142
|
type OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;
|
|
143
143
|
declare function convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales): {
|
|
144
144
|
symbolId: number;
|
|
145
|
-
interval: DecodedEnum<"
|
|
145
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
146
146
|
tsSec: number;
|
|
147
147
|
isFinal: boolean;
|
|
148
148
|
bids: {
|
|
@@ -226,7 +226,7 @@ declare function convertHeatmapDeltaChain(chain: OrderbookHeatmapDeltaChainRaw,
|
|
|
226
226
|
type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
|
|
227
227
|
declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
228
228
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
229
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
229
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
|
|
230
230
|
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 5 | 10 | 20 | 1 | "unspecified" | 200 | 1000 | 500 | 100 | 50>]>;
|
|
231
231
|
readonly chain: v.OptionalSchema<v.ObjectSchema<{
|
|
232
232
|
readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -267,7 +267,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
267
267
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"close" | "peak">>]>;
|
|
268
268
|
readonly liveBucket: v.OptionalSchema<v.ObjectSchema<{
|
|
269
269
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
270
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
270
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
|
|
271
271
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
272
272
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
273
273
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -286,7 +286,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
286
286
|
}, undefined>, undefined>;
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
|
-
interval: DecodedEnum<"
|
|
289
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
290
290
|
depth: 5 | 10 | 20 | 1 | "unspecified" | 200 | 1000 | 500 | 100 | 50;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
@@ -327,7 +327,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
327
327
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
328
328
|
liveBucket?: {
|
|
329
329
|
symbolId: number;
|
|
330
|
-
interval: DecodedEnum<"
|
|
330
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
331
331
|
tsSec: number;
|
|
332
332
|
isFinal: boolean;
|
|
333
333
|
bids?: {
|
|
@@ -346,7 +346,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
346
346
|
} | undefined;
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
|
-
interval: DecodedEnum<"
|
|
349
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
350
350
|
depth: 5 | 10 | 20 | 1 | "unspecified" | 200 | 1000 | 500 | 100 | 50;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
@@ -387,7 +387,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
387
387
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
388
388
|
liveBucket: {
|
|
389
389
|
symbolId: number;
|
|
390
|
-
interval: DecodedEnum<"
|
|
390
|
+
interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
|
|
391
391
|
tsSec: number;
|
|
392
392
|
isFinal: boolean;
|
|
393
393
|
bids: {
|
|
@@ -29,7 +29,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
29
29
|
readonly bestAskTicks: v.BigintSchema<undefined>;
|
|
30
30
|
readonly bestAskQtyScaled: v.BigintSchema<undefined>;
|
|
31
31
|
readonly sparklines: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
32
|
-
readonly interval: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SparklineInterval, undefined>, v.TransformAction<SparklineInterval, "unspecified" | "
|
|
32
|
+
readonly interval: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SparklineInterval, undefined>, v.TransformAction<SparklineInterval, "unspecified" | "1h" | "24h" | "1w" | "1m">]>;
|
|
33
33
|
readonly closeTicks: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
34
34
|
}, undefined>, undefined>, readonly []>;
|
|
35
35
|
readonly indexPriceTicks: v.BigintSchema<undefined>;
|
|
@@ -48,7 +48,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
48
48
|
bestAskTicks: bigint;
|
|
49
49
|
bestAskQtyScaled: bigint;
|
|
50
50
|
sparklines: {
|
|
51
|
-
interval: "unspecified" | "
|
|
51
|
+
interval: "unspecified" | "1h" | "24h" | "1w" | "1m";
|
|
52
52
|
closeTicks: bigint[];
|
|
53
53
|
}[];
|
|
54
54
|
indexPriceTicks: bigint;
|
|
@@ -77,7 +77,7 @@ declare const ListMarketOverviewInputSchema: v.SchemaWithPipe<readonly [v.Strict
|
|
|
77
77
|
readonly orderBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["change_24h_bps", "volume_24h_quote", "last_price", "date_added"], undefined>, "volume_24h_quote">, v.TransformAction<"change_24h_bps" | "volume_24h_quote" | "last_price" | "date_added", MarketOrderBy.ORDER_BY_CHANGE_24H_BPS | MarketOrderBy.ORDER_BY_VOLUME_24H_QUOTE | MarketOrderBy.ORDER_BY_LAST_PRICE | MarketOrderBy.ORDER_BY_DATE_ADDED>]>;
|
|
78
78
|
readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["asc", "desc"], undefined>, "desc">, v.TransformAction<"asc" | "desc", SortDirection.SORT_ASC | SortDirection.SORT_DESC>]>;
|
|
79
79
|
readonly includeSparklines: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
80
|
-
readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("
|
|
80
|
+
readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1h" | "24h" | "1w" | "1m")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
|
|
81
81
|
}, undefined>, v.TransformAction<{
|
|
82
82
|
symbolIds: number[];
|
|
83
83
|
limit: number;
|
|
@@ -17,7 +17,7 @@ declare class MfaService {
|
|
|
17
17
|
*/
|
|
18
18
|
beginTotpEnrollment(input: BeginTotpEnrollmentInput, options?: PolyesterMutationOptions): Promise<BeginTotpEnrollmentResult>;
|
|
19
19
|
/**
|
|
20
|
-
* Verifies the first authenticator code, activates the factor, and returns one-time recovery codes that are only shown in this response.
|
|
20
|
+
* Verifies the first authenticator code, activates the factor, and returns one-time recovery codes that are only shown in this response, plus MFA-elevated session details and access token.
|
|
21
21
|
*/
|
|
22
22
|
finishTotpEnrollment(input: FinishTotpEnrollmentInput, options?: PolyesterRequestOptions): Promise<FinishTotpEnrollmentResult>;
|
|
23
23
|
/**
|
|
@@ -25,7 +25,7 @@ declare class MfaService {
|
|
|
25
25
|
*/
|
|
26
26
|
beginPasskeyEnrollment(input: BeginPasskeyEnrollmentInput, options?: PolyesterMutationOptions): Promise<BeginPasskeyEnrollmentResult>;
|
|
27
27
|
/**
|
|
28
|
-
* Verifies the passkey registration response, activates the factor, and returns one-time recovery codes.
|
|
28
|
+
* Verifies the passkey registration response, activates the factor, and returns one-time recovery codes plus MFA-elevated session details and access token.
|
|
29
29
|
*/
|
|
30
30
|
finishPasskeyEnrollment(input: FinishPasskeyEnrollmentInput, options?: PolyesterRequestOptions): Promise<FinishPasskeyEnrollmentResult>;
|
|
31
31
|
/**
|
package/dist/services/mfa/mfa.js
CHANGED
|
@@ -29,7 +29,7 @@ var MfaService = class {
|
|
|
29
29
|
return parse(BeginTotpEnrollmentResultSchema, res);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Verifies the first authenticator code, activates the factor, and returns one-time recovery codes that are only shown in this response.
|
|
32
|
+
* Verifies the first authenticator code, activates the factor, and returns one-time recovery codes that are only shown in this response, plus MFA-elevated session details and access token.
|
|
33
33
|
*/
|
|
34
34
|
async finishTotpEnrollment(input, options) {
|
|
35
35
|
const req = parse(FinishTotpEnrollmentInputSchema, input);
|
|
@@ -45,7 +45,7 @@ var MfaService = class {
|
|
|
45
45
|
return parse(BeginPasskeyEnrollmentResultSchema, res);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Verifies the passkey registration response, activates the factor, and returns one-time recovery codes.
|
|
48
|
+
* Verifies the passkey registration response, activates the factor, and returns one-time recovery codes plus MFA-elevated session details and access token.
|
|
49
49
|
*/
|
|
50
50
|
async finishPasskeyEnrollment(input, options) {
|
|
51
51
|
const req = parse(FinishPasskeyEnrollmentInputSchema, input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.js","names":["#client","Proto.MFAService"],"sources":["../../../src/services/mfa/mfa.ts"],"sourcesContent":["import { createClient, type Client, type Transport } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/mfa_pb.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n BeginMfaChallengeInputSchema,\n BeginMfaChallengeResultSchema,\n BeginPasskeyEnrollmentInputSchema,\n BeginPasskeyEnrollmentResultSchema,\n BeginTotpEnrollmentInputSchema,\n BeginTotpEnrollmentResultSchema,\n ClaimFreshStepUpInputSchema,\n ClaimFreshStepUpResultSchema,\n CompleteMfaChallengeResultSchema,\n ConsumeFreshStepUpInputSchema,\n DeleteMfaFactorInputSchema,\n UpdateMfaFactorInputSchema,\n UpdateMfaFactorResultSchema,\n FinishPasskeyChallengeInputSchema,\n FinishPasskeyEnrollmentInputSchema,\n FinishPasskeyEnrollmentResultSchema,\n FinishTotpEnrollmentInputSchema,\n FinishTotpEnrollmentResultSchema,\n ListMfaFactorsResponseSchema,\n RegenerateRecoveryCodesInputSchema,\n RegenerateRecoveryCodesResultSchema,\n ReleaseFreshStepUpInputSchema,\n VerifyRecoveryCodeChallengeInputSchema,\n VerifyTotpChallengeInputSchema,\n type BeginMfaChallengeInput,\n type BeginMfaChallengeResult,\n type BeginPasskeyEnrollmentInput,\n type BeginPasskeyEnrollmentResult,\n type BeginTotpEnrollmentInput,\n type BeginTotpEnrollmentResult,\n type ClaimFreshStepUpInput,\n type ClaimFreshStepUpResult,\n type CompleteMfaChallengeResult,\n type ConsumeFreshStepUpInput,\n type DeleteMfaFactorInput,\n type UpdateMfaFactorInput,\n type UpdateMfaFactorResult,\n type FinishPasskeyChallengeInput,\n type FinishPasskeyEnrollmentInput,\n type FinishPasskeyEnrollmentResult,\n type FinishTotpEnrollmentInput,\n type FinishTotpEnrollmentResult,\n type ListMfaFactorsResult,\n type RegenerateRecoveryCodesInput,\n type RegenerateRecoveryCodesResult,\n type ReleaseFreshStepUpInput,\n type VerifyRecoveryCodeChallengeInput,\n type VerifyTotpChallengeInput,\n} from \"./mfa.schemas.js\";\n\n/**\n * Manages MFA enrollment, challenges, recovery codes, session elevation, and fresh step-up proofs.\n */\nexport class MfaService {\n #client: Client<typeof Proto.MFAService>;\n\n constructor(transport: Transport) {\n this.#client = createClient(Proto.MFAService, transport);\n }\n\n /**\n * Returns the caller's enrolled MFA factors, oldest first, and whether unused recovery codes exist.\n */\n async listFactors(options?: PolyesterRequestOptions): Promise<ListMfaFactorsResult> {\n const res = await this.#client.listMFAFactors({}, toConnectCallOptions(options));\n return parse(ListMfaFactorsResponseSchema, res);\n }\n\n /**\n * Creates an authenticator-app enrollment challenge and returns the secret, QR-compatible otpauth URI, enrollment ID, and expiry.\n */\n async beginTotpEnrollment(\n input: BeginTotpEnrollmentInput,\n options?: PolyesterMutationOptions,\n ): Promise<BeginTotpEnrollmentResult> {\n const req = parse(BeginTotpEnrollmentInputSchema, input);\n const res = await this.#client.beginTOTPEnrollment(req, toConnectCallOptions(options));\n return parse(BeginTotpEnrollmentResultSchema, res);\n }\n\n /**\n * Verifies the first authenticator code, activates the factor, and returns one-time recovery codes that are only shown in this response.\n */\n async finishTotpEnrollment(\n input: FinishTotpEnrollmentInput,\n options?: PolyesterRequestOptions,\n ): Promise<FinishTotpEnrollmentResult> {\n const req = parse(FinishTotpEnrollmentInputSchema, input);\n const res = await this.#client.finishTOTPEnrollment(req, toConnectCallOptions(options));\n return parse(FinishTotpEnrollmentResultSchema, res);\n }\n\n /**\n * Creates passkey registration options for a new factor and returns the enrollment challenge and expiry.\n */\n async beginPasskeyEnrollment(\n input: BeginPasskeyEnrollmentInput,\n options?: PolyesterMutationOptions,\n ): Promise<BeginPasskeyEnrollmentResult> {\n const req = parse(BeginPasskeyEnrollmentInputSchema, input);\n const res = await this.#client.beginPasskeyEnrollment(req, toConnectCallOptions(options));\n return parse(BeginPasskeyEnrollmentResultSchema, res);\n }\n\n /**\n * Verifies the passkey registration response, activates the factor, and returns one-time recovery codes.\n */\n async finishPasskeyEnrollment(\n input: FinishPasskeyEnrollmentInput,\n options?: PolyesterRequestOptions,\n ): Promise<FinishPasskeyEnrollmentResult> {\n const req = parse(FinishPasskeyEnrollmentInputSchema, input);\n const res = await this.#client.finishPasskeyEnrollment(req, toConnectCallOptions(options));\n return parse(FinishPasskeyEnrollmentResultSchema, res);\n }\n\n /**\n * Starts an MFA challenge for either session elevation or fresh step-up and returns allowed factor types plus passkey request options when available.\n */\n async beginChallenge(\n input: BeginMfaChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<BeginMfaChallengeResult> {\n const req = parse(BeginMfaChallengeInputSchema, input);\n const res = await this.#client.beginMFAChallenge(req, toConnectCallOptions(options));\n return parse(BeginMfaChallengeResultSchema, res);\n }\n\n /**\n * Completes a challenge with an authenticator code, returning either an elevated access token or a fresh step-up token depending on the challenge purpose.\n */\n async verifyTotpChallenge(\n input: VerifyTotpChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<CompleteMfaChallengeResult> {\n const req = parse(VerifyTotpChallengeInputSchema, input);\n const res = await this.#client.verifyTOTPChallenge(req, toConnectCallOptions(options));\n return parse(CompleteMfaChallengeResultSchema, res);\n }\n\n /**\n * Completes a challenge with a passkey authentication response, returning session assurance and the relevant token for the challenge purpose.\n */\n async finishPasskeyChallenge(\n input: FinishPasskeyChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<CompleteMfaChallengeResult> {\n const req = parse(FinishPasskeyChallengeInputSchema, input);\n const res = await this.#client.finishPasskeyChallenge(req, toConnectCallOptions(options));\n return parse(CompleteMfaChallengeResultSchema, res);\n }\n\n /**\n * Consumes a one-time recovery code to complete session elevation or fresh step-up.\n */\n async verifyRecoveryCodeChallenge(\n input: VerifyRecoveryCodeChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<CompleteMfaChallengeResult> {\n const req = parse(VerifyRecoveryCodeChallengeInputSchema, input);\n const res = await this.#client.verifyRecoveryCodeChallenge(\n req,\n toConnectCallOptions(options),\n );\n return parse(CompleteMfaChallengeResultSchema, res);\n }\n\n /**\n * Removes an enrolled MFA factor by factor ID; backend policy may require fresh step-up for this protected action.\n */\n async deleteFactor(\n input: DeleteMfaFactorInput,\n options?: PolyesterMutationOptions,\n ): Promise<void> {\n const { factorId } = parse(DeleteMfaFactorInputSchema, input);\n await this.#client.deleteMFAFactor({ factorId }, toConnectCallOptions(options));\n }\n\n /**\n * Updates an MFA factor label, where an empty label clears the display name.\n */\n async updateFactor(\n input: UpdateMfaFactorInput,\n options?: PolyesterMutationOptions,\n ): Promise<UpdateMfaFactorResult> {\n const { factorId, label } = parse(UpdateMfaFactorInputSchema, input);\n const res = await this.#client.updateMFAFactor(\n { factorId, label },\n toConnectCallOptions(options),\n );\n return parse(UpdateMfaFactorResultSchema, res);\n }\n\n /**\n * Rotates recovery codes after step-up and returns the new one-time codes, which are only available in this response.\n */\n async regenerateRecoveryCodes(\n input: RegenerateRecoveryCodesInput = {},\n options?: PolyesterMutationOptions,\n ): Promise<RegenerateRecoveryCodesResult> {\n parse(RegenerateRecoveryCodesInputSchema, input);\n const res = await this.#client.regenerateRecoveryCodes({}, toConnectCallOptions(options));\n return parse(RegenerateRecoveryCodesResultSchema, res);\n }\n\n /**\n * Binds a fresh step-up proof to one protected request using a request ID, action type, and subject, returning a claim nonce and expiry.\n */\n async claimFreshStepUp(\n input: ClaimFreshStepUpInput,\n options?: PolyesterRequestOptions,\n ): Promise<ClaimFreshStepUpResult> {\n const req = parse(ClaimFreshStepUpInputSchema, input);\n const res = await this.#client.claimFreshStepUp(req, toConnectCallOptions(options));\n return parse(ClaimFreshStepUpResultSchema, res);\n }\n\n /**\n * Marks a claimed fresh step-up proof as used after the protected request succeeds, echoing the original request binding and claim nonce.\n */\n async consumeFreshStepUp(\n input: ConsumeFreshStepUpInput,\n options?: PolyesterRequestOptions,\n ): Promise<void> {\n const req = parse(ConsumeFreshStepUpInputSchema, input);\n await this.#client.consumeFreshStepUp(removeUndefined(req), toConnectCallOptions(options));\n }\n\n /**\n * Releases a claimed fresh step-up proof when the protected request is abandoned or fails, preserving the original request binding and reason.\n */\n async releaseFreshStepUp(\n input: ReleaseFreshStepUpInput,\n options?: PolyesterRequestOptions,\n ): Promise<void> {\n const req = parse(ReleaseFreshStepUpInputSchema, input);\n await this.#client.releaseFreshStepUp(removeUndefined(req), toConnectCallOptions(options));\n }\n}\n"],"mappings":";;;;;;;;;;AA+DA,IAAa,aAAb,MAAwB;CACpB;CAEA,YAAY,WAAsB;EAC9B,KAAKA,UAAU,aAAaC,YAAkB,SAAS;CAC3D;;;;CAKA,MAAM,YAAY,SAAkE;EAChF,MAAM,MAAM,MAAM,KAAKD,QAAQ,eAAe,CAAC,GAAG,qBAAqB,OAAO,CAAC;EAC/E,OAAO,MAAM,8BAA8B,GAAG;CAClD;;;;CAKA,MAAM,oBACF,OACA,SACkC;EAClC,MAAM,MAAM,MAAM,gCAAgC,KAAK;EACvD,MAAM,MAAM,MAAM,KAAKA,QAAQ,oBAAoB,KAAK,qBAAqB,OAAO,CAAC;EACrF,OAAO,MAAM,iCAAiC,GAAG;CACrD;;;;CAKA,MAAM,qBACF,OACA,SACmC;EACnC,MAAM,MAAM,MAAM,iCAAiC,KAAK;EACxD,MAAM,MAAM,MAAM,KAAKA,QAAQ,qBAAqB,KAAK,qBAAqB,OAAO,CAAC;EACtF,OAAO,MAAM,kCAAkC,GAAG;CACtD;;;;CAKA,MAAM,uBACF,OACA,SACqC;EACrC,MAAM,MAAM,MAAM,mCAAmC,KAAK;EAC1D,MAAM,MAAM,MAAM,KAAKA,QAAQ,uBAAuB,KAAK,qBAAqB,OAAO,CAAC;EACxF,OAAO,MAAM,oCAAoC,GAAG;CACxD;;;;CAKA,MAAM,wBACF,OACA,SACsC;EACtC,MAAM,MAAM,MAAM,oCAAoC,KAAK;EAC3D,MAAM,MAAM,MAAM,KAAKA,QAAQ,wBAAwB,KAAK,qBAAqB,OAAO,CAAC;EACzF,OAAO,MAAM,qCAAqC,GAAG;CACzD;;;;CAKA,MAAM,eACF,OACA,SACgC;EAChC,MAAM,MAAM,MAAM,8BAA8B,KAAK;EACrD,MAAM,MAAM,MAAM,KAAKA,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AM,MAAM,MAAM,6BAA6B,KAAK;EACpD,MAAM,MAAM,MAAM,KAAKA,QAAQ,iBAAiB,KAAK,qBAAqB,OAAO,CAAC;EAClF,OAAO,MAAM,8BAA8B,GAAG;CAClD;;;;CAKA,MAAM,mBACF,OACA,SACa;EACb,MAAM,MAAM,MAAM,+BAA+B,KAAK;EACtD,MAAM,KAAKA,QAAQ,mBAAmB,gBAAgB,GAAG,GAAG,qBAAqB,OAAO,CAAC;CAC7F;;;;CAKA,MAAM,mBACF,OACA,SACa;EACb,MAAM,MAAM,MAAM,+BAA+B,KAAK;EACtD,MAAM,KAAKA,QAAQ,mBAAmB,gBAAgB,GAAG,GAAG,qBAAqB,OAAO,CAAC;CAC7F;AACJ"}
|
|
1
|
+
{"version":3,"file":"mfa.js","names":["#client","Proto.MFAService"],"sources":["../../../src/services/mfa/mfa.ts"],"sourcesContent":["import { createClient, type Client, type Transport } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/mfa_pb.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n BeginMfaChallengeInputSchema,\n BeginMfaChallengeResultSchema,\n BeginPasskeyEnrollmentInputSchema,\n BeginPasskeyEnrollmentResultSchema,\n BeginTotpEnrollmentInputSchema,\n BeginTotpEnrollmentResultSchema,\n ClaimFreshStepUpInputSchema,\n ClaimFreshStepUpResultSchema,\n CompleteMfaChallengeResultSchema,\n ConsumeFreshStepUpInputSchema,\n DeleteMfaFactorInputSchema,\n UpdateMfaFactorInputSchema,\n UpdateMfaFactorResultSchema,\n FinishPasskeyChallengeInputSchema,\n FinishPasskeyEnrollmentInputSchema,\n FinishPasskeyEnrollmentResultSchema,\n FinishTotpEnrollmentInputSchema,\n FinishTotpEnrollmentResultSchema,\n ListMfaFactorsResponseSchema,\n RegenerateRecoveryCodesInputSchema,\n RegenerateRecoveryCodesResultSchema,\n ReleaseFreshStepUpInputSchema,\n VerifyRecoveryCodeChallengeInputSchema,\n VerifyTotpChallengeInputSchema,\n type BeginMfaChallengeInput,\n type BeginMfaChallengeResult,\n type BeginPasskeyEnrollmentInput,\n type BeginPasskeyEnrollmentResult,\n type BeginTotpEnrollmentInput,\n type BeginTotpEnrollmentResult,\n type ClaimFreshStepUpInput,\n type ClaimFreshStepUpResult,\n type CompleteMfaChallengeResult,\n type ConsumeFreshStepUpInput,\n type DeleteMfaFactorInput,\n type UpdateMfaFactorInput,\n type UpdateMfaFactorResult,\n type FinishPasskeyChallengeInput,\n type FinishPasskeyEnrollmentInput,\n type FinishPasskeyEnrollmentResult,\n type FinishTotpEnrollmentInput,\n type FinishTotpEnrollmentResult,\n type ListMfaFactorsResult,\n type RegenerateRecoveryCodesInput,\n type RegenerateRecoveryCodesResult,\n type ReleaseFreshStepUpInput,\n type VerifyRecoveryCodeChallengeInput,\n type VerifyTotpChallengeInput,\n} from \"./mfa.schemas.js\";\n\n/**\n * Manages MFA enrollment, challenges, recovery codes, session elevation, and fresh step-up proofs.\n */\nexport class MfaService {\n #client: Client<typeof Proto.MFAService>;\n\n constructor(transport: Transport) {\n this.#client = createClient(Proto.MFAService, transport);\n }\n\n /**\n * Returns the caller's enrolled MFA factors, oldest first, and whether unused recovery codes exist.\n */\n async listFactors(options?: PolyesterRequestOptions): Promise<ListMfaFactorsResult> {\n const res = await this.#client.listMFAFactors({}, toConnectCallOptions(options));\n return parse(ListMfaFactorsResponseSchema, res);\n }\n\n /**\n * Creates an authenticator-app enrollment challenge and returns the secret, QR-compatible otpauth URI, enrollment ID, and expiry.\n */\n async beginTotpEnrollment(\n input: BeginTotpEnrollmentInput,\n options?: PolyesterMutationOptions,\n ): Promise<BeginTotpEnrollmentResult> {\n const req = parse(BeginTotpEnrollmentInputSchema, input);\n const res = await this.#client.beginTOTPEnrollment(req, toConnectCallOptions(options));\n return parse(BeginTotpEnrollmentResultSchema, res);\n }\n\n /**\n * Verifies the first authenticator code, activates the factor, and returns one-time recovery codes that are only shown in this response, plus MFA-elevated session details and access token.\n */\n async finishTotpEnrollment(\n input: FinishTotpEnrollmentInput,\n options?: PolyesterRequestOptions,\n ): Promise<FinishTotpEnrollmentResult> {\n const req = parse(FinishTotpEnrollmentInputSchema, input);\n const res = await this.#client.finishTOTPEnrollment(req, toConnectCallOptions(options));\n return parse(FinishTotpEnrollmentResultSchema, res);\n }\n\n /**\n * Creates passkey registration options for a new factor and returns the enrollment challenge and expiry.\n */\n async beginPasskeyEnrollment(\n input: BeginPasskeyEnrollmentInput,\n options?: PolyesterMutationOptions,\n ): Promise<BeginPasskeyEnrollmentResult> {\n const req = parse(BeginPasskeyEnrollmentInputSchema, input);\n const res = await this.#client.beginPasskeyEnrollment(req, toConnectCallOptions(options));\n return parse(BeginPasskeyEnrollmentResultSchema, res);\n }\n\n /**\n * Verifies the passkey registration response, activates the factor, and returns one-time recovery codes plus MFA-elevated session details and access token.\n */\n async finishPasskeyEnrollment(\n input: FinishPasskeyEnrollmentInput,\n options?: PolyesterRequestOptions,\n ): Promise<FinishPasskeyEnrollmentResult> {\n const req = parse(FinishPasskeyEnrollmentInputSchema, input);\n const res = await this.#client.finishPasskeyEnrollment(req, toConnectCallOptions(options));\n return parse(FinishPasskeyEnrollmentResultSchema, res);\n }\n\n /**\n * Starts an MFA challenge for either session elevation or fresh step-up and returns allowed factor types plus passkey request options when available.\n */\n async beginChallenge(\n input: BeginMfaChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<BeginMfaChallengeResult> {\n const req = parse(BeginMfaChallengeInputSchema, input);\n const res = await this.#client.beginMFAChallenge(req, toConnectCallOptions(options));\n return parse(BeginMfaChallengeResultSchema, res);\n }\n\n /**\n * Completes a challenge with an authenticator code, returning either an elevated access token or a fresh step-up token depending on the challenge purpose.\n */\n async verifyTotpChallenge(\n input: VerifyTotpChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<CompleteMfaChallengeResult> {\n const req = parse(VerifyTotpChallengeInputSchema, input);\n const res = await this.#client.verifyTOTPChallenge(req, toConnectCallOptions(options));\n return parse(CompleteMfaChallengeResultSchema, res);\n }\n\n /**\n * Completes a challenge with a passkey authentication response, returning session assurance and the relevant token for the challenge purpose.\n */\n async finishPasskeyChallenge(\n input: FinishPasskeyChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<CompleteMfaChallengeResult> {\n const req = parse(FinishPasskeyChallengeInputSchema, input);\n const res = await this.#client.finishPasskeyChallenge(req, toConnectCallOptions(options));\n return parse(CompleteMfaChallengeResultSchema, res);\n }\n\n /**\n * Consumes a one-time recovery code to complete session elevation or fresh step-up.\n */\n async verifyRecoveryCodeChallenge(\n input: VerifyRecoveryCodeChallengeInput,\n options?: PolyesterRequestOptions,\n ): Promise<CompleteMfaChallengeResult> {\n const req = parse(VerifyRecoveryCodeChallengeInputSchema, input);\n const res = await this.#client.verifyRecoveryCodeChallenge(\n req,\n toConnectCallOptions(options),\n );\n return parse(CompleteMfaChallengeResultSchema, res);\n }\n\n /**\n * Removes an enrolled MFA factor by factor ID; backend policy may require fresh step-up for this protected action.\n */\n async deleteFactor(\n input: DeleteMfaFactorInput,\n options?: PolyesterMutationOptions,\n ): Promise<void> {\n const { factorId } = parse(DeleteMfaFactorInputSchema, input);\n await this.#client.deleteMFAFactor({ factorId }, toConnectCallOptions(options));\n }\n\n /**\n * Updates an MFA factor label, where an empty label clears the display name.\n */\n async updateFactor(\n input: UpdateMfaFactorInput,\n options?: PolyesterMutationOptions,\n ): Promise<UpdateMfaFactorResult> {\n const { factorId, label } = parse(UpdateMfaFactorInputSchema, input);\n const res = await this.#client.updateMFAFactor(\n { factorId, label },\n toConnectCallOptions(options),\n );\n return parse(UpdateMfaFactorResultSchema, res);\n }\n\n /**\n * Rotates recovery codes after step-up and returns the new one-time codes, which are only available in this response.\n */\n async regenerateRecoveryCodes(\n input: RegenerateRecoveryCodesInput = {},\n options?: PolyesterMutationOptions,\n ): Promise<RegenerateRecoveryCodesResult> {\n parse(RegenerateRecoveryCodesInputSchema, input);\n const res = await this.#client.regenerateRecoveryCodes({}, toConnectCallOptions(options));\n return parse(RegenerateRecoveryCodesResultSchema, res);\n }\n\n /**\n * Binds a fresh step-up proof to one protected request using a request ID, action type, and subject, returning a claim nonce and expiry.\n */\n async claimFreshStepUp(\n input: ClaimFreshStepUpInput,\n options?: PolyesterRequestOptions,\n ): Promise<ClaimFreshStepUpResult> {\n const req = parse(ClaimFreshStepUpInputSchema, input);\n const res = await this.#client.claimFreshStepUp(req, toConnectCallOptions(options));\n return parse(ClaimFreshStepUpResultSchema, res);\n }\n\n /**\n * Marks a claimed fresh step-up proof as used after the protected request succeeds, echoing the original request binding and claim nonce.\n */\n async consumeFreshStepUp(\n input: ConsumeFreshStepUpInput,\n options?: PolyesterRequestOptions,\n ): Promise<void> {\n const req = parse(ConsumeFreshStepUpInputSchema, input);\n await this.#client.consumeFreshStepUp(removeUndefined(req), toConnectCallOptions(options));\n }\n\n /**\n * Releases a claimed fresh step-up proof when the protected request is abandoned or fails, preserving the original request binding and reason.\n */\n async releaseFreshStepUp(\n input: ReleaseFreshStepUpInput,\n options?: PolyesterRequestOptions,\n ): Promise<void> {\n const req = parse(ReleaseFreshStepUpInputSchema, input);\n await this.#client.releaseFreshStepUp(removeUndefined(req), toConnectCallOptions(options));\n }\n}\n"],"mappings":";;;;;;;;;;AA+DA,IAAa,aAAb,MAAwB;CACpB;CAEA,YAAY,WAAsB;EAC9B,KAAKA,UAAU,aAAaC,YAAkB,SAAS;CAC3D;;;;CAKA,MAAM,YAAY,SAAkE;EAChF,MAAM,MAAM,MAAM,KAAKD,QAAQ,eAAe,CAAC,GAAG,qBAAqB,OAAO,CAAC;EAC/E,OAAO,MAAM,8BAA8B,GAAG;CAClD;;;;CAKA,MAAM,oBACF,OACA,SACkC;EAClC,MAAM,MAAM,MAAM,gCAAgC,KAAK;EACvD,MAAM,MAAM,MAAM,KAAKA,QAAQ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