@merkl/api 1.6.74 → 1.6.76

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 (50) hide show
  1. package/dist/src/eden/index.d.ts +226 -276
  2. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.d.ts +60 -30
  3. package/dist/src/index.d.ts +263 -335
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
  6. package/dist/src/modules/v4/campaign/campaign.controller.js.map +1 -1
  7. package/dist/src/modules/v4/campaign/campaign.formatter.js.map +1 -1
  8. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +0 -24
  9. package/dist/src/modules/v4/campaign/campaign.service.d.ts +2 -3
  10. package/dist/src/modules/v4/campaign/campaign.service.js.map +1 -1
  11. package/dist/src/modules/v4/config/config.controller.d.ts +2 -2
  12. package/dist/src/modules/v4/config/config.model.d.ts +1 -1
  13. package/dist/src/modules/v4/config/config.service.js.map +1 -1
  14. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +0 -4
  15. package/dist/src/modules/v4/programPayload/programPayload.service.js.map +1 -1
  16. package/dist/src/modules/v4/router.d.ts +263 -335
  17. package/dist/src/modules/v4/router.js.map +1 -1
  18. package/dist/src/modules/v4/{campaignBatch/campaignBatch.model.d.ts → safePayload/safePayload.model.d.ts} +0 -12
  19. package/dist/src/modules/v4/safePayload/safePayload.model.js.map +1 -0
  20. package/dist/src/modules/v4/safePayload/safePayload.service.d.ts +9 -0
  21. package/dist/src/modules/v4/safePayload/safePayload.service.js.map +1 -0
  22. package/dist/src/modules/v4/template/template.controller.d.ts +302 -0
  23. package/dist/src/modules/v4/template/template.controller.js.map +1 -0
  24. package/dist/src/modules/v4/template/template.formatter.d.ts +24 -0
  25. package/dist/src/modules/v4/template/template.formatter.js.map +1 -0
  26. package/dist/src/modules/v4/template/template.model.d.ts +11 -0
  27. package/dist/src/modules/v4/template/template.model.js.map +1 -0
  28. package/dist/src/modules/v4/template/template.repository.d.ts +36 -0
  29. package/dist/src/modules/v4/template/template.repository.js.map +1 -0
  30. package/dist/src/modules/v4/template/template.service.d.ts +108 -0
  31. package/dist/src/modules/v4/template/template.service.js.map +1 -0
  32. package/dist/src/scripts/exportOpportunities.js.map +1 -1
  33. package/dist/src/scripts/importOpportunities.js.map +1 -1
  34. package/dist/src/utils/getAPR.d.ts +835 -805
  35. package/dist/src/utils/parseDistributionType.d.ts +30 -0
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +1 -1
  38. package/dist/src/modules/v4/campaignBatch/campaignBatch.controller.d.ts +0 -361
  39. package/dist/src/modules/v4/campaignBatch/campaignBatch.controller.js.map +0 -1
  40. package/dist/src/modules/v4/campaignBatch/campaignBatch.model.js.map +0 -1
  41. package/dist/src/modules/v4/campaignBatch/campaignBatch.repository.d.ts +0 -96
  42. package/dist/src/modules/v4/campaignBatch/campaignBatch.repository.js.map +0 -1
  43. package/dist/src/modules/v4/campaignBatch/campaignBatch.service.d.ts +0 -121
  44. package/dist/src/modules/v4/campaignBatch/campaignBatch.service.js.map +0 -1
  45. package/dist/src/modules/v4/campaignGroup/campaignGroup.model.d.ts +0 -16
  46. package/dist/src/modules/v4/campaignGroup/campaignGroup.model.js.map +0 -1
  47. package/dist/src/modules/v4/campaignGroup/campaignGroup.repository.d.ts +0 -127
  48. package/dist/src/modules/v4/campaignGroup/campaignGroup.repository.js.map +0 -1
  49. package/dist/src/modules/v4/campaignGroup/campaignGroup.service.d.ts +0 -127
  50. package/dist/src/modules/v4/campaignGroup/campaignGroup.service.js.map +0 -1
@@ -1331,279 +1331,6 @@ declare const eden: {
1331
1331
  };
1332
1332
  };
1333
1333
  };
