@r2wa-org/eden 0.0.83 → 0.0.85

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.
@@ -9996,6 +9996,44 @@ export declare const adminRouter: Elysia<"/admin", {
9996
9996
  };
9997
9997
  };
9998
9998
  };
9999
+ } & {
10000
+ users: {
10001
+ ":userId": {
10002
+ "latest-session": {
10003
+ get: {
10004
+ body: {};
10005
+ params: {
10006
+ userId: string;
10007
+ };
10008
+ query: {};
10009
+ headers: {};
10010
+ response: {
10011
+ 200: {
10012
+ id: string;
10013
+ createdAt: Date;
10014
+ updatedAt: Date;
10015
+ expiresAt: Date;
10016
+ ipAddress: string | null;
10017
+ userAgent: string | null;
10018
+ userId: string;
10019
+ impersonatedBy: string | null;
10020
+ } | null;
10021
+ 401: "Unauthorized";
10022
+ 403: "Forbidden: Admins only";
10023
+ 422: {
10024
+ type: "validation";
10025
+ on: string;
10026
+ summary?: string;
10027
+ message?: string;
10028
+ found?: unknown;
10029
+ property?: string;
10030
+ expected?: string;
10031
+ };
10032
+ };
10033
+ };
10034
+ };
10035
+ };
10036
+ };
9999
10037
  } & {
10000
10038
  users: {
10001
10039
  ":userId": {
package/dist/index.d.ts CHANGED
@@ -10319,6 +10319,44 @@ declare const app: Elysia<"/api", {
10319
10319
  };
10320
10320
  };
10321
10321
  };
10322
+ } & {
10323
+ users: {
10324
+ ":userId": {
10325
+ "latest-session": {
10326
+ get: {
10327
+ body: {};
10328
+ params: {
10329
+ userId: string;
10330
+ };
10331
+ query: {};
10332
+ headers: {};
10333
+ response: {
10334
+ 200: {
10335
+ id: string;
10336
+ createdAt: Date;
10337
+ updatedAt: Date;
10338
+ expiresAt: Date;
10339
+ ipAddress: string | null;
10340
+ userAgent: string | null;
10341
+ userId: string;
10342
+ impersonatedBy: string | null;
10343
+ } | null;
10344
+ 401: "Unauthorized";
10345
+ 403: "Forbidden: Admins only";
10346
+ 422: {
10347
+ type: "validation";
10348
+ on: string;
10349
+ summary?: string;
10350
+ message?: string;
10351
+ found?: unknown;
10352
+ property?: string;
10353
+ expected?: string;
10354
+ };
10355
+ };
10356
+ };
10357
+ };
10358
+ };
10359
+ };
10322
10360
  } & {
10323
10361
  users: {
10324
10362
  ":userId": {
@@ -12971,6 +13009,7 @@ declare const app: Elysia<"/api", {
12971
13009
  "market-buy": {
12972
13010
  post: {
12973
13011
  body: {
13012
+ transactionPassword?: string | undefined;
12974
13013
  idempotencyKey: string;
12975
13014
  marketId: string;
12976
13015
  baseAmount: string;
@@ -13022,6 +13061,7 @@ declare const app: Elysia<"/api", {
13022
13061
  "market-sell": {
13023
13062
  post: {
13024
13063
  body: {
13064
+ transactionPassword?: string | undefined;
13025
13065
  idempotencyKey: string;
13026
13066
  marketId: string;
13027
13067
  baseAmount: string;
@@ -179,6 +179,7 @@ export declare const tradeMarketOrderCreateSchema: import("@sinclair/typebox").T
179
179
  marketId: import("@sinclair/typebox").TString;
180
180
  baseAmount: import("@sinclair/typebox").TString;
181
181
  idempotencyKey: import("@sinclair/typebox").TString;
182
+ transactionPassword: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
182
183
  }>;
183
184
  export type TradeMarketOrderCreateInputType = typeof tradeMarketOrderCreateSchema.static;
184
185
  export declare const tradeMarketOrderResponseSchema: import("drizzle-typebox").BuildSchema<"select", {
@@ -522,6 +522,7 @@ export declare const tradeMarketRouter: Elysia<"/trade_market", {
522
522
  "market-buy": {
523
523
  post: {
524
524
  body: {
525
+ transactionPassword?: string | undefined;
525
526
  idempotencyKey: string;
526
527
  marketId: string;
527
528
  baseAmount: string;
@@ -573,6 +574,7 @@ export declare const tradeMarketRouter: Elysia<"/trade_market", {
573
574
  "market-sell": {
574
575
  post: {
575
576
  body: {
577
+ transactionPassword?: string | undefined;
576
578
  idempotencyKey: string;
577
579
  marketId: string;
578
580
  baseAmount: string;
@@ -1437,3 +1437,18 @@ export declare const userAdminBanResponseSchema: import("@sinclair/typebox").TOb
1437
1437
  success: import("@sinclair/typebox").TBoolean;
1438
1438
  }>;
1439
1439
  export type UserAdminBanResponseSchemaType = typeof userAdminBanResponseSchema.static;
1440
+ export declare const userAdminLatestSessionParamsSchema: import("@sinclair/typebox").TObject<{
1441
+ userId: import("@sinclair/typebox").TString;
1442
+ }>;
1443
+ export type UserAdminLatestSessionParamsSchemaType = typeof userAdminLatestSessionParamsSchema.static;
1444
+ export declare const userAdminLatestSessionResponseSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
1445
+ id: import("@sinclair/typebox").TString;
1446
+ createdAt: import("@sinclair/typebox").TDate;
1447
+ updatedAt: import("@sinclair/typebox").TDate;
1448
+ expiresAt: import("@sinclair/typebox").TDate;
1449
+ ipAddress: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
1450
+ userAgent: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
1451
+ userId: import("@sinclair/typebox").TString;
1452
+ impersonatedBy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
1453
+ }>, import("@sinclair/typebox").TNull]>;
1454
+ export type UserAdminLatestSessionResponseSchemaType = typeof userAdminLatestSessionResponseSchema.static;
@@ -741,6 +741,44 @@ export declare const userAdminRouter: Elysia<"/users", {
741
741
  };
742
742
  };
743
743
  };
744
+ } & {
745
+ users: {
746
+ ":userId": {
747
+ "latest-session": {
748
+ get: {
749
+ body: {};
750
+ params: {
751
+ userId: string;
752
+ };
753
+ query: {};
754
+ headers: {};
755
+ response: {
756
+ 200: {
757
+ id: string;
758
+ createdAt: Date;
759
+ updatedAt: Date;
760
+ expiresAt: Date;
761
+ ipAddress: string | null;
762
+ userAgent: string | null;
763
+ userId: string;
764
+ impersonatedBy: string | null;
765
+ } | null;
766
+ 401: "Unauthorized";
767
+ 403: "Forbidden: Admins only";
768
+ 422: {
769
+ type: "validation";
770
+ on: string;
771
+ summary?: string;
772
+ message?: string;
773
+ found?: unknown;
774
+ property?: string;
775
+ expected?: string;
776
+ };
777
+ };
778
+ };
779
+ };
780
+ };
781
+ };
744
782
  } & {
745
783
  users: {
746
784
  ":userId": {
@@ -128,6 +128,16 @@ export declare abstract class AdminUserService extends InternalUserService {
128
128
  banReason: string | null;
129
129
  banExpires: Date | null;
130
130
  }>;
131
+ static getLatestSessionByUserId(userId: string): Promise<{
132
+ id: string;
133
+ createdAt: Date;
134
+ updatedAt: Date;
135
+ expiresAt: Date;
136
+ ipAddress: string | null;
137
+ userAgent: string | null;
138
+ userId: string;
139
+ impersonatedBy: string | null;
140
+ } | null>;
131
141
  static updateProfile(userId: string, payload: UserProfileAdminUpdateSchemaType): Promise<{
132
142
  userProfile: {
133
143
  deletedAt: Date | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2wa-org/eden",
3
- "version": "0.0.83",
3
+ "version": "0.0.85",
4
4
  "description": "Elysia API type definitions for Eden Treaty",
5
5
  "files": [
6
6
  "dist"