@tammsyr/admin-api-client 1.0.16 → 1.0.18

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.
@@ -597,6 +597,9 @@ export interface AgentListItemDto {
597
597
  contactPhone: string;
598
598
  address: string;
599
599
  city: string;
600
+ /** Public URL for agent logo */
601
+ logoUrl?: string | null;
602
+ cashService: "CASH_IN" | "CASH_OUT" | "BOTH";
600
603
  /** @format date-time */
601
604
  createdAt: string;
602
605
  /** @format date-time */
@@ -722,6 +725,70 @@ export interface BranchResponseDto {
722
725
  */
723
726
  updatedAt: string;
724
727
  }
728
+ export interface AdminAccountResponseDto {
729
+ /**
730
+ * Account ID (UUID)
731
+ * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
732
+ */
733
+ id: string;
734
+ /**
735
+ * Human-readable 16-digit account number. Only set for main accounts.
736
+ * @example "1076012345678903"
737
+ */
738
+ accountNumber?: string;
739
+ /**
740
+ * Owning entity UUID: person (personal/business), merchant (merchant), or agent (agent). Absent for treasury.
741
+ * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
742
+ */
743
+ ownerId?: string;
744
+ /**
745
+ * Account type
746
+ * @example "personal"
747
+ */
748
+ type: "personal" | "business" | "merchant" | "agent" | "treasury";
749
+ /**
750
+ * ISO 4217 currency code
751
+ * @example "SYP"
752
+ */
753
+ currency: string;
754
+ /**
755
+ * Total ledger balance (available + reserved)
756
+ * @example "1000.00"
757
+ */
758
+ balance: string;
759
+ /**
760
+ * Funds available for new transactions
761
+ * @example "800.00"
762
+ */
763
+ availableBalance: string;
764
+ /**
765
+ * Funds reserved for pending transactions
766
+ * @example "200.00"
767
+ */
768
+ reservedBalance: string;
769
+ /**
770
+ * Account status
771
+ * @example "active"
772
+ */
773
+ status: "active" | "frozen" | "closed";
774
+ /**
775
+ * Account display name
776
+ * @example "Primary Wallet"
777
+ */
778
+ name?: string;
779
+ /**
780
+ * Parent account ID for pots
781
+ * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
782
+ */
783
+ parentAccountId?: string;
784
+ /**
785
+ * Account creation timestamp (ISO 8601)
786
+ * @example "2024-01-15T12:00:00Z"
787
+ */
788
+ createdAt: string;
789
+ /** QR payload for receiving (main accounts only) */
790
+ qrPayload?: string;
791
+ }
725
792
  export interface AgentResponseDto {
726
793
  /** @format uuid */
727
794
  id: string;
@@ -734,6 +801,9 @@ export interface AgentResponseDto {
734
801
  contactPhone: string;
735
802
  address: string;
736
803
  city: string;
804
+ /** Public URL for agent logo */
805
+ logoUrl?: string | null;
806
+ cashService: "CASH_IN" | "CASH_OUT" | "BOTH";
737
807
  /** @format date-time */
738
808
  createdAt: string;
739
809
  /** @format date-time */
@@ -743,6 +813,21 @@ export interface AgentResponseDto {
743
813
  limits?: AgentLimitResponseDto[];
744
814
  commissions?: AgentCommissionResponseDto[];
745
815
  branches?: BranchResponseDto[];
816
+ /** Agent main wallets (admin GET only; unified ownerId + type per account) */
817
+ accounts?: AdminAccountResponseDto[];
818
+ }
819
+ export interface CreateAgentWalletDto {
820
+ /**
821
+ * ISO 4217 currency code for the agent main wallet
822
+ * @example "SYP"
823
+ */
824
+ currency: string;
825
+ /**
826
+ * Display name; defaults to a label including the currency code
827
+ * @maxLength 100
828
+ * @example "Main SYP wallet"
829
+ */
830
+ name?: string;
746
831
  }
747
832
  export interface CreateAgentDto {
748
833
  /**
@@ -778,6 +863,16 @@ export interface CreateAgentDto {
778
863
  * @example "Dubai"
779
864
  */
780
865
  city: string;
866
+ /**
867
+ * Public URL for agent logo
868
+ * @example "https://cdn.example.com/agents/acme.png"
869
+ */
870
+ logoUrl?: string;
871
+ /**
872
+ * Cash-in only, cash-out only, or both
873
+ * @default "BOTH"
874
+ */
875
+ cashService?: "CASH_IN" | "CASH_OUT" | "BOTH";
781
876
  }
782
877
  export interface CreateAgentResponseDto {
783
878
  /**
@@ -827,6 +922,16 @@ export interface UpdateAgentDto {
827
922
  * @example "Dubai"
828
923
  */
829
924
  city?: string;
925
+ /**
926
+ * Public URL for agent logo
927
+ * @example "https://cdn.example.com/agents/acme.png"
928
+ */
929
+ logoUrl?: string;
930
+ /**
931
+ * Cash-in only, cash-out only, or both
932
+ * @default "BOTH"
933
+ */
934
+ cashService?: "CASH_IN" | "CASH_OUT" | "BOTH";
830
935
  }
831
936
  export interface UpdateAgentResponseDto {
832
937
  /**
@@ -1157,7 +1262,7 @@ export interface AmlRuleDto {
1157
1262
  * Account types this rule applies to; empty/omitted = all types
1158
1263
  * @example ["personal","business"]
1159
1264
  */
1160
- accountTypes?: ("personal" | "business" | "merchant" | "agent")[];
1265
+ accountTypes?: ("personal" | "business" | "merchant" | "agent" | "treasury")[];
1161
1266
  /**
1162
1267
  * Rule parameters as JSON string
1163
1268
  * @example "{"maxAmount": 10000, "currency": "SYP"}"
@@ -1232,7 +1337,7 @@ export interface CreateAmlRuleDto {
1232
1337
  * Account types this rule applies to; empty/omitted = all types
1233
1338
  * @example ["personal","business"]
1234
1339
  */
1235
- accountTypes?: ("personal" | "business" | "merchant" | "agent")[];
1340
+ accountTypes?: ("personal" | "business" | "merchant" | "agent" | "treasury")[];
1236
1341
  /**
1237
1342
  * Whether the rule is active
1238
1343
  * @default true
@@ -1292,7 +1397,7 @@ export interface UpdateAmlRuleDto {
1292
1397
  * Account types this rule applies to; empty/omitted = all types
1293
1398
  * @example ["personal","business"]
1294
1399
  */
1295
- accountTypes?: ("personal" | "business" | "merchant" | "agent")[];
1400
+ accountTypes?: ("personal" | "business" | "merchant" | "agent" | "treasury")[];
1296
1401
  /**
1297
1402
  * Rule parameters as JSON string
1298
1403
  * @example "{"maxAmount": 10000, "currency": "SYP"}"
@@ -1518,7 +1623,7 @@ export interface AccountListQueryDto {
1518
1623
  * Filter by account type
1519
1624
  * @example "personal"
1520
1625
  */
1521
- type?: "personal" | "business" | "merchant" | "agent";
1626
+ type?: "personal" | "business" | "merchant" | "agent" | "treasury";
1522
1627
  /**
1523
1628
  * Filter by currency code
1524
1629
  * @example "SYP"
@@ -1530,130 +1635,30 @@ export interface AccountListQueryDto {
1530
1635
  */
1531
1636
  search?: string;
1532
1637
  }
1533
- export interface AccountResponseDto {
1534
- /**
1535
- * Account ID (UUID)
1536
- * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1537
- */
1538
- id: string;
1539
- /**
1540
- * Human-readable 16-digit account number (encodes type + currency). Only set for main accounts.
1541
- * @example "1076012345678903"
1542
- */
1543
- accountNumber?: string;
1544
- /**
1545
- * Person ID (UUID)
1546
- * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1547
- */
1548
- personId: string;
1549
- /**
1550
- * Account type
1551
- * @example "personal"
1552
- */
1553
- type: "personal" | "business" | "merchant" | "agent";
1554
- /**
1555
- * ISO 4217 currency code (from supported currencies in the system)
1556
- * @example "SYP"
1557
- */
1558
- currency: string;
1559
- /**
1560
- * Total ledger balance (available + reserved)
1561
- * @example "1000.00"
1562
- */
1563
- balance: string;
1564
- /**
1565
- * Funds available for new transactions
1566
- * @example "800.00"
1567
- */
1568
- availableBalance: string;
1569
- /**
1570
- * Funds reserved for pending transactions
1571
- * @example "200.00"
1572
- */
1573
- reservedBalance: string;
1574
- /**
1575
- * Account status
1576
- * @example "active"
1577
- */
1578
- status: "active" | "frozen" | "closed";
1579
- /**
1580
- * Account name
1581
- * @example "Primary Wallet"
1582
- */
1583
- name?: string;
1584
- /**
1585
- * Parent account ID (null for Main Accounts, set for Pots)
1586
- * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1587
- */
1588
- parentAccountId?: string;
1589
- /**
1590
- * Account creation timestamp (ISO format)
1591
- * @example "2024-01-15T12:00:00Z"
1592
- */
1593
- createdAt: string;
1594
- /** Base64-encoded static QR payload for receiving payments (primary accounts only) */
1595
- qrPayload?: string;
1596
- }
1597
1638
  export interface AccountListResponseDto {
1598
- /** List of accounts */
1599
- data: AccountResponseDto[];
1639
+ /** List of accounts (unified ownerId + type; no separate personId/agentId/merchantId) */
1640
+ data: AdminAccountResponseDto[];
1600
1641
  /** Pagination metadata */
1601
1642
  meta: PaginationMetaDto;
1602
1643
  }
1603
- export interface PersonAddressDto {
1604
- /**
1605
- * Country name (translatable)
1606
- * @example {"ar":"سوريا","en":"Syria"}
1607
- */
1608
- country: object;
1609
- /**
1610
- * Province name (translatable)
1611
- * @example {"ar":"دمشق","en":"Damascus"}
1612
- */
1613
- province: object;
1644
+ export interface FundAccountDto {
1614
1645
  /**
1615
- * City name (translatable)
1616
- * @example {"ar":"دمشق","en":"Damascus"}
1646
+ * Account ID (UUID) to credit
1647
+ * @example "3fa85f64-5717-4562-b3fc-2c963f66afa6"
1617
1648
  */
1618
- city?: object;
1619
- /** @example "123 Main Street" */
1620
- detailedAddress: string;
1621
- }
1622
- export interface ConnectedUserDto {
1623
- /** @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890" */
1624
- userId: string;
1625
- /** @example "+963912345678" */
1626
- phoneNumber: string;
1627
- /** @example "active" */
1628
- status: "pending_phone_verification" | "pending_kyc" | "active" | "suspended" | "blocked" | "closed";
1629
- }
1630
- export interface PersonDetailDto {
1631
- /** @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890" */
1632
- id: string;
1633
- /** @example "Qusai" */
1634
- firstName: string;
1635
- /** @example "Armoush" */
1636
- lastName: string;
1637
- /** @example "1990-05-15" */
1638
- dateOfBirth: string;
1639
- /** @example "verified" */
1640
- status: "unverified" | "pending_kyc" | "verified" | "rejected" | "suspended";
1641
- /** @example "2026-01-24T08:09:53.496Z" */
1642
- createdAt: string;
1643
- /** @example "Syrian Arab" */
1644
- nationality: string;
1649
+ accountId: string;
1645
1650
  /**
1646
- * Father name
1647
- * @example "Mohammad"
1651
+ * Amount to credit (string for precision)
1652
+ * @example "10000.00"
1648
1653
  */
1649
- fatherName: string;
1654
+ amount: string;
1650
1655
  /**
1651
- * Mother name
1652
- * @example "Fatima"
1656
+ * Currency code
1657
+ * @example "SYP"
1653
1658
  */
1654
- motherName: string;
1655
- address: PersonAddressDto;
1656
- connectedUsers: ConnectedUserDto[];
1659
+ currency: object;
1660
+ /** Reason / justification for the funding */
1661
+ reason?: string;
1657
1662
  }
1658
1663
  export interface TransactionResponseDto {
1659
1664
  /**
@@ -1762,6 +1767,61 @@ export interface TransactionResponseDto {
1762
1767
  */
1763
1768
  counterpartyMasked?: string;
1764
1769
  }
1770
+ export interface PersonAddressDto {
1771
+ /**
1772
+ * Country name (translatable)
1773
+ * @example {"ar":"سوريا","en":"Syria"}
1774
+ */
1775
+ country: object;
1776
+ /**
1777
+ * Province name (translatable)
1778
+ * @example {"ar":"دمشق","en":"Damascus"}
1779
+ */
1780
+ province: object;
1781
+ /**
1782
+ * City name (translatable)
1783
+ * @example {"ar":"دمشق","en":"Damascus"}
1784
+ */
1785
+ city?: object;
1786
+ /** @example "123 Main Street" */
1787
+ detailedAddress: string;
1788
+ }
1789
+ export interface ConnectedUserDto {
1790
+ /** @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890" */
1791
+ userId: string;
1792
+ /** @example "+963912345678" */
1793
+ phoneNumber: string;
1794
+ /** @example "active" */
1795
+ status: "pending_phone_verification" | "pending_kyc" | "active" | "suspended" | "blocked" | "closed";
1796
+ }
1797
+ export interface PersonDetailDto {
1798
+ /** @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890" */
1799
+ id: string;
1800
+ /** @example "Qusai" */
1801
+ firstName: string;
1802
+ /** @example "Armoush" */
1803
+ lastName: string;
1804
+ /** @example "1990-05-15" */
1805
+ dateOfBirth: string;
1806
+ /** @example "verified" */
1807
+ status: "unverified" | "pending_kyc" | "verified" | "rejected" | "suspended";
1808
+ /** @example "2026-01-24T08:09:53.496Z" */
1809
+ createdAt: string;
1810
+ /** @example "Syrian Arab" */
1811
+ nationality: string;
1812
+ /**
1813
+ * Father name
1814
+ * @example "Mohammad"
1815
+ */
1816
+ fatherName: string;
1817
+ /**
1818
+ * Mother name
1819
+ * @example "Fatima"
1820
+ */
1821
+ motherName: string;
1822
+ address: PersonAddressDto;
1823
+ connectedUsers: ConnectedUserDto[];
1824
+ }
1765
1825
  export interface PaginatedTransactionsDto {
1766
1826
  /** List of transactions */
1767
1827
  data: TransactionResponseDto[];
@@ -1775,22 +1835,22 @@ export interface AdminAccountDetailResponseDto {
1775
1835
  */
1776
1836
  id: string;
1777
1837
  /**
1778
- * Human-readable 16-digit account number (encodes type + currency). Only set for main accounts.
1838
+ * Human-readable 16-digit account number. Only set for main accounts.
1779
1839
  * @example "1076012345678903"
1780
1840
  */
1781
1841
  accountNumber?: string;
1782
1842
  /**
1783
- * Person ID (UUID)
1843
+ * Owning entity UUID: person (personal/business), merchant (merchant), or agent (agent). Absent for treasury.
1784
1844
  * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1785
1845
  */
1786
- personId: string;
1846
+ ownerId?: string;
1787
1847
  /**
1788
1848
  * Account type
1789
1849
  * @example "personal"
1790
1850
  */
1791
- type: "personal" | "business" | "merchant" | "agent";
1851
+ type: "personal" | "business" | "merchant" | "agent" | "treasury";
1792
1852
  /**
1793
- * ISO 4217 currency code (from supported currencies in the system)
1853
+ * ISO 4217 currency code
1794
1854
  * @example "SYP"
1795
1855
  */
1796
1856
  currency: string;
@@ -1815,23 +1875,23 @@ export interface AdminAccountDetailResponseDto {
1815
1875
  */
1816
1876
  status: "active" | "frozen" | "closed";
1817
1877
  /**
1818
- * Account name
1878
+ * Account display name
1819
1879
  * @example "Primary Wallet"
1820
1880
  */
1821
1881
  name?: string;
1822
1882
  /**
1823
- * Parent account ID (null for Main Accounts, set for Pots)
1883
+ * Parent account ID for pots
1824
1884
  * @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
1825
1885
  */
1826
1886
  parentAccountId?: string;
1827
1887
  /**
1828
- * Account creation timestamp (ISO format)
1888
+ * Account creation timestamp (ISO 8601)
1829
1889
  * @example "2024-01-15T12:00:00Z"
1830
1890
  */
1831
1891
  createdAt: string;
1832
- /** Base64-encoded static QR payload for receiving payments (primary accounts only) */
1892
+ /** QR payload for receiving (main accounts only) */
1833
1893
  qrPayload?: string;
1834
- /** Owner (person) information. Null for merchant/agent accounts. */
1894
+ /** Person KYC/owner profile when the account type is personal or business. Null for merchant, agent, or treasury. */
1835
1895
  owner?: PersonDetailDto;
1836
1896
  /** Paginated transactions for this account */
1837
1897
  transactions: PaginatedTransactionsDto;
@@ -2504,7 +2564,7 @@ export interface FindAllParams6 {
2504
2564
  */
2505
2565
  endDate?: string;
2506
2566
  }
2507
- export type FindAllData1 = ActivityLogListResponseDto;
2567
+ export type FindAllResult1 = ActivityLogListResponseDto;
2508
2568
  export interface FindAllParams8 {
2509
2569
  /**
2510
2570
  * Page number (1-based)
@@ -2527,7 +2587,7 @@ export interface FindAllParams8 {
2527
2587
  */
2528
2588
  read?: boolean;
2529
2589
  }
2530
- export type FindAllResult1 = AdminNotificationListResponseDto;
2590
+ export type FindAllOutput1 = AdminNotificationListResponseDto;
2531
2591
  export type GetUnreadCountData = any;
2532
2592
  export interface MarkAsReadParams {
2533
2593
  /** Notification ID */
@@ -2558,6 +2618,8 @@ export interface ListAgentsParams {
2558
2618
  status?: "PENDING" | "ACTIVE" | "SUSPENDED" | "TERMINATED";
2559
2619
  /** Search by name, legal name, or registration number */
2560
2620
  searchTerm?: string;
2621
+ /** Filter by cash service capability */
2622
+ cashService?: "CASH_IN" | "CASH_OUT" | "BOTH";
2561
2623
  }
2562
2624
  export type ListAgentsData = AgentListResponseDto;
2563
2625
  export type CreateAgentData = CreateAgentResponseDto;
@@ -2571,6 +2633,11 @@ export interface UpdateAgentParams {
2571
2633
  id: string;
2572
2634
  }
2573
2635
  export type UpdateAgentData = UpdateAgentResponseDto;
2636
+ export interface CreateAgentWalletParams {
2637
+ /** Agent ID (UUID) */
2638
+ id: string;
2639
+ }
2640
+ export type CreateAgentWalletData = AdminAccountResponseDto;
2574
2641
  export interface UpsertAgentBranchesParams {
2575
2642
  /** Agent ID */
2576
2643
  id: string;
@@ -2586,6 +2653,21 @@ export interface UpsertAgentCommissionsParams {
2586
2653
  id: string;
2587
2654
  }
2588
2655
  export type UpsertAgentCommissionsData = AgentCommissionsResponseDto;
2656
+ export interface DeleteBranchParams {
2657
+ /** Branch ID (UUID) */
2658
+ branchId: string;
2659
+ }
2660
+ export type DeleteBranchData = MessageResponseDto;
2661
+ export interface DeleteLimitParams {
2662
+ /** Limit ID (UUID) */
2663
+ limitId: string;
2664
+ }
2665
+ export type DeleteLimitData = MessageResponseDto;
2666
+ export interface DeleteCommissionParams {
2667
+ /** Commission ID (UUID) */
2668
+ commissionId: string;
2669
+ }
2670
+ export type DeleteCommissionData = MessageResponseDto;
2589
2671
  export type GetStatisticsResult = KycStatisticsResponseDto;
2590
2672
  export interface FindAllParams10 {
2591
2673
  /**
@@ -2726,7 +2808,7 @@ export interface ListAccountsParams {
2726
2808
  * Filter by account type
2727
2809
  * @example "personal"
2728
2810
  */
2729
- type?: "personal" | "business" | "merchant" | "agent";
2811
+ type?: "personal" | "business" | "merchant" | "agent" | "treasury";
2730
2812
  /**
2731
2813
  * Filter by currency code
2732
2814
  * @example "SYP"
@@ -2739,6 +2821,7 @@ export interface ListAccountsParams {
2739
2821
  search?: string;
2740
2822
  }
2741
2823
  export type ListAccountsData = AccountListResponseDto;
2824
+ export type FundAccountData = TransactionResponseDto;
2742
2825
  export interface GetAccountDetailParams {
2743
2826
  /** Transaction history page number (default: 1) */
2744
2827
  txPage?: number;
@@ -2752,7 +2835,7 @@ export interface UpdateAccountStatusParams {
2752
2835
  /** Account ID (UUID) */
2753
2836
  id: string;
2754
2837
  }
2755
- export type UpdateAccountStatusData = AccountResponseDto;
2838
+ export type UpdateAccountStatusData = AdminAccountResponseDto;
2756
2839
  export interface GetStatisticsParams3 {
2757
2840
  /** Start date filter (ISO date, e.g. 2025-01-01) */
2758
2841
  startDate?: string;
@@ -2840,7 +2923,7 @@ export interface CalculateFeeParams {
2840
2923
  amount: string;
2841
2924
  }
2842
2925
  export type CalculateFeeData = CalculateFeeResponseDto;
2843
- export type GetStatisticsData2 = UserStatisticsResponseDto;
2926
+ export type GetStatisticsResult1 = UserStatisticsResponseDto;
2844
2927
  export interface FindAllParams12 {
2845
2928
  /**
2846
2929
  * Page number (1-based)