@postpaybr/protos 1.1.2 → 1.1.7

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 (157) hide show
  1. package/dist/typescript/account-entry.d.ts +80 -0
  2. package/dist/typescript/account-entry.js +28 -0
  3. package/dist/typescript/address.d.ts +65 -0
  4. package/dist/typescript/address.js +29 -0
  5. package/dist/typescript/admin-card-verification.d.ts +86 -0
  6. package/dist/typescript/admin-card-verification.js +28 -0
  7. package/dist/typescript/administrator.d.ts +176 -0
  8. package/dist/typescript/administrator.js +37 -0
  9. package/dist/typescript/anticipation.d.ts +84 -0
  10. package/dist/typescript/anticipation.js +30 -0
  11. package/dist/typescript/asset.d.ts +43 -0
  12. package/dist/typescript/asset.js +29 -0
  13. package/dist/typescript/auth.d.ts +28 -0
  14. package/dist/typescript/auth.js +24 -0
  15. package/dist/typescript/bank-account.d.ts +63 -0
  16. package/dist/typescript/bank-account.js +29 -0
  17. package/dist/typescript/card-vault.d.ts +35 -0
  18. package/dist/typescript/card-vault.js +24 -0
  19. package/dist/typescript/card-verification.d.ts +29 -0
  20. package/dist/typescript/card-verification.js +27 -0
  21. package/dist/typescript/card.d.ts +147 -0
  22. package/dist/typescript/card.js +33 -0
  23. package/dist/typescript/charge-schedule.d.ts +35 -0
  24. package/dist/typescript/charge-schedule.js +24 -0
  25. package/dist/typescript/charge.d.ts +538 -0
  26. package/dist/typescript/charge.js +55 -0
  27. package/dist/typescript/context.d.ts +154 -0
  28. package/dist/typescript/context.js +32 -0
  29. package/dist/typescript/customer.d.ts +213 -0
  30. package/dist/typescript/customer.js +39 -0
  31. package/dist/typescript/daily-balance.d.ts +32 -0
  32. package/dist/typescript/daily-balance.js +24 -0
  33. package/dist/typescript/document-verification.d.ts +106 -0
  34. package/dist/typescript/document-verification.js +30 -0
  35. package/dist/typescript/email.d.ts +71 -0
  36. package/dist/typescript/email.js +31 -0
  37. package/dist/typescript/expo-push.d.ts +31 -0
  38. package/dist/typescript/expo-push.js +24 -0
  39. package/dist/typescript/fee.d.ts +66 -0
  40. package/dist/typescript/fee.js +28 -0
  41. package/dist/typescript/location.d.ts +38 -0
  42. package/dist/typescript/location.js +24 -0
  43. package/dist/typescript/notification.d.ts +198 -0
  44. package/dist/typescript/notification.js +35 -0
  45. package/dist/typescript/order.d.ts +173 -0
  46. package/dist/typescript/order.js +34 -0
  47. package/dist/typescript/payable.d.ts +226 -0
  48. package/dist/typescript/payable.js +37 -0
  49. package/dist/typescript/payer.d.ts +23 -0
  50. package/dist/typescript/payer.js +24 -0
  51. package/dist/typescript/payment-calculator.d.ts +135 -0
  52. package/dist/typescript/payment-calculator.js +29 -0
  53. package/dist/typescript/payment-card.d.ts +189 -0
  54. package/dist/typescript/payment-card.js +27 -0
  55. package/dist/typescript/payment-gateway.d.ts +92 -0
  56. package/dist/typescript/payment-gateway.js +31 -0
  57. package/dist/typescript/payment-pix.d.ts +101 -0
  58. package/dist/typescript/payment-pix.js +24 -0
  59. package/dist/typescript/receipt.d.ts +193 -0
  60. package/dist/typescript/receipt.js +33 -0
  61. package/dist/typescript/recipient-payment-gateway.d.ts +95 -0
  62. package/dist/typescript/recipient-payment-gateway.js +30 -0
  63. package/dist/typescript/recipient.d.ts +222 -0
  64. package/dist/typescript/recipient.js +36 -0
  65. package/dist/typescript/role.d.ts +57 -0
  66. package/dist/typescript/role.js +30 -0
  67. package/dist/typescript/sms.d.ts +34 -0
  68. package/dist/typescript/sms.js +24 -0
  69. package/dist/typescript/tax.d.ts +293 -0
  70. package/dist/typescript/tax.js +36 -0
  71. package/dist/typescript/transfer.d.ts +185 -0
  72. package/dist/typescript/transfer.js +23 -0
  73. package/dist/typescript/two-factor.d.ts +66 -0
  74. package/dist/typescript/two-factor.js +30 -0
  75. package/dist/typescript/user.d.ts +196 -0
  76. package/dist/typescript/user.js +41 -0
  77. package/dist/typescript/wallet.d.ts +18 -0
  78. package/dist/typescript/wallet.js +24 -0
  79. package/package.json +11 -9
  80. package/typescript/account-entry.ts +0 -177
  81. package/typescript/address.ts +0 -133
  82. package/typescript/admin-card-verification.ts +0 -181
  83. package/typescript/administrator.ts +0 -375
  84. package/typescript/anticipation.ts +0 -187
  85. package/typescript/asset.ts +0 -123
  86. package/typescript/auth.ts +0 -84
  87. package/typescript/bank-account.ts +0 -157
  88. package/typescript/card-vault.ts +0 -92
  89. package/typescript/card-verification.ts +0 -93
  90. package/typescript/card.ts +0 -283
  91. package/typescript/charge-schedule.ts +0 -86
  92. package/typescript/charge.ts +0 -930
  93. package/typescript/context.ts +0 -296
  94. package/typescript/customer.ts +0 -425
  95. package/typescript/daily-balance.ts +0 -94
  96. package/typescript/document-verification.ts +0 -219
  97. package/typescript/email.ts +0 -183
  98. package/typescript/expo-push.ts +0 -75
  99. package/typescript/fee.ts +0 -131
  100. package/typescript/location.ts +0 -96
  101. package/typescript/notification.ts +0 -372
  102. package/typescript/order.ts +0 -311
  103. package/typescript/payable.ts +0 -414
  104. package/typescript/payer.ts +0 -68
  105. package/typescript/payment-calculator.ts +0 -252
  106. package/typescript/payment-card.ts +0 -289
  107. package/typescript/payment-gateway.ts +0 -209
  108. package/typescript/payment-pix.ts +0 -170
  109. package/typescript/receipt.ts +0 -344
  110. package/typescript/recipient-payment-gateway.ts +0 -209
  111. package/typescript/recipient.ts +0 -413
  112. package/typescript/role.ts +0 -144
  113. package/typescript/sms.ts +0 -96
  114. package/typescript/tax.ts +0 -463
  115. package/typescript/transfer.ts +0 -260
  116. package/typescript/two-factor.ts +0 -177
  117. package/typescript/user.ts +0 -413
  118. package/typescript/wallet.ts +0 -63
  119. /package/{account-entry.proto → src/protos/account-entry.proto} +0 -0
  120. /package/{address.proto → src/protos/address.proto} +0 -0
  121. /package/{admin-card-verification.proto → src/protos/admin-card-verification.proto} +0 -0
  122. /package/{administrator.proto → src/protos/administrator.proto} +0 -0
  123. /package/{anticipation.proto → src/protos/anticipation.proto} +0 -0
  124. /package/{asset.proto → src/protos/asset.proto} +0 -0
  125. /package/{auth.proto → src/protos/auth.proto} +0 -0
  126. /package/{bank-account.proto → src/protos/bank-account.proto} +0 -0
  127. /package/{card-vault.proto → src/protos/card-vault.proto} +0 -0
  128. /package/{card-verification.proto → src/protos/card-verification.proto} +0 -0
  129. /package/{card.proto → src/protos/card.proto} +0 -0
  130. /package/{charge-schedule.proto → src/protos/charge-schedule.proto} +0 -0
  131. /package/{charge.proto → src/protos/charge.proto} +0 -0
  132. /package/{context.proto → src/protos/context.proto} +0 -0
  133. /package/{customer.proto → src/protos/customer.proto} +0 -0
  134. /package/{daily-balance.proto → src/protos/daily-balance.proto} +0 -0
  135. /package/{document-verification.proto → src/protos/document-verification.proto} +0 -0
  136. /package/{email.proto → src/protos/email.proto} +0 -0
  137. /package/{expo-push.proto → src/protos/expo-push.proto} +0 -0
  138. /package/{fee.proto → src/protos/fee.proto} +0 -0
  139. /package/{location.proto → src/protos/location.proto} +0 -0
  140. /package/{notification.proto → src/protos/notification.proto} +0 -0
  141. /package/{order.proto → src/protos/order.proto} +0 -0
  142. /package/{payable.proto → src/protos/payable.proto} +0 -0
  143. /package/{payer.proto → src/protos/payer.proto} +0 -0
  144. /package/{payment-calculator.proto → src/protos/payment-calculator.proto} +0 -0
  145. /package/{payment-card.proto → src/protos/payment-card.proto} +0 -0
  146. /package/{payment-gateway.proto → src/protos/payment-gateway.proto} +0 -0
  147. /package/{payment-pix.proto → src/protos/payment-pix.proto} +0 -0
  148. /package/{receipt.proto → src/protos/receipt.proto} +0 -0
  149. /package/{recipient-payment-gateway.proto → src/protos/recipient-payment-gateway.proto} +0 -0
  150. /package/{recipient.proto → src/protos/recipient.proto} +0 -0
  151. /package/{role.proto → src/protos/role.proto} +0 -0
  152. /package/{sms.proto → src/protos/sms.proto} +0 -0
  153. /package/{tax.proto → src/protos/tax.proto} +0 -0
  154. /package/{transfer.proto → src/protos/transfer.proto} +0 -0
  155. /package/{two-factor.proto → src/protos/two-factor.proto} +0 -0
  156. /package/{user.proto → src/protos/user.proto} +0 -0
  157. /package/{wallet.proto → src/protos/wallet.proto} +0 -0
