@cuenca-mx/cuenca-js 1.2.2 → 2.0.0-dev1
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/CHANGELOG.md +19 -0
- package/build/data-2b32d8f3.mjs +634 -0
- package/build/data-70e6af8d.cjs +680 -0
- package/build/dts/client/client.d.ts +86 -0
- package/build/dts/client/index.d.ts +1 -0
- package/build/dts/errors.d.ts +25 -0
- package/build/dts/helpers/case.d.ts +5 -0
- package/build/dts/helpers/data.d.ts +3 -0
- package/build/dts/helpers/env.d.ts +7 -0
- package/build/dts/index.d.ts +55 -0
- package/build/dts/jwt.d.ts +8 -0
- package/build/dts/models/account.d.ts +12 -0
- package/build/dts/models/alert.d.ts +32 -0
- package/build/dts/models/apiKey.d.ts +13 -0
- package/build/dts/models/arpc.d.ts +10 -0
- package/build/dts/models/balanceEntry.d.ts +15 -0
- package/build/dts/models/baseUser.d.ts +23 -0
- package/build/dts/models/billPayment.d.ts +10 -0
- package/build/dts/models/bridgeAccount.d.ts +27 -0
- package/build/dts/models/bridgeBankAccount.d.ts +16 -0
- package/build/dts/models/bridgeClabe.d.ts +12 -0
- package/build/dts/models/bridgeTransaction.d.ts +32 -0
- package/build/dts/models/card.d.ts +19 -0
- package/build/dts/models/cardActivation.d.ts +12 -0
- package/build/dts/models/cardTransaction.d.ts +15 -0
- package/build/dts/models/cardValidation.d.ts +19 -0
- package/build/dts/models/commission.d.ts +9 -0
- package/build/dts/models/deposit.d.ts +11 -0
- package/build/dts/models/file.d.ts +10 -0
- package/build/dts/models/fraudFundsTransfer.d.ts +9 -0
- package/build/dts/models/index.d.ts +41 -0
- package/build/dts/models/kycValidations.d.ts +22 -0
- package/build/dts/models/legalPerson.d.ts +10 -0
- package/build/dts/models/loginToken.d.ts +7 -0
- package/build/dts/models/operator.d.ts +17 -0
- package/build/dts/models/operatorLogin.d.ts +7 -0
- package/build/dts/models/partner.d.ts +25 -0
- package/build/dts/models/postalCode.d.ts +14 -0
- package/build/dts/models/saving.d.ts +11 -0
- package/build/dts/models/serviceProvider.d.ts +10 -0
- package/build/dts/models/session.d.ts +14 -0
- package/build/dts/models/statement.d.ts +10 -0
- package/build/dts/models/transaction.d.ts +7 -0
- package/build/dts/models/transactionalProfile.d.ts +14 -0
- package/build/dts/models/transfer.d.ts +15 -0
- package/build/dts/models/user.d.ts +42 -0
- package/build/dts/models/userCredential.d.ts +10 -0
- package/build/dts/models/userLogin.d.ts +9 -0
- package/build/dts/models/userReport.d.ts +48 -0
- package/build/dts/models/userTosAgreement.d.ts +13 -0
- package/build/dts/models/verification.d.ts +12 -0
- package/build/dts/models/wallet.d.ts +8 -0
- package/build/dts/models/walletTransaction.d.ts +10 -0
- package/build/dts/models/whatsAppTransfer.d.ts +16 -0
- package/build/dts/requests/addressUpdateRequest.d.ts +17 -0
- package/build/dts/requests/alertRequest.d.ts +31 -0
- package/build/dts/requests/apiKeyRequest.d.ts +9 -0
- package/build/dts/requests/arpcRequest.d.ts +16 -0
- package/build/dts/requests/base.d.ts +2 -0
- package/build/dts/requests/cardActivationRequest.d.ts +11 -0
- package/build/dts/requests/cardRequest.d.ts +18 -0
- package/build/dts/requests/cardValidationRequest.d.ts +15 -0
- package/build/dts/requests/fileUploadRequest.d.ts +12 -0
- package/build/dts/requests/fraudFundsTransferRequest.d.ts +13 -0
- package/build/dts/requests/index.d.ts +28 -0
- package/build/dts/requests/kycValidationsRequest.d.ts +10 -0
- package/build/dts/requests/legalPersonRequest.d.ts +33 -0
- package/build/dts/requests/operatorLoginRequest.d.ts +9 -0
- package/build/dts/requests/operatorRequest.d.ts +24 -0
- package/build/dts/requests/partnerUserRequest.d.ts +100 -0
- package/build/dts/requests/reportGenerateRequest.d.ts +8 -0
- package/build/dts/requests/savingRequest.d.ts +11 -0
- package/build/dts/requests/sessionRequest.d.ts +12 -0
- package/build/dts/requests/tosUpdateRequest.d.ts +11 -0
- package/build/dts/requests/transferRequest.d.ts +12 -0
- package/build/dts/requests/transferUpdateRequest.d.ts +8 -0
- package/build/dts/requests/userCredentialRequest.d.ts +15 -0
- package/build/dts/requests/userLoginRequest.d.ts +8 -0
- package/build/dts/requests/userReportCreateRequest.d.ts +9 -0
- package/build/dts/requests/userReportUpdateRequest.d.ts +28 -0
- package/build/dts/requests/userRequest.d.ts +39 -0
- package/build/dts/requests/verificationRequest.d.ts +17 -0
- package/build/dts/requests/walletTransactionRequest.d.ts +9 -0
- package/build/dts/resources/accounts.d.ts +33 -0
- package/build/dts/resources/alerts.d.ts +54 -0
- package/build/dts/resources/apiKeys.d.ts +63 -0
- package/build/dts/resources/arpc.d.ts +18 -0
- package/build/dts/resources/balanceEntries.d.ts +37 -0
- package/build/dts/resources/base.d.ts +135 -0
- package/build/dts/resources/billPayments.d.ts +34 -0
- package/build/dts/resources/bridgeAccounts.d.ts +49 -0
- package/build/dts/resources/bridgeBankAccounts.d.ts +33 -0
- package/build/dts/resources/bridgeClabes.d.ts +27 -0
- package/build/dts/resources/bridgeTransactions.d.ts +36 -0
- package/build/dts/resources/cardActivations.d.ts +19 -0
- package/build/dts/resources/cardTransactions.d.ts +34 -0
- package/build/dts/resources/cardValidations.d.ts +19 -0
- package/build/dts/resources/cards.d.ts +63 -0
- package/build/dts/resources/commissions.d.ts +34 -0
- package/build/dts/resources/deposits.d.ts +34 -0
- package/build/dts/resources/files.d.ts +30 -0
- package/build/dts/resources/fraudFundsTransfers.d.ts +18 -0
- package/build/dts/resources/index.d.ts +39 -0
- package/build/dts/resources/kycValidations.d.ts +53 -0
- package/build/dts/resources/legalPersons.d.ts +54 -0
- package/build/dts/resources/loginTokens.d.ts +17 -0
- package/build/dts/resources/operatorLogins.d.ts +19 -0
- package/build/dts/resources/operators.d.ts +54 -0
- package/build/dts/resources/partners.d.ts +54 -0
- package/build/dts/resources/postalCodes.d.ts +24 -0
- package/build/dts/resources/reports.d.ts +8 -0
- package/build/dts/resources/savings.d.ts +62 -0
- package/build/dts/resources/serviceProviders.d.ts +32 -0
- package/build/dts/resources/sessions.d.ts +43 -0
- package/build/dts/resources/statements.d.ts +44 -0
- package/build/dts/resources/transfers.d.ts +64 -0
- package/build/dts/resources/userCredentials.d.ts +30 -0
- package/build/dts/resources/userLogins.d.ts +28 -0
- package/build/dts/resources/userReports.d.ts +54 -0
- package/build/dts/resources/users.d.ts +56 -0
- package/build/dts/resources/usersTosAgreements.d.ts +16 -0
- package/build/dts/resources/verifications.d.ts +31 -0
- package/build/dts/resources/walletTransactions.d.ts +48 -0
- package/build/dts/resources/whatsAppTransfers.d.ts +34 -0
- package/build/dts/types/enums.d.ts +590 -0
- package/build/dts/types/identities/address.d.ts +25 -0
- package/build/dts/types/identities/alertLog.d.ts +11 -0
- package/build/dts/types/identities/audit.d.ts +10 -0
- package/build/dts/types/identities/businessDetails.d.ts +9 -0
- package/build/dts/types/identities/externalAccount.d.ts +8 -0
- package/build/dts/types/identities/index.d.ts +17 -0
- package/build/dts/types/identities/kycFile.d.ts +14 -0
- package/build/dts/types/identities/legalRepresentatives.d.ts +12 -0
- package/build/dts/types/identities/license.d.ts +10 -0
- package/build/dts/types/identities/moralOperation.d.ts +8 -0
- package/build/dts/types/identities/physicalPerson.d.ts +12 -0
- package/build/dts/types/identities/shareholderMoral.d.ts +12 -0
- package/build/dts/types/identities/shareholderPhysical.d.ts +9 -0
- package/build/dts/types/identities/tosAgreements.d.ts +10 -0
- package/build/dts/types/identities/transactionalProfileServices.d.ts +10 -0
- package/build/dts/types/identities/verificationError.d.ts +10 -0
- package/build/dts/types/identities/vulnerableActivity.d.ts +10 -0
- package/build/dts/types/index.d.ts +3 -0
- package/build/dts/types/queries/accountQuery.d.ts +4 -0
- package/build/dts/types/queries/alertQuery.d.ts +12 -0
- package/build/dts/types/queries/apiKeyQuery.d.ts +4 -0
- package/build/dts/types/queries/balanceEntryQuery.d.ts +5 -0
- package/build/dts/types/queries/billPaymentQuery.d.ts +4 -0
- package/build/dts/types/queries/bridgeAccountQuery.d.ts +4 -0
- package/build/dts/types/queries/bridgeBankAccountQuery.d.ts +4 -0
- package/build/dts/types/queries/bridgeQuery.d.ts +7 -0
- package/build/dts/types/queries/bridgeTransactionQuery.d.ts +6 -0
- package/build/dts/types/queries/cardTransactionQuery.d.ts +4 -0
- package/build/dts/types/queries/cardsQuery.d.ts +4 -0
- package/build/dts/types/queries/depositQuery.d.ts +5 -0
- package/build/dts/types/queries/index.d.ts +27 -0
- package/build/dts/types/queries/operatorQuery.d.ts +4 -0
- package/build/dts/types/queries/partnerQuery.d.ts +4 -0
- package/build/dts/types/queries/postalCodeQuery.d.ts +4 -0
- package/build/dts/types/queries/queryParams.d.ts +15 -0
- package/build/dts/types/queries/statementQuery.d.ts +6 -0
- package/build/dts/types/queries/transactionQuery.d.ts +4 -0
- package/build/dts/types/queries/transferQuery.d.ts +7 -0
- package/build/dts/types/queries/userQuery.d.ts +11 -0
- package/build/dts/types/queries/userReportQuery.d.ts +4 -0
- package/build/dts/types/queries/walletQuery.d.ts +4 -0
- package/build/dts/types/queries/walletTransactionQuery.d.ts +4 -0
- package/build/errors/index.cjs +10 -0
- package/build/errors/index.mjs +10 -1
- package/build/index.cjs +1373 -2885
- package/build/index.mjs +1375 -2886
- package/build/jwt/index.cjs +11 -8
- package/build/jwt/index.mjs +11 -8
- package/build/requests/index.cjs +9 -22
- package/build/requests/index.mjs +2 -26
- package/build/types/index.cjs +20 -56
- package/build/types/index.mjs +9 -34
- package/build/umd/cuenca.umd.js +1 -1
- package/build/vulnerableActivity-17f0ce66.mjs +278 -0
- package/build/vulnerableActivity-3cb7b0ed.cjs +299 -0
- package/build/walletTransactionRequest-7f10c2a2.mjs +496 -0
- package/build/walletTransactionRequest-dd13c569.cjs +529 -0
- package/errors/index.d.ts +1 -0
- package/jwt/index.d.ts +1 -0
- package/package.json +26 -8
- package/requests/index.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/build/data-1fd00e5c.mjs +0 -1199
- package/build/data-72c37b60.cjs +0 -1240
- package/build/vulnerableActivity-7cc1734f.cjs +0 -867
- package/build/vulnerableActivity-bd344332.mjs +0 -831
- package/build/walletTransactionRequest-05d5305a.mjs +0 -1512
- package/build/walletTransactionRequest-c6a5c64d.cjs +0 -1539
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
import { AddressUpdateRequest } from './addressUpdateRequest';
|
|
3
|
+
interface TransactionalProfileServicesRequest {
|
|
4
|
+
speiTransfersNum?: number;
|
|
5
|
+
speiTransfersAmount?: number;
|
|
6
|
+
internalTransfersNum?: number;
|
|
7
|
+
internalTransfersAmount?: number;
|
|
8
|
+
}
|
|
9
|
+
interface TransactionalProfileRequest {
|
|
10
|
+
currency?: string;
|
|
11
|
+
monthlyAmount?: number;
|
|
12
|
+
recipientsNum?: number;
|
|
13
|
+
payersNum?: number;
|
|
14
|
+
deposits?: TransactionalProfileServicesRequest;
|
|
15
|
+
withdrawal?: TransactionalProfileServicesRequest;
|
|
16
|
+
}
|
|
17
|
+
interface BusinessDetailsRequest {
|
|
18
|
+
accountUsageDescription?: string;
|
|
19
|
+
businessDescription?: string;
|
|
20
|
+
}
|
|
21
|
+
interface ShareholderPhysicalRequest {
|
|
22
|
+
names?: string;
|
|
23
|
+
curp?: string;
|
|
24
|
+
rfc?: string;
|
|
25
|
+
firstSurname?: string;
|
|
26
|
+
percentage?: number;
|
|
27
|
+
secondSurname?: string;
|
|
28
|
+
shareCapital?: number;
|
|
29
|
+
}
|
|
30
|
+
interface LegalRepresentativesRequest extends ShareholderPhysicalRequest {
|
|
31
|
+
address?: AddressUpdateRequest;
|
|
32
|
+
emailAddress?: string;
|
|
33
|
+
job?: string;
|
|
34
|
+
phoneNumber?: string;
|
|
35
|
+
}
|
|
36
|
+
interface ShareholderMoralRequest {
|
|
37
|
+
name?: string;
|
|
38
|
+
percentage?: number;
|
|
39
|
+
shareholders?: ShareholderPhysicalRequest[];
|
|
40
|
+
legalRepresentatives?: LegalRepresentativesRequest[];
|
|
41
|
+
}
|
|
42
|
+
interface VulnerableActivityRequest {
|
|
43
|
+
isVulnerableActivity?: boolean;
|
|
44
|
+
hasSatRegister?: boolean;
|
|
45
|
+
satRegisteredDate?: string;
|
|
46
|
+
isInCompliance?: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface LicenseRequest {
|
|
49
|
+
licenseRequired?: boolean;
|
|
50
|
+
supervisoryEntity?: string;
|
|
51
|
+
licenseType?: string;
|
|
52
|
+
licenseDate?: string;
|
|
53
|
+
}
|
|
54
|
+
interface AuditRequest {
|
|
55
|
+
hasAudit?: boolean;
|
|
56
|
+
auditProvider?: string;
|
|
57
|
+
auditDate?: string;
|
|
58
|
+
auditComments?: string;
|
|
59
|
+
}
|
|
60
|
+
interface ExternalAccountRequest {
|
|
61
|
+
account?: string;
|
|
62
|
+
bank?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface PartnerUserRequest {
|
|
65
|
+
address?: AddressUpdateRequest;
|
|
66
|
+
audit?: AuditRequest;
|
|
67
|
+
businessDetails?: BusinessDetailsRequest;
|
|
68
|
+
businessName?: string;
|
|
69
|
+
clabe?: string;
|
|
70
|
+
createdAt?: string;
|
|
71
|
+
documentationUrl?: string;
|
|
72
|
+
emailAddress?: string;
|
|
73
|
+
externalAccount?: ExternalAccountRequest;
|
|
74
|
+
folio?: string;
|
|
75
|
+
id?: string;
|
|
76
|
+
incorporationDate?: string;
|
|
77
|
+
legalName?: string;
|
|
78
|
+
legalRepresentatives?: LegalRepresentativesRequest[];
|
|
79
|
+
level?: number;
|
|
80
|
+
license?: LicenseRequest;
|
|
81
|
+
meta?: WireObject;
|
|
82
|
+
nationality?: string;
|
|
83
|
+
phoneNumber?: string;
|
|
84
|
+
platformId?: string;
|
|
85
|
+
requiredLevel?: number;
|
|
86
|
+
rfc?: string;
|
|
87
|
+
shareholders?: ShareholderMoralRequest[];
|
|
88
|
+
status?: string;
|
|
89
|
+
transactionalProfile?: TransactionalProfileRequest;
|
|
90
|
+
updatedAt?: string;
|
|
91
|
+
userId?: string;
|
|
92
|
+
userType?: string;
|
|
93
|
+
vulnerableActivity?: VulnerableActivityRequest;
|
|
94
|
+
webSite?: string;
|
|
95
|
+
}
|
|
96
|
+
export declare const PartnerUserRequest: {
|
|
97
|
+
toObject: (req?: PartnerUserRequest) => WireObject;
|
|
98
|
+
toCleanObject: (req?: PartnerUserRequest) => WireObject;
|
|
99
|
+
};
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface ReportGenerateRequest {
|
|
3
|
+
committeeMeetingDate?: string | null;
|
|
4
|
+
}
|
|
5
|
+
export declare const ReportGenerateRequest: {
|
|
6
|
+
toObject: (req?: ReportGenerateRequest) => WireObject;
|
|
7
|
+
toCleanObject: (req?: ReportGenerateRequest) => WireObject;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface SavingRequest {
|
|
3
|
+
category?: string;
|
|
4
|
+
goalAmount?: number;
|
|
5
|
+
goalDate?: Date | string;
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const SavingRequest: {
|
|
9
|
+
toObject: (req?: SavingRequest) => WireObject;
|
|
10
|
+
toCleanObject: (req?: SavingRequest) => WireObject;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface SessionRequest {
|
|
3
|
+
failureUrl?: string;
|
|
4
|
+
successUrl?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
isBridge?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const SessionRequest: {
|
|
10
|
+
toObject: (req: SessionRequest) => WireObject;
|
|
11
|
+
toCleanObject: (req: SessionRequest) => WireObject;
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface TosUpdateRequest {
|
|
3
|
+
ip: string;
|
|
4
|
+
location?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const TosUpdateRequest: {
|
|
9
|
+
toObject: (req: TosUpdateRequest) => WireObject;
|
|
10
|
+
toCleanObject: (req: TosUpdateRequest) => WireObject;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface TransferRequest {
|
|
3
|
+
accountNumber: string;
|
|
4
|
+
amount: number;
|
|
5
|
+
descriptor: string;
|
|
6
|
+
idempotencyKey?: string;
|
|
7
|
+
recipientName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TransferRequest: {
|
|
10
|
+
toObject: (req: TransferRequest) => WireObject;
|
|
11
|
+
toCleanObject: (req: TransferRequest) => WireObject;
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface TransferUpdateRequest {
|
|
3
|
+
status?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const TransferUpdateRequest: {
|
|
6
|
+
toObject: (req?: TransferUpdateRequest) => WireObject;
|
|
7
|
+
toCleanObject: (req?: TransferUpdateRequest) => WireObject;
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface UserCredentialRequest {
|
|
3
|
+
password: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const UserCredentialRequest: {
|
|
6
|
+
toObject: (req: UserCredentialRequest) => WireObject;
|
|
7
|
+
};
|
|
8
|
+
export interface UserCredentialUpdateRequest {
|
|
9
|
+
password?: string | null;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const UserCredentialUpdateRequest: {
|
|
13
|
+
toObject: (req: UserCredentialUpdateRequest) => WireObject;
|
|
14
|
+
toCleanObject: (req: UserCredentialUpdateRequest) => WireObject;
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface UserReportCreateRequest {
|
|
3
|
+
committeeMeetingDate?: string;
|
|
4
|
+
userId?: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const UserReportCreateRequest: {
|
|
7
|
+
toObject: (req?: UserReportCreateRequest) => WireObject;
|
|
8
|
+
toCleanObject: (req?: UserReportCreateRequest) => WireObject;
|
|
9
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface UserReportUpdateRequest {
|
|
3
|
+
actividadEconomica?: string;
|
|
4
|
+
apellidoMaternoContraparte?: string;
|
|
5
|
+
apellidoPaternoContraparte?: string;
|
|
6
|
+
ciudadPoblacion?: string;
|
|
7
|
+
colonia?: string;
|
|
8
|
+
cuentaClabeContraparte?: string;
|
|
9
|
+
descripcionOperacion?: string;
|
|
10
|
+
entidadFederativaDomicilio?: string;
|
|
11
|
+
institucionFinancieraContraparte?: string;
|
|
12
|
+
instrumentoMonetario?: string;
|
|
13
|
+
mainAlertId?: string;
|
|
14
|
+
nacionalidadCuentaContraparte?: string;
|
|
15
|
+
nivelCuenta?: string;
|
|
16
|
+
nombreContraparte?: string;
|
|
17
|
+
paisNacionalidad?: string;
|
|
18
|
+
prioridadReporte?: string;
|
|
19
|
+
razonDenominacionContraparte?: string;
|
|
20
|
+
razonInusual?: string;
|
|
21
|
+
tipoOperacionItf?: string;
|
|
22
|
+
tipoOperacionPerfil?: string;
|
|
23
|
+
tipoPersonaContraparte?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const UserReportUpdateRequest: {
|
|
26
|
+
toObject: (req?: UserReportUpdateRequest) => WireObject;
|
|
27
|
+
toCleanObject: (req?: UserReportUpdateRequest) => WireObject;
|
|
28
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
import { AddressUpdateRequest } from './addressUpdateRequest';
|
|
3
|
+
import { TosUpdateRequest } from './tosUpdateRequest';
|
|
4
|
+
interface KycFileRequest {
|
|
5
|
+
data?: string;
|
|
6
|
+
isMx?: boolean;
|
|
7
|
+
status?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
uriBack?: string;
|
|
10
|
+
uriFront?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UserUpdateRequest {
|
|
13
|
+
address?: AddressUpdateRequest;
|
|
14
|
+
blacklistValidationStatus?: string;
|
|
15
|
+
countryOfBirth?: string;
|
|
16
|
+
curpDocumentUri?: string;
|
|
17
|
+
fiscalRegimeCode?: string;
|
|
18
|
+
govtId?: KycFileRequest;
|
|
19
|
+
emailAddress?: string;
|
|
20
|
+
isDormant?: boolean;
|
|
21
|
+
isFraud?: boolean;
|
|
22
|
+
isPldBlocked?: boolean;
|
|
23
|
+
isSecurityMode?: boolean;
|
|
24
|
+
profession?: string;
|
|
25
|
+
proofOfAddress?: KycFileRequest;
|
|
26
|
+
proofOfLife?: KycFileRequest;
|
|
27
|
+
requiredLevel?: number;
|
|
28
|
+
termsOfService?: TosUpdateRequest;
|
|
29
|
+
phoneNumber?: string;
|
|
30
|
+
rfc?: string;
|
|
31
|
+
status?: string;
|
|
32
|
+
userType?: string;
|
|
33
|
+
verificationId?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const UserUpdateRequest: {
|
|
36
|
+
toObject: (req?: UserUpdateRequest) => WireObject;
|
|
37
|
+
toCleanObject: (req?: UserUpdateRequest) => WireObject;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface VerificationRequest {
|
|
3
|
+
platformId?: string;
|
|
4
|
+
recipient?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const VerificationRequest: {
|
|
8
|
+
toObject: (req?: VerificationRequest) => WireObject;
|
|
9
|
+
toCleanObject: (req?: VerificationRequest) => WireObject;
|
|
10
|
+
};
|
|
11
|
+
export interface VerificationAttemptRequest {
|
|
12
|
+
code?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const VerificationAttemptRequest: {
|
|
15
|
+
toObject: (req?: VerificationAttemptRequest) => WireObject;
|
|
16
|
+
toCleanObject: (req?: VerificationAttemptRequest) => WireObject;
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
export interface WalletTransactionRequest {
|
|
3
|
+
amount: number;
|
|
4
|
+
transactionType?: string;
|
|
5
|
+
walletUri?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const WalletTransactionRequest: {
|
|
8
|
+
toObject: (req: WalletTransactionRequest) => WireObject;
|
|
9
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Account } from '../models';
|
|
2
|
+
import { AccountQuery } from '../types';
|
|
3
|
+
import { Client, ResourceCtor } from './base';
|
|
4
|
+
declare const AccountResource_base: {
|
|
5
|
+
new (...args: any[]): {
|
|
6
|
+
retrieve(id: string): Promise<Account>;
|
|
7
|
+
client: Client;
|
|
8
|
+
path: string;
|
|
9
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
10
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
11
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
12
|
+
};
|
|
13
|
+
} & {
|
|
14
|
+
new (...args: any[]): {
|
|
15
|
+
one(query?: AccountQuery): Promise<Account>;
|
|
16
|
+
first(query?: AccountQuery): Promise<Account | null>;
|
|
17
|
+
count(query?: AccountQuery): Promise<number>;
|
|
18
|
+
page(query?: AccountQuery | undefined, cursor?: string | undefined): Promise<{
|
|
19
|
+
items: Account[];
|
|
20
|
+
nextCursor: string | null;
|
|
21
|
+
}>;
|
|
22
|
+
all(query?: AccountQuery): AsyncGenerator<Account, any, unknown>;
|
|
23
|
+
client: Client;
|
|
24
|
+
path: string;
|
|
25
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
26
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
27
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
28
|
+
};
|
|
29
|
+
} & ResourceCtor<Account, AccountQuery>;
|
|
30
|
+
declare class AccountResource extends AccountResource_base {
|
|
31
|
+
constructor(client: Client);
|
|
32
|
+
}
|
|
33
|
+
export default AccountResource;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Alert } from '../models';
|
|
2
|
+
import { AlertUpdateRequest } from '../requests';
|
|
3
|
+
import { AlertQuery } from '../types';
|
|
4
|
+
import { Client, ResourceCtor } from './base';
|
|
5
|
+
declare const AlertResource_base: {
|
|
6
|
+
new (...args: any[]): {
|
|
7
|
+
_create(data: import("../helpers/case").WireObject): Promise<Alert>;
|
|
8
|
+
client: Client;
|
|
9
|
+
path: string;
|
|
10
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
11
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
12
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
13
|
+
};
|
|
14
|
+
} & {
|
|
15
|
+
new (...args: any[]): {
|
|
16
|
+
one(query?: AlertQuery): Promise<Alert>;
|
|
17
|
+
first(query?: AlertQuery): Promise<Alert | null>;
|
|
18
|
+
count(query?: AlertQuery): Promise<number>;
|
|
19
|
+
page(query?: AlertQuery | undefined, cursor?: string | undefined): Promise<{
|
|
20
|
+
items: Alert[];
|
|
21
|
+
nextCursor: string | null;
|
|
22
|
+
}>;
|
|
23
|
+
all(query?: AlertQuery): AsyncGenerator<Alert, any, unknown>;
|
|
24
|
+
client: Client;
|
|
25
|
+
path: string;
|
|
26
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
27
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
28
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
29
|
+
};
|
|
30
|
+
} & {
|
|
31
|
+
new (...args: any[]): {
|
|
32
|
+
retrieve(id: string): Promise<Alert>;
|
|
33
|
+
client: Client;
|
|
34
|
+
path: string;
|
|
35
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
36
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
37
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
38
|
+
};
|
|
39
|
+
} & {
|
|
40
|
+
new (...args: any[]): {
|
|
41
|
+
_update(id: string, data: import("../helpers/case").WireObject): Promise<Alert>;
|
|
42
|
+
client: Client;
|
|
43
|
+
path: string;
|
|
44
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
45
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
46
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
47
|
+
};
|
|
48
|
+
} & ResourceCtor<Alert, AlertQuery>;
|
|
49
|
+
declare class AlertResource extends AlertResource_base {
|
|
50
|
+
constructor(client: Client);
|
|
51
|
+
create(req: AlertUpdateRequest): Promise<Alert>;
|
|
52
|
+
update(alertId: string, req: AlertUpdateRequest): Promise<Alert>;
|
|
53
|
+
}
|
|
54
|
+
export default AlertResource;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ApiKey } from '../models';
|
|
2
|
+
import { ApiKeyQuery } from '../types';
|
|
3
|
+
import { Client, ResourceCtor } from './base';
|
|
4
|
+
declare const ApiKeyResource_base: {
|
|
5
|
+
new (...args: any[]): {
|
|
6
|
+
_create(data: import("../helpers/case").WireObject): Promise<ApiKey>;
|
|
7
|
+
client: Client;
|
|
8
|
+
path: string;
|
|
9
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
10
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
11
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
12
|
+
};
|
|
13
|
+
} & {
|
|
14
|
+
new (...args: any[]): {
|
|
15
|
+
_deactivate(id: string, data?: import("../helpers/case").WireObject): Promise<ApiKey>;
|
|
16
|
+
client: Client;
|
|
17
|
+
path: string;
|
|
18
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
19
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
20
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
21
|
+
};
|
|
22
|
+
} & {
|
|
23
|
+
new (...args: any[]): {
|
|
24
|
+
one(query?: ApiKeyQuery): Promise<ApiKey>;
|
|
25
|
+
first(query?: ApiKeyQuery): Promise<ApiKey | null>;
|
|
26
|
+
count(query?: ApiKeyQuery): Promise<number>;
|
|
27
|
+
page(query?: ApiKeyQuery | undefined, cursor?: string | undefined): Promise<{
|
|
28
|
+
items: ApiKey[];
|
|
29
|
+
nextCursor: string | null;
|
|
30
|
+
}>;
|
|
31
|
+
all(query?: ApiKeyQuery): AsyncGenerator<ApiKey, any, unknown>;
|
|
32
|
+
client: Client;
|
|
33
|
+
path: string;
|
|
34
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
35
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
36
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
37
|
+
};
|
|
38
|
+
} & {
|
|
39
|
+
new (...args: any[]): {
|
|
40
|
+
retrieve(id: string): Promise<ApiKey>;
|
|
41
|
+
client: Client;
|
|
42
|
+
path: string;
|
|
43
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
44
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
45
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
new (...args: any[]): {
|
|
49
|
+
_update(id: string, data: import("../helpers/case").WireObject): Promise<ApiKey>;
|
|
50
|
+
client: Client;
|
|
51
|
+
path: string;
|
|
52
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
53
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
54
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
55
|
+
};
|
|
56
|
+
} & ResourceCtor<ApiKey, ApiKeyQuery>;
|
|
57
|
+
declare class ApiKeyResource extends ApiKeyResource_base {
|
|
58
|
+
constructor(client: Client);
|
|
59
|
+
create(): Promise<ApiKey>;
|
|
60
|
+
deactivate(apiKeyId: string, minutes?: number): Promise<ApiKey>;
|
|
61
|
+
update(apiKeyId: string, metadata: Record<string, unknown>, userId?: string): Promise<ApiKey>;
|
|
62
|
+
}
|
|
63
|
+
export default ApiKeyResource;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Arpc } from '../models';
|
|
2
|
+
import { ArpcRequest } from '../requests';
|
|
3
|
+
import { Client, ResourceCtor } from './base';
|
|
4
|
+
declare const ArpcResource_base: {
|
|
5
|
+
new (...args: any[]): {
|
|
6
|
+
_create(data: import("../helpers/case").WireObject): Promise<Arpc>;
|
|
7
|
+
client: Client;
|
|
8
|
+
path: string;
|
|
9
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
10
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
11
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
12
|
+
};
|
|
13
|
+
} & ResourceCtor<Arpc, import("../types").QueryParams>;
|
|
14
|
+
declare class ArpcResource extends ArpcResource_base {
|
|
15
|
+
constructor(client: Client);
|
|
16
|
+
create(req: ArpcRequest): Promise<Arpc>;
|
|
17
|
+
}
|
|
18
|
+
export default ArpcResource;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Account, BalanceEntry, BillPayment, BridgeAccount, Card, CardTransaction, Commission, Deposit, Saving, Transfer, WalletTransaction, WhatsAppTransfer } from '../models';
|
|
2
|
+
import { BalanceEntryQuery } from '../types';
|
|
3
|
+
import { Client, ResourceCtor } from './base';
|
|
4
|
+
type RelatedTransaction = BillPayment | CardTransaction | Commission | Deposit | Saving | Transfer | WalletTransaction | WhatsAppTransfer;
|
|
5
|
+
type FundingInstrument = Account | BridgeAccount | Card;
|
|
6
|
+
declare const BalanceEntryResource_base: {
|
|
7
|
+
new (...args: any[]): {
|
|
8
|
+
one(query?: BalanceEntryQuery): Promise<BalanceEntry>;
|
|
9
|
+
first(query?: BalanceEntryQuery): Promise<BalanceEntry | null>;
|
|
10
|
+
count(query?: BalanceEntryQuery): Promise<number>;
|
|
11
|
+
page(query?: BalanceEntryQuery | undefined, cursor?: string | undefined): Promise<{
|
|
12
|
+
items: BalanceEntry[];
|
|
13
|
+
nextCursor: string | null;
|
|
14
|
+
}>;
|
|
15
|
+
all(query?: BalanceEntryQuery): AsyncGenerator<BalanceEntry, any, unknown>;
|
|
16
|
+
client: Client;
|
|
17
|
+
path: string;
|
|
18
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
19
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
20
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
21
|
+
};
|
|
22
|
+
} & {
|
|
23
|
+
new (...args: any[]): {
|
|
24
|
+
retrieve(id: string): Promise<BalanceEntry>;
|
|
25
|
+
client: Client;
|
|
26
|
+
path: string;
|
|
27
|
+
fromObject: import("./base").ModelFactory<unknown>;
|
|
28
|
+
toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
|
|
29
|
+
toQueryString(query: import("../types").QueryParams): string;
|
|
30
|
+
};
|
|
31
|
+
} & ResourceCtor<BalanceEntry, BalanceEntryQuery>;
|
|
32
|
+
declare class BalanceEntryResource extends BalanceEntryResource_base {
|
|
33
|
+
constructor(client: Client);
|
|
34
|
+
relatedTransaction(relatedTransactionUri: string): Promise<RelatedTransaction | null>;
|
|
35
|
+
fundingInstrument(fundingInstrumentUri: string): Promise<FundingInstrument | RelatedTransaction | null>;
|
|
36
|
+
}
|
|
37
|
+
export default BalanceEntryResource;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { WireObject } from '../helpers/case';
|
|
2
|
+
import { QueryParams } from '../types/queries/queryParams';
|
|
3
|
+
export interface Client {
|
|
4
|
+
get(config: {
|
|
5
|
+
endpoint: string;
|
|
6
|
+
format?: unknown;
|
|
7
|
+
params?: WireObject;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
responseType?: string;
|
|
10
|
+
}): Promise<WireObject>;
|
|
11
|
+
post(config: {
|
|
12
|
+
endpoint: string;
|
|
13
|
+
data?: unknown;
|
|
14
|
+
multipart?: boolean;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
responseType?: string;
|
|
17
|
+
}): Promise<WireObject>;
|
|
18
|
+
patch(config: {
|
|
19
|
+
endpoint: string;
|
|
20
|
+
data?: unknown;
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
}): Promise<WireObject>;
|
|
23
|
+
delete(config: {
|
|
24
|
+
endpoint: string;
|
|
25
|
+
data?: unknown;
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
}): Promise<WireObject>;
|
|
28
|
+
}
|
|
29
|
+
export type ModelFactory<T> = (obj: WireObject) => T;
|
|
30
|
+
type Constructor<T = object> = new (...args: any[]) => T;
|
|
31
|
+
interface ResourceLike<T, Q extends QueryParams = QueryParams> {
|
|
32
|
+
client: Client;
|
|
33
|
+
path: string;
|
|
34
|
+
fromObject: ModelFactory<T>;
|
|
35
|
+
toParams(query: Q): WireObject;
|
|
36
|
+
toQueryString(query: Q): string;
|
|
37
|
+
}
|
|
38
|
+
export type ModelOf<TBase> = TBase extends Constructor<ResourceLike<infer T, QueryParams>> ? T : never;
|
|
39
|
+
export type QueryOf<TBase> = TBase extends Constructor<ResourceLike<unknown, infer Q>> ? Q : QueryParams;
|
|
40
|
+
export declare class Resource<T, Q extends QueryParams = QueryParams> {
|
|
41
|
+
readonly client: Client;
|
|
42
|
+
readonly path: string;
|
|
43
|
+
readonly fromObject: ModelFactory<T>;
|
|
44
|
+
constructor(client: Client, path: string, fromObject: ModelFactory<T>);
|
|
45
|
+
toParams(query: Q): WireObject;
|
|
46
|
+
toQueryString(query: Q): string;
|
|
47
|
+
}
|
|
48
|
+
export type ResourceCtor<T, Q extends QueryParams = QueryParams> = Constructor<Resource<T, Q>>;
|
|
49
|
+
export declare function Retrievable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
50
|
+
new (...args: any[]): {
|
|
51
|
+
retrieve(id: string): Promise<ModelOf<TBase>>;
|
|
52
|
+
client: Client;
|
|
53
|
+
path: string;
|
|
54
|
+
fromObject: ModelFactory<unknown>;
|
|
55
|
+
toParams(query: QueryParams): WireObject;
|
|
56
|
+
toQueryString(query: QueryParams): string;
|
|
57
|
+
};
|
|
58
|
+
} & TBase;
|
|
59
|
+
export declare function Creatable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
60
|
+
new (...args: any[]): {
|
|
61
|
+
_create(data: WireObject): Promise<ModelOf<TBase>>;
|
|
62
|
+
client: Client;
|
|
63
|
+
path: string;
|
|
64
|
+
fromObject: ModelFactory<unknown>;
|
|
65
|
+
toParams(query: QueryParams): WireObject;
|
|
66
|
+
toQueryString(query: QueryParams): string;
|
|
67
|
+
};
|
|
68
|
+
} & TBase;
|
|
69
|
+
export declare function Updateable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
70
|
+
new (...args: any[]): {
|
|
71
|
+
_update(id: string, data: WireObject): Promise<ModelOf<TBase>>;
|
|
72
|
+
client: Client;
|
|
73
|
+
path: string;
|
|
74
|
+
fromObject: ModelFactory<unknown>;
|
|
75
|
+
toParams(query: QueryParams): WireObject;
|
|
76
|
+
toQueryString(query: QueryParams): string;
|
|
77
|
+
};
|
|
78
|
+
} & TBase;
|
|
79
|
+
export declare function Uploadable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
80
|
+
new (...args: any[]): {
|
|
81
|
+
_upload(data: WireObject): Promise<ModelOf<TBase>>;
|
|
82
|
+
client: Client;
|
|
83
|
+
path: string;
|
|
84
|
+
fromObject: ModelFactory<unknown>;
|
|
85
|
+
toParams(query: QueryParams): WireObject;
|
|
86
|
+
toQueryString(query: QueryParams): string;
|
|
87
|
+
};
|
|
88
|
+
} & TBase;
|
|
89
|
+
export declare function Deactivable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
90
|
+
new (...args: any[]): {
|
|
91
|
+
_deactivate(id: string, data?: WireObject): Promise<ModelOf<TBase>>;
|
|
92
|
+
client: Client;
|
|
93
|
+
path: string;
|
|
94
|
+
fromObject: ModelFactory<unknown>;
|
|
95
|
+
toParams(query: QueryParams): WireObject;
|
|
96
|
+
toQueryString(query: QueryParams): string;
|
|
97
|
+
};
|
|
98
|
+
} & TBase;
|
|
99
|
+
export declare function Downlodable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
100
|
+
new (...args: any[]): {
|
|
101
|
+
_download(id: string, format?: unknown, responseType?: string): Promise<unknown>;
|
|
102
|
+
client: Client;
|
|
103
|
+
path: string;
|
|
104
|
+
fromObject: ModelFactory<unknown>;
|
|
105
|
+
toParams(query: QueryParams): WireObject;
|
|
106
|
+
toQueryString(query: QueryParams): string;
|
|
107
|
+
};
|
|
108
|
+
} & TBase;
|
|
109
|
+
export declare function Queryable<TBase extends Constructor<ResourceLike<unknown>>>(Base: TBase): {
|
|
110
|
+
new (...args: any[]): {
|
|
111
|
+
one(query?: QueryOf<TBase>): Promise<ModelOf<TBase>>;
|
|
112
|
+
first(query?: QueryOf<TBase>): Promise<ModelOf<TBase> | null>;
|
|
113
|
+
count(query?: QueryOf<TBase>): Promise<number>;
|
|
114
|
+
page(query?: QueryOf<TBase> | undefined, cursor?: string): Promise<{
|
|
115
|
+
items: ModelOf<TBase>[];
|
|
116
|
+
nextCursor: string | null;
|
|
117
|
+
}>;
|
|
118
|
+
all(query?: QueryOf<TBase>): AsyncGenerator<ModelOf<TBase>, any, unknown>;
|
|
119
|
+
client: Client;
|
|
120
|
+
path: string;
|
|
121
|
+
fromObject: ModelFactory<unknown>;
|
|
122
|
+
toParams(query: QueryParams): WireObject;
|
|
123
|
+
toQueryString(query: QueryParams): string;
|
|
124
|
+
};
|
|
125
|
+
} & TBase;
|
|
126
|
+
/**
|
|
127
|
+
* Extracts the top-level path segment(s) from a resource URI, supporting nested paths
|
|
128
|
+
* (e.g. `/bridge/accounts/AC123` → `bridge/accounts`).
|
|
129
|
+
*
|
|
130
|
+
* NOT supported: sub-resource URIs like `/accounts/AC1/refund` — these return
|
|
131
|
+
* `accounts/AC1` which is not a valid resource key. If the API introduces
|
|
132
|
+
* sub-resources, extend this helper.
|
|
133
|
+
*/
|
|
134
|
+
export declare function getResourcePath(uri: string | null | undefined): string | null;
|
|
135
|
+
export {};
|