@techzunction/sdk 0.8.0 → 0.9.1
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.
- package/dist/index.cjs +167 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +362 -2
- package/dist/index.d.ts +362 -2
- package/dist/index.js +167 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1760,6 +1760,236 @@ type PaymentStatus = 'captured' | 'failed' | 'refunded' | 'partially_refunded';
|
|
|
1760
1760
|
type RefundStatus = 'pending' | 'processed' | 'failed';
|
|
1761
1761
|
type InvoiceType = 'subscription' | 'usage' | 'manual';
|
|
1762
1762
|
type InvoiceStatus = 'draft' | 'sent' | 'paid' | 'overdue' | 'cancelled';
|
|
1763
|
+
type KycStatus = 'pending' | 'submitted' | 'verified' | 'rejected' | 'expired';
|
|
1764
|
+
type KycDocumentType = 'aadhaar' | 'pan' | 'passport' | 'voter_id' | 'driving_license';
|
|
1765
|
+
type BankAccountType = 'savings' | 'current';
|
|
1766
|
+
type BankAccountStatus = 'active' | 'frozen' | 'closed' | 'dormant';
|
|
1767
|
+
type TransferMode = 'neft' | 'rtgs' | 'imps' | 'upi' | 'swift' | 'internal';
|
|
1768
|
+
type TransferStatus = 'initiated' | 'processing' | 'completed' | 'failed' | 'reversed';
|
|
1769
|
+
type CardType = 'debit' | 'credit';
|
|
1770
|
+
type CardVariant = 'virtual' | 'physical';
|
|
1771
|
+
type CardStatus = 'active' | 'blocked' | 'expired' | 'cancelled';
|
|
1772
|
+
type ScheduledTransferFrequency = 'once' | 'daily' | 'weekly' | 'monthly';
|
|
1773
|
+
type ScheduledTransferStatus = 'active' | 'paused' | 'completed' | 'cancelled';
|
|
1774
|
+
type BillPaymentStatus = 'pending' | 'paid' | 'failed';
|
|
1775
|
+
type FixedDepositStatus = 'active' | 'matured' | 'closed_premature' | 'renewed';
|
|
1776
|
+
interface KycVerification {
|
|
1777
|
+
id: string;
|
|
1778
|
+
documentType: KycDocumentType;
|
|
1779
|
+
documentNumber: string;
|
|
1780
|
+
documentUrl: string | null;
|
|
1781
|
+
selfieUrl: string | null;
|
|
1782
|
+
status: KycStatus;
|
|
1783
|
+
verifiedAt: string | null;
|
|
1784
|
+
rejectionNote: string | null;
|
|
1785
|
+
createdAt: string;
|
|
1786
|
+
updatedAt: string;
|
|
1787
|
+
}
|
|
1788
|
+
interface KycStatusResponse {
|
|
1789
|
+
verifications: KycVerification[];
|
|
1790
|
+
isFullyVerified: boolean;
|
|
1791
|
+
}
|
|
1792
|
+
interface BankAccount {
|
|
1793
|
+
id: string;
|
|
1794
|
+
accountNumber: string;
|
|
1795
|
+
ifscCode: string;
|
|
1796
|
+
accountType: BankAccountType;
|
|
1797
|
+
status: BankAccountStatus;
|
|
1798
|
+
nickname: string | null;
|
|
1799
|
+
balance: number;
|
|
1800
|
+
currency: string;
|
|
1801
|
+
autoSweepEnabled: boolean;
|
|
1802
|
+
autoSweepThreshold: number | null;
|
|
1803
|
+
isPrimary: boolean;
|
|
1804
|
+
createdAt: string;
|
|
1805
|
+
updatedAt: string;
|
|
1806
|
+
}
|
|
1807
|
+
interface BankAccountBalance {
|
|
1808
|
+
accountId: string;
|
|
1809
|
+
accountNumber: string;
|
|
1810
|
+
balance: number;
|
|
1811
|
+
currency: string;
|
|
1812
|
+
accountType: BankAccountType;
|
|
1813
|
+
}
|
|
1814
|
+
interface BankTransaction {
|
|
1815
|
+
id: string;
|
|
1816
|
+
accountId: string;
|
|
1817
|
+
type: 'credit' | 'debit';
|
|
1818
|
+
mode: TransferMode | null;
|
|
1819
|
+
amount: number;
|
|
1820
|
+
balanceAfter: number;
|
|
1821
|
+
currency: string;
|
|
1822
|
+
description: string;
|
|
1823
|
+
referenceNumber: string | null;
|
|
1824
|
+
counterpartyName: string | null;
|
|
1825
|
+
counterpartyAccount: string | null;
|
|
1826
|
+
counterpartyIfsc: string | null;
|
|
1827
|
+
status: TransferStatus;
|
|
1828
|
+
category: string | null;
|
|
1829
|
+
createdAt: string;
|
|
1830
|
+
}
|
|
1831
|
+
interface Beneficiary {
|
|
1832
|
+
id: string;
|
|
1833
|
+
name: string;
|
|
1834
|
+
accountNumber: string;
|
|
1835
|
+
ifscCode: string;
|
|
1836
|
+
bankName: string | null;
|
|
1837
|
+
upiId: string | null;
|
|
1838
|
+
nickname: string | null;
|
|
1839
|
+
isFavorite: boolean;
|
|
1840
|
+
transferLimit: number | null;
|
|
1841
|
+
isVerified: boolean;
|
|
1842
|
+
createdAt: string;
|
|
1843
|
+
}
|
|
1844
|
+
interface BankCard {
|
|
1845
|
+
id: string;
|
|
1846
|
+
cardType: CardType;
|
|
1847
|
+
variant: CardVariant;
|
|
1848
|
+
status: CardStatus;
|
|
1849
|
+
lastFourDigits: string;
|
|
1850
|
+
cardNetwork: string;
|
|
1851
|
+
expiryMonth: number;
|
|
1852
|
+
expiryYear: number;
|
|
1853
|
+
nameOnCard: string;
|
|
1854
|
+
dailyLimit: number;
|
|
1855
|
+
internationalEnabled: boolean;
|
|
1856
|
+
internationalFrom: string | null;
|
|
1857
|
+
internationalUntil: string | null;
|
|
1858
|
+
contactlessEnabled: boolean;
|
|
1859
|
+
atmWithdrawalLimit: number;
|
|
1860
|
+
onlineEnabled: boolean;
|
|
1861
|
+
createdAt: string;
|
|
1862
|
+
}
|
|
1863
|
+
interface FixedDeposit {
|
|
1864
|
+
id: string;
|
|
1865
|
+
accountId: string;
|
|
1866
|
+
fdNumber: string;
|
|
1867
|
+
principalAmount: number;
|
|
1868
|
+
interestRate: number;
|
|
1869
|
+
tenureDays: number;
|
|
1870
|
+
maturityAmount: number;
|
|
1871
|
+
maturityDate: string;
|
|
1872
|
+
status: FixedDepositStatus;
|
|
1873
|
+
autoRenew: boolean;
|
|
1874
|
+
closedAt: string | null;
|
|
1875
|
+
createdAt: string;
|
|
1876
|
+
}
|
|
1877
|
+
interface FixedDepositClosure {
|
|
1878
|
+
payoutAmount: number;
|
|
1879
|
+
daysHeld: number;
|
|
1880
|
+
prematureRate: number;
|
|
1881
|
+
}
|
|
1882
|
+
interface ScheduledTransfer {
|
|
1883
|
+
id: string;
|
|
1884
|
+
senderAccountId: string;
|
|
1885
|
+
beneficiaryName: string;
|
|
1886
|
+
beneficiaryAccount: string;
|
|
1887
|
+
beneficiaryIfsc: string;
|
|
1888
|
+
amount: number;
|
|
1889
|
+
mode: TransferMode;
|
|
1890
|
+
frequency: ScheduledTransferFrequency;
|
|
1891
|
+
status: ScheduledTransferStatus;
|
|
1892
|
+
description: string | null;
|
|
1893
|
+
nextExecutionAt: string;
|
|
1894
|
+
lastExecutedAt: string | null;
|
|
1895
|
+
endsAt: string | null;
|
|
1896
|
+
executionCount: number;
|
|
1897
|
+
createdAt: string;
|
|
1898
|
+
}
|
|
1899
|
+
interface BillPayment {
|
|
1900
|
+
id: string;
|
|
1901
|
+
accountId: string;
|
|
1902
|
+
billerCategory: string;
|
|
1903
|
+
billerName: string;
|
|
1904
|
+
billerId: string | null;
|
|
1905
|
+
consumerNumber: string;
|
|
1906
|
+
amount: number;
|
|
1907
|
+
status: BillPaymentStatus;
|
|
1908
|
+
referenceNumber: string | null;
|
|
1909
|
+
paidAt: string | null;
|
|
1910
|
+
createdAt: string;
|
|
1911
|
+
}
|
|
1912
|
+
interface SpendingCategory {
|
|
1913
|
+
id: string;
|
|
1914
|
+
name: string;
|
|
1915
|
+
icon: string | null;
|
|
1916
|
+
color: string | null;
|
|
1917
|
+
isDefault: boolean;
|
|
1918
|
+
}
|
|
1919
|
+
interface SpendingBreakdownItem {
|
|
1920
|
+
category: string;
|
|
1921
|
+
amount: number;
|
|
1922
|
+
percentage: number;
|
|
1923
|
+
}
|
|
1924
|
+
interface SpendingBreakdown {
|
|
1925
|
+
breakdown: SpendingBreakdownItem[];
|
|
1926
|
+
totalSpent: number;
|
|
1927
|
+
period: {
|
|
1928
|
+
months: number;
|
|
1929
|
+
since: string;
|
|
1930
|
+
};
|
|
1931
|
+
}
|
|
1932
|
+
interface MonthlyTrendItem {
|
|
1933
|
+
month: string;
|
|
1934
|
+
income: number;
|
|
1935
|
+
expenditure: number;
|
|
1936
|
+
net: number;
|
|
1937
|
+
}
|
|
1938
|
+
interface MonthlyTrends {
|
|
1939
|
+
trends: MonthlyTrendItem[];
|
|
1940
|
+
}
|
|
1941
|
+
interface CashFlowSummary {
|
|
1942
|
+
totalIncome: number;
|
|
1943
|
+
totalExpenditure: number;
|
|
1944
|
+
netCashFlow: number;
|
|
1945
|
+
period: {
|
|
1946
|
+
start: string;
|
|
1947
|
+
end: string;
|
|
1948
|
+
};
|
|
1949
|
+
}
|
|
1950
|
+
interface BudgetItem {
|
|
1951
|
+
id: string;
|
|
1952
|
+
category: string;
|
|
1953
|
+
monthlyLimit: number;
|
|
1954
|
+
alertAt: number;
|
|
1955
|
+
isActive: boolean;
|
|
1956
|
+
spent: number;
|
|
1957
|
+
utilization: number;
|
|
1958
|
+
isOverBudget: boolean;
|
|
1959
|
+
isNearLimit: boolean;
|
|
1960
|
+
}
|
|
1961
|
+
interface AnomalyAlert {
|
|
1962
|
+
id: string;
|
|
1963
|
+
transactionId: string | null;
|
|
1964
|
+
alertType: string;
|
|
1965
|
+
severity: string;
|
|
1966
|
+
title: string;
|
|
1967
|
+
description: string;
|
|
1968
|
+
isRead: boolean;
|
|
1969
|
+
isDismissed: boolean;
|
|
1970
|
+
createdAt: string;
|
|
1971
|
+
}
|
|
1972
|
+
interface NetWorthSnapshot {
|
|
1973
|
+
accounts: Array<{
|
|
1974
|
+
id: string;
|
|
1975
|
+
accountNumber: string;
|
|
1976
|
+
accountType: BankAccountType;
|
|
1977
|
+
balance: number;
|
|
1978
|
+
nickname: string | null;
|
|
1979
|
+
}>;
|
|
1980
|
+
fixedDeposits: Array<{
|
|
1981
|
+
id: string;
|
|
1982
|
+
fdNumber: string;
|
|
1983
|
+
principalAmount: number;
|
|
1984
|
+
maturityAmount: number;
|
|
1985
|
+
maturityDate: string;
|
|
1986
|
+
}>;
|
|
1987
|
+
summary: {
|
|
1988
|
+
accountsTotal: number;
|
|
1989
|
+
fixedDepositsTotal: number;
|
|
1990
|
+
netWorth: number;
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1763
1993
|
|
|
1764
1994
|
interface RawResponse<T> {
|
|
1765
1995
|
data: T;
|
|
@@ -2733,7 +2963,7 @@ declare class ScopedClient {
|
|
|
2733
2963
|
page?: number;
|
|
2734
2964
|
limit?: number;
|
|
2735
2965
|
[key: string]: unknown;
|
|
2736
|
-
}): TZPaginatedQuery<T>;
|
|
2966
|
+
}, scope?: AuthScope): TZPaginatedQuery<T>;
|
|
2737
2967
|
postDirect<T>(path: string, body?: unknown, scope?: AuthScope): Promise<T>;
|
|
2738
2968
|
getDirect<T>(path: string, scope?: AuthScope): Promise<T>;
|
|
2739
2969
|
patchDirect<T>(path: string, body?: unknown, scope?: AuthScope): Promise<T>;
|
|
@@ -3056,6 +3286,71 @@ declare const TZ: {
|
|
|
3056
3286
|
connectGoogleDrive(data: GoogleDriveCallbackDto): TZQuery<ConnectedSource>;
|
|
3057
3287
|
disconnect(provider: string): TZQuery<void>;
|
|
3058
3288
|
};
|
|
3289
|
+
banking: {
|
|
3290
|
+
kyc: {
|
|
3291
|
+
submit(data: SubmitKycDto): TZQuery<KycVerification>;
|
|
3292
|
+
getStatus(): TZQuery<KycStatusResponse>;
|
|
3293
|
+
};
|
|
3294
|
+
accounts: {
|
|
3295
|
+
list(): TZQuery<BankAccount[]>;
|
|
3296
|
+
get(id: string): TZQuery<BankAccount>;
|
|
3297
|
+
getBalance(id: string): TZQuery<BankAccountBalance>;
|
|
3298
|
+
updateNickname(id: string, data: UpdateAccountNicknameDto): TZQuery<BankAccount>;
|
|
3299
|
+
setAutoSweep(id: string, data: SetAutoSweepDto): TZQuery<BankAccount>;
|
|
3300
|
+
getStatement(id: string, params?: GetStatementQuery): TZPaginatedQuery<BankTransaction>;
|
|
3301
|
+
};
|
|
3302
|
+
fixedDeposits: {
|
|
3303
|
+
list(): TZQuery<FixedDeposit[]>;
|
|
3304
|
+
create(data: CreateFixedDepositDto): TZQuery<FixedDeposit>;
|
|
3305
|
+
close(fdId: string): TZQuery<FixedDepositClosure>;
|
|
3306
|
+
};
|
|
3307
|
+
transfers: {
|
|
3308
|
+
initiate(data: InitiateTransferDto): TZQuery<BankTransaction>;
|
|
3309
|
+
};
|
|
3310
|
+
beneficiaries: {
|
|
3311
|
+
list(): TZQuery<Beneficiary[]>;
|
|
3312
|
+
add(data: AddBeneficiaryDto): TZQuery<Beneficiary>;
|
|
3313
|
+
remove(id: string): TZQuery<Beneficiary>;
|
|
3314
|
+
toggleFavorite(id: string): TZQuery<Beneficiary>;
|
|
3315
|
+
};
|
|
3316
|
+
scheduledTransfers: {
|
|
3317
|
+
list(): TZQuery<ScheduledTransfer[]>;
|
|
3318
|
+
create(data: CreateScheduledTransferDto): TZQuery<ScheduledTransfer>;
|
|
3319
|
+
cancel(id: string): TZQuery<ScheduledTransfer>;
|
|
3320
|
+
};
|
|
3321
|
+
bills: {
|
|
3322
|
+
pay(data: PayBillDto): TZQuery<BillPayment>;
|
|
3323
|
+
list(params?: ListBillPaymentsQuery): TZPaginatedQuery<BillPayment>;
|
|
3324
|
+
};
|
|
3325
|
+
cards: {
|
|
3326
|
+
list(): TZQuery<BankCard[]>;
|
|
3327
|
+
get(id: string): TZQuery<BankCard>;
|
|
3328
|
+
generateVirtual(data: GenerateVirtualCardDto): TZQuery<BankCard>;
|
|
3329
|
+
block(id: string): TZQuery<BankCard>;
|
|
3330
|
+
unblock(id: string): TZQuery<BankCard>;
|
|
3331
|
+
updateLimits(id: string, data: UpdateCardLimitsDto): TZQuery<BankCard>;
|
|
3332
|
+
toggleInternational(id: string, data: ToggleInternationalDto): TZQuery<BankCard>;
|
|
3333
|
+
toggleContactless(id: string, data: ToggleCardFeatureDto): TZQuery<BankCard>;
|
|
3334
|
+
toggleOnline(id: string, data: ToggleCardFeatureDto): TZQuery<BankCard>;
|
|
3335
|
+
};
|
|
3336
|
+
analytics: {
|
|
3337
|
+
getSpendingBreakdown(months?: number): TZQuery<SpendingBreakdown>;
|
|
3338
|
+
getMonthlyTrends(months?: number): TZQuery<MonthlyTrends>;
|
|
3339
|
+
getCashFlow(startDate?: string, endDate?: string): TZQuery<CashFlowSummary>;
|
|
3340
|
+
getNetWorth(): TZQuery<NetWorthSnapshot>;
|
|
3341
|
+
getCategories(): TZQuery<SpendingCategory[]>;
|
|
3342
|
+
};
|
|
3343
|
+
budgets: {
|
|
3344
|
+
list(): TZQuery<BudgetItem[]>;
|
|
3345
|
+
set(data: SetBudgetDto): TZQuery<BudgetItem>;
|
|
3346
|
+
remove(category: string): TZQuery<BudgetItem>;
|
|
3347
|
+
};
|
|
3348
|
+
alerts: {
|
|
3349
|
+
list(params?: GetAnomalyAlertsQuery): TZPaginatedQuery<AnomalyAlert>;
|
|
3350
|
+
markRead(id: string): TZQuery<AnomalyAlert>;
|
|
3351
|
+
dismiss(id: string): TZQuery<AnomalyAlert>;
|
|
3352
|
+
};
|
|
3353
|
+
};
|
|
3059
3354
|
};
|
|
3060
3355
|
/** Admin namespace — all staff/org-admin APIs */
|
|
3061
3356
|
readonly admin: {
|
|
@@ -3887,6 +4182,71 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3887
4182
|
connectGoogleDrive(data: GoogleDriveCallbackDto): TZQuery<ConnectedSource>;
|
|
3888
4183
|
disconnect(provider: string): TZQuery<void>;
|
|
3889
4184
|
};
|
|
4185
|
+
banking: {
|
|
4186
|
+
kyc: {
|
|
4187
|
+
submit(data: SubmitKycDto): TZQuery<KycVerification>;
|
|
4188
|
+
getStatus(): TZQuery<KycStatusResponse>;
|
|
4189
|
+
};
|
|
4190
|
+
accounts: {
|
|
4191
|
+
list(): TZQuery<BankAccount[]>;
|
|
4192
|
+
get(id: string): TZQuery<BankAccount>;
|
|
4193
|
+
getBalance(id: string): TZQuery<BankAccountBalance>;
|
|
4194
|
+
updateNickname(id: string, data: UpdateAccountNicknameDto): TZQuery<BankAccount>;
|
|
4195
|
+
setAutoSweep(id: string, data: SetAutoSweepDto): TZQuery<BankAccount>;
|
|
4196
|
+
getStatement(id: string, params?: GetStatementQuery): TZPaginatedQuery<BankTransaction>;
|
|
4197
|
+
};
|
|
4198
|
+
fixedDeposits: {
|
|
4199
|
+
list(): TZQuery<FixedDeposit[]>;
|
|
4200
|
+
create(data: CreateFixedDepositDto): TZQuery<FixedDeposit>;
|
|
4201
|
+
close(fdId: string): TZQuery<FixedDepositClosure>;
|
|
4202
|
+
};
|
|
4203
|
+
transfers: {
|
|
4204
|
+
initiate(data: InitiateTransferDto): TZQuery<BankTransaction>;
|
|
4205
|
+
};
|
|
4206
|
+
beneficiaries: {
|
|
4207
|
+
list(): TZQuery<Beneficiary[]>;
|
|
4208
|
+
add(data: AddBeneficiaryDto): TZQuery<Beneficiary>;
|
|
4209
|
+
remove(id: string): TZQuery<Beneficiary>;
|
|
4210
|
+
toggleFavorite(id: string): TZQuery<Beneficiary>;
|
|
4211
|
+
};
|
|
4212
|
+
scheduledTransfers: {
|
|
4213
|
+
list(): TZQuery<ScheduledTransfer[]>;
|
|
4214
|
+
create(data: CreateScheduledTransferDto): TZQuery<ScheduledTransfer>;
|
|
4215
|
+
cancel(id: string): TZQuery<ScheduledTransfer>;
|
|
4216
|
+
};
|
|
4217
|
+
bills: {
|
|
4218
|
+
pay(data: PayBillDto): TZQuery<BillPayment>;
|
|
4219
|
+
list(params?: ListBillPaymentsQuery): TZPaginatedQuery<BillPayment>;
|
|
4220
|
+
};
|
|
4221
|
+
cards: {
|
|
4222
|
+
list(): TZQuery<BankCard[]>;
|
|
4223
|
+
get(id: string): TZQuery<BankCard>;
|
|
4224
|
+
generateVirtual(data: GenerateVirtualCardDto): TZQuery<BankCard>;
|
|
4225
|
+
block(id: string): TZQuery<BankCard>;
|
|
4226
|
+
unblock(id: string): TZQuery<BankCard>;
|
|
4227
|
+
updateLimits(id: string, data: UpdateCardLimitsDto): TZQuery<BankCard>;
|
|
4228
|
+
toggleInternational(id: string, data: ToggleInternationalDto): TZQuery<BankCard>;
|
|
4229
|
+
toggleContactless(id: string, data: ToggleCardFeatureDto): TZQuery<BankCard>;
|
|
4230
|
+
toggleOnline(id: string, data: ToggleCardFeatureDto): TZQuery<BankCard>;
|
|
4231
|
+
};
|
|
4232
|
+
analytics: {
|
|
4233
|
+
getSpendingBreakdown(months?: number): TZQuery<SpendingBreakdown>;
|
|
4234
|
+
getMonthlyTrends(months?: number): TZQuery<MonthlyTrends>;
|
|
4235
|
+
getCashFlow(startDate?: string, endDate?: string): TZQuery<CashFlowSummary>;
|
|
4236
|
+
getNetWorth(): TZQuery<NetWorthSnapshot>;
|
|
4237
|
+
getCategories(): TZQuery<SpendingCategory[]>;
|
|
4238
|
+
};
|
|
4239
|
+
budgets: {
|
|
4240
|
+
list(): TZQuery<BudgetItem[]>;
|
|
4241
|
+
set(data: SetBudgetDto): TZQuery<BudgetItem>;
|
|
4242
|
+
remove(category: string): TZQuery<BudgetItem>;
|
|
4243
|
+
};
|
|
4244
|
+
alerts: {
|
|
4245
|
+
list(params?: GetAnomalyAlertsQuery): TZPaginatedQuery<AnomalyAlert>;
|
|
4246
|
+
markRead(id: string): TZQuery<AnomalyAlert>;
|
|
4247
|
+
dismiss(id: string): TZQuery<AnomalyAlert>;
|
|
4248
|
+
};
|
|
4249
|
+
};
|
|
3890
4250
|
};
|
|
3891
4251
|
admin: {
|
|
3892
4252
|
auth: {
|
|
@@ -4433,4 +4793,4 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
4433
4793
|
}>;
|
|
4434
4794
|
};
|
|
4435
4795
|
|
|
4436
|
-
export { type AddBeneficiaryDto, type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminAbandonedCart, type AdminAbandonedCartsQuery, type AdminAffiliate, type AdminBlogPost, type AdminBroadcast, type AdminCancelBookingDto, type AdminCoupon, type AdminCustomer, type AdminCustomerDetail, type AdminDashboardData, type AdminDashboardQuery, type AdminDashboardStats, type AdminDeliveryAgent, type AdminDeliveryZone, type AdminFinanceQuery, type AdminFulfillResult, type AdminGiftCard, type AdminGiftCardTransaction, type AdminHelpArticle, type AdminInstitution, type AdminInvoice, type AdminListOrdersQuery, type AdminLocation, type AdminLocationDetail, type AdminLoyaltyAccount, type AdminLoyaltyData, type AdminMealSubscription, type AdminMenuItem, type AdminOrder, type AdminOrderDetail, type AdminOrganization, type AdminPayout, type AdminPopupSettings, type AdminPromotion, type AdminRedemption, type AdminReservation, type AdminReservationSlot, type AdminReservationTable, type AdminReview, type AdminScheduledOrder, type AdminScheduledOrdersQuery, type AdminSetting, type AdminSettlement, type AdminStudentDiscount, type AdminStudentPass, type AdminStudentPassDetail, type AdminStudentPassStats, type AdminSyncLog, type AdminTaxSummary, type AdminTicket, type AdminTicketDetail, type AdminTicketMessage, type AdminWaitlistEntry, type AdminWaitlistGroup, type ApiError, type ApiErrorEnvelope, type ApiKey, type ApiKeyEnv, type ApiPaginatedEnvelope, type ApiPaginatedResult, type ApiResponseEnvelope, type ApiResult, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CampaignChannel, type CampaignStatus, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type CatalogSizeVariation, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ConnectedSource, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateBroadcastDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateDeliveryAgentDto, type CreateDeliveryZoneDto, type CreateFixedDepositDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReservationSlotDto, type CreateReservationTableDto, type CreateReviewDto, type CreateRoleDto, type CreateScheduledTransferDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type CreateWatchRoomDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EarningsSummary, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserStatus, type EndUserTagsDto, type EndUserVerifyOtpDto, type FulfillRewardDto, type GenerateVirtualCardDto, type GetAnomalyAlertsQuery, type GetCatalogItemsQuery, type GetStatementQuery, type GiftCard, type GoogleDriveCallbackDto, type GoogleDriveConnectUrl, type HelpArticle, type HostEarning, type Ingredient, type InitiateTransferDto, type Institution, type InviteStaffUserDto, type InvoiceStatus, type InvoiceType, type JoinWatchRoomDto, type JsonObject, type JsonPrimitive, type JsonValue, type ListBillPaymentsQuery, type ListCatalogItemsQuery, type ListContentQuery, type ListEarningsQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type ListWatchRoomsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealPlanItem, type MealSubscription, type Movie, type MovieCredits, type MovieDetail, type Notification, type NotificationData, type NotificationStatus, type NotificationType, type NutritionData, type OauthProvider, type Order, type OrderItem, type OrderStatus, type OrderType, type OrgStatus, type OtpType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PayBillDto, type PaymentMethod, type PaymentOrder, type PaymentProviderType, type PaymentStatus, type PaymentVerification, type PlanFeatures, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type ProductType, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RefundStatus, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type RuleConfig, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SegmentType, type SetAutoSweepDto, type SetBudgetDto, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubmitKycDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SubscriptionStatus, type SuperAdminLoginDto, type SuperAdminRole, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, type SwitchWatchRoomModeDto, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TaxConfig, type TemplateChannel, type TmdbMovie, type TmdbMovieDetail, type ToggleCardFeatureDto, type ToggleInternationalDto, type TokenStore, type TopUpWalletDto, type UpdateAccountNicknameDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCardLimitsDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateDeliveryAgentDto, type UpdateDeliveryZoneDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePopupSettingsDto, type UpdatePurchaseOrderDto, type UpdateReservationSlotDto, type UpdateReservationStatusDto, type UpdateReservationTableDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type UserStatus, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchRoom, type WatchRoomJoinResponse, type WatchRoomMessage, type WatchRoomPlaybackState, type WatchRoomPrivacy, type WatchRoomStatus, type WatchRoomVibe, type WatchRoomViewer, type WatchRoomViewerMode, type WatchSessionHistoryItem, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
|
|
4796
|
+
export { type AddBeneficiaryDto, type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminAbandonedCart, type AdminAbandonedCartsQuery, type AdminAffiliate, type AdminBlogPost, type AdminBroadcast, type AdminCancelBookingDto, type AdminCoupon, type AdminCustomer, type AdminCustomerDetail, type AdminDashboardData, type AdminDashboardQuery, type AdminDashboardStats, type AdminDeliveryAgent, type AdminDeliveryZone, type AdminFinanceQuery, type AdminFulfillResult, type AdminGiftCard, type AdminGiftCardTransaction, type AdminHelpArticle, type AdminInstitution, type AdminInvoice, type AdminListOrdersQuery, type AdminLocation, type AdminLocationDetail, type AdminLoyaltyAccount, type AdminLoyaltyData, type AdminMealSubscription, type AdminMenuItem, type AdminOrder, type AdminOrderDetail, type AdminOrganization, type AdminPayout, type AdminPopupSettings, type AdminPromotion, type AdminRedemption, type AdminReservation, type AdminReservationSlot, type AdminReservationTable, type AdminReview, type AdminScheduledOrder, type AdminScheduledOrdersQuery, type AdminSetting, type AdminSettlement, type AdminStudentDiscount, type AdminStudentPass, type AdminStudentPassDetail, type AdminStudentPassStats, type AdminSyncLog, type AdminTaxSummary, type AdminTicket, type AdminTicketDetail, type AdminTicketMessage, type AdminWaitlistEntry, type AdminWaitlistGroup, type AnomalyAlert, type ApiError, type ApiErrorEnvelope, type ApiKey, type ApiKeyEnv, type ApiPaginatedEnvelope, type ApiPaginatedResult, type ApiResponseEnvelope, type ApiResult, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BankAccount, type BankAccountBalance, type BankAccountStatus, type BankAccountType, type BankCard, type BankTransaction, type Beneficiary, type BillPayment, type BillPaymentStatus, type BudgetItem, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CampaignChannel, type CampaignStatus, type CancelPropertyBookingDto, type CardStatus, type CardType, type CardVariant, type Cart, type CartItemOption, type CartLineItem, type CashFlowSummary, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type CatalogSizeVariation, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ConnectedSource, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateBroadcastDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateDeliveryAgentDto, type CreateDeliveryZoneDto, type CreateFixedDepositDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReservationSlotDto, type CreateReservationTableDto, type CreateReviewDto, type CreateRoleDto, type CreateScheduledTransferDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type CreateWatchRoomDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EarningsSummary, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserStatus, type EndUserTagsDto, type EndUserVerifyOtpDto, type FixedDeposit, type FixedDepositClosure, type FixedDepositStatus, type FulfillRewardDto, type GenerateVirtualCardDto, type GetAnomalyAlertsQuery, type GetCatalogItemsQuery, type GetStatementQuery, type GiftCard, type GoogleDriveCallbackDto, type GoogleDriveConnectUrl, type HelpArticle, type HostEarning, type Ingredient, type InitiateTransferDto, type Institution, type InviteStaffUserDto, type InvoiceStatus, type InvoiceType, type JoinWatchRoomDto, type JsonObject, type JsonPrimitive, type JsonValue, type KycDocumentType, type KycStatus, type KycStatusResponse, type KycVerification, type ListBillPaymentsQuery, type ListCatalogItemsQuery, type ListContentQuery, type ListEarningsQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type ListWatchRoomsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealPlanItem, type MealSubscription, type MonthlyTrendItem, type MonthlyTrends, type Movie, type MovieCredits, type MovieDetail, type NetWorthSnapshot, type Notification, type NotificationData, type NotificationStatus, type NotificationType, type NutritionData, type OauthProvider, type Order, type OrderItem, type OrderStatus, type OrderType, type OrgStatus, type OtpType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PayBillDto, type PaymentMethod, type PaymentOrder, type PaymentProviderType, type PaymentStatus, type PaymentVerification, type PlanFeatures, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type ProductType, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RefundStatus, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type RuleConfig, type ScheduleCampaignDto, type ScheduledTransfer, type ScheduledTransferFrequency, type ScheduledTransferStatus, ScopedClient, type SearchQuery, type SearchStatusQuery, type SegmentType, type SetAutoSweepDto, type SetBudgetDto, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type SpendingBreakdown, type SpendingBreakdownItem, type SpendingCategory, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubmitKycDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SubscriptionStatus, type SuperAdminLoginDto, type SuperAdminRole, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, type SwitchWatchRoomModeDto, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TaxConfig, type TemplateChannel, type TmdbMovie, type TmdbMovieDetail, type ToggleCardFeatureDto, type ToggleInternationalDto, type TokenStore, type TopUpWalletDto, type TransferMode, type TransferStatus, type UpdateAccountNicknameDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCardLimitsDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateDeliveryAgentDto, type UpdateDeliveryZoneDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePopupSettingsDto, type UpdatePurchaseOrderDto, type UpdateReservationSlotDto, type UpdateReservationStatusDto, type UpdateReservationTableDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type UserStatus, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchRoom, type WatchRoomJoinResponse, type WatchRoomMessage, type WatchRoomPlaybackState, type WatchRoomPrivacy, type WatchRoomStatus, type WatchRoomVibe, type WatchRoomViewer, type WatchRoomViewerMode, type WatchSessionHistoryItem, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
|
package/dist/index.js
CHANGED
|
@@ -374,16 +374,16 @@ var ScopedClient = class {
|
|
|
374
374
|
return new TZQuery((signal) => this.root.rawRequest("POST", fp, { body: formData, scope: s, signal, sendOrgKey: this.sendOrgKey }));
|
|
375
375
|
}
|
|
376
376
|
/** Paginated GET → TZPaginatedQuery<T> with .next(), .prev(), .goTo() */
|
|
377
|
-
paginated(path, params = {}) {
|
|
377
|
+
paginated(path, params = {}, scope) {
|
|
378
378
|
const page = params.page ?? 1;
|
|
379
379
|
const limit = params.limit ?? 20;
|
|
380
|
-
const
|
|
380
|
+
const resolvedScope = scope ?? this.defaultScope;
|
|
381
381
|
const factory = (p, l) => {
|
|
382
382
|
const merged = { ...params, page: p, limit: l };
|
|
383
383
|
const qs = toQs(merged);
|
|
384
384
|
const fp = this.fullPath(`${path}${qs}`);
|
|
385
385
|
const executor = async (signal) => {
|
|
386
|
-
const rawRes = await this.root.rawRequest("GET", fp, { scope, signal, sendOrgKey: this.sendOrgKey });
|
|
386
|
+
const rawRes = await this.root.rawRequest("GET", fp, { scope: resolvedScope, signal, sendOrgKey: this.sendOrgKey });
|
|
387
387
|
const envelope = rawRes.raw;
|
|
388
388
|
const pagination = envelope["pagination"] ?? { page: p, limit: l, total: 0, totalPages: 0, hasNextPage: false, hasPrevPage: false };
|
|
389
389
|
return {
|
|
@@ -1079,6 +1079,168 @@ function createStorefrontConnectedSources(c) {
|
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
+
// src/storefront/banking.ts
|
|
1083
|
+
function createStorefrontBanking(c) {
|
|
1084
|
+
return {
|
|
1085
|
+
// ─── KYC ────────────────────────────────────────────────────────
|
|
1086
|
+
kyc: {
|
|
1087
|
+
submit(data) {
|
|
1088
|
+
return c.post("/banking/kyc", data, "enduser");
|
|
1089
|
+
},
|
|
1090
|
+
getStatus() {
|
|
1091
|
+
return c.get("/banking/kyc/status", "enduser");
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
// ─── Accounts ───────────────────────────────────────────────────
|
|
1095
|
+
accounts: {
|
|
1096
|
+
list() {
|
|
1097
|
+
return c.get("/banking/accounts", "enduser");
|
|
1098
|
+
},
|
|
1099
|
+
get(id) {
|
|
1100
|
+
return c.get(`/banking/accounts/${id}`, "enduser");
|
|
1101
|
+
},
|
|
1102
|
+
getBalance(id) {
|
|
1103
|
+
return c.get(`/banking/accounts/${id}/balance`, "enduser");
|
|
1104
|
+
},
|
|
1105
|
+
updateNickname(id, data) {
|
|
1106
|
+
return c.patch(`/banking/accounts/${id}/nickname`, data, "enduser");
|
|
1107
|
+
},
|
|
1108
|
+
setAutoSweep(id, data) {
|
|
1109
|
+
return c.patch(`/banking/accounts/${id}/auto-sweep`, data, "enduser");
|
|
1110
|
+
},
|
|
1111
|
+
getStatement(id, params) {
|
|
1112
|
+
return c.paginated(`/banking/accounts/${id}/statement`, params, "enduser");
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
// ─── Fixed Deposits ─────────────────────────────────────────────
|
|
1116
|
+
fixedDeposits: {
|
|
1117
|
+
list() {
|
|
1118
|
+
return c.get("/banking/accounts/fixed-deposits/list", "enduser");
|
|
1119
|
+
},
|
|
1120
|
+
create(data) {
|
|
1121
|
+
return c.post("/banking/accounts/fixed-deposits", data, "enduser");
|
|
1122
|
+
},
|
|
1123
|
+
close(fdId) {
|
|
1124
|
+
return c.del(`/banking/accounts/fixed-deposits/${fdId}`, "enduser");
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
// ─── Transfers ──────────────────────────────────────────────────
|
|
1128
|
+
transfers: {
|
|
1129
|
+
initiate(data) {
|
|
1130
|
+
return c.post("/banking/transfers", data, "enduser");
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
// ─── Beneficiaries ──────────────────────────────────────────────
|
|
1134
|
+
beneficiaries: {
|
|
1135
|
+
list() {
|
|
1136
|
+
return c.get("/banking/transfers/beneficiaries", "enduser");
|
|
1137
|
+
},
|
|
1138
|
+
add(data) {
|
|
1139
|
+
return c.post("/banking/transfers/beneficiaries", data, "enduser");
|
|
1140
|
+
},
|
|
1141
|
+
remove(id) {
|
|
1142
|
+
return c.del(`/banking/transfers/beneficiaries/${id}`, "enduser");
|
|
1143
|
+
},
|
|
1144
|
+
toggleFavorite(id) {
|
|
1145
|
+
return c.patch(`/banking/transfers/beneficiaries/${id}/favorite`, {}, "enduser");
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1148
|
+
// ─── Scheduled Transfers ────────────────────────────────────────
|
|
1149
|
+
scheduledTransfers: {
|
|
1150
|
+
list() {
|
|
1151
|
+
return c.get("/banking/transfers/scheduled", "enduser");
|
|
1152
|
+
},
|
|
1153
|
+
create(data) {
|
|
1154
|
+
return c.post("/banking/transfers/scheduled", data, "enduser");
|
|
1155
|
+
},
|
|
1156
|
+
cancel(id) {
|
|
1157
|
+
return c.del(`/banking/transfers/scheduled/${id}`, "enduser");
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
// ─── Bill Payments ──────────────────────────────────────────────
|
|
1161
|
+
bills: {
|
|
1162
|
+
pay(data) {
|
|
1163
|
+
return c.post("/banking/transfers/bills", data, "enduser");
|
|
1164
|
+
},
|
|
1165
|
+
list(params) {
|
|
1166
|
+
return c.paginated("/banking/transfers/bills", params, "enduser");
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1169
|
+
// ─── Cards ──────────────────────────────────────────────────────
|
|
1170
|
+
cards: {
|
|
1171
|
+
list() {
|
|
1172
|
+
return c.get("/banking/cards", "enduser");
|
|
1173
|
+
},
|
|
1174
|
+
get(id) {
|
|
1175
|
+
return c.get(`/banking/cards/${id}`, "enduser");
|
|
1176
|
+
},
|
|
1177
|
+
generateVirtual(data) {
|
|
1178
|
+
return c.post("/banking/cards", data, "enduser");
|
|
1179
|
+
},
|
|
1180
|
+
block(id) {
|
|
1181
|
+
return c.post(`/banking/cards/${id}/block`, {}, "enduser");
|
|
1182
|
+
},
|
|
1183
|
+
unblock(id) {
|
|
1184
|
+
return c.post(`/banking/cards/${id}/unblock`, {}, "enduser");
|
|
1185
|
+
},
|
|
1186
|
+
updateLimits(id, data) {
|
|
1187
|
+
return c.patch(`/banking/cards/${id}/limits`, data, "enduser");
|
|
1188
|
+
},
|
|
1189
|
+
toggleInternational(id, data) {
|
|
1190
|
+
return c.patch(`/banking/cards/${id}/international`, data, "enduser");
|
|
1191
|
+
},
|
|
1192
|
+
toggleContactless(id, data) {
|
|
1193
|
+
return c.patch(`/banking/cards/${id}/contactless`, data, "enduser");
|
|
1194
|
+
},
|
|
1195
|
+
toggleOnline(id, data) {
|
|
1196
|
+
return c.patch(`/banking/cards/${id}/online`, data, "enduser");
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
// ─── Analytics ──────────────────────────────────────────────────
|
|
1200
|
+
analytics: {
|
|
1201
|
+
getSpendingBreakdown(months) {
|
|
1202
|
+
return c.get(`/banking/analytics/spending${toQs({ months })}`, "enduser");
|
|
1203
|
+
},
|
|
1204
|
+
getMonthlyTrends(months) {
|
|
1205
|
+
return c.get(`/banking/analytics/trends${toQs({ months })}`, "enduser");
|
|
1206
|
+
},
|
|
1207
|
+
getCashFlow(startDate, endDate) {
|
|
1208
|
+
return c.get(`/banking/analytics/cash-flow${toQs({ startDate, endDate })}`, "enduser");
|
|
1209
|
+
},
|
|
1210
|
+
getNetWorth() {
|
|
1211
|
+
return c.get("/banking/analytics/net-worth", "enduser");
|
|
1212
|
+
},
|
|
1213
|
+
getCategories() {
|
|
1214
|
+
return c.get("/banking/analytics/categories");
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
// ─── Budgets ────────────────────────────────────────────────────
|
|
1218
|
+
budgets: {
|
|
1219
|
+
list() {
|
|
1220
|
+
return c.get("/banking/analytics/budgets", "enduser");
|
|
1221
|
+
},
|
|
1222
|
+
set(data) {
|
|
1223
|
+
return c.post("/banking/analytics/budgets", data, "enduser");
|
|
1224
|
+
},
|
|
1225
|
+
remove(category) {
|
|
1226
|
+
return c.del(`/banking/analytics/budgets/${category}`, "enduser");
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
// ─── Anomaly Alerts ─────────────────────────────────────────────
|
|
1230
|
+
alerts: {
|
|
1231
|
+
list(params) {
|
|
1232
|
+
return c.paginated("/banking/analytics/alerts", params, "enduser");
|
|
1233
|
+
},
|
|
1234
|
+
markRead(id) {
|
|
1235
|
+
return c.post(`/banking/analytics/alerts/${id}/read`, {}, "enduser");
|
|
1236
|
+
},
|
|
1237
|
+
dismiss(id) {
|
|
1238
|
+
return c.post(`/banking/analytics/alerts/${id}/dismiss`, {}, "enduser");
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1082
1244
|
// src/storefront/index.ts
|
|
1083
1245
|
function createStorefront(c) {
|
|
1084
1246
|
return {
|
|
@@ -1112,7 +1274,8 @@ function createStorefront(c) {
|
|
|
1112
1274
|
help: createStorefrontHelp(c),
|
|
1113
1275
|
rooms: createStorefrontRooms(c),
|
|
1114
1276
|
earnings: createStorefrontEarnings(c),
|
|
1115
|
-
connectedSources: createStorefrontConnectedSources(c)
|
|
1277
|
+
connectedSources: createStorefrontConnectedSources(c),
|
|
1278
|
+
banking: createStorefrontBanking(c)
|
|
1116
1279
|
};
|
|
1117
1280
|
}
|
|
1118
1281
|
|