@@ -0,0 +1,80 @@
1
+ import { AccountEntryType, ChargeMetadata, GatewayIdentification, PaymentMethods } from '@postpaybr/contracts/types';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "accountEntry";
4
+ export interface CreateAccountEntryRequest {
5
+ amount: number;
6
+ type: AccountEntryType;
7
+ description: string;
8
+ bankAccountId: string;
9
+ recipientId: string;
10
+ transferId?: string | undefined;
11
+ chargeId?: string | undefined;
12
+ }
13
+ export interface CreateAccountEntryResponse {
14
+ accountEntry: AccountEntry | undefined;
15
+ }
16
+ export interface CreateAccountEntriesRequest {
17
+ entries: CreateAccountEntryRequest[];
18
+ }
19
+ export interface CreateAccountEntriesResponse {
20
+ accountEntries: AccountEntry[];
21
+ }
22
+ export interface GetEntriesByTransferRequest {
23
+ transferId: string;
24
+ }
25
+ export interface GetEntriesByTransferResponse {
26
+ accountEntries: AccountEntry[];
27
+ }
28
+ export interface TableFilterParams {
29
+ pageIndex?: number;
30
+ pageSize?: number;
31
+ status?: string[];
32
+ globalFilter?: string;
33
+ startDate?: Date;
34
+ endDate?: Date;
35
+ }
36
+ export interface GetEntriesByPeriodRequest {
37
+ recipientId: string;
38
+ filter: TableFilterParams | undefined;
39
+ }
40
+ export interface GetEntriesByPeriodResponse {
41
+ accountEntries: AccountEntry[];
42
+ }
43
+ export interface AccountEntry {
44
+ id: string;
45
+ amount: number;
46
+ type: AccountEntryType;
47
+ description: string;
48
+ bankAccountId: string;
49
+ recipientId: string;
50
+ transferId?: string | undefined;
51
+ chargeId?: string | undefined;
52
+ createdAt: Date;
53
+ }
54
+ export interface Charge {
55
+ id: string;
56
+ amount: number;
57
+ paymentMethod: PaymentMethods;
58
+ txid: string;
59
+ gatewayId: GatewayIdentification;
60
+ metadata: ChargeMetadata;
61
+ }
62
+ export interface DailyBalance {
63
+ date: Date;
64
+ balance: number;
65
+ }
66
+ export declare const ACCOUNT_ENTRY_PACKAGE_NAME = "accountEntry";
67
+ export interface AccountEntryServiceClient {
68
+ createAccountEntry(request: CreateAccountEntryRequest): Observable<CreateAccountEntryResponse>;
69
+ createAccountEntries(request: CreateAccountEntriesRequest): Observable<CreateAccountEntriesResponse>;
70
+ getEntriesByTransfer(request: GetEntriesByTransferRequest): Observable<GetEntriesByTransferResponse>;
71
+ getEntriesByPeriod(request: GetEntriesByPeriodRequest): Observable<GetEntriesByPeriodResponse>;
72
+ }
73
+ export interface AccountEntryServiceController {
74
+ createAccountEntry(request: CreateAccountEntryRequest): Promise<CreateAccountEntryResponse> | Observable<CreateAccountEntryResponse> | CreateAccountEntryResponse;
75
+ createAccountEntries(request: CreateAccountEntriesRequest): Promise<CreateAccountEntriesResponse> | Observable<CreateAccountEntriesResponse> | CreateAccountEntriesResponse;
76
+ getEntriesByTransfer(request: GetEntriesByTransferRequest): Promise<GetEntriesByTransferResponse> | Observable<GetEntriesByTransferResponse> | GetEntriesByTransferResponse;
77
+ getEntriesByPeriod(request: GetEntriesByPeriodRequest): Promise<GetEntriesByPeriodResponse> | Observable<GetEntriesByPeriodResponse> | GetEntriesByPeriodResponse;
78
+ }
79
+ export declare function AccountEntryServiceControllerMethods(): (constructor: Function) => void;
80
+ export declare const ACCOUNT_ENTRY_SERVICE_NAME = "AccountEntryService";
@@ -0,0 +1,28 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v6.32.0
5
+ // source: account-entry.proto
6
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
7
+ export const protobufPackage = 'accountEntry';
8
+ export const ACCOUNT_ENTRY_PACKAGE_NAME = 'accountEntry';
9
+ export function AccountEntryServiceControllerMethods() {
10
+ return function (constructor) {
11
+ const grpcMethods = [
12
+ 'createAccountEntry',
13
+ 'createAccountEntries',
14
+ 'getEntriesByTransfer',
15
+ 'getEntriesByPeriod',
16
+ ];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ GrpcMethod('AccountEntryService', method)(constructor.prototype[method], method, descriptor);
20
+ }
21
+ const grpcStreamMethods = [];
22
+ for (const method of grpcStreamMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ GrpcStreamMethod('AccountEntryService', method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ export const ACCOUNT_ENTRY_SERVICE_NAME = 'AccountEntryService';
@@ -0,0 +1,65 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare const protobufPackage = "address";
3
+ export interface Address {
4
+ id: string;
5
+ zipCode: string;
6
+ street: string;
7
+ number: string;
8
+ complement?: string | undefined;
9
+ neighborhood: string;
10
+ city: string;
11
+ state: string;
12
+ nickname?: string | undefined;
13
+ reference?: string | undefined;
14
+ accountId?: string | undefined;
15
+ }
16
+ export interface CreateAddressDto {
17
+ state: string;
18
+ city: string;
19
+ zipCode: string;
20
+ neighborhood: string;
21
+ street: string;
22
+ number: string;
23
+ nickname?: string | undefined;
24
+ complement?: string | undefined;
25
+ reference?: string | undefined;
26
+ accountId?: string | undefined;
27
+ }
28
+ export interface getAddressesByAccountIdRequest {
29
+ accountId: string;
30
+ }
31
+ export interface GetAddressByIdRequest {
32
+ accountId: string;
33
+ id: string;
34
+ }
35
+ export interface AddressList {
36
+ addresses: Address[];
37
+ }
38
+ export interface UpdateAddressRequest {
39
+ id: string;
40
+ state?: string | undefined;
41
+ city?: string | undefined;
42
+ zipCode?: string | undefined;
43
+ neighborhood?: string | undefined;
44
+ street?: string | undefined;
45
+ number?: string | undefined;
46
+ nickname?: string | undefined;
47
+ complement?: string | undefined;
48
+ reference?: string | undefined;
49
+ accountId?: string | undefined;
50
+ }
51
+ export declare const ADDRESS_PACKAGE_NAME = "address";
52
+ export interface AddressServiceClient {
53
+ createAddress(request: CreateAddressDto): Observable<Address>;
54
+ getAddressesByAccountId(request: getAddressesByAccountIdRequest): Observable<AddressList>;
55
+ getAddressById(request: GetAddressByIdRequest): Observable<Address>;
56
+ updateAddress(request: UpdateAddressRequest): Observable<Address>;
57
+ }
58
+ export interface AddressServiceController {
59
+ createAddress(request: CreateAddressDto): Promise<Address> | Observable<Address> | Address;
60
+ getAddressesByAccountId(request: getAddressesByAccountIdRequest): Promise<AddressList> | Observable<AddressList> | AddressList;
61
+ getAddressById(request: GetAddressByIdRequest): Promise<Address> | Observable<Address> | Address;
62
+ updateAddress(request: UpdateAddressRequest): Promise<Address> | Observable<Address> | Address;
63
+ }
64
+ export declare function AddressServiceControllerMethods(): (constructor: Function) => void;
65
+ export declare const ADDRESS_SERVICE_NAME = "AddressService";
@@ -0,0 +1,29 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v6.32.0
5
+ // source: address.proto
6
+ /* eslint-disable */
7
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
8
+ export const protobufPackage = 'address';
9
+ export const ADDRESS_PACKAGE_NAME = 'address';
10
+ export function AddressServiceControllerMethods() {
11
+ return function (constructor) {
12
+ const grpcMethods = [
13
+ 'createAddress',
14
+ 'getAddressesByAccountId',
15
+ 'getAddressById',
16
+ 'updateAddress',
17
+ ];
18
+ for (const method of grpcMethods) {
19
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
20
+ GrpcMethod('AddressService', method)(constructor.prototype[method], method, descriptor);
21
+ }
22
+ const grpcStreamMethods = [];
23
+ for (const method of grpcStreamMethods) {
24
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
25
+ GrpcStreamMethod('AddressService', method)(constructor.prototype[method], method, descriptor);
26
+ }
27
+ };
28
+ }
29
+ export const ADDRESS_SERVICE_NAME = 'AddressService';
@@ -0,0 +1,86 @@
1
+ import { CardChallenge, CardRejectionReason, VerificationStatus } from '@postpaybr/contracts/types';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "adminCardVerification";
4
+ export interface CreateCardVerificationRequest {
5
+ customerId: string;
6
+ cardId: string;
7
+ selfieWithCardUrl: string;
8
+ challenge: CardChallenge;
9
+ }
10
+ export interface UpdateVerificationStatusRequest {
11
+ id: string;
12
+ status: VerificationStatus;
13
+ rejectionReasons?: CardRejectionReason[];
14
+ customRejectionReason?: string | undefined;
15
+ reviewerId?: string | undefined;
16
+ }
17
+ export interface CardVerificationResponse {
18
+ id: string;
19
+ cardId: string;
20
+ selfieWithCardUrl: string;
21
+ rejectionReasons: CardRejectionReason[];
22
+ customRejectionReason: string;
23
+ histories?: VerificationHistory[];
24
+ challenge: CardChallenge;
25
+ }
26
+ export interface GetVerificationsWithCardDetailsRequest {
27
+ status: VerificationStatus;
28
+ offset?: number | undefined;
29
+ limit?: number | undefined;
30
+ }
31
+ export interface GetAllVerificationsWithDetailsResponse {
32
+ verifications: VerificationWithDetails[];
33
+ }
34
+ export interface VerificationWithDetails {
35
+ id: string;
36
+ customerName: string;
37
+ cardNumber: string;
38
+ createdAt: Date;
39
+ reviewedBy: string;
40
+ status: string;
41
+ }
42
+ export interface VerificationHistory {
43
+ id: string;
44
+ status: VerificationStatus;
45
+ reviewerId: string;
46
+ createdAt: Date;
47
+ }
48
+ export interface GetVerificationDetailsByIdRequest {
49
+ id: string;
50
+ }
51
+ export interface VerificationDetailsResponse {
52
+ id: string;
53
+ cardNumber: string;
54
+ cardName: string;
55
+ selfieWithCardUrl: string;
56
+ selfieWithDocumentUrl: string;
57
+ challenge: CardChallenge;
58
+ status: VerificationStatus;
59
+ histories: VerificationHistoryWithAdmin[];
60
+ rejectionReasons: CardRejectionReason[];
61
+ customRejectionReason: string;
62
+ }
63
+ export interface VerificationHistoryWithAdmin {
64
+ id: string;
65
+ status: VerificationStatus;
66
+ reviewerId: string;
67
+ createdAt: Date;
68
+ reviewedBy: string;
69
+ }
70
+ export interface Empty {
71
+ }
72
+ export declare const ADMIN_CARD_VERIFICATION_PACKAGE_NAME = "adminCardVerification";
73
+ export interface AdminCardVerificationServiceClient {
74
+ initiateCardVerification(request: CreateCardVerificationRequest): Observable<CardVerificationResponse>;
75
+ updateVerificationStatus(request: UpdateVerificationStatusRequest): Observable<CardVerificationResponse>;
76
+ getVerificationsWithCardDetails(request: GetVerificationsWithCardDetailsRequest): Observable<GetAllVerificationsWithDetailsResponse>;
77
+ getVerificationDetailsById(request: GetVerificationDetailsByIdRequest): Observable<VerificationDetailsResponse>;
78
+ }
79
+ export interface AdminCardVerificationServiceController {
80
+ initiateCardVerification(request: CreateCardVerificationRequest): Promise<CardVerificationResponse> | Observable<CardVerificationResponse> | CardVerificationResponse;
81
+ updateVerificationStatus(request: UpdateVerificationStatusRequest): Promise<CardVerificationResponse> | Observable<CardVerificationResponse> | CardVerificationResponse;
82
+ getVerificationsWithCardDetails(request: GetVerificationsWithCardDetailsRequest): Promise<GetAllVerificationsWithDetailsResponse> | Observable<GetAllVerificationsWithDetailsResponse> | GetAllVerificationsWithDetailsResponse;
83
+ getVerificationDetailsById(request: GetVerificationDetailsByIdRequest): Promise<VerificationDetailsResponse> | Observable<VerificationDetailsResponse> | VerificationDetailsResponse;
84
+ }
85
+ export declare function AdminCardVerificationServiceControllerMethods(): (constructor: Function) => void;
86
+ export declare const ADMIN_CARD_VERIFICATION_SERVICE_NAME = "AdminCardVerificationService";
@@ -0,0 +1,28 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v3.20.3
5
+ // source: admin-card-verification.proto
6
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
7
+ export const protobufPackage = 'adminCardVerification';
8
+ export const ADMIN_CARD_VERIFICATION_PACKAGE_NAME = 'adminCardVerification';
9
+ export function AdminCardVerificationServiceControllerMethods() {
10
+ return function (constructor) {
11
+ const grpcMethods = [
12
+ 'initiateCardVerification',
13
+ 'updateVerificationStatus',
14
+ 'getVerificationsWithCardDetails',
15
+ 'getVerificationDetailsById',
16
+ ];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ GrpcMethod('AdminCardVerificationService', method)(constructor.prototype[method], method, descriptor);
20
+ }
21
+ const grpcStreamMethods = [];
22
+ for (const method of grpcStreamMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ GrpcStreamMethod('AdminCardVerificationService', method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ export const ADMIN_CARD_VERIFICATION_SERVICE_NAME = 'AdminCardVerificationService';
@@ -0,0 +1,176 @@
1
+ import { HolderType, RecipientLegalType, UserStatus } from '@postpaybr/contracts/enums';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "administrator";
4
+ export interface CreateAdministratorRequest {
5
+ firstName: string;
6
+ lastName: string;
7
+ email: string;
8
+ roleIds: string[];
9
+ recipientId: string;
10
+ }
11
+ export interface GetAdministratorByIdRequest {
12
+ id: string;
13
+ }
14
+ export interface AdministratorResponse {
15
+ id: string;
16
+ firstName: string;
17
+ lastName: string;
18
+ document: string;
19
+ email: string;
20
+ isAccessRestricted: boolean;
21
+ roles?: Role[];
22
+ status?: UserStatus | undefined;
23
+ isSuperAdmin: boolean;
24
+ recipientId: string;
25
+ userId: string;
26
+ twoFactorEnabled?: boolean;
27
+ }
28
+ export interface UpdateAdministratorRequest {
29
+ id: string;
30
+ firstName?: string | undefined;
31
+ lastName?: string | undefined;
32
+ email?: string | undefined;
33
+ roleIds?: string[];
34
+ document?: string | undefined;
35
+ status?: UserStatus | undefined;
36
+ }
37
+ export interface Role {
38
+ id: string;
39
+ code: string;
40
+ description: string;
41
+ permissions: string[];
42
+ }
43
+ export interface GetAllAdministratorsRequest {
44
+ }
45
+ export interface GetAllAdministratorsResponse {
46
+ administrators: AdministratorResponse[];
47
+ }
48
+ export interface ValidateAndSignInRequest {
49
+ email: string;
50
+ password: string;
51
+ }
52
+ export interface Tokens {
53
+ accessToken: string;
54
+ refreshToken: string;
55
+ }
56
+ export interface UserInfo {
57
+ id: string;
58
+ email: string;
59
+ name: string;
60
+ }
61
+ export interface ValidateAndSignInResponse {
62
+ success?: SuccessResponse | undefined;
63
+ twoFactorRequired?: TwoFactorRequiredResponse | undefined;
64
+ }
65
+ export interface SuccessResponse {
66
+ tokens: Tokens | undefined;
67
+ administrator: AdministratorResponse | undefined;
68
+ recipient: Recipient | undefined;
69
+ }
70
+ export interface TwoFactorRequiredResponse {
71
+ administratorId: string;
72
+ user: UserInfo | undefined;
73
+ }
74
+ export interface VerifyTwoFactorAuthenticationRequest {
75
+ administratorId: string;
76
+ token: string;
77
+ }
78
+ export interface VerifyTwoFactorAuthenticationResponse {
79
+ tokens: Tokens | undefined;
80
+ administrator: AdministratorResponse | undefined;
81
+ recipient: Recipient | undefined;
82
+ }
83
+ export interface Recipient {
84
+ id: string;
85
+ code: string;
86
+ commercialName: string;
87
+ socialReason: string;
88
+ holderType: HolderType;
89
+ document: string;
90
+ cnaeId: string;
91
+ legalType: RecipientLegalType;
92
+ contactName: string;
93
+ contactEmail: string;
94
+ contactPhone: string;
95
+ foundation: string;
96
+ avatarUrl?: string | undefined;
97
+ isActive: boolean;
98
+ }
99
+ export interface RefreshTokenRequest {
100
+ refreshToken: string;
101
+ }
102
+ export interface RefreshTokenResponse {
103
+ accessToken: string;
104
+ refreshToken: string;
105
+ isAccessRestricted: boolean;
106
+ }
107
+ export interface handleAdministratorChangePasswordRequest {
108
+ administratorId: string;
109
+ newPassword: string;
110
+ }
111
+ export interface handleAdministratorChangePasswordResponse {
112
+ isFirstChangePassword: boolean;
113
+ }
114
+ export interface ResendVerificationEmailRequest {
115
+ administratorId: string;
116
+ }
117
+ export interface Void {
118
+ }
119
+ export interface ChangeAdministratorStatusRequest {
120
+ administratorId: string;
121
+ status: string;
122
+ }
123
+ export interface ChangeAdministratorStatusResponse {
124
+ success: boolean;
125
+ }
126
+ export interface initiateAdministratorChangePasswordRequest {
127
+ email: string;
128
+ }
129
+ export interface initiateAdministratorChangePasswordResponse {
130
+ success: boolean;
131
+ }
132
+ export interface GetAdministratorNameRequest {
133
+ id: string;
134
+ }
135
+ export interface GetAdministratorNameResponse {
136
+ name: string;
137
+ }
138
+ export interface GetAdministratorsByRecipientRequest {
139
+ recipientId: string;
140
+ }
141
+ export interface GetAdministratorsByRecipientResponse {
142
+ administrators: AdministratorResponse[];
143
+ }
144
+ export declare const ADMINISTRATOR_PACKAGE_NAME = "administrator";
145
+ export interface AdministratorServiceClient {
146
+ createAdministrator(request: CreateAdministratorRequest): Observable<AdministratorResponse>;
147
+ getAdministratorById(request: GetAdministratorByIdRequest): Observable<AdministratorResponse>;
148
+ updateAdministrator(request: UpdateAdministratorRequest): Observable<AdministratorResponse>;
149
+ getAllAdministrators(request: GetAllAdministratorsRequest): Observable<GetAllAdministratorsResponse>;
150
+ validateAndSignIn(request: ValidateAndSignInRequest): Observable<ValidateAndSignInResponse>;
151
+ verifyTwoFactorAuthentication(request: VerifyTwoFactorAuthenticationRequest): Observable<VerifyTwoFactorAuthenticationResponse>;
152
+ refreshAccessToken(request: RefreshTokenRequest): Observable<RefreshTokenResponse>;
153
+ handleAdministratorChangePassword(request: handleAdministratorChangePasswordRequest): Observable<handleAdministratorChangePasswordResponse>;
154
+ resendVerificationEmail(request: ResendVerificationEmailRequest): Observable<Void>;
155
+ changeAdministratorStatus(request: ChangeAdministratorStatusRequest): Observable<ChangeAdministratorStatusResponse>;
156
+ initiateAdministratorChangePassword(request: initiateAdministratorChangePasswordRequest): Observable<initiateAdministratorChangePasswordResponse>;
157
+ getAdministratorName(request: GetAdministratorNameRequest): Observable<GetAdministratorNameResponse>;
158
+ getAdministratorsByRecipient(request: GetAdministratorsByRecipientRequest): Observable<GetAdministratorsByRecipientResponse>;
159
+ }
160
+ export interface AdministratorServiceController {
161
+ createAdministrator(request: CreateAdministratorRequest): Promise<AdministratorResponse> | Observable<AdministratorResponse> | AdministratorResponse;
162
+ getAdministratorById(request: GetAdministratorByIdRequest): Promise<AdministratorResponse> | Observable<AdministratorResponse> | AdministratorResponse;
163
+ updateAdministrator(request: UpdateAdministratorRequest): Promise<AdministratorResponse> | Observable<AdministratorResponse> | AdministratorResponse;
164
+ getAllAdministrators(request: GetAllAdministratorsRequest): Promise<GetAllAdministratorsResponse> | Observable<GetAllAdministratorsResponse> | GetAllAdministratorsResponse;
165
+ validateAndSignIn(request: ValidateAndSignInRequest): Promise<ValidateAndSignInResponse> | Observable<ValidateAndSignInResponse> | ValidateAndSignInResponse;
166
+ verifyTwoFactorAuthentication(request: VerifyTwoFactorAuthenticationRequest): Promise<VerifyTwoFactorAuthenticationResponse> | Observable<VerifyTwoFactorAuthenticationResponse> | VerifyTwoFactorAuthenticationResponse;
167
+ refreshAccessToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse> | Observable<RefreshTokenResponse> | RefreshTokenResponse;
168
+ handleAdministratorChangePassword(request: handleAdministratorChangePasswordRequest): Promise<handleAdministratorChangePasswordResponse> | Observable<handleAdministratorChangePasswordResponse> | handleAdministratorChangePasswordResponse;
169
+ resendVerificationEmail(request: ResendVerificationEmailRequest): Promise<Void> | Observable<Void> | Void;
170
+ changeAdministratorStatus(request: ChangeAdministratorStatusRequest): Promise<ChangeAdministratorStatusResponse> | Observable<ChangeAdministratorStatusResponse> | ChangeAdministratorStatusResponse;
171
+ initiateAdministratorChangePassword(request: initiateAdministratorChangePasswordRequest): Promise<initiateAdministratorChangePasswordResponse> | Observable<initiateAdministratorChangePasswordResponse> | initiateAdministratorChangePasswordResponse;
172
+ getAdministratorName(request: GetAdministratorNameRequest): Promise<GetAdministratorNameResponse> | Observable<GetAdministratorNameResponse> | GetAdministratorNameResponse;
173
+ getAdministratorsByRecipient(request: GetAdministratorsByRecipientRequest): Promise<GetAdministratorsByRecipientResponse> | Observable<GetAdministratorsByRecipientResponse> | GetAdministratorsByRecipientResponse;
174
+ }
175
+ export declare function AdministratorServiceControllerMethods(): (constructor: Function) => void;
176
+ export declare const ADMINISTRATOR_SERVICE_NAME = "AdministratorService";
@@ -0,0 +1,37 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v6.32.1
5
+ // source: administrator.proto
6
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
7
+ export const protobufPackage = 'administrator';
8
+ export const ADMINISTRATOR_PACKAGE_NAME = 'administrator';
9
+ export function AdministratorServiceControllerMethods() {
10
+ return function (constructor) {
11
+ const grpcMethods = [
12
+ 'createAdministrator',
13
+ 'getAdministratorById',
14
+ 'updateAdministrator',
15
+ 'getAllAdministrators',
16
+ 'validateAndSignIn',
17
+ 'verifyTwoFactorAuthentication',
18
+ 'refreshAccessToken',
19
+ 'handleAdministratorChangePassword',
20
+ 'resendVerificationEmail',
21
+ 'changeAdministratorStatus',
22
+ 'initiateAdministratorChangePassword',
23
+ 'getAdministratorName',
24
+ 'getAdministratorsByRecipient',
25
+ ];
26
+ for (const method of grpcMethods) {
27
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
28
+ GrpcMethod('AdministratorService', method)(constructor.prototype[method], method, descriptor);
29
+ }
30
+ const grpcStreamMethods = [];
31
+ for (const method of grpcStreamMethods) {
32
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
33
+ GrpcStreamMethod('AdministratorService', method)(constructor.prototype[method], method, descriptor);
34
+ }
35
+ };
36
+ }
37
+ export const ADMINISTRATOR_SERVICE_NAME = 'AdministratorService';
@@ -0,0 +1,84 @@
1
+ import { AnticipationStatus } from '@postpaybr/contracts/types';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "anticipation";
4
+ export interface SimulateAnticipationsRequest {
5
+ payableIds: string[];
6
+ }
7
+ export interface CreateAnticipationsRequest {
8
+ payableIds: string[];
9
+ }
10
+ export interface GetAnticipationsByRecipientRequest {
11
+ recipientId: string;
12
+ }
13
+ export interface GetAnticipationRequest {
14
+ id: string;
15
+ }
16
+ export interface UpdateAnticipationStatusRequest {
17
+ anticipationId: string;
18
+ status: string;
19
+ }
20
+ export interface SimulationResponse {
21
+ payableCount: number;
22
+ totalAmount: number;
23
+ recipientId: string;
24
+ }
25
+ export interface AnticipationResponse {
26
+ success: boolean;
27
+ }
28
+ export interface GetAnticipationsResponse {
29
+ anticipations: Anticipation[];
30
+ }
31
+ export interface Anticipation {
32
+ id: string;
33
+ amount: number;
34
+ fee: number;
35
+ baseFee: number;
36
+ feePercentage: number;
37
+ status: string;
38
+ externalId?: string | undefined;
39
+ anticipatedDays?: number | undefined;
40
+ createdAt: Date;
41
+ updatedAt: Date;
42
+ payable: Payable | undefined;
43
+ }
44
+ export interface Payable {
45
+ id: string;
46
+ amount: number;
47
+ installment: number;
48
+ status: string;
49
+ dueAt: string;
50
+ createdAt: Date;
51
+ isAnticipated: boolean;
52
+ processedAt: Date;
53
+ chargeId: string;
54
+ recipientId: string;
55
+ }
56
+ export interface UpdateAnticipationRequest {
57
+ payableId: string;
58
+ externalId?: string | undefined;
59
+ status?: AnticipationStatus | undefined;
60
+ amount?: number | undefined;
61
+ fee?: number | undefined;
62
+ baseFee?: number | undefined;
63
+ feePercentage?: number | undefined;
64
+ anticipatedDays?: number | undefined;
65
+ }
66
+ export declare const ANTICIPATION_PACKAGE_NAME = "anticipation";
67
+ export interface AnticipationServiceClient {
68
+ simulateAnticipations(request: SimulateAnticipationsRequest): Observable<SimulationResponse>;
69
+ createAnticipations(request: CreateAnticipationsRequest): Observable<AnticipationResponse>;
70
+ getAnticipationsByRecipient(request: GetAnticipationsByRecipientRequest): Observable<GetAnticipationsResponse>;
71
+ getAnticipation(request: GetAnticipationRequest): Observable<Anticipation>;
72
+ updateAnticipationStatus(request: UpdateAnticipationStatusRequest): Observable<AnticipationResponse>;
73
+ updateAnticipation(request: UpdateAnticipationRequest): Observable<Anticipation>;
74
+ }
75
+ export interface AnticipationServiceController {
76
+ simulateAnticipations(request: SimulateAnticipationsRequest): Promise<SimulationResponse> | Observable<SimulationResponse> | SimulationResponse;
77
+ createAnticipations(request: CreateAnticipationsRequest): Promise<AnticipationResponse> | Observable<AnticipationResponse> | AnticipationResponse;
78
+ getAnticipationsByRecipient(request: GetAnticipationsByRecipientRequest): Promise<GetAnticipationsResponse> | Observable<GetAnticipationsResponse> | GetAnticipationsResponse;
79
+ getAnticipation(request: GetAnticipationRequest): Promise<Anticipation> | Observable<Anticipation> | Anticipation;
80
+ updateAnticipationStatus(request: UpdateAnticipationStatusRequest): Promise<AnticipationResponse> | Observable<AnticipationResponse> | AnticipationResponse;
81
+ updateAnticipation(request: UpdateAnticipationRequest): Promise<Anticipation> | Observable<Anticipation> | Anticipation;
82
+ }
83
+ export declare function AnticipationServiceControllerMethods(): (constructor: Function) => void;
84
+ export declare const ANTICIPATION_SERVICE_NAME = "AnticipationService";
@@ -0,0 +1,30 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v3.20.3
5
+ // source: anticipation.proto
6
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
7
+ export const protobufPackage = 'anticipation';
8
+ export const ANTICIPATION_PACKAGE_NAME = 'anticipation';
9
+ export function AnticipationServiceControllerMethods() {
10
+ return function (constructor) {
11
+ const grpcMethods = [
12
+ 'simulateAnticipations',
13
+ 'createAnticipations',
14
+ 'getAnticipationsByRecipient',
15
+ 'getAnticipation',
16
+ 'updateAnticipationStatus',
17
+ 'updateAnticipation',
18
+ ];
19
+ for (const method of grpcMethods) {
20
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
21
+ GrpcMethod('AnticipationService', method)(constructor.prototype[method], method, descriptor);
22
+ }
23
+ const grpcStreamMethods = [];
24
+ for (const method of grpcStreamMethods) {
25
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
+ GrpcStreamMethod('AnticipationService', method)(constructor.prototype[method], method, descriptor);
27
+ }
28
+ };
29
+ }
30
+ export const ANTICIPATION_SERVICE_NAME = 'AnticipationService';