@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,71 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare const protobufPackage = "email";
3
+ export interface SendVerificationEmailRequest {
4
+ email: string;
5
+ customerId?: string | undefined;
6
+ template: string;
7
+ subject: string;
8
+ }
9
+ export interface SendVerificationEmailResponse {
10
+ success: boolean;
11
+ }
12
+ export interface CheckVerificationEmailRequest {
13
+ token: string;
14
+ }
15
+ export interface CheckVerificationEmailResponse {
16
+ success: boolean;
17
+ }
18
+ export interface SendMessageEmailRequest {
19
+ email: string;
20
+ template: string;
21
+ subject?: string | undefined;
22
+ }
23
+ export interface SendMessageEmailResponse {
24
+ success: boolean;
25
+ }
26
+ export interface SendRecoveryPasswordEmailRequest {
27
+ email: string;
28
+ customerId: string;
29
+ subject: string;
30
+ }
31
+ export interface SendRecoveryPasswordEmailResponse {
32
+ success: boolean;
33
+ }
34
+ export interface CheckRecoveryPasswordTokenRequest {
35
+ token: string;
36
+ email: string;
37
+ }
38
+ export interface CheckRecoveryPasswordTokenResponse {
39
+ success: boolean;
40
+ attemptsLeft: number;
41
+ message: string;
42
+ }
43
+ export interface GetEmailVerificationByTokenRequest {
44
+ token: string;
45
+ }
46
+ export interface GetEmailVerificationByTokenResponse {
47
+ recipientId: string;
48
+ recipientType: string;
49
+ token: string;
50
+ expiresAt: Date;
51
+ isVerified: boolean;
52
+ }
53
+ export declare const EMAIL_PACKAGE_NAME = "email";
54
+ export interface EmailServiceClient {
55
+ sendVerificationEmail(request: SendVerificationEmailRequest): Observable<SendVerificationEmailResponse>;
56
+ checkVerificationEmail(request: CheckVerificationEmailRequest): Observable<CheckVerificationEmailResponse>;
57
+ sendMessageEmail(request: SendMessageEmailRequest): Observable<SendMessageEmailResponse>;
58
+ sendRecoveryPasswordEmail(request: SendRecoveryPasswordEmailRequest): Observable<SendRecoveryPasswordEmailResponse>;
59
+ checkRecoveryPasswordToken(request: CheckRecoveryPasswordTokenRequest): Observable<CheckRecoveryPasswordTokenResponse>;
60
+ getEmailVerificationByToken(request: GetEmailVerificationByTokenRequest): Observable<GetEmailVerificationByTokenResponse>;
61
+ }
62
+ export interface EmailServiceController {
63
+ sendVerificationEmail(request: SendVerificationEmailRequest): Promise<SendVerificationEmailResponse> | Observable<SendVerificationEmailResponse> | SendVerificationEmailResponse;
64
+ checkVerificationEmail(request: CheckVerificationEmailRequest): Promise<CheckVerificationEmailResponse> | Observable<CheckVerificationEmailResponse> | CheckVerificationEmailResponse;
65
+ sendMessageEmail(request: SendMessageEmailRequest): Promise<SendMessageEmailResponse> | Observable<SendMessageEmailResponse> | SendMessageEmailResponse;
66
+ sendRecoveryPasswordEmail(request: SendRecoveryPasswordEmailRequest): Promise<SendRecoveryPasswordEmailResponse> | Observable<SendRecoveryPasswordEmailResponse> | SendRecoveryPasswordEmailResponse;
67
+ checkRecoveryPasswordToken(request: CheckRecoveryPasswordTokenRequest): Promise<CheckRecoveryPasswordTokenResponse> | Observable<CheckRecoveryPasswordTokenResponse> | CheckRecoveryPasswordTokenResponse;
68
+ getEmailVerificationByToken(request: GetEmailVerificationByTokenRequest): Promise<GetEmailVerificationByTokenResponse> | Observable<GetEmailVerificationByTokenResponse> | GetEmailVerificationByTokenResponse;
69
+ }
70
+ export declare function EmailServiceControllerMethods(): (constructor: Function) => void;
71
+ export declare const EMAIL_SERVICE_NAME = "EmailService";
@@ -0,0 +1,31 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.0
4
+ // protoc v3.20.3
5
+ // source: email.proto
6
+ /* eslint-disable */
7
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
8
+ export const protobufPackage = 'email';
9
+ export const EMAIL_PACKAGE_NAME = 'email';
10
+ export function EmailServiceControllerMethods() {
11
+ return function (constructor) {
12
+ const grpcMethods = [
13
+ 'sendVerificationEmail',
14
+ 'checkVerificationEmail',
15
+ 'sendMessageEmail',
16
+ 'sendRecoveryPasswordEmail',
17
+ 'checkRecoveryPasswordToken',
18
+ 'getEmailVerificationByToken',
19
+ ];
20
+ for (const method of grpcMethods) {
21
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
22
+ GrpcMethod('EmailService', method)(constructor.prototype[method], method, descriptor);
23
+ }
24
+ const grpcStreamMethods = [];
25
+ for (const method of grpcStreamMethods) {
26
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
27
+ GrpcStreamMethod('EmailService', method)(constructor.prototype[method], method, descriptor);
28
+ }
29
+ };
30
+ }
31
+ export const EMAIL_SERVICE_NAME = 'EmailService';
@@ -0,0 +1,31 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare const protobufPackage = "expoPush";
3
+ export interface NotificationDto {
4
+ pushTokens: string[];
5
+ title: string;
6
+ body?: string | undefined;
7
+ data: {
8
+ [key: string]: string;
9
+ };
10
+ }
11
+ export interface NotificationDto_DataEntry {
12
+ key: string;
13
+ value: string;
14
+ }
15
+ export interface DataValue {
16
+ stringValue?: string | undefined;
17
+ intValue?: number | undefined;
18
+ boolValue?: boolean | undefined;
19
+ floatValue?: number | undefined;
20
+ }
21
+ export interface Empty {
22
+ }
23
+ export declare const EXPO_PUSH_PACKAGE_NAME = "expoPush";
24
+ export interface ExpoPushServiceClient {
25
+ sendNotification(request: NotificationDto): Observable<Empty>;
26
+ }
27
+ export interface ExpoPushServiceController {
28
+ sendNotification(request: NotificationDto): Promise<Empty> | Observable<Empty> | Empty;
29
+ }
30
+ export declare function ExpoPushServiceControllerMethods(): (constructor: Function) => void;
31
+ export declare const EXPO_PUSH_SERVICE_NAME = "ExpoPushService";
@@ -0,0 +1,24 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.0
4
+ // protoc v3.20.3
5
+ // source: expo-push.proto
6
+ /* eslint-disable */
7
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
8
+ export const protobufPackage = 'expoPush';
9
+ export const EXPO_PUSH_PACKAGE_NAME = 'expoPush';
10
+ export function ExpoPushServiceControllerMethods() {
11
+ return function (constructor) {
12
+ const grpcMethods = ['sendNotification'];
13
+ for (const method of grpcMethods) {
14
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
15
+ GrpcMethod('ExpoPushService', method)(constructor.prototype[method], method, descriptor);
16
+ }
17
+ const grpcStreamMethods = [];
18
+ for (const method of grpcStreamMethods) {
19
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
20
+ GrpcStreamMethod('ExpoPushService', method)(constructor.prototype[method], method, descriptor);
21
+ }
22
+ };
23
+ }
24
+ export const EXPO_PUSH_SERVICE_NAME = 'ExpoPushService';
@@ -0,0 +1,66 @@
1
+ import { brandType, FeeType, PaymentMethods } from '@postpaybr/contracts/types';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "fee";
4
+ export interface CreateFeeDto {
5
+ method: PaymentMethods;
6
+ type: FeeType;
7
+ base: number;
8
+ percentage?: number | undefined;
9
+ promotionalBase?: number | undefined;
10
+ promotionalPercentage?: number | undefined;
11
+ description?: string | undefined;
12
+ installment: number;
13
+ brand: brandType;
14
+ }
15
+ export interface UpdateFeeDto {
16
+ method?: PaymentMethods | undefined;
17
+ type?: FeeType | undefined;
18
+ base?: number | undefined;
19
+ percentage?: number | undefined;
20
+ promotionalBase?: number | undefined;
21
+ promotionalPercentage?: number | undefined;
22
+ description?: string | undefined;
23
+ installment?: number | undefined;
24
+ brand?: brandType | undefined;
25
+ recipientId: string;
26
+ feeId: string;
27
+ }
28
+ export interface GetFeeRequest {
29
+ recipientId: string;
30
+ method: PaymentMethods;
31
+ installment?: number | undefined;
32
+ brand?: brandType | undefined;
33
+ }
34
+ export interface FeeEntity {
35
+ id: string;
36
+ method: PaymentMethods;
37
+ type: FeeType;
38
+ base: number;
39
+ percentage: number;
40
+ promotionalBase: number;
41
+ promotionalPercentage: number;
42
+ description?: string | undefined;
43
+ installment: number;
44
+ isDefault: boolean;
45
+ brand: brandType;
46
+ }
47
+ export interface FeeEntityList {
48
+ fees: FeeEntity[];
49
+ }
50
+ export interface Void {
51
+ }
52
+ export declare const FEE_PACKAGE_NAME = "fee";
53
+ export interface FeeServiceClient {
54
+ createFee(request: CreateFeeDto): Observable<FeeEntity>;
55
+ updateRecipientFee(request: UpdateFeeDto): Observable<FeeEntity>;
56
+ getAllDefaultFees(request: Void): Observable<FeeEntityList>;
57
+ getFeeForRecipientAndMethod(request: GetFeeRequest): Observable<FeeEntity>;
58
+ }
59
+ export interface FeeServiceController {
60
+ createFee(request: CreateFeeDto): Promise<FeeEntity> | Observable<FeeEntity> | FeeEntity;
61
+ updateRecipientFee(request: UpdateFeeDto): Promise<FeeEntity> | Observable<FeeEntity> | FeeEntity;
62
+ getAllDefaultFees(request: Void): Promise<FeeEntityList> | Observable<FeeEntityList> | FeeEntityList;
63
+ getFeeForRecipientAndMethod(request: GetFeeRequest): Promise<FeeEntity> | Observable<FeeEntity> | FeeEntity;
64
+ }
65
+ export declare function FeeServiceControllerMethods(): (constructor: Function) => void;
66
+ export declare const FEE_SERVICE_NAME = "FeeService";
@@ -0,0 +1,28 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.0
4
+ // protoc v3.20.3
5
+ // source: fee.proto
6
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
7
+ export const protobufPackage = 'fee';
8
+ export const FEE_PACKAGE_NAME = 'fee';
9
+ export function FeeServiceControllerMethods() {
10
+ return function (constructor) {
11
+ const grpcMethods = [
12
+ 'createFee',
13
+ 'updateRecipientFee',
14
+ 'getAllDefaultFees',
15
+ 'getFeeForRecipientAndMethod',
16
+ ];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ GrpcMethod('FeeService', 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('FeeService', method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ export const FEE_SERVICE_NAME = 'FeeService';
@@ -0,0 +1,38 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare const protobufPackage = "location";
3
+ export interface State {
4
+ id: string;
5
+ code: string;
6
+ name: string;
7
+ nationalCode: number;
8
+ cities: City[];
9
+ }
10
+ export interface City {
11
+ id: string;
12
+ name: string;
13
+ nationalCode: number;
14
+ active: boolean;
15
+ state: State | undefined;
16
+ }
17
+ export interface GetCitiesRequest {
18
+ nationalCode: number;
19
+ }
20
+ export interface GetCitiesResponse {
21
+ cities: City[];
22
+ }
23
+ export interface GetStatesRequest {
24
+ }
25
+ export interface GetStatesResponse {
26
+ states: State[];
27
+ }
28
+ export declare const LOCATION_PACKAGE_NAME = "location";
29
+ export interface LocationServiceClient {
30
+ getCities(request: GetCitiesRequest): Observable<GetCitiesResponse>;
31
+ getStates(request: GetStatesRequest): Observable<GetStatesResponse>;
32
+ }
33
+ export interface LocationServiceController {
34
+ getCities(request: GetCitiesRequest): Promise<GetCitiesResponse> | Observable<GetCitiesResponse> | GetCitiesResponse;
35
+ getStates(request: GetStatesRequest): Promise<GetStatesResponse> | Observable<GetStatesResponse> | GetStatesResponse;
36
+ }
37
+ export declare function LocationServiceControllerMethods(): (constructor: Function) => void;
38
+ export declare const LOCATION_SERVICE_NAME = "LocationService";
@@ -0,0 +1,24 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.0
4
+ // protoc v3.20.3
5
+ // source: location.proto
6
+ /* eslint-disable */
7
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
8
+ export const protobufPackage = 'location';
9
+ export const LOCATION_PACKAGE_NAME = 'location';
10
+ export function LocationServiceControllerMethods() {
11
+ return function (constructor) {
12
+ const grpcMethods = ['getCities', 'getStates'];
13
+ for (const method of grpcMethods) {
14
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
15
+ GrpcMethod('LocationService', method)(constructor.prototype[method], method, descriptor);
16
+ }
17
+ const grpcStreamMethods = [];
18
+ for (const method of grpcStreamMethods) {
19
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
20
+ GrpcStreamMethod('LocationService', method)(constructor.prototype[method], method, descriptor);
21
+ }
22
+ };
23
+ }
24
+ export const LOCATION_SERVICE_NAME = 'LocationService';
@@ -0,0 +1,198 @@
1
+ import { RecipientType } from '@postpaybr/contracts/enums';
2
+ import { ChangesFieldType, NotificationCategory, NotificationImageType } from '@postpaybr/contracts/types';
3
+ import { Observable } from 'rxjs';
4
+ export declare const protobufPackage = "notification";
5
+ export interface GetAllNotificationsDto {
6
+ recipientId: string;
7
+ recipientType: RecipientType;
8
+ severities?: number[];
9
+ isRead?: boolean | undefined;
10
+ }
11
+ export interface DateFilter {
12
+ startDate?: Date | undefined;
13
+ endDate?: Date | undefined;
14
+ }
15
+ export interface PaginationFilter {
16
+ limit?: number | undefined;
17
+ offset?: number | undefined;
18
+ }
19
+ export interface NotificationChange {
20
+ field: ChangesFieldType;
21
+ oldValue: string;
22
+ newValue: string;
23
+ }
24
+ export interface ChangePoint {
25
+ title: string;
26
+ description: string;
27
+ }
28
+ export interface NotificationMetadata {
29
+ actionLabel?: string | undefined;
30
+ url?: string | undefined;
31
+ deviceInfo?: string | undefined;
32
+ location?: string | undefined;
33
+ eventDate?: Date | undefined;
34
+ securityAction?: string | undefined;
35
+ changes?: NotificationChange[];
36
+ startDate?: Date | undefined;
37
+ endDate?: Date | undefined;
38
+ impactDescription?: string | undefined;
39
+ updateReason?: string | undefined;
40
+ changePoints?: ChangePoint[];
41
+ userId?: string | undefined;
42
+ scheduledPaymentDate?: Date | undefined;
43
+ paymentAmount?: number | undefined;
44
+ paymentStatus?: string | undefined;
45
+ paymentMethod?: string | undefined;
46
+ chargeId?: string | undefined;
47
+ receiptId?: string | undefined;
48
+ taxId?: string | undefined;
49
+ params?: {
50
+ [key: string]: string;
51
+ };
52
+ actionButtonVariant?: 'default' | 'ghost' | undefined;
53
+ callToAction?: string | undefined;
54
+ }
55
+ export interface NotificationMetadata_ParamsEntry {
56
+ key: string;
57
+ value: string;
58
+ }
59
+ export interface Notification {
60
+ id: string;
61
+ title: string;
62
+ description: string;
63
+ isRead: boolean;
64
+ severity: number;
65
+ createdAt: Date;
66
+ updatedAt: Date;
67
+ category: NotificationCategory;
68
+ recipientType: RecipientType;
69
+ recipientId: string;
70
+ imageUrl?: string | undefined;
71
+ imageType?: NotificationImageType | undefined;
72
+ meta?: NotificationMetadata | undefined;
73
+ }
74
+ export interface CreateNotificationRequest {
75
+ recipientId: string;
76
+ recipientType: RecipientType;
77
+ title: string;
78
+ description: string;
79
+ severity?: number | undefined;
80
+ category?: NotificationCategory | undefined;
81
+ meta?: NotificationMetadata | undefined;
82
+ isRead?: boolean | undefined;
83
+ imageUrl?: string | undefined;
84
+ imageType?: NotificationImageType | undefined;
85
+ }
86
+ export interface NotificationResponse {
87
+ notification: Notification | undefined;
88
+ }
89
+ export interface GetNotificationByIdRequest {
90
+ recipientId: string;
91
+ recipientType: RecipientType;
92
+ id: string;
93
+ }
94
+ export interface GetAllNotificationsRequest {
95
+ data: GetAllNotificationsDto | undefined;
96
+ dateFilter: DateFilter | undefined;
97
+ pagination: PaginationFilter | undefined;
98
+ }
99
+ export interface NotificationsResponse {
100
+ notifications: Notification[];
101
+ count: number;
102
+ }
103
+ export interface CountUnreadNotificationsRequest {
104
+ recipientId: string;
105
+ recipientType: RecipientType;
106
+ }
107
+ export interface CountUnreadNotificationsResponse {
108
+ countNotRead: number;
109
+ }
110
+ export interface MarkAsReadRequest {
111
+ recipientId: string;
112
+ recipientType: RecipientType;
113
+ notificationId: string;
114
+ }
115
+ export interface MarkAsReadResponse {
116
+ success: boolean;
117
+ }
118
+ export interface CreateSecurityNotificationRequest {
119
+ recipientId: string;
120
+ recipientType: RecipientType;
121
+ deviceInfo?: string | undefined;
122
+ location?: string | undefined;
123
+ eventDate: Date;
124
+ imageUrl?: string | undefined;
125
+ imageType?: NotificationImageType | undefined;
126
+ }
127
+ export interface CreatePasswordChangedNotificationRequest {
128
+ recipientId: string;
129
+ recipientType: RecipientType;
130
+ deviceInfo?: string | undefined;
131
+ location?: string | undefined;
132
+ eventDate: Date;
133
+ imageUrl?: string | undefined;
134
+ imageType?: NotificationImageType | undefined;
135
+ }
136
+ export interface CreateMaintenanceNotificationRequest {
137
+ recipientId: string;
138
+ recipientType: RecipientType;
139
+ startDate: Date;
140
+ endDate: Date;
141
+ impactDescription: string;
142
+ imageUrl?: string | undefined;
143
+ imageType?: NotificationImageType | undefined;
144
+ }
145
+ export interface CreateTermsUpdatedNotificationRequest {
146
+ recipientId: string;
147
+ recipientType: RecipientType;
148
+ updateReason: string;
149
+ changePoints: ChangePoint[];
150
+ imageUrl?: string | undefined;
151
+ imageType?: NotificationImageType | undefined;
152
+ }
153
+ export interface CreateProfileUpdatedNotificationRequest {
154
+ recipientId: string;
155
+ recipientType: RecipientType;
156
+ changes: NotificationChange[];
157
+ imageUrl?: string | undefined;
158
+ imageType?: NotificationImageType | undefined;
159
+ }
160
+ export interface GetNotificationStatusRequest {
161
+ recipientId: string;
162
+ recipientType: RecipientType;
163
+ }
164
+ export interface GetNotificationStatusResponse {
165
+ hasCritical: boolean;
166
+ hasUpdates: boolean;
167
+ allCriticalRead: boolean;
168
+ allUpdatesRead: boolean;
169
+ }
170
+ export declare const NOTIFICATION_PACKAGE_NAME = "notification";
171
+ export interface NotificationServiceClient {
172
+ createNotification(request: CreateNotificationRequest): Observable<NotificationResponse>;
173
+ getNotificationById(request: GetNotificationByIdRequest): Observable<NotificationResponse>;
174
+ getAllNotifications(request: GetAllNotificationsRequest): Observable<NotificationsResponse>;
175
+ countUnreadNotifications(request: CountUnreadNotificationsRequest): Observable<CountUnreadNotificationsResponse>;
176
+ markAsRead(request: MarkAsReadRequest): Observable<MarkAsReadResponse>;
177
+ createSecurityNotification(request: CreateSecurityNotificationRequest): Observable<NotificationResponse>;
178
+ createPasswordChangedNotification(request: CreatePasswordChangedNotificationRequest): Observable<NotificationResponse>;
179
+ createMaintenanceNotification(request: CreateMaintenanceNotificationRequest): Observable<NotificationResponse>;
180
+ createTermsUpdatedNotification(request: CreateTermsUpdatedNotificationRequest): Observable<NotificationResponse>;
181
+ createProfileUpdatedNotification(request: CreateProfileUpdatedNotificationRequest): Observable<NotificationResponse>;
182
+ getNotificationStatus(request: GetNotificationStatusRequest): Observable<GetNotificationStatusResponse>;
183
+ }
184
+ export interface NotificationServiceController {
185
+ createNotification(request: CreateNotificationRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
186
+ getNotificationById(request: GetNotificationByIdRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
187
+ getAllNotifications(request: GetAllNotificationsRequest): Promise<NotificationsResponse> | Observable<NotificationsResponse> | NotificationsResponse;
188
+ countUnreadNotifications(request: CountUnreadNotificationsRequest): Promise<CountUnreadNotificationsResponse> | Observable<CountUnreadNotificationsResponse> | CountUnreadNotificationsResponse;
189
+ markAsRead(request: MarkAsReadRequest): Promise<MarkAsReadResponse> | Observable<MarkAsReadResponse> | MarkAsReadResponse;
190
+ createSecurityNotification(request: CreateSecurityNotificationRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
191
+ createPasswordChangedNotification(request: CreatePasswordChangedNotificationRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
192
+ createMaintenanceNotification(request: CreateMaintenanceNotificationRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
193
+ createTermsUpdatedNotification(request: CreateTermsUpdatedNotificationRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
194
+ createProfileUpdatedNotification(request: CreateProfileUpdatedNotificationRequest): Promise<NotificationResponse> | Observable<NotificationResponse> | NotificationResponse;
195
+ getNotificationStatus(request: GetNotificationStatusRequest): Promise<GetNotificationStatusResponse> | Observable<GetNotificationStatusResponse> | GetNotificationStatusResponse;
196
+ }
197
+ export declare function NotificationServiceControllerMethods(): (constructor: Function) => void;
198
+ export declare const NOTIFICATION_SERVICE_NAME = "NotificationService";
@@ -0,0 +1,35 @@
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: notification.proto
6
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
7
+ export const protobufPackage = 'notification';
8
+ export const NOTIFICATION_PACKAGE_NAME = 'notification';
9
+ export function NotificationServiceControllerMethods() {
10
+ return function (constructor) {
11
+ const grpcMethods = [
12
+ 'createNotification',
13
+ 'getNotificationById',
14
+ 'getAllNotifications',
15
+ 'countUnreadNotifications',
16
+ 'markAsRead',
17
+ 'createSecurityNotification',
18
+ 'createPasswordChangedNotification',
19
+ 'createMaintenanceNotification',
20
+ 'createTermsUpdatedNotification',
21
+ 'createProfileUpdatedNotification',
22
+ 'getNotificationStatus',
23
+ ];
24
+ for (const method of grpcMethods) {
25
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
+ GrpcMethod('NotificationService', method)(constructor.prototype[method], method, descriptor);
27
+ }
28
+ const grpcStreamMethods = [];
29
+ for (const method of grpcStreamMethods) {
30
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
31
+ GrpcStreamMethod('NotificationService', method)(constructor.prototype[method], method, descriptor);
32
+ }
33
+ };
34
+ }
35
+ export const NOTIFICATION_SERVICE_NAME = 'NotificationService';