@polyester/sdk 0.29.0 → 0.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/gen/auth/v1/auth_pb.d.ts +7 -1
  3. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  4. package/dist/gen/auth/v1/auth_pb.js +7 -1
  5. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  6. package/dist/gen/auth/v1/social_verification_pb.d.ts +9 -0
  7. package/dist/gen/auth/v1/social_verification_pb.d.ts.map +1 -1
  8. package/dist/gen/auth/v1/social_verification_pb.js +6 -1
  9. package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
  10. package/dist/gen/claims/v1/claims_pb.d.ts +7 -1
  11. package/dist/gen/claims/v1/claims_pb.d.ts.map +1 -1
  12. package/dist/gen/claims/v1/claims_pb.js +7 -1
  13. package/dist/gen/claims/v1/claims_pb.js.map +1 -1
  14. package/dist/gen/orders/v1/orders_read_pb.d.ts +3 -1
  15. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  16. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  17. package/dist/gen/triggers/v1/triggers_pb.d.ts +6 -0
  18. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  19. package/dist/gen/triggers/v1/triggers_pb.js +7 -1
  20. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  21. package/dist/index.d.ts +3 -3
  22. package/dist/index.js +2 -2
  23. package/dist/services/candles/candles.schemas.d.ts +10 -10
  24. package/dist/services/heatmap/heatmap.schemas.d.ts +13 -13
  25. package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
  26. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  27. package/dist/services/social-verification/index.d.ts +2 -2
  28. package/dist/services/social-verification/social-verification.codecs.js +95 -1
  29. package/dist/services/social-verification/social-verification.codecs.js.map +1 -1
  30. package/dist/services/social-verification/social-verification.schemas.d.ts +10 -1
  31. package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
  32. package/dist/services/social-verification/social-verification.schemas.js +3 -1
  33. package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
  34. package/dist/services/social-verification/social-verification.types.d.ts +2 -2
  35. package/dist/services/subaccounts/subaccounts.d.ts +2 -1
  36. package/dist/services/subaccounts/subaccounts.d.ts.map +1 -1
  37. package/dist/services/subaccounts/subaccounts.js +2 -1
  38. package/dist/services/subaccounts/subaccounts.js.map +1 -1
  39. package/dist/services/subaccounts/subaccounts.schemas.d.ts +2 -2
  40. package/dist/services/trades/trades.schemas.d.ts +15 -14
  41. package/dist/services/trades/trades.schemas.d.ts.map +1 -1
  42. package/dist/services/trades/trades.schemas.js +10 -3
  43. package/dist/services/trades/trades.schemas.js.map +1 -1
  44. package/dist/services/triggers/triggers-output.schemas.d.ts +4 -4
  45. package/dist/services/triggers/triggers.codecs.js +1 -0
  46. package/dist/services/triggers/triggers.codecs.js.map +1 -1
  47. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  48. package/dist/shared/connect-error-mapping.js +6 -2
  49. package/dist/shared/connect-error-mapping.js.map +1 -1
  50. package/dist/shared/errors.d.ts +13 -2
  51. package/dist/shared/errors.d.ts.map +1 -1
  52. package/dist/shared/errors.js +14 -1
  53. package/dist/shared/errors.js.map +1 -1
  54. package/dist/shared/transports.d.ts +5 -0
  55. package/dist/shared/transports.d.ts.map +1 -1
  56. package/dist/shared/transports.js +14 -2
  57. package/dist/shared/transports.js.map +1 -1
  58. package/package.json +1 -1
@@ -11,7 +11,7 @@ type TimestampInit = {
11
11
  };
12
12
  declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
13
13
  readonly symbolId: v.NumberSchema<undefined>;
14
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
14
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
15
15
  readonly tsSec: v.BigintSchema<undefined>;
16
16
  readonly open: v.BigintSchema<undefined>;
17
17
  readonly high: v.BigintSchema<undefined>;
@@ -22,7 +22,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
22
22
  readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
23
23
  }, undefined>, v.TransformAction<{
24
24
  symbolId: number;
25
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
25
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
26
26
  tsSec: bigint;
27
27
  open: bigint;
28
28
  high: bigint;
@@ -33,7 +33,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
33
33
  isClosed: boolean;
34
34
  }, {
35
35
  symbolId: number;
36
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
36
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
37
37
  time: number;
38
38
  open: string;
39
39
  high: string;
@@ -46,7 +46,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
46
46
  declare const createCandleRowIntSchema: typeof createCandleRowSchema;
47
47
  declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
48
48
  readonly symbolId: v.NumberSchema<undefined>;
49
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
49
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
50
50
  readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
51
51
  readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
52
52
  readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
@@ -63,7 +63,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
63
63
  readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
64
64
  }, undefined>, v.TransformAction<{
65
65
  symbolId: number;
66
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
66
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
67
67
  tsSec: bigint[];
68
68
  open: bigint[];
69
69
  high: bigint[];
@@ -80,7 +80,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
80
80
  nextPageToken: string;
81
81
  }, {
82
82
  symbolId: number;
83
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
83
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
84
84
  time: number[];
85
85
  open: string[];
86
86
  high: string[];
@@ -100,7 +100,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
100
100
  }>]>;
101
101
  declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
102
102
  readonly symbolId: v.NumberSchema<undefined>;
103
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
103
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
104
104
  readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
105
105
  readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
106
106
  readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
@@ -117,7 +117,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
117
117
  readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
118
118
  }, undefined>, v.TransformAction<{
119
119
  symbolId: number;
120
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
120
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
121
121
  tsSec: bigint[];
122
122
  open: bigint[];
123
123
  high: bigint[];
@@ -134,7 +134,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
134
134
  nextPageToken: string;
135
135
  }, {
136
136
  symbolId: number;
137
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
137
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
138
138
  tsSec: number[];
139
139
  open: string[];
140
140
  high: string[];
@@ -158,7 +158,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
158
158
  type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
159
159
  declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
160
160
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
161
- readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "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>]>;
161
+ readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "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>]>;
162
162
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 10000, undefined>]>, undefined>;
163
163
  readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
164
164
  readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
@@ -13,8 +13,8 @@ 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>, v.MaxValueAction<number, 4294967295, undefined>]>;
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
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50, HeatmapDepth>]>;
16
+ readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
17
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 500 | 100 | 50 | 1000, 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>]>;
20
20
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, 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<"1h" | "1m" | "1s" | "5m">>]>;
125
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
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<"1h" | "1m" | "1s" | "5m">;
145
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
146
146
  tsSec: number;
147
147
  isFinal: boolean;
148
148
  bids: {
@@ -226,8 +226,8 @@ 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<"1h" | "1m" | "1s" | "5m">>]>;
230
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50>]>;
229
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
230
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 50 | 1000>]>;
231
231
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
232
232
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
233
233
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -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<"1h" | "1m" | "1s" | "5m">>]>;
270
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
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,8 +286,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
286
286
  }, undefined>, undefined>;
287
287
  }, undefined>, v.TransformAction<{
288
288
  symbolId: number;
289
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
290
- depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50;
289
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
290
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 50 | 1000;
291
291
  chain?: {
292
292
  baseKeyframe?: {
293
293
  tsSec: number;
@@ -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<"1h" | "1m" | "1s" | "5m">;
330
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
331
331
  tsSec: number;
332
332
  isFinal: boolean;
333
333
  bids?: {
@@ -346,8 +346,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
346
346
  } | undefined;
347
347
  }, {
348
348
  symbolId: number;
349
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
350
- depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50;
349
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
350
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 50 | 1000;
351
351
  chain: {
352
352
  baseKeyframe: {
353
353
  tsSec: number;
@@ -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<"1h" | "1m" | "1s" | "5m">;
390
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
391
391
  tsSec: number;
392
392
  isFinal: boolean;
393
393
  bids: {
@@ -30,7 +30,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
30
30
  readonly bestAskTicks: v.BigintSchema<undefined>;
31
31
  readonly bestAskQtyScaled: v.BigintSchema<undefined>;
32
32
  readonly sparklines: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
33
- readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1h" | "24h" | "1w" | "1m">]>;
33
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1m" | "1h" | "1w" | "24h">]>;
34
34
  readonly closeTicks: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
35
35
  }, undefined>, undefined>, readonly []>;
36
36
  readonly indexPriceTicks: v.BigintSchema<undefined>;
@@ -50,7 +50,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
50
50
  bestAskTicks: bigint;
51
51
  bestAskQtyScaled: bigint;
52
52
  sparklines: {
53
- interval: "unspecified" | "1h" | "24h" | "1w" | "1m";
53
+ interval: "unspecified" | "1m" | "1h" | "1w" | "24h";
54
54
  closeTicks: bigint[];
55
55
  }[];
56
56
  indexPriceTicks: bigint;
@@ -80,7 +80,7 @@ declare const ListMarketOverviewInputSchema: v.SchemaWithPipe<readonly [v.Strict
80
80
  readonly orderBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["change_24h_bps", "volume_24h_usd", "last_price", "date_added"], undefined>, "volume_24h_usd">, v.TransformAction<"change_24h_bps" | "volume_24h_usd" | "last_price" | "date_added", MarketOrderBy.ORDER_BY_CHANGE_24H_BPS | MarketOrderBy.ORDER_BY_VOLUME_24H_USD | MarketOrderBy.ORDER_BY_LAST_PRICE | MarketOrderBy.ORDER_BY_DATE_ADDED>]>;
81
81
  readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["asc", "desc"], undefined>, "desc">, v.TransformAction<"asc" | "desc", SortDirection.SORT_ASC | SortDirection.SORT_DESC>]>;
82
82
  readonly includeSparklines: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
83
- 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)[]>]>;
83
+ readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1m" | "1h" | "1w" | "24h")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
84
84
  }, undefined>, v.TransformAction<{
85
85
  symbolIds: number[];
86
86
  limit: number;
@@ -10,7 +10,7 @@ declare const GetOrderbookInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
10
10
  depth: number;
11
11
  }, {
12
12
  symbolId: number;
13
- depth: 1 | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50;
13
+ depth: 1 | 10 | 5 | 20 | 200 | 500 | 100 | 50 | 1000;
14
14
  protoDepth: Depth;
15
15
  }>]>;
