@merkl/api 0.10.394 → 0.10.396

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 (42) hide show
  1. package/dist/database/api/.generated/drizzle/schema.d.ts +2806 -0
  2. package/dist/database/api/.generated/drizzle/schema.js +849 -0
  3. package/dist/database/api/.generated/drizzle/schema.ts +906 -0
  4. package/dist/database/api/.generated/edge.js +2 -2
  5. package/dist/database/api/.generated/index.js +2 -2
  6. package/dist/database/api/.generated/package.json +1 -1
  7. package/dist/database/api/.generated/schema.prisma +5 -0
  8. package/dist/src/eden/index.d.ts +314 -36
  9. package/dist/src/index.d.ts +120 -12
  10. package/dist/src/modules/v4/cache/cache.service.js +2 -0
  11. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
  12. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +10 -10
  13. package/dist/src/modules/v4/campaign/campaign.repository.js +2 -2
  14. package/dist/src/modules/v4/campaign/campaign.service.d.ts +3 -2
  15. package/dist/src/modules/v4/campaign/campaign.service.js +9 -1
  16. package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +1 -1
  17. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +3 -3
  18. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +5 -5
  19. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +72 -72
  20. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +1 -1
  21. package/dist/src/modules/v4/reward/reward.controller.d.ts +109 -1
  22. package/dist/src/modules/v4/reward/reward.controller.js +29 -21
  23. package/dist/src/modules/v4/reward/reward.model.d.ts +5 -0
  24. package/dist/src/modules/v4/reward/reward.model.js +8 -0
  25. package/dist/src/modules/v4/reward/reward.repository.d.ts +12 -8
  26. package/dist/src/modules/v4/reward/reward.repository.js +13 -16
  27. package/dist/src/modules/v4/reward/reward.service.d.ts +10 -5
  28. package/dist/src/modules/v4/router.d.ts +120 -12
  29. package/dist/src/modules/v4/status/status.controller.d.ts +6 -6
  30. package/dist/src/modules/v4/status/status.repository.d.ts +6 -6
  31. package/dist/src/modules/v4/status/status.service.d.ts +6 -6
  32. package/dist/src/modules/v4/token/token.repository.d.ts +2 -2
  33. package/dist/src/modules/v4/token/token.service.d.ts +3 -4
  34. package/dist/src/modules/v4/token/token.service.js +2 -1
  35. package/dist/src/modules/v4/user/user.model.d.ts +5 -0
  36. package/dist/src/modules/v4/user/user.model.js +4 -0
  37. package/dist/src/modules/v4/user/user.repository.d.ts +1 -1
  38. package/dist/src/modules/v4/user/user.service.d.ts +1 -1
  39. package/dist/src/utils/prisma.d.ts +16 -3
  40. package/dist/src/utils/prisma.js +2 -1
  41. package/dist/tsconfig.package.tsbuildinfo +1 -1
  42. package/package.json +4 -2
