@merkaly/api 0.23.0 → 0.24.0

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 (30) hide show
  1. package/dist/finance/payment/index.d.ts +1 -0
  2. package/dist/finance/payment/payment.entity.d.ts +2 -0
  3. package/dist/finance/payment/payment.gateway.entity.d.ts +51 -0
  4. package/dist/integration/payment/account.d.ts +85 -0
  5. package/dist/integration/payment/account.enum.d.ts +30 -0
  6. package/dist/integration/payment/account.enum.js +35 -0
  7. package/dist/integration/payment/charge.d.ts +25 -0
  8. package/dist/integration/payment/charge.enum.d.ts +9 -0
  9. package/dist/integration/payment/charge.enum.js +10 -0
  10. package/dist/integration/payment/charge.request.validator.d.ts +16 -0
  11. package/dist/integration/payment/charge.request.validator.js +118 -0
  12. package/dist/integration/payment/index.d.ts +6 -3
  13. package/dist/integration/payment/index.js +3 -1
  14. package/dist/integration/payment/payment.account.entity.d.ts +68 -0
  15. package/dist/integration/payment/payment.entity.d.ts +3 -2
  16. package/dist/integration/payment/provider.enum.d.ts +1 -1
  17. package/dist/integration/payment/provider.enum.js +1 -1
  18. package/dist/integration/payment/request.validator.d.ts +37 -69
  19. package/dist/integration/payment/request.validator.js +145 -303
  20. package/dist/order/sale/attention.d.ts +8 -0
  21. package/dist/order/sale/attention.enum.d.ts +9 -0
  22. package/dist/order/sale/attention.enum.js +10 -0
  23. package/dist/order/sale/index.d.ts +2 -0
  24. package/dist/order/sale/index.js +1 -0
  25. package/dist/order/sale/shipping.request.validator.js +2 -11
  26. package/package.json +3 -1
  27. package/dist/integration/payment/payment.recipient.entity.d.ts +0 -53
  28. package/dist/integration/payment/recipient.d.ts +0 -40
  29. package/dist/integration/payment/recipient.enum.d.ts +0 -22
  30. package/dist/integration/payment/recipient.enum.js +0 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "description": "Shared TypeScript interfaces and enums for Merkaly API",