16
16
  type GetOrderbookInput = v.InferInput<typeof GetOrderbookInputSchema>;
@@ -1,3 +1,3 @@
1
- import { GetVerificationResponse, GetVerificationResponseSchema, SocialProvider, SocialProviderInput, SocialProviderInputSchema, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationSchema, SocialVerificationStatus, SocialVerificationStatusSchema, StartVerificationInput, StartVerificationInputSchema, StartVerificationResponse, StartVerificationResponseSchema, VerificationReadyResponse, VerificationReadyResponseSchema } from "./social-verification.schemas.js";
1
+ import { GetVerificationResponse, GetVerificationResponseSchema, SocialProvider, SocialProviderInput, SocialProviderInputSchema, SocialProviderSchema, SocialVerification, SocialVerificationErrorCode, SocialVerificationErrorCodeSchema, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationSchema, SocialVerificationStatus, SocialVerificationStatusSchema, StartVerificationInput, StartVerificationInputSchema, StartVerificationResponse, StartVerificationResponseSchema, VerificationReadyResponse, VerificationReadyResponseSchema } from "./social-verification.schemas.js";
2
2
  import { SocialVerificationService } from "./social-verification.js";
3
- export { GetVerificationResponse, GetVerificationResponseSchema, SocialProvider, SocialProviderInput, SocialProviderInputSchema, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationSchema, SocialVerificationService, SocialVerificationStatus, SocialVerificationStatusSchema, StartVerificationInput, StartVerificationInputSchema, StartVerificationResponse, StartVerificationResponseSchema, VerificationReadyResponse, VerificationReadyResponseSchema };
3
+ export { GetVerificationResponse, GetVerificationResponseSchema, SocialProvider, SocialProviderInput, SocialProviderInputSchema, SocialProviderSchema, SocialVerification, SocialVerificationErrorCode, SocialVerificationErrorCodeSchema, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationSchema, SocialVerificationService, SocialVerificationStatus, SocialVerificationStatusSchema, StartVerificationInput, StartVerificationInputSchema, StartVerificationResponse, StartVerificationResponseSchema, VerificationReadyResponse, VerificationReadyResponseSchema };
@@ -1,3 +1,4 @@
1
+ import "../../gen/auth/v1/auth_pb.js";
1
2
  import "../../gen/auth/v1/social_verification_pb.js";
2
3
  //#region src/services/social-verification/social-verification.codecs.ts
3
4
  const SOCIAL_PROVIDER_VALUES = ["twitter", "discord"];
@@ -49,7 +50,100 @@ const SocialVerificationStatusCodec = { protoToOutput: {
49
50
  [6]: "expired",
50
51
  [7]: "cancelled"
51
52
  } };
53
+ const SOCIAL_VERIFICATION_ERROR_CODE_VALUES = [
54
+ "username_invalid",
55
+ "username_taken",
56
+ "username_cooldown",
57
+ "username_feature_locked",
58
+ "username_reserved",
59
+ "invalid_request",
60
+ "authentication_required",
61
+ "session_kind_not_allowed",
62
+ "wallet_login_failed",
63
+ "resource_not_found",
64
+ "subaccount_access_denied",
65
+ "api_key_access_denied",
66
+ "api_key_invalid_status_transition",
67
+ "policy_invalid",
68
+ "smart_account_already_linked",
69
+ "invite_access_denied",
70
+ "invite_invalid_state",
71
+ "mfa_disabled",
72
+ "mfa_not_enrolled",
73
+ "mfa_session_invalid",
74
+ "mfa_challenge_not_found",
75
+ "mfa_challenge_invalid",
76
+ "mfa_challenge_locked",
77
+ "mfa_otp_invalid",
78
+ "mfa_recovery_invalid",
79
+ "mfa_passkey_not_available",
80
+ "mfa_passkey_credential_invalid",
81
+ "mfa_passkey_verify_failed",
82
+ "mfa_enrollment_binding_invalid",
83
+ "step_up_required",
84
+ "step_up_proof_unavailable",
85
+ "step_up_already_claimed",
86
+ "policy_in_use",
87
+ "policy_locked",
88
+ "policy_scope_mismatch",
89
+ "revision_conflict",
90
+ "mfa_elevation_required",
91
+ "mfa_last_factor_required",
92
+ "internal_error",
93
+ "terms_not_accepted",
94
+ "social_verification_expired",
95
+ "social_verification_invalid_state",
96
+ "subaccount_challenge_invalid",
97
+ "social_account_already_linked"
98
+ ];
99
+ const SocialVerificationErrorCodeCodec = { protoToOutput: {
100
+ [0]: "unspecified",
101
+ [1]: "username_invalid",
102
+ [2]: "username_taken",
103
+ [3]: "username_cooldown",
104
+ [4]: "username_feature_locked",
105
+ [5]: "username_reserved",
106
+ [6]: "invalid_request",
107
+ [7]: "authentication_required",
108
+ [8]: "session_kind_not_allowed",
109
+ [9]: "wallet_login_failed",
110
+ [10]: "resource_not_found",
111
+ [11]: "subaccount_access_denied",
112
+ [12]: "api_key_access_denied",
113
+ [14]: "api_key_invalid_status_transition",
114
+ [15]: "policy_invalid",
115
+ [16]: "smart_account_already_linked",
116
+ [17]: "invite_access_denied",
117
+ [18]: "invite_invalid_state",
118
+ [19]: "mfa_disabled",
119
+ [20]: "mfa_not_enrolled",
120
+ [21]: "mfa_session_invalid",
121
+ [22]: "mfa_challenge_not_found",
122
+ [23]: "mfa_challenge_invalid",
123
+ [24]: "mfa_challenge_locked",
124
+ [25]: "mfa_otp_invalid",
125
+ [26]: "mfa_recovery_invalid",
126
+ [27]: "mfa_passkey_not_available",
127
+ [28]: "mfa_passkey_credential_invalid",
128
+ [29]: "mfa_passkey_verify_failed",
129
+ [30]: "mfa_enrollment_binding_invalid",
130
+ [31]: "step_up_required",
131
+ [32]: "step_up_proof_unavailable",
132
+ [33]: "step_up_already_claimed",
133
+ [34]: "policy_in_use",
134
+ [35]: "policy_locked",
135
+ [36]: "policy_scope_mismatch",
136
+ [37]: "revision_conflict",
137
+ [38]: "mfa_elevation_required",
138
+ [39]: "mfa_last_factor_required",
139
+ [40]: "internal_error",
140
+ [41]: "terms_not_accepted",
141
+ [42]: "social_verification_expired",
142
+ [43]: "social_verification_invalid_state",
143
+ [44]: "subaccount_challenge_invalid",
144
+ [45]: "social_account_already_linked"
145
+ } };
52
146
  //#endregion
53
- export { SOCIAL_PROVIDER_VALUES, SOCIAL_VERIFICATION_METHOD_VALUES, SOCIAL_VERIFICATION_STATUS_VALUES, SocialProviderCodec, SocialVerificationMethodCodec, SocialVerificationStatusCodec };
147
+ export { SOCIAL_PROVIDER_VALUES, SOCIAL_VERIFICATION_ERROR_CODE_VALUES, SOCIAL_VERIFICATION_METHOD_VALUES, SOCIAL_VERIFICATION_STATUS_VALUES, SocialProviderCodec, SocialVerificationErrorCodeCodec, SocialVerificationMethodCodec, SocialVerificationStatusCodec };
54
148
 
