@cuenca-mx/cuenca-js 2.0.0-dev0 → 2.0.0-dev2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/build/{data-ca00ac2d.cjs → data-added373.cjs} +24 -0
  2. package/build/{data-91da6d58.mjs → data-fa440a47.mjs} +21 -1
  3. package/build/dts/index.d.ts +5 -1
  4. package/build/dts/models/index.d.ts +5 -0
  5. package/build/dts/models/legalPerson.d.ts +10 -0
  6. package/build/dts/models/operator.d.ts +17 -0
  7. package/build/dts/models/operatorLogin.d.ts +11 -0
  8. package/build/dts/models/paymentOrder.d.ts +42 -0
  9. package/build/dts/requests/index.d.ts +6 -0
  10. package/build/dts/requests/legalPersonRequest.d.ts +33 -0
  11. package/build/dts/requests/operatorLoginRequest.d.ts +9 -0
  12. package/build/dts/requests/operatorRequest.d.ts +24 -0
  13. package/build/dts/requests/paymentOrderRequest.d.ts +28 -0
  14. package/build/dts/resources/index.d.ts +4 -0
  15. package/build/dts/resources/legalPersons.d.ts +54 -0
  16. package/build/dts/resources/operatorLogins.d.ts +19 -0
  17. package/build/dts/resources/operators.d.ts +54 -0
  18. package/build/dts/resources/paymentOrders.d.ts +57 -0
  19. package/build/dts/types/enums.d.ts +24 -0
  20. package/build/dts/types/queries/index.d.ts +2 -0
  21. package/build/dts/types/queries/operatorQuery.d.ts +4 -0
  22. package/build/dts/types/queries/paymentOrderQuery.d.ts +8 -0
  23. package/build/index.cjs +145 -10
  24. package/build/index.mjs +145 -10
  25. package/build/requests/index.cjs +9 -2
  26. package/build/requests/index.mjs +2 -2
  27. package/build/types/index.cjs +6 -2
  28. package/build/types/index.mjs +2 -2
  29. package/build/umd/cuenca.umd.js +1 -1
  30. package/build/{vulnerableActivity-d5aed4a7.cjs → vulnerableActivity-48357401.cjs} +1 -1
  31. package/build/{vulnerableActivity-61dc2846.mjs → vulnerableActivity-e5e336fc.mjs} +2 -2
  32. package/build/{walletTransactionRequest-aab46c5e.cjs → walletTransactionRequest-3feb43b2.cjs} +82 -1
  33. package/build/{walletTransactionRequest-dc11fc69.mjs → walletTransactionRequest-72ea259b.mjs} +76 -2
  34. package/package.json +1 -1