6
6
  "repository": {
@@ -22,6 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
+ "@brazilian-utils/brazilian-utils": "^2.5.0",
26
+ "card-validator": "^10.0.4",
25
27
  "class-transformer": "^0.5.1",
26
28
  "class-validator": "^0.15.1",
27
29
  "reflect-metadata": "^0.2.2"
@@ -1,53 +0,0 @@
1
- import { Schema as MongoSchema } from 'mongoose';
2
- import { PaymentBankAccountTypeEnum, PaymentRecipientStatusEnum, PaymentRecipientTypeEnum, PaymentTransferIntervalEnum } from './recipient.enum.js';
3
- export declare class IntegrationPaymentRecipientBankEntity {
4
- bank: string;
5
- branch: string;
6
- accountLast4: string;
7
- type: PaymentBankAccountTypeEnum;
8
- }
9
- export declare const IntegrationPaymentRecipientBankSchema: MongoSchema<IntegrationPaymentRecipientBankEntity, import("mongoose").Model<IntegrationPaymentRecipientBankEntity, any, any, any, import("mongoose").Document<unknown, any, IntegrationPaymentRecipientBankEntity, any, {}> & IntegrationPaymentRecipientBankEntity & {
10
- _id: import("mongoose").Types.ObjectId;
11
- } & {
12
- __v: number;
13
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentRecipientBankEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentRecipientBankEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<IntegrationPaymentRecipientBankEntity> & {
14
- _id: import("mongoose").Types.ObjectId;
15
- } & {
16
- __v: number;
17
- }>;
18
- export declare class IntegrationPaymentRecipientTransferEntity {
19
- enabled: boolean;
20
- interval: PaymentTransferIntervalEnum;
21
- day: number;
22
- }
23
- export declare const IntegrationPaymentRecipientTransferSchema: MongoSchema<IntegrationPaymentRecipientTransferEntity, import("mongoose").Model<IntegrationPaymentRecipientTransferEntity, any, any, any, import("mongoose").Document<unknown, any, IntegrationPaymentRecipientTransferEntity, any, {}> & IntegrationPaymentRecipientTransferEntity & {
24
- _id: import("mongoose").Types.ObjectId;
25
- } & {
26
- __v: number;
27
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentRecipientTransferEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentRecipientTransferEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<IntegrationPaymentRecipientTransferEntity> & {
28
- _id: import("mongoose").Types.ObjectId;
29
- } & {
30
- __v: number;
31
- }>;
32
- export declare class IntegrationPaymentRecipientEntity {
33
- recipientId: string;
34
- type: PaymentRecipientTypeEnum;
35
- documentMasked: string;
36
- name: string;
37
- status: PaymentRecipientStatusEnum;
38
- kycStatus?: string | null;
39
- kycStatusReason?: string | null;
40
- bank?: IntegrationPaymentRecipientBankEntity | null;
41
- transferSettings?: IntegrationPaymentRecipientTransferEntity | null;
42
- createdAt?: Date | null;
43
- syncedAt: Date;
44
- }
45
- export declare const IntegrationPaymentRecipientSchema: MongoSchema<IntegrationPaymentRecipientEntity, import("mongoose").Model<IntegrationPaymentRecipientEntity, any, any, any, import("mongoose").Document<unknown, any, IntegrationPaymentRecipientEntity, any, {}> & IntegrationPaymentRecipientEntity & {
46
- _id: import("mongoose").Types.ObjectId;
47
- } & {
48
- __v: number;
49
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IntegrationPaymentRecipientEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<IntegrationPaymentRecipientEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<IntegrationPaymentRecipientEntity> & {
50
- _id: import("mongoose").Types.ObjectId;
51
- } & {
52
- __v: number;
53
- }>;
@@ -1,40 +0,0 @@
1
- import type { PaymentProviderEnum } from './provider.enum.js';
2
- import type { PaymentBankAccountTypeEnum, PaymentRecipientStatusEnum, PaymentRecipientTypeEnum, PaymentTransferIntervalEnum } from './recipient.enum.js';
3
- export interface PaymentRecipientBank {
4
- bank: string;
5
- branch: string;
6
- accountLast4: string;
7
- type: PaymentBankAccountTypeEnum;
8
- }
9
- export interface PaymentRecipientTransferSettings {
10
- enabled: boolean;
11
- interval: PaymentTransferIntervalEnum;
12
- day: number;
13
- }
14
- export interface PaymentRecipientSummary {
15
- recipientId: string;
16
- type: PaymentRecipientTypeEnum;
17
- documentMasked: string;
18
- name: string;
19
- status: PaymentRecipientStatusEnum;
20
- kycStatus: string | null;
21
- kycStatusReason: string | null;
22
- bank: PaymentRecipientBank | null;
23
- transferSettings: PaymentRecipientTransferSettings | null;
24
- createdAt: Date | null;
25
- syncedAt: Date;
26
- }
27
- export interface PaymentRecipientStatus {
28
- configured: boolean;
29
- connected: boolean;
30
- provider: PaymentProviderEnum;
31
- recipient: PaymentRecipientSummary | null;
32
- canSell: boolean;
33
- canWithdraw: boolean;
34
- kycAction: boolean;
35
- }
36
- export interface PaymentRecipientKycLink {
37
- url: string;
38
- qrCodeBase64: string | null;
39
- expiresAt: Date | null;
40
- }
@@ -1,22 +0,0 @@
1
- export declare enum PaymentRecipientStatusEnum {
2
- REGISTRATION = "REGISTRATION",
3
- AFFILIATION = "AFFILIATION",
4
- ACTIVE = "ACTIVE",
5
- REFUSED = "REFUSED",
6
- SUSPENDED = "SUSPENDED",
7
- BLOCKED = "BLOCKED",
8
- INACTIVE = "INACTIVE"
9
- }
10
- export declare enum PaymentRecipientTypeEnum {
11
- INDIVIDUAL = "INDIVIDUAL",
12
- CORPORATION = "CORPORATION"
13
- }
14
- export declare enum PaymentTransferIntervalEnum {
15
- DAILY = "DAILY",
16
- WEEKLY = "WEEKLY",
17
- MONTHLY = "MONTHLY"
18
- }
19
- export declare enum PaymentBankAccountTypeEnum {
20
- CHECKING = "CHECKING",
21
- SAVINGS = "SAVINGS"
22
- }
@@ -1,26 +0,0 @@
1
- export var PaymentRecipientStatusEnum;
2
- (function (PaymentRecipientStatusEnum) {
3
- PaymentRecipientStatusEnum["REGISTRATION"] = "REGISTRATION";
4
- PaymentRecipientStatusEnum["AFFILIATION"] = "AFFILIATION";
5
- PaymentRecipientStatusEnum["ACTIVE"] = "ACTIVE";
6
- PaymentRecipientStatusEnum["REFUSED"] = "REFUSED";
7
- PaymentRecipientStatusEnum["SUSPENDED"] = "SUSPENDED";
8
- PaymentRecipientStatusEnum["BLOCKED"] = "BLOCKED";
9
- PaymentRecipientStatusEnum["INACTIVE"] = "INACTIVE";
10
- })(PaymentRecipientStatusEnum || (PaymentRecipientStatusEnum = {}));
11
- export var PaymentRecipientTypeEnum;
12
- (function (PaymentRecipientTypeEnum) {
13
- PaymentRecipientTypeEnum["INDIVIDUAL"] = "INDIVIDUAL";
14
- PaymentRecipientTypeEnum["CORPORATION"] = "CORPORATION";
15
- })(PaymentRecipientTypeEnum || (PaymentRecipientTypeEnum = {}));
16
- export var PaymentTransferIntervalEnum;
17
- (function (PaymentTransferIntervalEnum) {
18
- PaymentTransferIntervalEnum["DAILY"] = "DAILY";
19
- PaymentTransferIntervalEnum["WEEKLY"] = "WEEKLY";
20
- PaymentTransferIntervalEnum["MONTHLY"] = "MONTHLY";
21
- })(PaymentTransferIntervalEnum || (PaymentTransferIntervalEnum = {}));
22
- export var PaymentBankAccountTypeEnum;
23
- (function (PaymentBankAccountTypeEnum) {
24
- PaymentBankAccountTypeEnum["CHECKING"] = "CHECKING";
25
- PaymentBankAccountTypeEnum["SAVINGS"] = "SAVINGS";
26
- })(PaymentBankAccountTypeEnum || (PaymentBankAccountTypeEnum = {}));