55
149
  //# sourceMappingURL=social-verification.codecs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"social-verification.codecs.js","names":[],"sources":["../../../src/services/social-verification/social-verification.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/social_verification_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const SOCIAL_PROVIDER_VALUES = [\"twitter\", \"discord\"] as const;\nexport type SocialProviderValue = (typeof SOCIAL_PROVIDER_VALUES)[number];\n\nexport const SOCIAL_VERIFICATION_METHOD_VALUES = [\"profile\", \"channel\", \"dm\"] as const;\nexport type SocialVerificationMethodValue = (typeof SOCIAL_VERIFICATION_METHOD_VALUES)[number];\n\nexport const SOCIAL_VERIFICATION_STATUS_VALUES = [\n \"pending_user_action\",\n \"queued\",\n \"in_progress\",\n \"verified\",\n \"failed\",\n \"expired\",\n \"cancelled\",\n] as const;\nexport type SocialVerificationStatusValue = (typeof SOCIAL_VERIFICATION_STATUS_VALUES)[number];\n\nexport const SocialProviderCodec = {\n inputToProto: {\n twitter: Proto.SocialProvider.TWITTER,\n discord: Proto.SocialProvider.DISCORD,\n } satisfies InputToProto<SocialProviderValue, Proto.SocialProvider>,\n protoToOutput: {\n [Proto.SocialProvider.PROVIDER_UNSPECIFIED]: \"unspecified\",\n [Proto.SocialProvider.TWITTER]: \"twitter\",\n [Proto.SocialProvider.DISCORD]: \"discord\",\n } satisfies ProtoToOutput<Proto.SocialProvider, SocialProviderValue>,\n} as const;\n\nexport const SocialVerificationMethodCodec = {\n inputToProto: {\n profile: Proto.SocialVerificationMethod.METHOD_PROFILE,\n channel: Proto.SocialVerificationMethod.METHOD_CHANNEL,\n dm: Proto.SocialVerificationMethod.METHOD_DM,\n } satisfies InputToProto<SocialVerificationMethodValue, Proto.SocialVerificationMethod>,\n protoToOutput: {\n [Proto.SocialVerificationMethod.METHOD_UNSPECIFIED]: \"unspecified\",\n [Proto.SocialVerificationMethod.METHOD_PROFILE]: \"profile\",\n [Proto.SocialVerificationMethod.METHOD_CHANNEL]: \"channel\",\n [Proto.SocialVerificationMethod.METHOD_DM]: \"dm\",\n } satisfies ProtoToOutput<Proto.SocialVerificationMethod, SocialVerificationMethodValue>,\n} as const;\n\nexport const SocialVerificationStatusCodec = {\n protoToOutput: {\n [Proto.SocialVerificationStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.SocialVerificationStatus.STATUS_PENDING_USER_ACTION]: \"pending_user_action\",\n [Proto.SocialVerificationStatus.STATUS_QUEUED]: \"queued\",\n [Proto.SocialVerificationStatus.STATUS_IN_PROGRESS]: \"in_progress\",\n [Proto.SocialVerificationStatus.STATUS_VERIFIED]: \"verified\",\n [Proto.SocialVerificationStatus.STATUS_FAILED]: \"failed\",\n [Proto.SocialVerificationStatus.STATUS_EXPIRED]: \"expired\",\n [Proto.SocialVerificationStatus.STATUS_CANCELLED]: \"cancelled\",\n } satisfies ProtoToOutput<Proto.SocialVerificationStatus, SocialVerificationStatusValue>,\n} as const;\n"],"mappings":";;AAGA,MAAa,yBAAyB,CAAC,WAAW,SAAS;AAG3D,MAAa,oCAAoC;CAAC;CAAW;CAAW;AAAI;AAG5E,MAAa,oCAAoC;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAGA,MAAa,sBAAsB;CAC/B,cAAc;EACV,SAAA;EACA,SAAA;CACJ;CACA,eAAe;GACkC,IAAA;GACb,IAAA;GACA,IAAA;CACpC;AACJ;AAEA,MAAa,gCAAgC;CACzC,cAAc;EACV,SAAA;EACA,SAAA;EACA,IAAA;CACJ;CACA,eAAe;GAC0C,IAAA;GACJ,IAAA;GACA,IAAA;GACL,IAAA;CAChD;AACJ;AAEA,MAAa,gCAAgC,EACzC,eAAe;EAC0C,IAAA;EACQ,IAAA;EACb,IAAA;EACK,IAAA;EACH,IAAA;EACF,IAAA;EACC,IAAA;EACE,IAAA;AACvD,EACJ"}