@@ -499,6 +499,26 @@ const UserStatus = {
499
499
  const UserType = {
500
500
  Moral: 'moral',
501
501
  Physical: 'physical',
502
+ LegalPerson: 'legal_person',
503
+ };
504
+ const OperatorRole = {
505
+ Operator: 'operator',
506
+ Authorizer: 'authorizer',
507
+ };
508
+ const OperatorStatus = {
509
+ Active: 'active',
510
+ Disabled: 'disabled',
511
+ };
512
+ const PaymentOrderStatus = {
513
+ Created: 'created',
514
+ Authorized: 'authorized',
515
+ Rejected: 'rejected',
516
+ Expired: 'expired',
517
+ };
518
+ const PaymentOrderLineStatus = {
519
+ Pending: 'pending',
520
+ Invalid: 'invalid',
521
+ Submitted: 'submitted',
502
522
  };
503
523
  const VerificationStatus = {
504
524
  Created: 'created',
@@ -646,7 +666,11 @@ exports.MLIndicatorLevel = MLIndicatorLevel;
646
666
  exports.MLIndicatorPeriod = MLIndicatorPeriod;
647
667
  exports.MLIndicatorType = MLIndicatorType;
648
668
  exports.Network = Network;
669
+ exports.OperatorRole = OperatorRole;
670
+ exports.OperatorStatus = OperatorStatus;
649
671
  exports.PLDFilterType = PLDFilterType;
672
+ exports.PaymentOrderLineStatus = PaymentOrderLineStatus;
673
+ exports.PaymentOrderStatus = PaymentOrderStatus;
650
674
  exports.Phase = Phase;
651
675
  exports.SATRegimeCode = SATRegimeCode;
652
676
  exports.SATRegimeLabels = SATRegimeLabels;
@@ -497,6 +497,26 @@ const UserStatus = {
497
497
  const UserType = {
498
498
  Moral: 'moral',
499
499
  Physical: 'physical',
500
+ LegalPerson: 'legal_person',
501
+ };
502
+ const OperatorRole = {
503
+ Operator: 'operator',
504
+ Authorizer: 'authorizer',
505
+ };
506
+ const OperatorStatus = {
507
+ Active: 'active',
508
+ Disabled: 'disabled',
509
+ };
510
+ const PaymentOrderStatus = {
511
+ Created: 'created',
512
+ Authorized: 'authorized',
513
+ Rejected: 'rejected',
514
+ Expired: 'expired',
515
+ };
516
+ const PaymentOrderLineStatus = {
517
+ Pending: 'pending',
518
+ Invalid: 'invalid',
519
+ Submitted: 'submitted',
500
520
  };
501
521
  const VerificationStatus = {
502
522
  Created: 'created',
@@ -622,4 +642,4 @@ const coerceDatesWithDefaults = (obj, fields) => {
622
642
  return result;
623
643
  };
624
644
 
625
- export { AlertStatus as A, BridgeAccountStatus as B, CardStatus as C, DepositNetwork as D, EntryType as E, FileFormat as F, SATRegimeCode as G, SATRegimeLabels as H, KYCFileType as K, MLIndicatorLevel as M, Network as N, Phase as P, State as S, TrackDataMethod as T, UserStatus as U, VerificationType as V, WalletTransactionType as W, camelize as a, BridgeBankAccountStatus as b, coerceDatesWithDefaults as c, dateToUTC as d, BridgeTransactionType as e, CardErrorType as f, CardFundingType as g, CardIssuer as h, CardTransactionType as i, CardType as j, CommissionType as k, Currency as l, KYCValidationSource as m, MLIndicatorType as n, MLIndicatorPeriod as o, PLDFilterType as p, Country as q, ServiceProviderCategory as r, snakeize as s, SavingCategory as t, SessionType as u, SourceAlertType as v, TransactionStatus as w, TransferNetwork as x, UserType as y, VerificationStatus as z };
645
+ export { AlertStatus as A, BridgeAccountStatus as B, CardStatus as C, DepositNetwork as D, EntryType as E, FileFormat as F, PaymentOrderStatus as G, PaymentOrderLineStatus as H, VerificationStatus as I, SATRegimeCode as J, KYCFileType as K, SATRegimeLabels as L, MLIndicatorLevel as M, Network as N, OperatorRole as O, Phase as P, State as S, TrackDataMethod as T, UserStatus as U, VerificationType as V, WalletTransactionType as W, camelize as a, BridgeBankAccountStatus as b, coerceDatesWithDefaults as c, dateToUTC as d, BridgeTransactionType as e, CardErrorType as f, CardFundingType as g, CardIssuer as h, CardTransactionType as i, CardType as j, CommissionType as k, Currency as l, KYCValidationSource as m, MLIndicatorType as n, MLIndicatorPeriod as o, PLDFilterType as p, Country as q, ServiceProviderCategory as r, snakeize as s, SavingCategory as t, SessionType as u, SourceAlertType as v, TransactionStatus as w, TransferNetwork as x, UserType as y, OperatorStatus as z };
@@ -1,5 +1,5 @@
1
1
  import { Client } from './client';
2
- import { AccountResource, AlertResource, ApiKeyResource, ArpcResource, BalanceEntryResource, BillPaymentResource, BridgeAccountResource, BridgeBankAccountResource, BridgeClabeResource, BridgeTransactionResource, CardActivationResource, CardResource, CardTransactionResource, CardValidationResource, CommissionResource, DepositResource, FileResource, FraudFundsTransferResource, KYCValidationsResource, LoginTokenResource, PartnerResource, PostalCodeResource, ReportResource, SavingResource, ServiceProviderResource, SessionResource, StatementResource, TransferResource, UserCredentialResource, UserLoginResource, UserReportResource, UserResource, UsersTosAgreementsResource, VerificationResource, WalletTransactionsResource, WhatsAppTransferResource } from './resources';
2
+ import { AccountResource, AlertResource, ApiKeyResource, ArpcResource, BalanceEntryResource, BillPaymentResource, BridgeAccountResource, BridgeBankAccountResource, BridgeClabeResource, BridgeTransactionResource, CardActivationResource, CardResource, CardTransactionResource, CardValidationResource, CommissionResource, DepositResource, FileResource, FraudFundsTransferResource, KYCValidationsResource, LegalPersonResource, LoginTokenResource, OperatorLoginResource, OperatorResource, PartnerResource, PaymentOrderResource, PostalCodeResource, ReportResource, SavingResource, ServiceProviderResource, SessionResource, StatementResource, TransferResource, UserCredentialResource, UserLoginResource, UserReportResource, UserResource, UsersTosAgreementsResource, VerificationResource, WalletTransactionsResource, WhatsAppTransferResource } from './resources';
3
3
  interface CuencaOptions {
4
4
  apiKey?: string;
5
5
  apiSecret?: string;
@@ -29,8 +29,12 @@ export declare class Cuenca {
29
29
  files: FileResource;
30
30
  fraudFundsTransfers: FraudFundsTransferResource;
31
31
  kycValidations: KYCValidationsResource;
32
+ legalPersons: LegalPersonResource;
32
33
  loginTokens: LoginTokenResource;
34
+ operatorLogins: OperatorLoginResource;
35
+ operators: OperatorResource;
33
36
  partners: PartnerResource;
37
+ paymentOrders: PaymentOrderResource;
34
38
  postalCodes: PostalCodeResource;
35
39
  reports: ReportResource;
36
40
  savings: SavingResource;
@@ -17,7 +17,12 @@ export { Deposit } from './deposit';
17
17
  export { File } from './file';
18
18
  export { FraudFundsTransfer } from './fraudFundsTransfer';
19
19
  export { KYCValidations } from './kycValidations';
20
+ export { LegalPerson } from './legalPerson';
20
21
  export { LoginToken } from './loginToken';
22
+ export { Operator } from './operator';
23
+ export { OperatorLogin } from './operatorLogin';
24
+ export { PaymentOrder } from './paymentOrder';
25
+ export type { PaymentOrderLine } from './paymentOrder';
21
26
  export { Partner } from './partner';
22
27
  export { PostalCode } from './postalCode';
23
28
  export { Saving } from './saving';
@@ -0,0 +1,10 @@
1
+ import { WireObject } from '../helpers/case';
2
+ import { LegalRepresentatives } from '../types';
3
+ import { BaseUser } from './baseUser';
4
+ export interface LegalPerson extends BaseUser {
5
+ legalName?: string;
6
+ legalRepresentatives?: LegalRepresentatives[];
7
+ }
8
+ export declare const LegalPerson: {
9
+ fromObject: (obj: WireObject) => LegalPerson;
10
+ };
@@ -0,0 +1,17 @@
1
+ import { WireObject } from '../helpers/case';
2
+ import { OperatorRole, OperatorStatus } from '../types';
3
+ export interface Operator {
4
+ id?: string;
5
+ createdAt?: Date | null;
6
+ updatedAt?: Date | null;
7
+ platformId?: string;
8
+ name?: string;
9
+ email?: string;
10
+ phone?: string;
11
+ companyUserId?: string;
12
+ role?: OperatorRole;
13
+ status?: OperatorStatus;
14
+ }
15
+ export declare const Operator: {
16
+ fromObject: (obj: WireObject) => Operator;
17
+ };
@@ -0,0 +1,11 @@
1
+ import { WireObject } from '../helpers/case';
2
+ import { OperatorRole } from '../types';
3
+ export interface OperatorLogin {
4
+ sessionToken?: string;
5
+ operatorId?: string;
6
+ role?: OperatorRole;
7
+ companyUserId?: string;
8
+ }
9
+ export declare const OperatorLogin: {
10
+ fromObject: (obj: WireObject) => OperatorLogin;
11
+ };
@@ -0,0 +1,42 @@
1
+ import { WireObject } from '../helpers/case';
2
+ import { PaymentOrderLineStatus, PaymentOrderStatus } from '../types';
3
+ export interface PaymentOrderLine {
4
+ index?: number;
5
+ accountNumber?: string;
6
+ recipientName?: string;
7
+ amount?: number;
8
+ descriptor?: string;
9
+ status?: PaymentOrderLineStatus;
10
+ error?: string;
11
+ transferId?: string;
12
+ }
13
+ export interface PaymentOrder {
14
+ id?: string;
15
+ createdAt?: Date | null;
16
+ updatedAt?: Date | null;
17
+ expiresAt?: Date | null;
18
+ accountNumber?: string;
19
+ recipientName?: string;
20
+ amount?: number;
21
+ descriptor?: string;
22
+ idempotencyKey?: string;
23
+ userId?: string;
24
+ platformId?: string;
25
+ status?: PaymentOrderStatus;
26
+ createdByActorId?: string;
27
+ authorizedByActorId?: string;
28
+ authorizedAt?: Date | null;
29
+ rejectedByActorId?: string;
30
+ rejectedAt?: Date | null;
31
+ rejectionReason?: string;
32
+ transferId?: string;
33
+ isBatch?: boolean;
34
+ lines?: PaymentOrderLine[];
35
+ linesTotal?: number;
36
+ linesValid?: number;
37
+ linesInvalid?: number;
38
+ linesSubmitted?: number;
39
+ }
40
+ export declare const PaymentOrder: {
41
+ fromObject: (obj: WireObject) => PaymentOrder;
42
+ };
@@ -8,6 +8,12 @@ export { CardValidationRequest } from './cardValidationRequest';
8
8
  export { FileUploadRequest } from './fileUploadRequest';
9
9
  export { FraudFundsTransferRequest } from './fraudFundsTransferRequest';
10
10
  export { KYCValidationsRequest } from './kycValidationsRequest';
11
+ export { LegalPersonRequest, LegalPersonUpdateRequest, } from './legalPersonRequest';
12
+ export type { LegalRepresentativeRequest } from './legalPersonRequest';
13
+ export { OperatorRequest, OperatorUpdateRequest } from './operatorRequest';
14
+ export { OperatorLoginRequest } from './operatorLoginRequest';
15
+ export { PaymentOrderRejectRequest, PaymentOrderRequest, } from './paymentOrderRequest';
16
+ export type { PaymentOrderItemRequest } from './paymentOrderRequest';
11
17
  export { PartnerUserRequest } from './partnerUserRequest';
12
18
  export { ReportGenerateRequest } from './reportGenerateRequest';
13
19
  export { SavingRequest } from './savingRequest';
@@ -0,0 +1,33 @@
1
+ import { WireObject } from '../helpers/case';
2
+ import { AddressUpdateRequest } from './addressUpdateRequest';
3
+ export interface LegalRepresentativeRequest {
4
+ names: string;
5
+ firstSurname: string;
6
+ job: string;
7
+ phoneNumber: string;
8
+ emailAddress: string;
9
+ secondSurname?: string;
10
+ curp?: string;
11
+ rfc?: string;
12
+ address?: AddressUpdateRequest;
13
+ }
14
+ export interface LegalPersonRequest {
15
+ legalName: string;
16
+ rfc: string;
17
+ address: AddressUpdateRequest;
18
+ legalRepresentatives: LegalRepresentativeRequest[];
19
+ }
20
+ export declare const LegalPersonRequest: {
21
+ toObject: (req: LegalPersonRequest) => WireObject;
22
+ toCleanObject: (req: LegalPersonRequest) => WireObject;
23
+ };
24
+ export interface LegalPersonUpdateRequest {
25
+ legalName?: string;
26
+ rfc?: string;
27
+ address?: AddressUpdateRequest;
28
+ legalRepresentatives?: LegalRepresentativeRequest[];
29
+ }
30
+ export declare const LegalPersonUpdateRequest: {
31
+ toObject: (req?: LegalPersonUpdateRequest) => WireObject;
32
+ toCleanObject: (req?: LegalPersonUpdateRequest) => WireObject;
33
+ };
@@ -0,0 +1,9 @@
1
+ import { WireObject } from '../helpers/case';
2
+ export interface OperatorLoginRequest {
3
+ email: string;
4
+ password: string;
5
+ }
6
+ export declare const OperatorLoginRequest: {
7
+ toObject: (req: OperatorLoginRequest) => WireObject;
8
+ toCleanObject: (req: OperatorLoginRequest) => WireObject;
9
+ };
@@ -0,0 +1,24 @@
1
+ import { WireObject } from '../helpers/case';
2
+ import { OperatorRole, OperatorStatus } from '../types';
3
+ export interface OperatorRequest {
4
+ name: string;
5
+ email: string;
6
+ phone: string;
7
+ companyUserId: string;
8
+ role: OperatorRole;
9
+ status?: OperatorStatus;
10
+ }
11
+ export declare const OperatorRequest: {
12
+ toObject: (req: OperatorRequest) => WireObject;
13
+ toCleanObject: (req: OperatorRequest) => WireObject;
14
+ };
15
+ export interface OperatorUpdateRequest {
16
+ name?: string;
17
+ phone?: string;
18
+ role?: OperatorRole;
19
+ status?: OperatorStatus;
20
+ }
21
+ export declare const OperatorUpdateRequest: {
22
+ toObject: (req?: OperatorUpdateRequest) => WireObject;
23
+ toCleanObject: (req?: OperatorUpdateRequest) => WireObject;
24
+ };
@@ -0,0 +1,28 @@
1
+ import { WireObject } from '../helpers/case';
2
+ export interface PaymentOrderItemRequest {
3
+ accountNumber: string;
4
+ recipientName: string;
5
+ amount: number;
6
+ descriptor: string;
7
+ }
8
+ /** Unitario XOR batch: pass line fields OR `items`, plus `idempotencyKey`. */
9
+ export interface PaymentOrderRequest {
10
+ accountNumber?: string;
11
+ recipientName?: string;
12
+ amount?: number;
13
+ descriptor?: string;
14
+ items?: PaymentOrderItemRequest[];
15
+ idempotencyKey: string;
16
+ expiresInHours?: number;
17
+ }
18
+ export declare const PaymentOrderRequest: {
19
+ toObject: (req: PaymentOrderRequest) => WireObject;
20
+ toCleanObject: (req: PaymentOrderRequest) => WireObject;
21
+ };
22
+ export interface PaymentOrderRejectRequest {
23
+ rejectionReason: string;
24
+ }
25
+ export declare const PaymentOrderRejectRequest: {
26
+ toObject: (req: PaymentOrderRejectRequest) => WireObject;
27
+ toCleanObject: (req: PaymentOrderRejectRequest) => WireObject;
28
+ };
@@ -17,8 +17,12 @@ export { default as DepositResource } from './deposits';
17
17
  export { default as FileResource } from './files';
18
18
  export { default as FraudFundsTransferResource } from './fraudFundsTransfers';
19
19
  export { default as KYCValidationsResource } from './kycValidations';
20
+ export { default as LegalPersonResource } from './legalPersons';
20
21
  export { default as LoginTokenResource } from './loginTokens';
22
+ export { default as OperatorLoginResource } from './operatorLogins';
23
+ export { default as OperatorResource } from './operators';
21
24
  export { default as PartnerResource } from './partners';
25
+ export { default as PaymentOrderResource } from './paymentOrders';
22
26
  export { default as PostalCodeResource } from './postalCodes';
23
27
  export { default as ReportResource } from './reports';
24
28
  export { default as SavingResource } from './savings';
@@ -0,0 +1,54 @@
1
+ import { LegalPerson } from '../models';
2
+ import { LegalPersonRequest, LegalPersonUpdateRequest } from '../requests';
3
+ import { QueryParams } from '../types';
4
+ import { Client, ResourceCtor } from './base';
5
+ declare const LegalPersonResource_base: {
6
+ new (...args: any[]): {
7
+ _create(data: import("../helpers/case").WireObject): Promise<LegalPerson>;
8
+ client: Client;
9
+ path: string;
10
+ fromObject: import("./base").ModelFactory<unknown>;
11
+ toParams(query: QueryParams): import("../helpers/case").WireObject;
12
+ toQueryString(query: QueryParams): string;
13
+ };
14
+ } & {
15
+ new (...args: any[]): {
16
+ one(query?: QueryParams): Promise<LegalPerson>;
17
+ first(query?: QueryParams): Promise<LegalPerson | null>;
18
+ count(query?: QueryParams): Promise<number>;
19
+ page(query?: QueryParams | undefined, cursor?: string | undefined): Promise<{
20
+ items: LegalPerson[];
21
+ nextCursor: string | null;
22
+ }>;
23
+ all(query?: QueryParams): AsyncGenerator<LegalPerson, any, unknown>;
24
+ client: Client;
25
+ path: string;
26
+ fromObject: import("./base").ModelFactory<unknown>;
27
+ toParams(query: QueryParams): import("../helpers/case").WireObject;
28
+ toQueryString(query: QueryParams): string;
29
+ };
30
+ } & {
31
+ new (...args: any[]): {
32
+ retrieve(id: string): Promise<LegalPerson>;
33
+ client: Client;
34
+ path: string;
35
+ fromObject: import("./base").ModelFactory<unknown>;
36
+ toParams(query: QueryParams): import("../helpers/case").WireObject;
37
+ toQueryString(query: QueryParams): string;
38
+ };
39
+ } & {
40
+ new (...args: any[]): {
41
+ _update(id: string, data: import("../helpers/case").WireObject): Promise<LegalPerson>;
42
+ client: Client;
43
+ path: string;
44
+ fromObject: import("./base").ModelFactory<unknown>;
45
+ toParams(query: QueryParams): import("../helpers/case").WireObject;
46
+ toQueryString(query: QueryParams): string;
47
+ };
48
+ } & ResourceCtor<LegalPerson, QueryParams>;
49
+ declare class LegalPersonResource extends LegalPersonResource_base {
50
+ constructor(client: Client);
51
+ create(req: LegalPersonRequest): Promise<LegalPerson>;
52
+ update(legalPersonId: string, req: LegalPersonUpdateRequest): Promise<LegalPerson>;
53
+ }
54
+ export default LegalPersonResource;
@@ -0,0 +1,19 @@
1
+ import { OperatorLogin } from '../models';
2
+ import { Client, ResourceCtor } from './base';
3
+ declare const OperatorLoginResource_base: {
4
+ new (...args: any[]): {
5
+ _create(data: import("../helpers/case").WireObject): Promise<OperatorLogin>;
6
+ client: Client;
7
+ path: string;
8
+ fromObject: import("./base").ModelFactory<unknown>;
9
+ toParams(query: import("../types").QueryParams): import("../helpers/case").WireObject;
10
+ toQueryString(query: import("../types").QueryParams): string;
11
+ };
12
+ } & ResourceCtor<OperatorLogin, import("../types").QueryParams>;
13
+ declare class OperatorLoginResource extends OperatorLoginResource_base {
14
+ private sessionIdInHeaders;
15
+ constructor(client: Client);
16
+ create(email: string, password: string): Promise<OperatorLogin>;
17
+ clearSessionHeader(): void;
18
+ }
19
+ export default OperatorLoginResource;
@@ -0,0 +1,54 @@
1
+ import { Operator } from '../models';
2
+ import { OperatorRequest, OperatorUpdateRequest } from '../requests';
3
+ import { OperatorQuery } from '../types';
4
+ import { Client, ResourceCtor } from './base';
5
+ declare const OperatorResource_base: {
6
+ new (...args: any[]): {
7
+ _create(data: import("../helpers/case").WireObject): Promise<Operator>;
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?: OperatorQuery): Promise<Operator>;
17
+ first(query?: OperatorQuery): Promise<Operator | null>;
18
+ count(query?: OperatorQuery): Promise<number>;
19
+ page(query?: OperatorQuery | undefined, cursor?: string | undefined): Promise<{
20
+ items: Operator[];
21
+ nextCursor: string | null;
22
+ }>;
23
+ all(query?: OperatorQuery): AsyncGenerator<Operator, 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<Operator>;
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<Operator>;
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<Operator, OperatorQuery>;
49
+ declare class OperatorResource extends OperatorResource_base {
50
+ constructor(client: Client);
51
+ create(req: OperatorRequest): Promise<Operator>;
52
+ update(operatorId: string, req: OperatorUpdateRequest): Promise<Operator>;
53
+ }
54
+ export default OperatorResource;
@@ -0,0 +1,57 @@
1
+ import { PaymentOrder } from '../models';
2
+ import { PaymentOrderRequest } from '../requests';
3
+ import { PaymentOrderQuery } from '../types';
4
+ import { Client, ResourceCtor } from './base';
5
+ declare const PaymentOrderResource_base: {
6
+ new (...args: any[]): {
7
+ _create(data: import("../helpers/case").WireObject): Promise<PaymentOrder>;
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?: PaymentOrderQuery): Promise<PaymentOrder>;
17
+ first(query?: PaymentOrderQuery): Promise<PaymentOrder | null>;
18
+ count(query?: PaymentOrderQuery): Promise<number>;
19
+ page(query?: PaymentOrderQuery | undefined, cursor?: string | undefined): Promise<{
20
+ items: PaymentOrder[];
21
+ nextCursor: string | null;
22
+ }>;
23
+ all(query?: PaymentOrderQuery): AsyncGenerator<PaymentOrder, 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<PaymentOrder>;
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
+ } & ResourceCtor<PaymentOrder, PaymentOrderQuery>;
40
+ declare class PaymentOrderResource extends PaymentOrderResource_base {
41
+ constructor(client: Client);
42
+ create(req: PaymentOrderRequest, { operatorId }: {
43
+ operatorId: string;
44
+ }): Promise<PaymentOrder>;
45
+ validate(req: PaymentOrderRequest, { operatorId }: {
46
+ operatorId: string;
47
+ }): Promise<PaymentOrder>;
48
+ authorize(paymentOrderId: string, { operatorId, otp }: {
49
+ operatorId: string;
50
+ otp: string;
51
+ }): Promise<PaymentOrder>;
52
+ reject(paymentOrderId: string, { operatorId, rejectionReason, }: {
53
+ operatorId: string;
54
+ rejectionReason: string;
55
+ }): Promise<PaymentOrder>;
56
+ }
57
+ export default PaymentOrderResource;
@@ -528,8 +528,32 @@ export type UserStatus = typeof UserStatus[keyof typeof UserStatus];
528
528
  export declare const UserType: {
529
529
  readonly Moral: "moral";
530
530
  readonly Physical: "physical";
531
+ readonly LegalPerson: "legal_person";
531
532
  };
532
533
  export type UserType = typeof UserType[keyof typeof UserType];
534
+ export declare const OperatorRole: {
535
+ readonly Operator: "operator";
536
+ readonly Authorizer: "authorizer";
537
+ };
538
+ export type OperatorRole = typeof OperatorRole[keyof typeof OperatorRole];
539
+ export declare const OperatorStatus: {
540
+ readonly Active: "active";
541
+ readonly Disabled: "disabled";
542
+ };
543
+ export type OperatorStatus = typeof OperatorStatus[keyof typeof OperatorStatus];
544
+ export declare const PaymentOrderStatus: {
545
+ readonly Created: "created";
546
+ readonly Authorized: "authorized";
547
+ readonly Rejected: "rejected";
548
+ readonly Expired: "expired";
549
+ };
550
+ export type PaymentOrderStatus = typeof PaymentOrderStatus[keyof typeof PaymentOrderStatus];
551
+ export declare const PaymentOrderLineStatus: {
552
+ readonly Pending: "pending";
553
+ readonly Invalid: "invalid";
554
+ readonly Submitted: "submitted";
555
+ };
556
+ export type PaymentOrderLineStatus = typeof PaymentOrderLineStatus[keyof typeof PaymentOrderLineStatus];
533
557
  export declare const VerificationStatus: {
534
558
  readonly Created: "created";
535
559
  readonly NotVerified: "not_verified";
@@ -10,7 +10,9 @@ export type { BridgeTransactionQuery } from './bridgeTransactionQuery';
10
10
  export type { CardsQuery } from './cardsQuery';
11
11
  export type { CardTransactionQuery } from './cardTransactionQuery';
12
12
  export type { DepositQuery } from './depositQuery';
13
+ export type { OperatorQuery } from './operatorQuery';
13
14
  export type { PartnerQuery } from './partnerQuery';
15
+ export type { PaymentOrderQuery } from './paymentOrderQuery';
14
16
  export type { PostalCodeQuery } from './postalCodeQuery';
15
17
  export type { QueryParams } from './queryParams';
16
18
  export type { StatementQuery } from './statementQuery';
@@ -0,0 +1,4 @@
1
+ import { QueryParams } from './queryParams';
2
+ export interface OperatorQuery extends QueryParams {
3
+ email?: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ import { PaymentOrderStatus } from '../enums';
2
+ import { QueryParams } from './queryParams';
3
+ export interface PaymentOrderQuery extends QueryParams {
4
+ status?: PaymentOrderStatus;
5
+ accountNumber?: string;
6
+ idempotencyKey?: string;
7
+ isBatch?: boolean;
8
+ }