@@ -7,7 +7,7 @@ import { RewardRepository } from "./reward.repository";
7
7
  export declare abstract class RewardService {
8
8
  static hashId(root: string, recipient: string, rewardTokenId: string): string;
9
9
  static hashDailyRewardsRecordId(opportunityId: string, timestamp: bigint): string;
10
- static createManyReward(rewards: CreateManyRewardModel): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
10
+ static createManyReward(rewards: CreateManyRewardModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
11
11
  /**
12
12
  * Format the reward breakdown to conform to its resource model declaration
13
13
  * @param breakdown straight from db
@@ -153,7 +153,7 @@ export declare abstract class RewardService {
153
153
  root: string;
154
154
  proofs: string[];
155
155
  }[];
156
- static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload | undefined>;
156
+ static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult | undefined>;
157
157
  static getByRecipient(recipient: string, roots: string[], withToken?: boolean, withTestTokens?: boolean, chainFilter?: ChainId[]): Promise<({
158
158
  RewardToken: {
159
159
  symbol: string;
@@ -170,7 +170,6 @@ export declare abstract class RewardService {
170
170
  };
171
171
  Breakdown: ({
172
172
  Campaign: {
173
- campaignId: string;
174
173
  Opportunity: {
175
174
  Chain: {
176
175
  name: string;
@@ -221,6 +220,7 @@ export declare abstract class RewardService {
221
220
  apr: number;
222
221
  dailyRewards: number;
223
222
  };
223
+ campaignId: string;
224
224
  };
225
225
  } & {
226
226
  reason: string;
@@ -459,7 +459,6 @@ export declare abstract class RewardService {
459
459
  };
460
460
  Breakdown: ({
461
461
  Campaign: {
462
- campaignId: string;
463
462
  Opportunity: {
464
463
  Chain: {
465
464
  name: string;
@@ -510,6 +509,7 @@ export declare abstract class RewardService {
510
509
  apr: number;
511
510
  dailyRewards: number;
512
511
  };
512
+ campaignId: string;
513
513
  };
514
514
  } & {
515
515
  reason: string;
@@ -554,7 +554,12 @@ export declare abstract class RewardService {
554
554
  campaignId: string;
555
555
  amount: bigint;
556
556
  }>;
557
- static breakdownForToken(query: TokenIdModel): Promise<import("./reward.model").BreakdownForTokenRaw[]>;
557
+ static breakdownForToken(query: TokenIdModel): Promise<{
558
+ amount: string;
559
+ claimed: string;
560
+ pending: string;
561
+ recipient: string;
562
+ }[]>;
558
563
  static countForToken(query: TokenIdModel): Promise<{
559
564
  count: number;
560
565
  }>;
@@ -312,7 +312,6 @@ export declare const v4: Elysia<"/v4", {
312
312
  tags: string[];
313
313
  icon: string;
314
314
  } | null | undefined;
315
- depositUrl?: string | undefined;
316
315
  aprRecord?: {
317
316
  timestamp: string | bigint;
318
317
  cumulated: number;
@@ -324,6 +323,7 @@ export declare const v4: Elysia<"/v4", {
324
323
  aprRecordId: string;
325
324
  }[];
326
325
  } | undefined;
326
+ depositUrl?: string | undefined;
327
327
  tvlRecord?: {
328
328
  total: number;
329
329
  timestamp: string | bigint;
@@ -445,7 +445,6 @@ export declare const v4: Elysia<"/v4", {
445
445
  tags: string[];
446
446
  icon: string;
447
447
  } | null | undefined;
448
- depositUrl?: string | undefined;
449
448
  aprRecord?: {
450
449
  timestamp: string | bigint;
451
450
  cumulated: number;
@@ -457,6 +456,7 @@ export declare const v4: Elysia<"/v4", {
457
456
  aprRecordId: string;
458
457
  }[];
459
458
  } | undefined;
459
+ depositUrl?: string | undefined;
460
460
  tvlRecord?: {
461
461
  total: number;
462
462
  timestamp: string | bigint;
@@ -613,7 +613,6 @@ export declare const v4: Elysia<"/v4", {
613
613
  tags: string[];
614
614
  icon: string;
615
615
  } | null | undefined;
616
- depositUrl?: string | undefined;
617
616
  aprRecord?: {
618
617
  timestamp: string | bigint;
619
618
  cumulated: number;
@@ -625,6 +624,7 @@ export declare const v4: Elysia<"/v4", {
625
624
  aprRecordId: string;
626
625
  }[];
627
626
  } | undefined;
627
+ depositUrl?: string | undefined;
628
628
  tvlRecord?: {
629
629
  total: number;
630
630
  timestamp: string | bigint;
@@ -1195,10 +1195,10 @@ export declare const v4: Elysia<"/v4", {
1195
1195
  response: {
1196
1196
  200: {
1197
1197
  endTimestamp: bigint;
1198
- campaignId: string;
1199
1198
  CampaignStatus: {
1200
1199
  computedUntil: bigint;
1201
1200
  }[];
1201
+ campaignId: string;
1202
1202
  }[];
1203
1203
  422: {
1204
1204
  type: "validation";
@@ -1873,6 +1873,106 @@ export declare const v4: Elysia<"/v4", {
1873
1873
  };
1874
1874
  };
1875
1875
  };
1876
+ } & {
1877
+ campaign: {
1878
+ ":campaignId": {
1879
+ index: {
1880
+ get: {
1881
+ body: unknown;
1882
+ params: {
1883
+ campaignId: string;
1884
+ };
1885
+ query: {
1886
+ items?: number | undefined;
1887
+ page?: number | undefined;
1888
+ };
1889
+ headers: unknown;
1890
+ response: {
1891
+ 200: {
1892
+ amount: string;
1893
+ claimed: string;
1894
+ pending: string;
1895
+ recipient: string;
1896
+ }[];
1897
+ 422: {
1898
+ type: "validation";
1899
+ on: string;
1900
+ summary?: string;
1901
+ message?: string;
1902
+ found?: unknown;
1903
+ property?: string;
1904
+ expected?: string;
1905
+ };
1906
+ };
1907
+ };
1908
+ };
1909
+ };
1910
+ };
1911
+ } & {
1912
+ campaign: {
1913
+ ":campaignId": {
1914
+ total: {
1915
+ get: {
1916
+ body: unknown;
1917
+ params: {
1918
+ campaignId: string;
1919
+ };
1920
+ query: {
1921
+ items?: number | undefined;
1922
+ page?: number | undefined;
1923
+ };
1924
+ headers: unknown;
1925
+ response: {
1926
+ 200: {
1927
+ tokenId: string;
1928
+ amount: bigint;
1929
+ };
1930
+ 422: {
1931
+ type: "validation";
1932
+ on: string;
1933
+ summary?: string;
1934
+ message?: string;
1935
+ found?: unknown;
1936
+ property?: string;
1937
+ expected?: string;
1938
+ };
1939
+ };
1940
+ };
1941
+ };
1942
+ };
1943
+ };
1944
+ } & {
1945
+ campaign: {
1946
+ ":campaignId": {
1947
+ count: {
1948
+ get: {
1949
+ body: unknown;
1950
+ params: {
1951
+ campaignId: string;
1952
+ };
1953
+ query: {
1954
+ items?: number | undefined;
1955
+ page?: number | undefined;
1956
+ };
1957
+ headers: unknown;
1958
+ response: {
1959
+ 200: {
1960
+ count: number;
1961
+ };
1962
+ 422: {
1963
+ type: "validation";
1964
+ on: string;
1965
+ summary?: string;
1966
+ message?: string;
1967
+ found?: unknown;
1968
+ property?: string;
1969
+ expected?: string;
1970
+ };
1971
+ };
1972
+ };
1973
+ };
1974
+ };
1975
+ };
1876
1976
  } & {
1877
1977
  token: {
1878
1978
  index: {
@@ -1882,12 +1982,18 @@ export declare const v4: Elysia<"/v4", {
1882
1982
  query: {
1883
1983
  items?: number | undefined;
1884
1984
  page?: number | undefined;
1985
+ campaignIds?: string[] | undefined;
1885
1986
  chainId: number;
1886
1987
  address: string;
1887
1988
  };
1888
1989
  headers: unknown;
1889
1990
  response: {
1890
- 200: import("./reward").BreakdownForTokenRaw[];
1991
+ 200: {
1992
+ amount: string;
1993
+ claimed: string;
1994
+ pending: string;
1995
+ recipient: string;
1996
+ }[];
1891
1997
  422: {
1892
1998
  type: "validation";
1893
1999
  on: string;
@@ -1910,6 +2016,7 @@ export declare const v4: Elysia<"/v4", {
1910
2016
  query: {
1911
2017
  items?: number | undefined;
1912
2018
  page?: number | undefined;
2019
+ campaignIds?: string[] | undefined;
1913
2020
  chainId: number;
1914
2021
  address: string;
1915
2022
  };
@@ -1941,6 +2048,7 @@ export declare const v4: Elysia<"/v4", {
1941
2048
  query: {
1942
2049
  items?: number | undefined;
1943
2050
  page?: number | undefined;
2051
+ campaignIds?: string[] | undefined;
1944
2052
  chainId: number;
1945
2053
  address: string;
1946
2054
  };
@@ -3591,13 +3699,13 @@ export declare const v4: Elysia<"/v4", {
3591
3699
  chainId?: number | undefined;
3592
3700
  startTimestamp?: string | undefined;
3593
3701
  endTimestamp?: string | undefined;
3702
+ campaignStatus?: {} | undefined;
3594
3703
  distributionChainId?: number | undefined;
3595
3704
  campaignId?: string | undefined;
3596
3705
  rewardTokenId?: string | undefined;
3597
3706
  amount?: string | undefined;
3598
3707
  opportunityId?: string | undefined;
3599
3708
  creatorAddress?: string | undefined;
3600
- campaignStatus?: {} | undefined;
3601
3709
  rewardToken?: {} | undefined;
3602
3710
  rewardTokenAddress?: string | undefined;
3603
3711
  distributionChain?: {} | undefined;
@@ -3825,12 +3933,6 @@ export declare const v4: Elysia<"/v4", {
3825
3933
  delayFormatted: string;
3826
3934
  startTimestamp: bigint;
3827
3935
  endTimestamp: bigint;
3828
- computeChainId: number;
3829
- distributionChainId: number;
3830
- campaignId: string;
3831
- Opportunity: {
3832
- name: string;
3833
- };
3834
3936
  CampaignStatus: {
3835
3937
  error: string;
3836
3938
  details: import("database/api/.generated/runtime/library").JsonValue;
@@ -3839,6 +3941,12 @@ export declare const v4: Elysia<"/v4", {
3839
3941
  computedUntil: bigint;
3840
3942
  processingStarted: bigint;
3841
3943
  }[];
3944
+ Opportunity: {
3945
+ name: string;
3946
+ };
3947
+ computeChainId: number;
3948
+ distributionChainId: number;
3949
+ campaignId: string;
3842
3950
  }[];
3843
3951
  422: {
3844
3952
  type: "validation";
@@ -167,12 +167,6 @@ export declare const StatusController: Elysia<"/campaign-status", {
167
167
  delayFormatted: string;
168
168
  startTimestamp: bigint;
169
169
  endTimestamp: bigint;
170
- computeChainId: number;
171
- distributionChainId: number;
172
- campaignId: string;
173
- Opportunity: {
174
- name: string;
175
- };
176
170
  CampaignStatus: {
177
171
  error: string;
178
172
  details: import("database/api/.generated/runtime/library").JsonValue;
@@ -181,6 +175,12 @@ export declare const StatusController: Elysia<"/campaign-status", {
181
175
  computedUntil: bigint;
182
176
  processingStarted: bigint;
183
177
  }[];
178
+ Opportunity: {
179
+ name: string;
180
+ };
181
+ computeChainId: number;
182
+ distributionChainId: number;
183
+ campaignId: string;
184
184
  }[];
185
185
  422: {
186
186
  type: "validation";
@@ -70,12 +70,6 @@ export declare class StatusRepository {
70
70
  static findManyDelay(query: DelayModel): Promise<{
71
71
  startTimestamp: bigint;
72
72
  endTimestamp: bigint;
73
- computeChainId: number;
74
- distributionChainId: number;
75
- campaignId: string;
76
- Opportunity: {
77
- name: string;
78
- };
79
73
  CampaignStatus: {
80
74
  error: string;
81
75
  details: Prisma.JsonValue;
@@ -84,5 +78,11 @@ export declare class StatusRepository {
84
78
  computedUntil: bigint;
85
79
  processingStarted: bigint;
86
80
  }[];
81
+ Opportunity: {
82
+ name: string;
83
+ };
84
+ computeChainId: number;
85
+ distributionChainId: number;
86
+ campaignId: string;
87
87
  }[]>;
88
88
  }
@@ -40,12 +40,6 @@ export declare class StatusService {
40
40
  delayFormatted: string;
41
41
  startTimestamp: bigint;
42
42
  endTimestamp: bigint;
43
- computeChainId: number;
44
- distributionChainId: number;
45
- campaignId: string;
46
- Opportunity: {
47
- name: string;
48
- };
49
43
  CampaignStatus: {
50
44
  error: string;
51
45
  details: import("database/api/.generated/runtime/library").JsonValue;
@@ -54,5 +48,11 @@ export declare class StatusService {
54
48
  computedUntil: bigint;
55
49
  processingStarted: bigint;
56
50
  }[];
51
+ Opportunity: {
52
+ name: string;
53
+ };
54
+ computeChainId: number;
55
+ distributionChainId: number;
56
+ campaignId: string;
57
57
  }[]>;
58
58
  }
@@ -67,14 +67,14 @@ export declare abstract class TokenRepository {
67
67
  * @param price value
68
68
  * @param excludeAddresses to not update even if symbol match
69
69
  */
70
- static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
70
+ static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
71
71
  /**
72
72
  * Updates price of tokens that share the same address
73
73
  * @param address
74
74
  * @param price value
75
75
  * @param chainId
76
76
  */
77
- static updateAddressPrices(address: string, price: number, chainId?: number): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
77
+ static updateAddressPrices(address: string, price: number, chainId?: number): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
78
78
  static findChains(): Promise<Record<string, ChainId>>;
79
79
  /**
80
80
  * create a token on database
@@ -1,6 +1,5 @@
1
1
  import type { CreateTokenModel, GetTokenQueryModel, Token, TokenModel, TokenUnique, UpdateTokenModel } from "./";
2
2
  import type { Pricer } from "../../../utils/pricer";
3
- import { Prisma } from "../../../../database/api/.generated";
4
3
  import { type ChainId } from "@sdk";
5
4
  import { TokenRepository } from "./token.repository";
6
5
  export declare abstract class TokenService {
@@ -72,14 +71,14 @@ export declare abstract class TokenService {
72
71
  * @param price value
73
72
  * @param excludeAddresses to not update symbols that defined using addresses
74
73
  */
75
- static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<Prisma.BatchPayload>;
74
+ static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
76
75
  /**
77
76
  * Updates price of tokens that share the same address
78
77
  * @param address
79
78
  * @param price value
80
79
  * @param chainId
81
80
  */
82
- static updateAddressPrices(address: string, price: number, chainId?: number): Promise<Prisma.BatchPayload>;
81
+ static updateAddressPrices(address: string, price: number, chainId?: number): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
83
82
  /**
84
83
  * Updates price of tokens that share the same symbol
85
84
  * @param symbol
@@ -133,7 +132,7 @@ export declare abstract class TokenService {
133
132
  * @param chainId
134
133
  * @param address
135
134
  */
136
- static findUniqueOrThrow(token: TokenUnique): Promise<{
135
+ static findUniqueOrThrow(token: TokenUnique | string): Promise<{
137
136
  symbol: string;
138
137
  name: string | null;
139
138
  id: string;
@@ -225,7 +225,8 @@ export class TokenService {
225
225
  * @param address
226
226
  */
227
227
  static async findUniqueOrThrow(token) {
228
- return await TokenRepository.findUniqueOrThrow(TokenService.hashId({ chainId: token.chainId, address: token.address }));
228
+ const id = typeof token === "string" ? token : TokenService.hashId(token);
229
+ return await TokenRepository.findUniqueOrThrow(id);
229
230
  }
230
231
  /**
231
232
  * Get the list of tokens satisfying the query
@@ -5,6 +5,7 @@ import type { Resource } from "../prisma";
5
5
  * @see {@link Resource}
6
6
  */
7
7
  export type User = Resource<"User">;
8
+ export type Creator = Resource<"Creator">;
8
9
  export declare const UserRewardRouteDto: import("@sinclair/typebox").TObject<{
9
10
  chainId: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>, number[]>;
10
11
  reloadChainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
@@ -50,6 +51,10 @@ export declare const UserDto: import("@sinclair/typebox").TObject<{
50
51
  address: import("@sinclair/typebox").TString;
51
52
  tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
52
53
  }>;
54
+ export declare const CreatorDto: import("@sinclair/typebox").TObject<{
55
+ address: import("@sinclair/typebox").TString;
56
+ tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
57
+ }>;
53
58
  export declare const GetManyUserQuery: import("@sinclair/typebox").TObject<{
54
59
  address: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
55
60
  tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
@@ -52,6 +52,10 @@ export const UserDto = t.Object({
52
52
  address: t.String(),
53
53
  tags: t.Array(t.String()),
54
54
  });
55
+ export const CreatorDto = t.Object({
56
+ address: t.String(),
57
+ tags: t.Array(t.String()),
58
+ });
55
59
  export const GetManyUserQuery = t.Object({
56
60
  address: t.Optional(t.String()),
57
61
  tags: t.Optional(t.Array(t.String())),
@@ -20,7 +20,7 @@ export declare abstract class UserRepository {
20
20
  address: string;
21
21
  creatorId: string | null;
22
22
  }>;
23
- static createMany(users: UserModel[]): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
23
+ static createMany(users: UserModel[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
24
24
  static updateTags(address: string, tags: string[]): Promise<{
25
25
  tags: string[];
26
26
  address: string;
@@ -20,7 +20,7 @@ export declare abstract class UserService {
20
20
  address: string;
21
21
  creatorId: string | null;
22
22
  }>;
23
- static createMany(users: UserModel[]): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
23
+ static createMany(users: UserModel[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
24
24
  static updateTags(user: string, tags: string[]): Promise<{
25
25
  tags: string[];
26
26
  address: string;
@@ -1,12 +1,25 @@
1
- import { PrismaClient as ApiPrismaClient } from "../../database/api/.generated";
2
1
  import { PrismaClient as EnginePrismaClient } from "../../database/engine/.generated";
3
- export declare const apiDbClient: ApiPrismaClient<{
2
+ export declare const apiDbClient: import("database/api/.generated/runtime/library").DynamicClientExtensionThis<import("../../database/api/.generated").Prisma.TypeMap<import("database/api/.generated/runtime/library").InternalArgs & {
3
+ result: {};
4
+ model: {};
5
+ query: {};
6
+ client: {
7
+ $drizzle: () => import("drizzle-orm/prisma/pg").PrismaPgDatabase;
8
+ };
9
+ }, import("../../database/api/.generated").Prisma.PrismaClientOptions>, import("../../database/api/.generated").Prisma.TypeMapCb, {
10
+ result: {};
11
+ model: {};
12
+ query: {};
13
+ client: {
14
+ $drizzle: () => import("drizzle-orm/prisma/pg").PrismaPgDatabase;
15
+ };
16
+ }, {
4
17
  datasources: {
5
18
  db: {
6
19
  url: string;
7
20
  };
8
21
  };
9
- }, never, import("database/api/.generated/runtime/library").DefaultArgs>;
22
+ }>;
10
23
  export declare const engineDbClient: EnginePrismaClient<{
11
24
  datasources: {
12
25
  db: {
@@ -1,8 +1,9 @@
1
1
  import { PrismaClient as ApiPrismaClient } from "../../database/api/.generated";
2
2
  import { PrismaClient as EnginePrismaClient } from "../../database/engine/.generated";
3
+ import { drizzle } from "drizzle-orm/prisma/pg";
3
4
  export const apiDbClient = new ApiPrismaClient({
4
5
  datasources: { db: { url: `${process.env.DATABASE_API_URL}&connection_limit=250&pool_timeout=15` } },
5
- });
6
+ }).$extends(drizzle());
6
7
  export const engineDbClient = new EnginePrismaClient({
7
8
  datasources: {
8
9
  db: {