1
+ {"version":3,"file":"social-verification.codecs.js","names":[],"sources":["../../../src/services/social-verification/social-verification.codecs.ts"],"sourcesContent":["import { AuthErrorCode } from \"../../gen/auth/v1/auth_pb.js\";\nimport * as Proto from \"../../gen/auth/v1/social_verification_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const SOCIAL_PROVIDER_VALUES = [\"twitter\", \"discord\"] as const;\nexport type SocialProviderValue = (typeof SOCIAL_PROVIDER_VALUES)[number];\n\nexport const SOCIAL_VERIFICATION_METHOD_VALUES = [\"profile\", \"channel\", \"dm\"] as const;\nexport type SocialVerificationMethodValue = (typeof SOCIAL_VERIFICATION_METHOD_VALUES)[number];\n\nexport const SOCIAL_VERIFICATION_STATUS_VALUES = [\n \"pending_user_action\",\n \"queued\",\n \"in_progress\",\n \"verified\",\n \"failed\",\n \"expired\",\n \"cancelled\",\n] as const;\nexport type SocialVerificationStatusValue = (typeof SOCIAL_VERIFICATION_STATUS_VALUES)[number];\n\nexport const SocialProviderCodec = {\n inputToProto: {\n twitter: Proto.SocialProvider.TWITTER,\n discord: Proto.SocialProvider.DISCORD,\n } satisfies InputToProto<SocialProviderValue, Proto.SocialProvider>,\n protoToOutput: {\n [Proto.SocialProvider.PROVIDER_UNSPECIFIED]: \"unspecified\",\n [Proto.SocialProvider.TWITTER]: \"twitter\",\n [Proto.SocialProvider.DISCORD]: \"discord\",\n } satisfies ProtoToOutput<Proto.SocialProvider, SocialProviderValue>,\n} as const;\n\nexport const SocialVerificationMethodCodec = {\n inputToProto: {\n profile: Proto.SocialVerificationMethod.METHOD_PROFILE,\n channel: Proto.SocialVerificationMethod.METHOD_CHANNEL,\n dm: Proto.SocialVerificationMethod.METHOD_DM,\n } satisfies InputToProto<SocialVerificationMethodValue, Proto.SocialVerificationMethod>,\n protoToOutput: {\n [Proto.SocialVerificationMethod.METHOD_UNSPECIFIED]: \"unspecified\",\n [Proto.SocialVerificationMethod.METHOD_PROFILE]: \"profile\",\n [Proto.SocialVerificationMethod.METHOD_CHANNEL]: \"channel\",\n [Proto.SocialVerificationMethod.METHOD_DM]: \"dm\",\n } satisfies ProtoToOutput<Proto.SocialVerificationMethod, SocialVerificationMethodValue>,\n} as const;\n\nexport const SocialVerificationStatusCodec = {\n protoToOutput: {\n [Proto.SocialVerificationStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.SocialVerificationStatus.STATUS_PENDING_USER_ACTION]: \"pending_user_action\",\n [Proto.SocialVerificationStatus.STATUS_QUEUED]: \"queued\",\n [Proto.SocialVerificationStatus.STATUS_IN_PROGRESS]: \"in_progress\",\n [Proto.SocialVerificationStatus.STATUS_VERIFIED]: \"verified\",\n [Proto.SocialVerificationStatus.STATUS_FAILED]: \"failed\",\n [Proto.SocialVerificationStatus.STATUS_EXPIRED]: \"expired\",\n [Proto.SocialVerificationStatus.STATUS_CANCELLED]: \"cancelled\",\n } satisfies ProtoToOutput<Proto.SocialVerificationStatus, SocialVerificationStatusValue>,\n} as const;\n\nexport const SOCIAL_VERIFICATION_ERROR_CODE_VALUES = [\n \"username_invalid\",\n \"username_taken\",\n \"username_cooldown\",\n \"username_feature_locked\",\n \"username_reserved\",\n \"invalid_request\",\n \"authentication_required\",\n \"session_kind_not_allowed\",\n \"wallet_login_failed\",\n \"resource_not_found\",\n \"subaccount_access_denied\",\n \"api_key_access_denied\",\n \"api_key_invalid_status_transition\",\n \"policy_invalid\",\n \"smart_account_already_linked\",\n \"invite_access_denied\",\n \"invite_invalid_state\",\n \"mfa_disabled\",\n \"mfa_not_enrolled\",\n \"mfa_session_invalid\",\n \"mfa_challenge_not_found\",\n \"mfa_challenge_invalid\",\n \"mfa_challenge_locked\",\n \"mfa_otp_invalid\",\n \"mfa_recovery_invalid\",\n \"mfa_passkey_not_available\",\n \"mfa_passkey_credential_invalid\",\n \"mfa_passkey_verify_failed\",\n \"mfa_enrollment_binding_invalid\",\n \"step_up_required\",\n \"step_up_proof_unavailable\",\n \"step_up_already_claimed\",\n \"policy_in_use\",\n \"policy_locked\",\n \"policy_scope_mismatch\",\n \"revision_conflict\",\n \"mfa_elevation_required\",\n \"mfa_last_factor_required\",\n \"internal_error\",\n \"terms_not_accepted\",\n \"social_verification_expired\",\n \"social_verification_invalid_state\",\n \"subaccount_challenge_invalid\",\n \"social_account_already_linked\",\n] as const;\nexport type SocialVerificationErrorCodeValue =\n (typeof SOCIAL_VERIFICATION_ERROR_CODE_VALUES)[number];\n\n// Partial: auth codes added upstream decode to \"unspecified\" until mapped here.\nexport const SocialVerificationErrorCodeCodec = {\n protoToOutput: {\n [AuthErrorCode.AUTH_UNSPECIFIED]: \"unspecified\",\n [AuthErrorCode.AUTH_USERNAME_INVALID]: \"username_invalid\",\n [AuthErrorCode.AUTH_USERNAME_TAKEN]: \"username_taken\",\n [AuthErrorCode.AUTH_USERNAME_COOLDOWN]: \"username_cooldown\",\n [AuthErrorCode.AUTH_USERNAME_FEATURE_LOCKED]: \"username_feature_locked\",\n [AuthErrorCode.AUTH_USERNAME_RESERVED]: \"username_reserved\",\n [AuthErrorCode.AUTH_INVALID_REQUEST]: \"invalid_request\",\n [AuthErrorCode.AUTH_AUTHENTICATION_REQUIRED]: \"authentication_required\",\n [AuthErrorCode.AUTH_SESSION_KIND_NOT_ALLOWED]: \"session_kind_not_allowed\",\n [AuthErrorCode.AUTH_WALLET_LOGIN_FAILED]: \"wallet_login_failed\",\n [AuthErrorCode.AUTH_RESOURCE_NOT_FOUND]: \"resource_not_found\",\n [AuthErrorCode.AUTH_SUBACCOUNT_ACCESS_DENIED]: \"subaccount_access_denied\",\n [AuthErrorCode.AUTH_API_KEY_ACCESS_DENIED]: \"api_key_access_denied\",\n [AuthErrorCode.AUTH_API_KEY_INVALID_STATUS_TRANSITION]: \"api_key_invalid_status_transition\",\n [AuthErrorCode.AUTH_POLICY_INVALID]: \"policy_invalid\",\n [AuthErrorCode.AUTH_SMART_ACCOUNT_ALREADY_LINKED]: \"smart_account_already_linked\",\n [AuthErrorCode.AUTH_INVITE_ACCESS_DENIED]: \"invite_access_denied\",\n [AuthErrorCode.AUTH_INVITE_INVALID_STATE]: \"invite_invalid_state\",\n [AuthErrorCode.AUTH_MFA_DISABLED]: \"mfa_disabled\",\n [AuthErrorCode.AUTH_MFA_NOT_ENROLLED]: \"mfa_not_enrolled\",\n [AuthErrorCode.AUTH_MFA_SESSION_INVALID]: \"mfa_session_invalid\",\n [AuthErrorCode.AUTH_MFA_CHALLENGE_NOT_FOUND]: \"mfa_challenge_not_found\",\n [AuthErrorCode.AUTH_MFA_CHALLENGE_INVALID]: \"mfa_challenge_invalid\",\n [AuthErrorCode.AUTH_MFA_CHALLENGE_LOCKED]: \"mfa_challenge_locked\",\n [AuthErrorCode.AUTH_MFA_OTP_INVALID]: \"mfa_otp_invalid\",\n [AuthErrorCode.AUTH_MFA_RECOVERY_INVALID]: \"mfa_recovery_invalid\",\n [AuthErrorCode.AUTH_MFA_PASSKEY_NOT_AVAILABLE]: \"mfa_passkey_not_available\",\n [AuthErrorCode.AUTH_MFA_PASSKEY_CREDENTIAL_INVALID]: \"mfa_passkey_credential_invalid\",\n [AuthErrorCode.AUTH_MFA_PASSKEY_VERIFY_FAILED]: \"mfa_passkey_verify_failed\",\n [AuthErrorCode.AUTH_MFA_ENROLLMENT_BINDING_INVALID]: \"mfa_enrollment_binding_invalid\",\n [AuthErrorCode.AUTH_STEP_UP_REQUIRED]: \"step_up_required\",\n [AuthErrorCode.AUTH_STEP_UP_PROOF_UNAVAILABLE]: \"step_up_proof_unavailable\",\n [AuthErrorCode.AUTH_STEP_UP_ALREADY_CLAIMED]: \"step_up_already_claimed\",\n [AuthErrorCode.AUTH_POLICY_IN_USE]: \"policy_in_use\",\n [AuthErrorCode.AUTH_POLICY_LOCKED]: \"policy_locked\",\n [AuthErrorCode.AUTH_POLICY_SCOPE_MISMATCH]: \"policy_scope_mismatch\",\n [AuthErrorCode.AUTH_REVISION_CONFLICT]: \"revision_conflict\",\n [AuthErrorCode.AUTH_MFA_ELEVATION_REQUIRED]: \"mfa_elevation_required\",\n [AuthErrorCode.AUTH_MFA_LAST_FACTOR_REQUIRED]: \"mfa_last_factor_required\",\n [AuthErrorCode.AUTH_INTERNAL_ERROR]: \"internal_error\",\n [AuthErrorCode.AUTH_TERMS_NOT_ACCEPTED]: \"terms_not_accepted\",\n [AuthErrorCode.AUTH_SOCIAL_VERIFICATION_EXPIRED]: \"social_verification_expired\",\n [AuthErrorCode.AUTH_SOCIAL_VERIFICATION_INVALID_STATE]: \"social_verification_invalid_state\",\n [AuthErrorCode.AUTH_SUBACCOUNT_CHALLENGE_INVALID]: \"subaccount_challenge_invalid\",\n [AuthErrorCode.AUTH_SOCIAL_ACCOUNT_ALREADY_LINKED]: \"social_account_already_linked\",\n } satisfies Partial<ProtoToOutput<AuthErrorCode, SocialVerificationErrorCodeValue>>,\n} as const;\n"],"mappings":";;;AAIA,MAAa,yBAAyB,CAAC,WAAW,SAAS;AAG3D,MAAa,oCAAoC;CAAC;CAAW;CAAW;AAAI;AAG5E,MAAa,oCAAoC;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAGA,MAAa,sBAAsB;CAC/B,cAAc;EACV,SAAA;EACA,SAAA;CACJ;CACA,eAAe;GACkC,IAAA;GACb,IAAA;GACA,IAAA;CACpC;AACJ;AAEA,MAAa,gCAAgC;CACzC,cAAc;EACV,SAAA;EACA,SAAA;EACA,IAAA;CACJ;CACA,eAAe;GAC0C,IAAA;GACJ,IAAA;GACA,IAAA;GACL,IAAA;CAChD;AACJ;AAEA,MAAa,gCAAgC,EACzC,eAAe;EAC0C,IAAA;EACQ,IAAA;EACb,IAAA;EACK,IAAA;EACH,IAAA;EACF,IAAA;EACC,IAAA;EACE,IAAA;AACvD,EACJ;AAEA,MAAa,wCAAwC;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAKA,MAAa,mCAAmC,EAC5C,eAAe;EACuB,IAAA;EACK,IAAA;EACF,IAAA;EACG,IAAA;EACM,IAAA;EACN,IAAA;EACF,IAAA;EACQ,IAAA;EACC,IAAA;EACL,IAAA;EACD,KAAA;EACM,KAAA;EACH,KAAA;EACY,KAAA;EACnB,KAAA;EACc,KAAA;EACR,KAAA;EACA,KAAA;EACR,KAAA;EACI,KAAA;EACG,KAAA;EACI,KAAA;EACF,KAAA;EACD,KAAA;EACL,KAAA;EACK,KAAA;EACK,KAAA;EACK,KAAA;EACL,KAAA;EACK,KAAA;EACd,KAAA;EACS,KAAA;EACF,KAAA;EACV,KAAA;EACA,KAAA;EACQ,KAAA;EACJ,KAAA;EACK,KAAA;EACE,KAAA;EACV,KAAA;EACI,KAAA;EACS,KAAA;EACM,KAAA;EACL,KAAA;EACC,KAAA;AACxD,EACJ"}
@@ -7,6 +7,8 @@ declare const SocialProviderSchema: v.PicklistSchema<readonly ["twitter", "disco
7
7
  type SocialProvider = v.InferInput<typeof SocialProviderSchema>;
8
8
  declare const SocialVerificationMethodSchema: v.PicklistSchema<readonly ["profile", "channel", "dm"], undefined>;
9
9
  type SocialVerificationMethod = v.InferInput<typeof SocialVerificationMethodSchema>;
10
+ declare const SocialVerificationErrorCodeSchema: v.PicklistSchema<readonly ["username_invalid", "username_taken", "username_cooldown", "username_feature_locked", "username_reserved", "invalid_request", "authentication_required", "session_kind_not_allowed", "wallet_login_failed", "resource_not_found", "subaccount_access_denied", "api_key_access_denied", "api_key_invalid_status_transition", "policy_invalid", "smart_account_already_linked", "invite_access_denied", "invite_invalid_state", "mfa_disabled", "mfa_not_enrolled", "mfa_session_invalid", "mfa_challenge_not_found", "mfa_challenge_invalid", "mfa_challenge_locked", "mfa_otp_invalid", "mfa_recovery_invalid", "mfa_passkey_not_available", "mfa_passkey_credential_invalid", "mfa_passkey_verify_failed", "mfa_enrollment_binding_invalid", "step_up_required", "step_up_proof_unavailable", "step_up_already_claimed", "policy_in_use", "policy_locked", "policy_scope_mismatch", "revision_conflict", "mfa_elevation_required", "mfa_last_factor_required", "internal_error", "terms_not_accepted", "social_verification_expired", "social_verification_invalid_state", "subaccount_challenge_invalid", "social_account_already_linked"], undefined>;
11
+ type SocialVerificationErrorCode = v.InferOutput<typeof SocialVerificationErrorCodeSchema>;
10
12
  declare const SocialVerificationStatusSchema: v.PicklistSchema<readonly ["pending_user_action", "queued", "in_progress", "verified", "failed", "expired", "cancelled"], undefined>;
11
13
  type SocialVerificationStatus = v.InferOutput<typeof SocialVerificationStatusSchema>;
12
14
  declare const SocialVerificationSchema: v.ObjectSchema<{
@@ -41,6 +43,13 @@ type SocialVerification = Omit<SocialVerificationBase, "provider" | "method" | "
41
43
  provider: DecodedEnum<SocialProvider>;
42
44
  method: DecodedEnum<SocialVerificationMethod>;
43
45
  status: DecodedEnum<SocialVerificationStatus>;
46
+ /**
47
+ * Machine-readable failure for the current state; branch on this, not `lastError`.
48
+ * `"unspecified"` when no typed failure applies or the code is newer than this SDK.
49
+ * `"social_account_already_linked"` is non-retryable for this account: send the
50
+ * user to the account already linked to that identity instead of restarting.
51
+ */
52
+ errorCode: DecodedEnum<SocialVerificationErrorCode>;
44
53
  };
45
54
  declare const StartVerificationInputSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"provider", [v.StrictObjectSchema<{
46
55
  readonly provider: v.LiteralSchema<"twitter", undefined>;
@@ -106,5 +115,5 @@ declare const GetVerificationResponseSchema: v.SchemaWithPipe<readonly [v.Object
106
115
  }>]>;
107
116
  type GetVerificationResponse = v.InferOutput<typeof GetVerificationResponseSchema>;
108
117
  //#endregion
109
- export { GetVerificationResponse, GetVerificationResponseSchema, SocialProvider, SocialProviderInput, SocialProviderInputSchema, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationSchema, SocialVerificationStatus, SocialVerificationStatusSchema, StartVerificationInput, StartVerificationInputSchema, StartVerificationResponse, StartVerificationResponseSchema, VerificationReadyResponse, VerificationReadyResponseSchema };
118
+ export { GetVerificationResponse, GetVerificationResponseSchema, SocialProvider, SocialProviderInput, SocialProviderInputSchema, SocialProviderSchema, SocialVerification, SocialVerificationErrorCode, SocialVerificationErrorCodeSchema, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationSchema, SocialVerificationStatus, SocialVerificationStatusSchema, StartVerificationInput, StartVerificationInputSchema, StartVerificationResponse, StartVerificationResponseSchema, VerificationReadyResponse, VerificationReadyResponseSchema };
110
119
  //# sourceMappingURL=social-verification.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"social-verification.schemas.d.ts","names":[],"sources":["../../../src/services/social-verification/social-verification.schemas.ts"],"mappings":";;;;;cAoBa,sBAAoB,EAAA;KACrB,iBAAiB,EAAE,kBAAkB;cAEpC,gCAA8B,EAAA;KAC/B,2BAA2B,EAAE,kBAAkB;cAE9C,gCAA8B,EAAA;KAC/B,2BAA2B,EAAE,mBAAmB;cAgC/C,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgBhC,yBAAyB,EAAE,mBAAmB;KACvC,qBAAqB,KAAK;EAClC,UAAU,YAAY;EACtB,QAAQ,YAAY;EACpB,QAAQ,YAAY;;cAGX,8BAA4B,EAAA,yBAAA,EAAA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;KA+B7B,yBAAyB,EAAE,kBAAkB;cAO5C,2BAAyB,EAAA;;;KAI1B,sBAAsB,EAAE,kBAAkB;cAEzC,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;KAahC,4BAA4B,EAAE,mBAAmB;cAEhD,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;KAShC,4BAA4B,EAAE,mBAAmB;cAEhD,+BAA6B,EAAA,yBAAA,EAAA;;;;;;;KAS9B,0BAA0B,EAAE,mBAAmB"}
1
+ {"version":3,"file":"social-verification.schemas.d.ts","names":[],"sources":["../../../src/services/social-verification/social-verification.schemas.ts"],"mappings":";;;;;cAuBa,sBAAoB,EAAA;KACrB,iBAAiB,EAAE,kBAAkB;cAEpC,gCAA8B,EAAA;KAC/B,2BAA2B,EAAE,kBAAkB;cAE9C,mCAAiC,EAAA;KAClC,8BAA8B,EAAE,mBAAmB;cAElD,gCAA8B,EAAA;KAC/B,2BAA2B,EAAE,mBAAmB;cAiC/C,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgBhC,yBAAyB,EAAE,mBAAmB;KACvC,qBAAqB,KAAK;EAClC,UAAU,YAAY;EACtB,QAAQ,YAAY;EACpB,QAAQ,YAAY;;;;;;;EAOpB,WAAW,YAAY;;cAGd,8BAA4B,EAAA,yBAAA,EAAA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;KA+B7B,yBAAyB,EAAE,kBAAkB;cAO5C,2BAAyB,EAAA;;;KAI1B,sBAAsB,EAAE,kBAAkB;cAEzC,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;KAahC,4BAA4B,EAAE,mBAAmB;cAEhD,iCAA+B,EAAA,yBAAA,EAAA;;;;;;;KAShC,4BAA4B,EAAE,mBAAmB;cAEhD,+BAA6B,EAAA,yBAAA,EAAA;;;;;;;KAS9B,0BAA0B,EAAE,mBAAmB"}
@@ -1,11 +1,12 @@
1
1
  import { enumLabel } from "../../shared/proto-enum-codec.js";
2
2
  import { TimestampSchema } from "../../shared/schemas.js";
3
3
  import "../../gen/auth/v1/social_verification_pb.js";
4
- import { SOCIAL_PROVIDER_VALUES, SOCIAL_VERIFICATION_METHOD_VALUES, SOCIAL_VERIFICATION_STATUS_VALUES, SocialProviderCodec, SocialVerificationMethodCodec, SocialVerificationStatusCodec } from "./social-verification.codecs.js";
4
+ import { SOCIAL_PROVIDER_VALUES, SOCIAL_VERIFICATION_ERROR_CODE_VALUES, SOCIAL_VERIFICATION_METHOD_VALUES, SOCIAL_VERIFICATION_STATUS_VALUES, SocialProviderCodec, SocialVerificationErrorCodeCodec, SocialVerificationMethodCodec, SocialVerificationStatusCodec } from "./social-verification.codecs.js";
5
5
  import * as v from "valibot";
6
6
  //#region src/services/social-verification/social-verification.schemas.ts
7
7
  const SocialProviderSchema = v.picklist(SOCIAL_PROVIDER_VALUES);
8
8
  const SocialVerificationMethodSchema = v.picklist(SOCIAL_VERIFICATION_METHOD_VALUES);
9
+ v.picklist(SOCIAL_VERIFICATION_ERROR_CODE_VALUES);
9
10
  const SocialVerificationStatusSchema = v.picklist(SOCIAL_VERIFICATION_STATUS_VALUES);
10
11
  function normalizeHandle(input) {
11
12
  return (input ?? "").trim().replace(/^@+/, "");
@@ -29,6 +30,7 @@ function transformVerification(v) {
29
30
  verifiedAt: v.verifiedAt,
30
31
  attempts: v.attempts,
31
32
  lastError: v.lastError,
33
+ errorCode: enumLabel(SocialVerificationErrorCodeCodec.protoToOutput, v.errorCode),
32
34
  updatedAt: v.updatedAt
33
35
  };
34
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"social-verification.schemas.js","names":[],"sources":["../../../src/services/social-verification/social-verification.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { TimestampSchema } from \"../../shared/schemas.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport * as Proto from \"../../gen/auth/v1/social_verification_pb.js\";\nimport {\n SOCIAL_PROVIDER_VALUES,\n SOCIAL_VERIFICATION_METHOD_VALUES,\n SOCIAL_VERIFICATION_STATUS_VALUES,\n SocialProviderCodec,\n SocialVerificationMethodCodec,\n SocialVerificationStatusCodec,\n} from \"./social-verification.codecs.js\";\n\nexport {\n SOCIAL_PROVIDER_VALUES,\n SOCIAL_VERIFICATION_METHOD_VALUES,\n SOCIAL_VERIFICATION_STATUS_VALUES,\n} from \"./social-verification.codecs.js\";\n\nexport const SocialProviderSchema = v.picklist(SOCIAL_PROVIDER_VALUES);\nexport type SocialProvider = v.InferInput<typeof SocialProviderSchema>;\n\nexport const SocialVerificationMethodSchema = v.picklist(SOCIAL_VERIFICATION_METHOD_VALUES);\nexport type SocialVerificationMethod = v.InferInput<typeof SocialVerificationMethodSchema>;\n\nexport const SocialVerificationStatusSchema = v.picklist(SOCIAL_VERIFICATION_STATUS_VALUES);\nexport type SocialVerificationStatus = v.InferOutput<typeof SocialVerificationStatusSchema>;\n\nfunction normalizeHandle(input: string): string {\n return (input ?? \"\").trim().replace(/^@+/, \"\");\n}\n\nconst TWITTER_HANDLE_PATTERN = /^[A-Za-z0-9_]{1,15}$/;\n\n/**\n * Normalizes a social verification response into the SDK verification shape.\n */\nexport function transformVerification(\n v: Proto.SocialVerification | undefined,\n): SocialVerification | undefined {\n if (!v) return undefined;\n return {\n id: v.id,\n provider: enumLabel(SocialProviderCodec.protoToOutput, v.provider),\n method: enumLabel(SocialVerificationMethodCodec.protoToOutput, v.method),\n handle: v.handle,\n providerUserId: v.providerUserId,\n challengeCode: v.challengeCode,\n status: enumLabel(SocialVerificationStatusCodec.protoToOutput, v.status),\n requestedAt: v.requestedAt,\n expiresAt: v.expiresAt,\n verifiedAt: v.verifiedAt,\n attempts: v.attempts,\n lastError: v.lastError,\n updatedAt: v.updatedAt,\n };\n}\n\nexport const SocialVerificationSchema = v.object({\n id: v.bigint(),\n provider: SocialProviderSchema,\n method: SocialVerificationMethodSchema,\n handle: v.string(),\n providerUserId: v.string(),\n challengeCode: v.string(),\n status: SocialVerificationStatusSchema,\n requestedAt: v.optional(TimestampSchema),\n expiresAt: v.optional(TimestampSchema),\n verifiedAt: v.optional(TimestampSchema),\n attempts: v.number(),\n lastError: v.string(),\n updatedAt: v.optional(TimestampSchema),\n});\n\ntype SocialVerificationBase = v.InferOutput<typeof SocialVerificationSchema>;\nexport type SocialVerification = Omit<SocialVerificationBase, \"provider\" | \"method\" | \"status\"> & {\n provider: DecodedEnum<SocialProvider>;\n method: DecodedEnum<SocialVerificationMethod>;\n status: DecodedEnum<SocialVerificationStatus>;\n};\n\nexport const StartVerificationInputSchema = v.pipe(\n v.variant(\"provider\", [\n v.strictObject({\n provider: v.literal(\"twitter\"),\n handle: v.pipe(\n v.string(),\n v.transform(normalizeHandle),\n v.minLength(1),\n v.regex(\n TWITTER_HANDLE_PATTERN,\n \"Twitter handle must be 1-15 letters, digits, or underscores\",\n ),\n ),\n method: v.optional(v.literal(\"profile\")),\n }),\n v.strictObject({\n provider: v.literal(\"discord\"),\n method: v.optional(v.picklist([\"channel\", \"dm\"])),\n }),\n ]),\n v.transform(({ provider, method, ...input }) => ({\n ...input,\n provider: SocialProviderCodec.inputToProto[provider],\n // METHOD_UNSPECIFIED lets the API choose Twitter's profile or Discord's channel default.\n method:\n method === undefined\n ? Proto.SocialVerificationMethod.METHOD_UNSPECIFIED\n : SocialVerificationMethodCodec.inputToProto[method],\n })),\n);\n\nexport type StartVerificationInput = v.InferInput<typeof StartVerificationInputSchema>;\n\nexport const ProviderInputSchema = v.pipe(\n SocialProviderSchema,\n v.transform((v) => SocialProviderCodec.inputToProto[v]),\n);\n\nexport const SocialProviderInputSchema = v.strictObject({\n provider: ProviderInputSchema,\n});\n\nexport type SocialProviderInput = v.InferInput<typeof SocialProviderInputSchema>;\n\nexport const StartVerificationResponseSchema = v.pipe(\n v.object({\n challengeCode: v.string(),\n expiresAt: v.optional(TimestampSchema),\n verification: v.optional(v.custom<Proto.SocialVerification>(() => true)),\n }),\n v.transform((res) => ({\n challengeCode: res.challengeCode,\n expiresAt: res.expiresAt,\n verification: transformVerification(res.verification),\n })),\n);\n\nexport type StartVerificationResponse = v.InferOutput<typeof StartVerificationResponseSchema>;\n\nexport const VerificationReadyResponseSchema = v.pipe(\n v.object({\n verification: v.optional(v.custom<Proto.SocialVerification>(() => true)),\n }),\n v.transform((res) => ({\n verification: transformVerification(res.verification),\n })),\n);\n\nexport type VerificationReadyResponse = v.InferOutput<typeof VerificationReadyResponseSchema>;\n\nexport const GetVerificationResponseSchema = v.pipe(\n v.object({\n verification: v.optional(v.custom<Proto.SocialVerification>(() => true)),\n }),\n v.transform((res) => ({\n verification: transformVerification(res.verification),\n })),\n);\n\nexport type GetVerificationResponse = v.InferOutput<typeof GetVerificationResponseSchema>;\n"],"mappings":";;;;;;AAoBA,MAAa,uBAAuB,EAAE,SAAS,sBAAsB;AAGrE,MAAa,iCAAiC,EAAE,SAAS,iCAAiC;AAG1F,MAAa,iCAAiC,EAAE,SAAS,iCAAiC;AAG1F,SAAS,gBAAgB,OAAuB;CAC5C,QAAQ,SAAS,GAAA,CAAI,KAAK,CAAC,CAAC,QAAQ,OAAO,EAAE;AACjD;AAEA,MAAM,yBAAyB;;;;AAK/B,SAAgB,sBACZ,GAC8B;CAC9B,IAAI,CAAC,GAAG,OAAO,KAAA;CACf,OAAO;EACH,IAAI,EAAE;EACN,UAAU,UAAU,oBAAoB,eAAe,EAAE,QAAQ;EACjE,QAAQ,UAAU,8BAA8B,eAAe,EAAE,MAAM;EACvE,QAAQ,EAAE;EACV,gBAAgB,EAAE;EAClB,eAAe,EAAE;EACjB,QAAQ,UAAU,8BAA8B,eAAe,EAAE,MAAM;EACvE,aAAa,EAAE;EACf,WAAW,EAAE;EACb,YAAY,EAAE;EACd,UAAU,EAAE;EACZ,WAAW,EAAE;EACb,WAAW,EAAE;CACjB;AACJ;AAEwC,EAAE,OAAO;CAC7C,IAAI,EAAE,OAAO;CACb,UAAU;CACV,QAAQ;CACR,QAAQ,EAAE,OAAO;CACjB,gBAAgB,EAAE,OAAO;CACzB,eAAe,EAAE,OAAO;CACxB,QAAQ;CACR,aAAa,EAAE,SAAS,eAAe;CACvC,WAAW,EAAE,SAAS,eAAe;CACrC,YAAY,EAAE,SAAS,eAAe;CACtC,UAAU,EAAE,OAAO;CACnB,WAAW,EAAE,OAAO;CACpB,WAAW,EAAE,SAAS,eAAe;AACzC,CAAC;AASD,MAAa,+BAA+B,EAAE,KAC1C,EAAE,QAAQ,YAAY,CAClB,EAAE,aAAa;CACX,UAAU,EAAE,QAAQ,SAAS;CAC7B,QAAQ,EAAE,KACN,EAAE,OAAO,GACT,EAAE,UAAU,eAAe,GAC3B,EAAE,UAAU,CAAC,GACb,EAAE,MACE,wBACA,6DACJ,CACJ;CACA,QAAQ,EAAE,SAAS,EAAE,QAAQ,SAAS,CAAC;AAC3C,CAAC,GACD,EAAE,aAAa;CACX,UAAU,EAAE,QAAQ,SAAS;CAC7B,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,WAAW,IAAI,CAAC,CAAC;AACpD,CAAC,CACL,CAAC,GACD,EAAE,WAAW,EAAE,UAAU,QAAQ,GAAG,aAAa;CAC7C,GAAG;CACH,UAAU,oBAAoB,aAAa;CAE3C,QACI,WAAW,KAAA,IAAA,IAEL,8BAA8B,aAAa;AACzD,EAAE,CACN;AAIA,MAAa,sBAAsB,EAAE,KACjC,sBACA,EAAE,WAAW,MAAM,oBAAoB,aAAa,EAAE,CAC1D;AAEA,MAAa,4BAA4B,EAAE,aAAa,EACpD,UAAU,oBACd,CAAC;AAID,MAAa,kCAAkC,EAAE,KAC7C,EAAE,OAAO;CACL,eAAe,EAAE,OAAO;CACxB,WAAW,EAAE,SAAS,eAAe;CACrC,cAAc,EAAE,SAAS,EAAE,aAAuC,IAAI,CAAC;AAC3E,CAAC,GACD,EAAE,WAAW,SAAS;CAClB,eAAe,IAAI;CACnB,WAAW,IAAI;CACf,cAAc,sBAAsB,IAAI,YAAY;AACxD,EAAE,CACN;AAIA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,OAAO,EACL,cAAc,EAAE,SAAS,EAAE,aAAuC,IAAI,CAAC,EAC3E,CAAC,GACD,EAAE,WAAW,SAAS,EAClB,cAAc,sBAAsB,IAAI,YAAY,EACxD,EAAE,CACN;AAIA,MAAa,gCAAgC,EAAE,KAC3C,EAAE,OAAO,EACL,cAAc,EAAE,SAAS,EAAE,aAAuC,IAAI,CAAC,EAC3E,CAAC,GACD,EAAE,WAAW,SAAS,EAClB,cAAc,sBAAsB,IAAI,YAAY,EACxD,EAAE,CACN"}
1
+ {"version":3,"file":"social-verification.schemas.js","names":[],"sources":["../../../src/services/social-verification/social-verification.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { TimestampSchema } from \"../../shared/schemas.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport * as Proto from \"../../gen/auth/v1/social_verification_pb.js\";\nimport {\n SOCIAL_PROVIDER_VALUES,\n SOCIAL_VERIFICATION_ERROR_CODE_VALUES,\n SOCIAL_VERIFICATION_METHOD_VALUES,\n SOCIAL_VERIFICATION_STATUS_VALUES,\n SocialProviderCodec,\n SocialVerificationErrorCodeCodec,\n SocialVerificationMethodCodec,\n SocialVerificationStatusCodec,\n} from \"./social-verification.codecs.js\";\n\nexport {\n SOCIAL_PROVIDER_VALUES,\n SOCIAL_VERIFICATION_ERROR_CODE_VALUES,\n SOCIAL_VERIFICATION_METHOD_VALUES,\n SOCIAL_VERIFICATION_STATUS_VALUES,\n} from \"./social-verification.codecs.js\";\n\nexport const SocialProviderSchema = v.picklist(SOCIAL_PROVIDER_VALUES);\nexport type SocialProvider = v.InferInput<typeof SocialProviderSchema>;\n\nexport const SocialVerificationMethodSchema = v.picklist(SOCIAL_VERIFICATION_METHOD_VALUES);\nexport type SocialVerificationMethod = v.InferInput<typeof SocialVerificationMethodSchema>;\n\nexport const SocialVerificationErrorCodeSchema = v.picklist(SOCIAL_VERIFICATION_ERROR_CODE_VALUES);\nexport type SocialVerificationErrorCode = v.InferOutput<typeof SocialVerificationErrorCodeSchema>;\n\nexport const SocialVerificationStatusSchema = v.picklist(SOCIAL_VERIFICATION_STATUS_VALUES);\nexport type SocialVerificationStatus = v.InferOutput<typeof SocialVerificationStatusSchema>;\n\nfunction normalizeHandle(input: string): string {\n return (input ?? \"\").trim().replace(/^@+/, \"\");\n}\n\nconst TWITTER_HANDLE_PATTERN = /^[A-Za-z0-9_]{1,15}$/;\n\n/**\n * Normalizes a social verification response into the SDK verification shape.\n */\nexport function transformVerification(\n v: Proto.SocialVerification | undefined,\n): SocialVerification | undefined {\n if (!v) return undefined;\n return {\n id: v.id,\n provider: enumLabel(SocialProviderCodec.protoToOutput, v.provider),\n method: enumLabel(SocialVerificationMethodCodec.protoToOutput, v.method),\n handle: v.handle,\n providerUserId: v.providerUserId,\n challengeCode: v.challengeCode,\n status: enumLabel(SocialVerificationStatusCodec.protoToOutput, v.status),\n requestedAt: v.requestedAt,\n expiresAt: v.expiresAt,\n verifiedAt: v.verifiedAt,\n attempts: v.attempts,\n lastError: v.lastError,\n errorCode: enumLabel(SocialVerificationErrorCodeCodec.protoToOutput, v.errorCode),\n updatedAt: v.updatedAt,\n };\n}\n\nexport const SocialVerificationSchema = v.object({\n id: v.bigint(),\n provider: SocialProviderSchema,\n method: SocialVerificationMethodSchema,\n handle: v.string(),\n providerUserId: v.string(),\n challengeCode: v.string(),\n status: SocialVerificationStatusSchema,\n requestedAt: v.optional(TimestampSchema),\n expiresAt: v.optional(TimestampSchema),\n verifiedAt: v.optional(TimestampSchema),\n attempts: v.number(),\n lastError: v.string(),\n updatedAt: v.optional(TimestampSchema),\n});\n\ntype SocialVerificationBase = v.InferOutput<typeof SocialVerificationSchema>;\nexport type SocialVerification = Omit<SocialVerificationBase, \"provider\" | \"method\" | \"status\"> & {\n provider: DecodedEnum<SocialProvider>;\n method: DecodedEnum<SocialVerificationMethod>;\n status: DecodedEnum<SocialVerificationStatus>;\n /**\n * Machine-readable failure for the current state; branch on this, not `lastError`.\n * `\"unspecified\"` when no typed failure applies or the code is newer than this SDK.\n * `\"social_account_already_linked\"` is non-retryable for this account: send the\n * user to the account already linked to that identity instead of restarting.\n */\n errorCode: DecodedEnum<SocialVerificationErrorCode>;\n};\n\nexport const StartVerificationInputSchema = v.pipe(\n v.variant(\"provider\", [\n v.strictObject({\n provider: v.literal(\"twitter\"),\n handle: v.pipe(\n v.string(),\n v.transform(normalizeHandle),\n v.minLength(1),\n v.regex(\n TWITTER_HANDLE_PATTERN,\n \"Twitter handle must be 1-15 letters, digits, or underscores\",\n ),\n ),\n method: v.optional(v.literal(\"profile\")),\n }),\n v.strictObject({\n provider: v.literal(\"discord\"),\n method: v.optional(v.picklist([\"channel\", \"dm\"])),\n }),\n ]),\n v.transform(({ provider, method, ...input }) => ({\n ...input,\n provider: SocialProviderCodec.inputToProto[provider],\n // METHOD_UNSPECIFIED lets the API choose Twitter's profile or Discord's channel default.\n method:\n method === undefined\n ? Proto.SocialVerificationMethod.METHOD_UNSPECIFIED\n : SocialVerificationMethodCodec.inputToProto[method],\n })),\n);\n\nexport type StartVerificationInput = v.InferInput<typeof StartVerificationInputSchema>;\n\nexport const ProviderInputSchema = v.pipe(\n SocialProviderSchema,\n v.transform((v) => SocialProviderCodec.inputToProto[v]),\n);\n\nexport const SocialProviderInputSchema = v.strictObject({\n provider: ProviderInputSchema,\n});\n\nexport type SocialProviderInput = v.InferInput<typeof SocialProviderInputSchema>;\n\nexport const StartVerificationResponseSchema = v.pipe(\n v.object({\n challengeCode: v.string(),\n expiresAt: v.optional(TimestampSchema),\n verification: v.optional(v.custom<Proto.SocialVerification>(() => true)),\n }),\n v.transform((res) => ({\n challengeCode: res.challengeCode,\n expiresAt: res.expiresAt,\n verification: transformVerification(res.verification),\n })),\n);\n\nexport type StartVerificationResponse = v.InferOutput<typeof StartVerificationResponseSchema>;\n\nexport const VerificationReadyResponseSchema = v.pipe(\n v.object({\n verification: v.optional(v.custom<Proto.SocialVerification>(() => true)),\n }),\n v.transform((res) => ({\n verification: transformVerification(res.verification),\n })),\n);\n\nexport type VerificationReadyResponse = v.InferOutput<typeof VerificationReadyResponseSchema>;\n\nexport const GetVerificationResponseSchema = v.pipe(\n v.object({\n verification: v.optional(v.custom<Proto.SocialVerification>(() => true)),\n }),\n v.transform((res) => ({\n verification: transformVerification(res.verification),\n })),\n);\n\nexport type GetVerificationResponse = v.InferOutput<typeof GetVerificationResponseSchema>;\n"],"mappings":";;;;;;AAuBA,MAAa,uBAAuB,EAAE,SAAS,sBAAsB;AAGrE,MAAa,iCAAiC,EAAE,SAAS,iCAAiC;AAGzC,EAAE,SAAS,qCAAqC;AAGjG,MAAa,iCAAiC,EAAE,SAAS,iCAAiC;AAG1F,SAAS,gBAAgB,OAAuB;CAC5C,QAAQ,SAAS,GAAA,CAAI,KAAK,CAAC,CAAC,QAAQ,OAAO,EAAE;AACjD;AAEA,MAAM,yBAAyB;;;;AAK/B,SAAgB,sBACZ,GAC8B;CAC9B,IAAI,CAAC,GAAG,OAAO,KAAA;CACf,OAAO;EACH,IAAI,EAAE;EACN,UAAU,UAAU,oBAAoB,eAAe,EAAE,QAAQ;EACjE,QAAQ,UAAU,8BAA8B,eAAe,EAAE,MAAM;EACvE,QAAQ,EAAE;EACV,gBAAgB,EAAE;EAClB,eAAe,EAAE;EACjB,QAAQ,UAAU,8BAA8B,eAAe,EAAE,MAAM;EACvE,aAAa,EAAE;EACf,WAAW,EAAE;EACb,YAAY,EAAE;EACd,UAAU,EAAE;EACZ,WAAW,EAAE;EACb,WAAW,UAAU,iCAAiC,eAAe,EAAE,SAAS;EAChF,WAAW,EAAE;CACjB;AACJ;AAEwC,EAAE,OAAO;CAC7C,IAAI,EAAE,OAAO;CACb,UAAU;CACV,QAAQ;CACR,QAAQ,EAAE,OAAO;CACjB,gBAAgB,EAAE,OAAO;CACzB,eAAe,EAAE,OAAO;CACxB,QAAQ;CACR,aAAa,EAAE,SAAS,eAAe;CACvC,WAAW,EAAE,SAAS,eAAe;CACrC,YAAY,EAAE,SAAS,eAAe;CACtC,UAAU,EAAE,OAAO;CACnB,WAAW,EAAE,OAAO;CACpB,WAAW,EAAE,SAAS,eAAe;AACzC,CAAC;AAgBD,MAAa,+BAA+B,EAAE,KAC1C,EAAE,QAAQ,YAAY,CAClB,EAAE,aAAa;CACX,UAAU,EAAE,QAAQ,SAAS;CAC7B,QAAQ,EAAE,KACN,EAAE,OAAO,GACT,EAAE,UAAU,eAAe,GAC3B,EAAE,UAAU,CAAC,GACb,EAAE,MACE,wBACA,6DACJ,CACJ;CACA,QAAQ,EAAE,SAAS,EAAE,QAAQ,SAAS,CAAC;AAC3C,CAAC,GACD,EAAE,aAAa;CACX,UAAU,EAAE,QAAQ,SAAS;CAC7B,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,WAAW,IAAI,CAAC,CAAC;AACpD,CAAC,CACL,CAAC,GACD,EAAE,WAAW,EAAE,UAAU,QAAQ,GAAG,aAAa;CAC7C,GAAG;CACH,UAAU,oBAAoB,aAAa;CAE3C,QACI,WAAW,KAAA,IAAA,IAEL,8BAA8B,aAAa;AACzD,EAAE,CACN;AAIA,MAAa,sBAAsB,EAAE,KACjC,sBACA,EAAE,WAAW,MAAM,oBAAoB,aAAa,EAAE,CAC1D;AAEA,MAAa,4BAA4B,EAAE,aAAa,EACpD,UAAU,oBACd,CAAC;AAID,MAAa,kCAAkC,EAAE,KAC7C,EAAE,OAAO;CACL,eAAe,EAAE,OAAO;CACxB,WAAW,EAAE,SAAS,eAAe;CACrC,cAAc,EAAE,SAAS,EAAE,aAAuC,IAAI,CAAC;AAC3E,CAAC,GACD,EAAE,WAAW,SAAS;CAClB,eAAe,IAAI;CACnB,WAAW,IAAI;CACf,cAAc,sBAAsB,IAAI,YAAY;AACxD,EAAE,CACN;AAIA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,OAAO,EACL,cAAc,EAAE,SAAS,EAAE,aAAuC,IAAI,CAAC,EAC3E,CAAC,GACD,EAAE,WAAW,SAAS,EAClB,cAAc,sBAAsB,IAAI,YAAY,EACxD,EAAE,CACN;AAIA,MAAa,gCAAgC,EAAE,KAC3C,EAAE,OAAO,EACL,cAAc,EAAE,SAAS,EAAE,aAAuC,IAAI,CAAC,EAC3E,CAAC,GACD,EAAE,WAAW,SAAS,EAClB,cAAc,sBAAsB,IAAI,YAAY,EACxD,EAAE,CACN"}
@@ -1,2 +1,2 @@
1
- import { GetVerificationResponse, SocialProvider, SocialProviderInput, SocialVerification, SocialVerificationMethod, SocialVerificationStatus, StartVerificationInput, StartVerificationResponse, VerificationReadyResponse } from "./social-verification.schemas.js";
2
- export type { GetVerificationResponse, SocialProvider, SocialProviderInput, SocialVerification, SocialVerificationMethod, SocialVerificationStatus, StartVerificationInput, StartVerificationResponse, VerificationReadyResponse };
1
+ import { GetVerificationResponse, SocialProvider, SocialProviderInput, SocialVerification, SocialVerificationErrorCode, SocialVerificationMethod, SocialVerificationStatus, StartVerificationInput, StartVerificationResponse, VerificationReadyResponse } from "./social-verification.schemas.js";
2
+ export type { GetVerificationResponse, SocialProvider, SocialProviderInput, SocialVerification, SocialVerificationErrorCode, SocialVerificationMethod, SocialVerificationStatus, StartVerificationInput, StartVerificationResponse, VerificationReadyResponse };
@@ -72,7 +72,8 @@ declare class SubaccountsService {
72
72
  */
73
73
  setMemberMfaRequirement(input: v.InferInput<typeof SetSubaccountMemberMfaRequirementInputSchema>, options?: PolyesterMutationOptions): Promise<SubaccountMutationResult>;
74
74
  /**
75
- * Returns incoming, outgoing, or all subaccount invitations for the caller, newest first.
75
+ * Returns the caller's subaccount invitations, newest first. Omit `direction` to include both
76
+ * incoming and outgoing invitations, or pass `"incoming"` or `"outgoing"` to filter.
76
77
  */
77
78
  listInvites(input: v.InferInput<typeof ListSubaccountInvitesInputSchema>, options?: PolyesterRequestOptions): Promise<SubaccountInvite[]>;
78
79
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"subaccounts.d.ts","names":[],"sources":["../../../src/services/subaccounts/subaccounts.ts"],"mappings":";;;;;;;;;;;;;;UAsDU,kCAAkC,mBAAmB;EAC3D;;UAGM,8BAA8B,mBAAmB;EACvD;;;;;cAMS;;WACA,UAAU;EASf,YAAA,YAAY,4BACZ,UAAU,mBACV,WAAW;;;;EAaT,KAAK,UAAU,0BAA0B;IAC3C;IACA,aAAa,EAAE,mBAAmB;;;;;EAYhC,IACF,OAAO,EAAE,kBAAkB,0BAC3B,UAAU,0BACX,QACC;IACI,SAAS;IACT,QAAQ;IACR,SAAS;IACT,SAAS;;;;;;;EAqCX,gBACF,OAAO,EAAE,kBAAkB,uCAC3B,UAAU,0BACX,QAAQ;;;;EAYL,OACF,OAAO,EAAE,kBAAkB,8BAC3B,UAAU,2BACX,QAAQ;;;;EAYL,OACF,OAAO,EAAE,kBAAkB,8BAC3B,UAAU,2BACX,QAAQ;;;;EAaL,aACF,OAAO,EAAE,kBAAkB,oCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,aACF,OAAO,EAAE,kBAAkB,oCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,iBACF,OAAO,EAAE,kBAAkB,wCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,wBACF,OAAO,EAAE,kBAAkB,+CAC3B,UAAU,2BACX,QAAQ;;;;EAYL,YACF,OAAO,EAAE,kBAAkB,mCAC3B,UAAU,0BACX,QAAQ;;;;EAYL,UAAU,UAAU,0BAA0B,QAAQ;;;;EAWtD,wBACF,OAAO,EAAE,kBAAkB,0BAC3B,UAAU,0BACX,QAAQ;;;;EAYL,YACF,OAAO,EAAE,kBAAkB,0BAC3B,UAAU,0BACX,QAAQ;;;;EAYL,cACF,OAAO,EAAE,kBAAkB,qCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,WACF,OAAO,EAAE,kBAAkB,gCAC3B,UAAU,0BACX;IAAU,QAAQ;IAAmB;;;;;EAexC,UAAU,OAAO;;;;EAmBjB,iBAAiB,OAAO"}
1
+ {"version":3,"file":"subaccounts.d.ts","names":[],"sources":["../../../src/services/subaccounts/subaccounts.ts"],"mappings":";;;;;;;;;;;;;;UAsDU,kCAAkC,mBAAmB;EAC3D;;UAGM,8BAA8B,mBAAmB;EACvD;;;;;cAMS;;WACA,UAAU;EASf,YAAA,YAAY,4BACZ,UAAU,mBACV,WAAW;;;;EAaT,KAAK,UAAU,0BAA0B;IAC3C;IACA,aAAa,EAAE,mBAAmB;;;;;EAYhC,IACF,OAAO,EAAE,kBAAkB,0BAC3B,UAAU,0BACX,QACC;IACI,SAAS;IACT,QAAQ;IACR,SAAS;IACT,SAAS;;;;;;;EAqCX,gBACF,OAAO,EAAE,kBAAkB,uCAC3B,UAAU,0BACX,QAAQ;;;;EAYL,OACF,OAAO,EAAE,kBAAkB,8BAC3B,UAAU,2BACX,QAAQ;;;;EAYL,OACF,OAAO,EAAE,kBAAkB,8BAC3B,UAAU,2BACX,QAAQ;;;;EAaL,aACF,OAAO,EAAE,kBAAkB,oCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,aACF,OAAO,EAAE,kBAAkB,oCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,iBACF,OAAO,EAAE,kBAAkB,wCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,wBACF,OAAO,EAAE,kBAAkB,+CAC3B,UAAU,2BACX,QAAQ;;;;;EAaL,YACF,OAAO,EAAE,kBAAkB,mCAC3B,UAAU,0BACX,QAAQ;;;;EAYL,UAAU,UAAU,0BAA0B,QAAQ;;;;EAWtD,wBACF,OAAO,EAAE,kBAAkB,0BAC3B,UAAU,0BACX,QAAQ;;;;EAYL,YACF,OAAO,EAAE,kBAAkB,0BAC3B,UAAU,0BACX,QAAQ;;;;EAYL,cACF,OAAO,EAAE,kBAAkB,qCAC3B,UAAU,2BACX,QAAQ;;;;EAYL,WACF,OAAO,EAAE,kBAAkB,gCAC3B,UAAU,0BACX;IAAU,QAAQ;IAAmB;;;;;EAexC,UAAU,OAAO;;;;EAmBjB,iBAAiB,OAAO"}
@@ -122,7 +122,8 @@ var SubaccountsService = class {
122
122
  return parse(SubaccountMutationResultSchema, res);
123
123
  }
124
124
  /**
125
- * Returns incoming, outgoing, or all subaccount invitations for the caller, newest first.
125
+ * Returns the caller's subaccount invitations, newest first. Omit `direction` to include both
126
+ * incoming and outgoing invitations, or pass `"incoming"` or `"outgoing"` to filter.
126
127
  */
127
128
  async listInvites(input, options) {
128
129
  const validatedInput = parse(ListSubaccountInvitesInputSchema, input);