1334
- "campaign-batch": ((params: {
1335
- id: string | number;
1336
- }) => {
1337
- get: (options?: {
1338
- fetch?: RequestInit | undefined;
1339
- headers?: Record<string, unknown> | undefined;
1340
- query?: Record<string, unknown> | undefined;
1341
- } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1342
- 200: {
1343
- TemplateCampaigns: {
1344
- campaigns: {
1345
- id: string;
1346
- computeChainId: number;
1347
- distributionChainId: number;
1348
- campaignId: string;
1349
- type: string;
1350
- distributionType: import("@package/databases").DistributionType;
1351
- subType: number | null;
1352
- rewardTokenId: string;
1353
- amount: string;
1354
- opportunityId: string;
1355
- startTimestamp: bigint;
1356
- endTimestamp: bigint;
1357
- params: import("@prisma/client/runtime/client").JsonValue;
1358
- description: string | null;
1359
- pauseCompute: string | null;
1360
- dailyRewards: number;
1361
- apr: number;
1362
- creatorAddress: string;
1363
- manualOverrides: import("@package/databases").CampaignManualOverride[];
1364
- createdAt: Date;
1365
- rootCampaignId: string | null;
1366
- parentCampaignId: string | null;
1367
- }[];
1368
- } & {
1369
- id: string;
1370
- slug: string | null;
1371
- };
1372
- } & {
1373
- id: string;
1374
- slug: string | null;
1375
- groupId: string;
1376
- creatorId: string;
1377
- };
1378
- 422: {
1379
- type: "validation";
1380
- on: string;
1381
- summary?: string | undefined;
1382
- message?: string | undefined;
1383
- found?: unknown;
1384
- property?: string | undefined;
1385
- expected?: string | undefined;
1386
- };
1387
- }>>;
1388
- patch: (body: {
1389
- slug?: string | undefined;
1390
- campaignsToAdd?: string[] | undefined;
1391
- campaignsToRemove?: string[] | undefined;
1392
- }, options: {
1393
- fetch?: RequestInit | undefined;
1394
- headers: {
1395
- authorization: string;
1396
- };
1397
- query?: Record<string, unknown> | undefined;
1398
- }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1399
- 200: {
1400
- TemplateCampaigns: {
1401
- campaigns: {
1402
- id: string;
1403
- computeChainId: number;
1404
- distributionChainId: number;
1405
- campaignId: string;
1406
- type: string;
1407
- distributionType: import("@package/databases").DistributionType;
1408
- subType: number | null;
1409
- rewardTokenId: string;
1410
- amount: string;
1411
- opportunityId: string;
1412
- startTimestamp: bigint;
1413
- endTimestamp: bigint;
1414
- params: import("@prisma/client/runtime/client").JsonValue;
1415
- description: string | null;
1416
- pauseCompute: string | null;
1417
- dailyRewards: number;
1418
- apr: number;
1419
- creatorAddress: string;
1420
- manualOverrides: import("@package/databases").CampaignManualOverride[];
1421
- createdAt: Date;
1422
- rootCampaignId: string | null;
1423
- parentCampaignId: string | null;
1424
- }[];
1425
- } & {
1426
- id: string;
1427
- slug: string | null;
1428
- };
1429
- } & {
1430
- id: string;
1431
- slug: string | null;
1432
- groupId: string;
1433
- creatorId: string;
1434
- };
1435
- 422: {
1436
- type: "validation";
1437
- on: string;
1438
- summary?: string | undefined;
1439
- message?: string | undefined;
1440
- found?: unknown;
1441
- property?: string | undefined;
1442
- expected?: string | undefined;
1443
- };
1444
- }>>;
1445
- delete: (body: unknown, options: {
1446
- fetch?: RequestInit | undefined;
1447
- headers: {
1448
- authorization: string;
1449
- };
1450
- query?: Record<string, unknown> | undefined;
1451
- }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1452
- 200: {
1453
- id: string;
1454
- slug: string | null;
1455
- groupId: string;
1456
- creatorId: string;
1457
- };
1458
- 422: {
1459
- type: "validation";
1460
- on: string;
1461
- summary?: string | undefined;
1462
- message?: string | undefined;
1463
- found?: unknown;
1464
- property?: string | undefined;
1465
- expected?: string | undefined;
1466
- };
1467
- }>>;
1468
- "generate-payload": {
1469
- post: (body: {
1470
- creatorAddress: string;
1471
- rewardToken: string;
1472
- distributionChainId: number;
1473
- startTimestamp: number;
1474
- endTimestamp: number;
1475
- campaignsParams: {
1476
- [x: string]: {
1477
- amount: string;
1478
- }[];
1479
- };
1480
- }, options?: {
1481
- fetch?: RequestInit | undefined;
1482
- headers?: Record<string, unknown> | undefined;
1483
- query?: Record<string, unknown> | undefined;
1484
- } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1485
- 200: import("../modules/v4/campaignBatch/campaignBatch.model").SafePayload | null;
1486
- 422: {
1487
- type: "validation";
1488
- on: string;
1489
- summary?: string | undefined;
1490
- message?: string | undefined;
1491
- found?: unknown;
1492
- property?: string | undefined;
1493
- expected?: string | undefined;
1494
- };
1495
- }>>;
1496
- };
1497
- model: {
1498
- get: (options?: {
1499
- fetch?: RequestInit | undefined;
1500
- headers?: Record<string, unknown> | undefined;
1501
- query?: Record<string, unknown> | undefined;
1502
- } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1503
- 200: {
1504
- creatorAddress: string;
1505
- rewardToken: string;
1506
- distributionChainId: number;
1507
- startTimestamp: number;
1508
- endTimestamp: number;
1509
- campaignsParams: {
1510
- [x: string]: {
1511
- amount: string;
1512
- }[];
1513
- };
1514
- };
1515
- 422: {
1516
- type: "validation";
1517
- on: string;
1518
- summary?: string | undefined;
1519
- message?: string | undefined;
1520
- found?: unknown;
1521
- property?: string | undefined;
1522
- expected?: string | undefined;
1523
- };
1524
- }>>;
1525
- };
1526
- "simulate-payload": {
1527
- post: (body: {
1528
- creatorAddress: string;
1529
- rewardToken: string;
1530
- distributionChainId: number;
1531
- startTimestamp: number;
1532
- endTimestamp: number;
1533
- campaignsParams: {
1534
- [x: string]: {
1535
- amount: string;
1536
- }[];
1537
- };
1538
- }, options?: {
1539
- fetch?: RequestInit | undefined;
1540
- headers?: Record<string, unknown> | undefined;
1541
- query?: Record<string, unknown> | undefined;
1542
- } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1543
- 200: unknown[];
1544
- 422: {
1545
- type: "validation";
1546
- on: string;
1547
- summary?: string | undefined;
1548
- message?: string | undefined;
1549
- found?: unknown;
1550
- property?: string | undefined;
1551
- expected?: string | undefined;
1552
- };
1553
- }>>;
1554
- };
1555
- }) & {
1556
- get: (options: {
1557
- fetch?: RequestInit | undefined;
1558
- headers?: Record<string, unknown> | undefined;
1559
- query: {
1560
- creatorId: string;
1561
- };
1562
- }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1563
- 200: {
1564
- id: string;
1565
- slug: string | null;
1566
- groupId: string;
1567
- creatorId: string;
1568
- }[];
1569
- 422: {
1570
- type: "validation";
1571
- on: string;
1572
- summary?: string | undefined;
1573
- message?: string | undefined;
1574
- found?: unknown;
1575
- property?: string | undefined;
1576
- expected?: string | undefined;
1577
- };
1578
- }>>;
1579
- post: (body: {
1580
- slug?: string | undefined;
1581
- templateCampaigns: string[];
1582
- creatorId: string;
1583
- }, options: {
1584
- fetch?: RequestInit | undefined;
1585
- headers: {
1586
- authorization: string;
1587
- };
1588
- query?: Record<string, unknown> | undefined;
1589
- }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1590
- 200: {
1591
- id: string;
1592
- slug: string | null;
1593
- groupId: string;
1594
- creatorId: string;
1595
- };
1596
- 422: {
1597
- type: "validation";
1598
- on: string;
1599
- summary?: string | undefined;
1600
- message?: string | undefined;
1601
- found?: unknown;
1602
- property?: string | undefined;
1603
- expected?: string | undefined;
1604
- };
1605
- }>>;
1606
- };
1607
1334
  "campaign-status": ((params: {
1608
1335
  campaignId: string | number;
1609
1336
  }) => {
@@ -5172,7 +4899,7 @@ declare const eden: {
5172
4899
  headers?: Record<string, unknown> | undefined;
5173
4900
  query?: Record<string, unknown> | undefined;
5174
4901
  } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
5175
- 200: import("../modules/v4/campaignBatch/campaignBatch.model").SafePayload | null;
4902
+ 200: import("../modules/v4/safePayload/safePayload.model").SafePayload | null;
5176
4903
  422: {
5177
4904
  type: "validation";
5178
4905
  on: string;
@@ -7209,7 +6936,7 @@ declare const eden: {
7209
6936
  extend?: boolean | undefined;
7210
6937
  };
7211
6938
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
7212
- 200: import("../modules/v4/campaignBatch/campaignBatch.model").SafePayload | null;
6939
+ 200: import("../modules/v4/safePayload/safePayload.model").SafePayload | null;
7213
6940
  422: {
7214
6941
  type: "validation";
7215
6942
  on: string;
@@ -7230,7 +6957,7 @@ declare const eden: {
7230
6957
  extend?: boolean | undefined;
7231
6958
  };
7232
6959
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
7233
- 200: import("../modules/v4/campaignBatch/campaignBatch.model").SafePayload | null;
6960
+ 200: import("../modules/v4/safePayload/safePayload.model").SafePayload | null;
7234
6961
  422: {
7235
6962
  type: "validation";
7236
6963
  on: string;
@@ -13759,6 +13486,229 @@ declare const eden: {
13759
13486
  }>>;
13760
13487
  }) & {};
13761
13488
  };
13489
+ templates: ((params: {
13490
+ id: string | number;
13491
+ }) => {
13492
+ get: (options?: {
13493
+ fetch?: RequestInit | undefined;
13494
+ headers?: Record<string, unknown> | undefined;
13495
+ query?: Record<string, unknown> | undefined;
13496
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13497
+ 200: {
13498
+ id: string;
13499
+ name: string;
13500
+ description: string;
13501
+ config: any;
13502
+ toFill: string[];
13503
+ protocolId?: string | undefined;
13504
+ protocol?: {
13505
+ id: string;
13506
+ name: string;
13507
+ icon: string;
13508
+ tags: string[];
13509
+ description: string;
13510
+ url: string;
13511
+ dailyRewards?: number | undefined;
13512
+ numberOfLiveCampaigns?: number | undefined;
13513
+ opportunityLiveTags?: string[] | undefined;
13514
+ banner: string | null;
13515
+ opportunityBannerLight: string | null;
13516
+ opportunityBannerDark: string | null;
13517
+ } | undefined;
13518
+ } | null;
13519
+ 422: {
13520
+ type: "validation";
13521
+ on: string;
13522
+ summary?: string | undefined;
13523
+ message?: string | undefined;
13524
+ found?: unknown;
13525
+ property?: string | undefined;
13526
+ expected?: string | undefined;
13527
+ };
13528
+ }>>;
13529
+ put: (body: {
13530
+ id: string;
13531
+ name?: string | undefined;
13532
+ description?: string | undefined;
13533
+ config?: any;
13534
+ toFill?: string[] | undefined;
13535
+ protocolId?: string | undefined;
13536
+ }, options: {
13537
+ fetch?: RequestInit | undefined;
13538
+ headers: {
13539
+ authorization: string;
13540
+ };
13541
+ query?: Record<string, unknown> | undefined;
13542
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13543
+ 200: {
13544
+ id: string;
13545
+ name: string;
13546
+ description: string;
13547
+ config: any;
13548
+ toFill: string[];
13549
+ protocolId?: string | undefined;
13550
+ protocol?: {
13551
+ id: string;
13552
+ name: string;
13553
+ icon: string;
13554
+ tags: string[];
13555
+ description: string;
13556
+ url: string;
13557
+ dailyRewards?: number | undefined;
13558
+ numberOfLiveCampaigns?: number | undefined;
13559
+ opportunityLiveTags?: string[] | undefined;
13560
+ banner: string | null;
13561
+ opportunityBannerLight: string | null;
13562
+ opportunityBannerDark: string | null;
13563
+ } | undefined;
13564
+ };
13565
+ 422: {
13566
+ type: "validation";
13567
+ on: string;
13568
+ summary?: string | undefined;
13569
+ message?: string | undefined;
13570
+ found?: unknown;
13571
+ property?: string | undefined;
13572
+ expected?: string | undefined;
13573
+ };
13574
+ }>>;
13575
+ delete: (body: unknown, options: {
13576
+ fetch?: RequestInit | undefined;
13577
+ headers: {
13578
+ authorization: string;
13579
+ };
13580
+ query?: Record<string, unknown> | undefined;
13581
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13582
+ 200: {
13583
+ id: string;
13584
+ name: string;
13585
+ description: string;
13586
+ config: import("@prisma/client/runtime/client").JsonValue;
13587
+ toFill: string[];
13588
+ protocolId: string | null;
13589
+ };
13590
+ 422: {
13591
+ type: "validation";
13592
+ on: string;
13593
+ summary?: string | undefined;
13594
+ message?: string | undefined;
13595
+ found?: unknown;
13596
+ property?: string | undefined;
13597
+ expected?: string | undefined;
13598
+ };
13599
+ }>>;
13600
+ }) & {
13601
+ get: (options: {
13602
+ fetch?: RequestInit | undefined;
13603
+ headers?: Record<string, unknown> | undefined;
13604
+ query: {
13605
+ page?: number | undefined;
13606
+ items?: number | undefined;
13607
+ protocolId?: string | undefined;
13608
+ search?: string | undefined;
13609
+ };
13610
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13611
+ 200: {
13612
+ id: string;
13613
+ name: string;
13614
+ description: string;
13615
+ config: any;
13616
+ toFill: string[];
13617
+ protocolId?: string | undefined;
13618
+ protocol?: {
13619
+ id: string;
13620
+ name: string;
13621
+ icon: string;
13622
+ tags: string[];
13623
+ description: string;
13624
+ url: string;
13625
+ dailyRewards?: number | undefined;
13626
+ numberOfLiveCampaigns?: number | undefined;
13627
+ opportunityLiveTags?: string[] | undefined;
13628
+ banner: string | null;
13629
+ opportunityBannerLight: string | null;
13630
+ opportunityBannerDark: string | null;
13631
+ } | undefined;
13632
+ }[];
13633
+ 422: {
13634
+ type: "validation";
13635
+ on: string;
13636
+ summary?: string | undefined;
13637
+ message?: string | undefined;
13638
+ found?: unknown;
13639
+ property?: string | undefined;
13640
+ expected?: string | undefined;
13641
+ };
13642
+ }>>;
13643
+ post: (body: {
13644
+ name: string;
13645
+ description: string;
13646
+ config: any;
13647
+ toFill: string[];
13648
+ protocolId?: string | undefined;
13649
+ }, options: {
13650
+ fetch?: RequestInit | undefined;
13651
+ headers: {
13652
+ authorization: string;
13653
+ };
13654
+ query?: Record<string, unknown> | undefined;
13655
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13656
+ 200: {
13657
+ id: string;
13658
+ name: string;
13659
+ description: string;
13660
+ config: any;
13661
+ toFill: string[];
13662
+ protocolId?: string | undefined;
13663
+ protocol?: {
13664
+ id: string;
13665
+ name: string;
13666
+ icon: string;
13667
+ tags: string[];
13668
+ description: string;
13669
+ url: string;
13670
+ dailyRewards?: number | undefined;
13671
+ numberOfLiveCampaigns?: number | undefined;
13672
+ opportunityLiveTags?: string[] | undefined;
13673
+ banner: string | null;
13674
+ opportunityBannerLight: string | null;
13675
+ opportunityBannerDark: string | null;
13676
+ } | undefined;
13677
+ };
13678
+ 422: {
13679
+ type: "validation";
13680
+ on: string;
13681
+ summary?: string | undefined;
13682
+ message?: string | undefined;
13683
+ found?: unknown;
13684
+ property?: string | undefined;
13685
+ expected?: string | undefined;
13686
+ };
13687
+ }>>;
13688
+ count: {
13689
+ get: (options: {
13690
+ fetch?: RequestInit | undefined;
13691
+ headers?: Record<string, unknown> | undefined;
13692
+ query: {
13693
+ page?: number | undefined;
13694
+ items?: number | undefined;
13695
+ protocolId?: string | undefined;
13696
+ search?: string | undefined;
13697
+ };
13698
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
13699
+ 200: number;
13700
+ 422: {
13701
+ type: "validation";
13702
+ on: string;
13703
+ summary?: string | undefined;
13704
+ message?: string | undefined;
13705
+ found?: unknown;
13706
+ property?: string | undefined;
13707
+ expected?: string | undefined;
13708
+ };
13709
+ }>>;
13710
+ };
13711
+ };
13762
13712
  tokens: ((params: {
13763
13713
  id: string | number;
13764
13714
  }) => {