cecon-interfaces 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/enums/company-keys.enum.d.ts +7 -0
  2. package/dist/enums/company-keys.enum.js +11 -0
  3. package/dist/enums/company-message-type.enum.d.ts +5 -0
  4. package/dist/enums/company-message-type.enum.js +9 -0
  5. package/dist/enums/doc-type.enum.d.ts +4 -0
  6. package/dist/enums/doc-type.enum.js +8 -0
  7. package/dist/enums/lead-origin.enum.d.ts +9 -0
  8. package/dist/enums/lead-origin.enum.js +13 -0
  9. package/dist/enums/payment-channel.enum.d.ts +10 -0
  10. package/dist/enums/payment-channel.enum.js +14 -0
  11. package/dist/enums/payment-mode.enum.d.ts +5 -0
  12. package/dist/enums/payment-mode.enum.js +9 -0
  13. package/dist/enums/payment-type.enum.d.ts +18 -0
  14. package/dist/enums/payment-type.enum.js +22 -0
  15. package/dist/index.d.ts +13 -0
  16. package/dist/index.js +3 -0
  17. package/dist/interfaces/i-address.d.ts +9 -0
  18. package/dist/interfaces/i-address.js +2 -0
  19. package/dist/interfaces/i-company.d.ts +37 -0
  20. package/dist/interfaces/i-company.js +2 -0
  21. package/dist/interfaces/i-coords.d.ts +4 -0
  22. package/dist/interfaces/i-coords.js +2 -0
  23. package/dist/interfaces/i-delivery-area-fixed.d.ts +7 -0
  24. package/dist/interfaces/i-delivery-area-fixed.js +2 -0
  25. package/dist/interfaces/i-delivery-area.d.ts +11 -0
  26. package/dist/interfaces/i-delivery-area.js +2 -0
  27. package/dist/interfaces/i-messager-channel.d.ts +5 -0
  28. package/dist/interfaces/i-messager-channel.js +2 -0
  29. package/dist/interfaces/i-mobyo-server-api.d.ts +8 -0
  30. package/dist/interfaces/i-mobyo-server-api.js +2 -0
  31. package/dist/interfaces/i-origin.d.ts +9 -0
  32. package/dist/interfaces/i-origin.js +2 -0
  33. package/dist/interfaces/i-payment-method.d.ts +18 -0
  34. package/dist/interfaces/i-payment-method.js +2 -0
  35. package/dist/interfaces/i-payment-provider-agent.d.ts +4 -0
  36. package/dist/interfaces/i-payment-provider-agent.js +2 -0
  37. package/dist/interfaces/i-payment-provider.d.ts +17 -0
  38. package/dist/interfaces/i-payment-provider.js +2 -0
  39. package/dist/interfaces/i-payment-tokens-data.d.ts +9 -0
  40. package/dist/interfaces/i-payment-tokens-data.js +3 -0
  41. package/dist/interfaces/i-payment-tokens.d.ts +8 -0
  42. package/dist/interfaces/i-payment-tokens.js +3 -0
  43. package/ng-package.json +6 -0
  44. package/package.json +34 -0
  45. package/readme.md +9 -0
  46. package/src/enums/company-keys.enum.ts +7 -0
  47. package/src/enums/company-message-type.enum.ts +5 -0
  48. package/src/enums/doc-type.enum.ts +4 -0
  49. package/src/enums/lead-origin.enum.ts +9 -0
  50. package/src/enums/payment-channel.enum.ts +10 -0
  51. package/src/enums/payment-mode.enum.ts +5 -0
  52. package/src/enums/payment-type.enum.ts +18 -0
  53. package/src/index.ts +16 -0
  54. package/src/interfaces/i-address.ts +13 -0
  55. package/src/interfaces/i-company.ts +42 -0
  56. package/src/interfaces/i-coords.ts +8 -0
  57. package/src/interfaces/i-delivery-area-fixed.ts +11 -0
  58. package/src/interfaces/i-delivery-area.ts +16 -0
  59. package/src/interfaces/i-messager-channel.ts +7 -0
  60. package/src/interfaces/i-mobyo-server-api.ts +8 -0
  61. package/src/interfaces/i-origin.ts +14 -0
  62. package/src/interfaces/i-payment-method.ts +23 -0
  63. package/src/interfaces/i-payment-provider-agent.ts +8 -0
  64. package/src/interfaces/i-payment-provider.ts +22 -0
  65. package/src/interfaces/i-payment-tokens-data.ts +15 -0
  66. package/src/interfaces/i-payment-tokens.ts +16 -0
  67. package/tsconfig.json +12 -0
@@ -0,0 +1,7 @@
1
+ export declare enum CompanyKeysEnum {
2
+ google = "GOOGLE",
3
+ loggi = "LOGGI",
4
+ desenfila = "DESENFILA",
5
+ mottu = "MOTTU",
6
+ algolia = "ALGOLIA"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyKeysEnum = void 0;
4
+ var CompanyKeysEnum;
5
+ (function (CompanyKeysEnum) {
6
+ CompanyKeysEnum["google"] = "GOOGLE";
7
+ CompanyKeysEnum["loggi"] = "LOGGI";
8
+ CompanyKeysEnum["desenfila"] = "DESENFILA";
9
+ CompanyKeysEnum["mottu"] = "MOTTU";
10
+ CompanyKeysEnum["algolia"] = "ALGOLIA";
11
+ })(CompanyKeysEnum = exports.CompanyKeysEnum || (exports.CompanyKeysEnum = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum CompanyMessageTypeEnum {
2
+ whatsapp = "WHATSAPP",
3
+ instagram = "INSTAGRAM",
4
+ sms = "SMS"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyMessageTypeEnum = void 0;
4
+ var CompanyMessageTypeEnum;
5
+ (function (CompanyMessageTypeEnum) {
6
+ CompanyMessageTypeEnum["whatsapp"] = "WHATSAPP";
7
+ CompanyMessageTypeEnum["instagram"] = "INSTAGRAM";
8
+ CompanyMessageTypeEnum["sms"] = "SMS";
9
+ })(CompanyMessageTypeEnum = exports.CompanyMessageTypeEnum || (exports.CompanyMessageTypeEnum = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum DocTypeEnum {
2
+ CPF = "CPF",
3
+ CNPJ = "CNPJ"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocTypeEnum = void 0;
4
+ var DocTypeEnum;
5
+ (function (DocTypeEnum) {
6
+ DocTypeEnum["CPF"] = "CPF";
7
+ DocTypeEnum["CNPJ"] = "CNPJ";
8
+ })(DocTypeEnum = exports.DocTypeEnum || (exports.DocTypeEnum = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum LeadOriginEnum {
2
+ FACEBOOK_ADS = "Facebook Ads",
3
+ GOOGLE_ADS = "Google Ads",
4
+ EMAIL_MARKETING = "Email Marketing",
5
+ REFERRED_BY_FRIEND = "Indica\u00E7\u00E3o de amigo",
6
+ ORGANIC_SEARCH = "Busca org\u00E2nica",
7
+ DIRECT_VISIT = "Visita Direta",
8
+ OTHERS = "Outros"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LeadOriginEnum = void 0;
4
+ var LeadOriginEnum;
5
+ (function (LeadOriginEnum) {
6
+ LeadOriginEnum["FACEBOOK_ADS"] = "Facebook Ads";
7
+ LeadOriginEnum["GOOGLE_ADS"] = "Google Ads";
8
+ LeadOriginEnum["EMAIL_MARKETING"] = "Email Marketing";
9
+ LeadOriginEnum["REFERRED_BY_FRIEND"] = "Indica\u00E7\u00E3o de amigo";
10
+ LeadOriginEnum["ORGANIC_SEARCH"] = "Busca org\u00E2nica";
11
+ LeadOriginEnum["DIRECT_VISIT"] = "Visita Direta";
12
+ LeadOriginEnum["OTHERS"] = "Outros";
13
+ })(LeadOriginEnum = exports.LeadOriginEnum || (exports.LeadOriginEnum = {}));
@@ -0,0 +1,10 @@
1
+ export declare enum PaymentChannelEnum {
2
+ APP = "APP",
3
+ DELIVERY = "DELIVERY",
4
+ AUTOMATION = "AUTOMATION",
5
+ PHONE = "PHONE",
6
+ MAIL = "MAIL",
7
+ KIOSK = "KIOSK",
8
+ QR_CODE = "QR_CODE",
9
+ WEBSITE = "WEBSITE"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentChannelEnum = void 0;
4
+ var PaymentChannelEnum;
5
+ (function (PaymentChannelEnum) {
6
+ PaymentChannelEnum["APP"] = "APP";
7
+ PaymentChannelEnum["DELIVERY"] = "DELIVERY";
8
+ PaymentChannelEnum["AUTOMATION"] = "AUTOMATION";
9
+ PaymentChannelEnum["PHONE"] = "PHONE";
10
+ PaymentChannelEnum["MAIL"] = "MAIL";
11
+ PaymentChannelEnum["KIOSK"] = "KIOSK";
12
+ PaymentChannelEnum["QR_CODE"] = "QR_CODE";
13
+ PaymentChannelEnum["WEBSITE"] = "WEBSITE";
14
+ })(PaymentChannelEnum = exports.PaymentChannelEnum || (exports.PaymentChannelEnum = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum PaymentModeEnum {
2
+ ELECTRONIC = "ELECTRONIC",
3
+ MANUAL = "MANUAL",
4
+ DIGITAL = "DIGITAL"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentModeEnum = void 0;
4
+ var PaymentModeEnum;
5
+ (function (PaymentModeEnum) {
6
+ PaymentModeEnum["ELECTRONIC"] = "ELECTRONIC";
7
+ PaymentModeEnum["MANUAL"] = "MANUAL";
8
+ PaymentModeEnum["DIGITAL"] = "DIGITAL";
9
+ })(PaymentModeEnum = exports.PaymentModeEnum || (exports.PaymentModeEnum = {}));
@@ -0,0 +1,18 @@
1
+ export declare enum PaymentTypeEnum {
2
+ CREDIT_CARD = "CREDIT_CARD",
3
+ DEBIT_CARD = "DEBIT_CARD",
4
+ CASH = "CASH",
5
+ MOBILE_PAYMENT = "MOBILE_PAYMENT",
6
+ CHECK = "CHECK",
7
+ CRYPTOCURRENCY = "CRYPTOCURRENCY",
8
+ ELECTRONIC_BANKING = "ELECTRONIC_BANKING",
9
+ MONEY_ORDER = "MONEY_ORDER",
10
+ PREPAID_CARD = "PREPAID_CARD",
11
+ E_WALLET = "E_WALLET",
12
+ DIRECT_DEBIT = "DIRECT_DEBIT",
13
+ PAYPAL = "PAYPAL",
14
+ WIRE_TRANSFER = "WIRE_TRANSFER",
15
+ GIFT_CARD = "GIFT_CARD",
16
+ VOUCHER = "VOUCHER",
17
+ BILLING = "BILLING"
18
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentTypeEnum = void 0;
4
+ var PaymentTypeEnum;
5
+ (function (PaymentTypeEnum) {
6
+ PaymentTypeEnum["CREDIT_CARD"] = "CREDIT_CARD";
7
+ PaymentTypeEnum["DEBIT_CARD"] = "DEBIT_CARD";
8
+ PaymentTypeEnum["CASH"] = "CASH";
9
+ PaymentTypeEnum["MOBILE_PAYMENT"] = "MOBILE_PAYMENT";
10
+ PaymentTypeEnum["CHECK"] = "CHECK";
11
+ PaymentTypeEnum["CRYPTOCURRENCY"] = "CRYPTOCURRENCY";
12
+ PaymentTypeEnum["ELECTRONIC_BANKING"] = "ELECTRONIC_BANKING";
13
+ PaymentTypeEnum["MONEY_ORDER"] = "MONEY_ORDER";
14
+ PaymentTypeEnum["PREPAID_CARD"] = "PREPAID_CARD";
15
+ PaymentTypeEnum["E_WALLET"] = "E_WALLET";
16
+ PaymentTypeEnum["DIRECT_DEBIT"] = "DIRECT_DEBIT";
17
+ PaymentTypeEnum["PAYPAL"] = "PAYPAL";
18
+ PaymentTypeEnum["WIRE_TRANSFER"] = "WIRE_TRANSFER";
19
+ PaymentTypeEnum["GIFT_CARD"] = "GIFT_CARD";
20
+ PaymentTypeEnum["VOUCHER"] = "VOUCHER";
21
+ PaymentTypeEnum["BILLING"] = "BILLING";
22
+ })(PaymentTypeEnum = exports.PaymentTypeEnum || (exports.PaymentTypeEnum = {}));
@@ -0,0 +1,13 @@
1
+ export { IAddress } from './interfaces/i-address';
2
+ export { ICompany } from './interfaces/i-company';
3
+ export { ICoords } from './interfaces/i-coords';
4
+ export { IDeliveryArea } from './interfaces/i-delivery-area';
5
+ export { IDeliveryAreaFixed } from './interfaces/i-delivery-area-fixed';
6
+ export { IMessagerChannel } from './interfaces/i-messager-channel';
7
+ export { IMobyoApiConfig } from './interfaces/i-mobyo-server-api';
8
+ export { IOrigin } from './interfaces/i-origin';
9
+ export { IPaymentMethod } from './interfaces/i-payment-method';
10
+ export { IPaymentProvider } from './interfaces/i-payment-provider';
11
+ export { IPaymentProviderAgent } from './interfaces/i-payment-provider-agent';
12
+ export { IPaymentToken } from './interfaces/i-payment-tokens';
13
+ export { IPaymentTokenData } from './interfaces/i-payment-tokens-data';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // index.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export interface IAddress {
2
+ city: string;
3
+ complement?: string;
4
+ neighborhood: string;
5
+ postalCode: string;
6
+ state: string;
7
+ streetName: string;
8
+ streetNumber: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,37 @@
1
+ import { DocTypeEnum } from '../enums/doc-type.enum';
2
+ import { IAddress } from './i-address';
3
+ import { IDeliveryArea } from './i-delivery-area';
4
+ import { IDeliveryAreaFixed } from './i-delivery-area-fixed';
5
+ import { IMessagerChannel } from './i-messager-channel';
6
+ import { IMobyoApiConfig } from './i-mobyo-server-api';
7
+ import { IOrigin } from './i-origin';
8
+ import { IPaymentMethod } from './i-payment-method';
9
+ import { IPaymentProvider } from './i-payment-provider';
10
+ export interface ICompany {
11
+ active: boolean;
12
+ address: IAddress;
13
+ bgImageURL?: string;
14
+ containerId: string;
15
+ createdAt: Date;
16
+ deliveryArea: IDeliveryArea[];
17
+ deliveryAreaFixed?: IDeliveryAreaFixed;
18
+ doc: string;
19
+ docType: DocTypeEnum;
20
+ email: string;
21
+ id: string;
22
+ imageURL?: string;
23
+ logoURL?: string;
24
+ internationalCode: string;
25
+ messagerChannels: IMessagerChannel[];
26
+ config: IMobyoApiConfig;
27
+ name: string;
28
+ origin: IOrigin;
29
+ paymentProvider: IPaymentProvider;
30
+ paymentsMethods: IPaymentMethod[];
31
+ phoneNumber: string;
32
+ pubsubTopic: string;
33
+ fullName: string;
34
+ sandbox: boolean;
35
+ updatedAt: number;
36
+ version: string;
37
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface ICoords {
2
+ latitude: number;
3
+ longitude: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface IDeliveryAreaFixed {
2
+ active: boolean;
3
+ deliveryFee: number;
4
+ maxTime: number;
5
+ minTime: number;
6
+ minimumOrderValue: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { ICoords } from './i-coords';
2
+ export interface IDeliveryArea {
3
+ deliveryFee: number;
4
+ id: string;
5
+ latlngs: ICoords[];
6
+ maxTime: number;
7
+ minTime: number;
8
+ minimumOrderValue: number;
9
+ name: string;
10
+ sequence: number;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface IMessagerChannel {
2
+ channelId: string;
3
+ type: string;
4
+ id: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface IMobyoApiConfig {
2
+ hasIntegration: boolean;
3
+ hasPrint: boolean;
4
+ integrationUrl: string;
5
+ printCols: number;
6
+ printInterface: string;
7
+ printType: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { LeadOriginEnum } from '../enums/lead-origin.enum';
2
+ export interface IOrigin {
3
+ campaign?: string;
4
+ contactPoint?: string;
5
+ date: Number;
6
+ details?: string;
7
+ referrer?: string;
8
+ type: LeadOriginEnum;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { PaymentChannelEnum } from '../enums/payment-channel.enum';
2
+ import { PaymentModeEnum } from '../enums/payment-mode.enum';
3
+ import { PaymentTypeEnum } from '../enums/payment-type.enum';
4
+ export interface IPaymentMethod {
5
+ active: boolean;
6
+ channel: PaymentChannelEnum;
7
+ createdAt: number;
8
+ fee: number;
9
+ id: string;
10
+ index: number;
11
+ maxAmount: number;
12
+ minAmount: number;
13
+ mode: PaymentModeEnum;
14
+ name: string;
15
+ token: string;
16
+ type: PaymentTypeEnum;
17
+ updatedAt: number;
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface IPaymentProviderAgent {
2
+ accountId: string;
3
+ name?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { IPaymentProviderAgent } from './i-payment-provider-agent';
2
+ import { IPaymentToken } from './i-payment-tokens';
3
+ export interface IPaymentProvider {
4
+ accountId: string;
5
+ active: boolean;
6
+ agent: IPaymentProviderAgent;
7
+ customerId: string;
8
+ liveApiToken: string;
9
+ name: string;
10
+ paymentTokens: IPaymentToken;
11
+ subscriptionId: string;
12
+ subscriptions?: string;
13
+ testApiToken: string;
14
+ userToken: string;
15
+ verified: boolean;
16
+ verifiedAt: number;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export interface IPaymentTokenData {
2
+ bin: string;
3
+ brand: string;
4
+ displayNumber: string;
5
+ firstDigits: string;
6
+ maskedNumber: string;
7
+ month: number;
8
+ year: number;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // src/models/base.entity.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { IPaymentTokenData } from './i-payment-tokens-data';
2
+ export interface IPaymentToken {
3
+ customerId: string;
4
+ data: IPaymentTokenData;
5
+ description: string;
6
+ id: string;
7
+ itemType: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // src/models/base.entity.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
+ "lib": {
4
+ "entryFile": "src/public-api.ts"
5
+ }
6
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "cecon-interfaces",
3
+ "version": "1.0.0",
4
+ "description": "Interfaces de Projetos Cecon",
5
+ "dependencies": {},
6
+ "peerDependencies": {
7
+ },
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "private": false,
11
+ "scripts": {
12
+ "test": "echo \"Error: no test specified\" && exit 1"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/markcecon/cecon-interfaces.git"
17
+ },
18
+ "keywords": [
19
+ "interfaces",
20
+ "models",
21
+ "pacotes",
22
+ "types",
23
+ "cecon"
24
+ ],
25
+ "author": "Mark Cecon",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/markcecon/cecon-interfaces/issues"
29
+ },
30
+ "homepage": "https://github.com/markcecon/cecon-interfaces#readme",
31
+ "devDependencies": {
32
+ "ng-packagr": "^16.2.0"
33
+ }
34
+ }
package/readme.md ADDED
@@ -0,0 +1,9 @@
1
+ Compilar com o comando: tsc
2
+ *Mude a versão*
3
+ npx ng-packagr -p ng-package.json
4
+
5
+ abra o terminat
6
+ cd dist
7
+
8
+ publicar
9
+ npm publish
@@ -0,0 +1,7 @@
1
+ export enum CompanyKeysEnum {
2
+ google = 'GOOGLE',
3
+ loggi = 'LOGGI',
4
+ desenfila = 'DESENFILA',
5
+ mottu = 'MOTTU',
6
+ algolia = 'ALGOLIA',
7
+ }
@@ -0,0 +1,5 @@
1
+ export enum CompanyMessageTypeEnum {
2
+ whatsapp = 'WHATSAPP',
3
+ instagram = 'INSTAGRAM',
4
+ sms = 'SMS',
5
+ }
@@ -0,0 +1,4 @@
1
+ export enum DocTypeEnum {
2
+ CPF = 'CPF',
3
+ CNPJ = 'CNPJ',
4
+ }
@@ -0,0 +1,9 @@
1
+ export enum LeadOriginEnum {
2
+ FACEBOOK_ADS = 'Facebook Ads',
3
+ GOOGLE_ADS = 'Google Ads',
4
+ EMAIL_MARKETING = 'Email Marketing',
5
+ REFERRED_BY_FRIEND = 'Indicação de amigo',
6
+ ORGANIC_SEARCH = 'Busca orgânica',
7
+ DIRECT_VISIT = 'Visita Direta',
8
+ OTHERS = 'Outros',
9
+ }
@@ -0,0 +1,10 @@
1
+ export enum PaymentChannelEnum {
2
+ APP = 'APP',
3
+ DELIVERY = 'DELIVERY',
4
+ AUTOMATION = 'AUTOMATION',
5
+ PHONE = 'PHONE',
6
+ MAIL = 'MAIL',
7
+ KIOSK = 'KIOSK',
8
+ QR_CODE = 'QR_CODE',
9
+ WEBSITE = 'WEBSITE',
10
+ }
@@ -0,0 +1,5 @@
1
+ export enum PaymentModeEnum {
2
+ ELECTRONIC = 'ELECTRONIC',
3
+ MANUAL = 'MANUAL',
4
+ DIGITAL = 'DIGITAL',
5
+ }
@@ -0,0 +1,18 @@
1
+ export enum PaymentTypeEnum {
2
+ CREDIT_CARD = 'CREDIT_CARD',
3
+ DEBIT_CARD = 'DEBIT_CARD',
4
+ CASH = 'CASH',
5
+ MOBILE_PAYMENT = 'MOBILE_PAYMENT',
6
+ CHECK = 'CHECK',
7
+ CRYPTOCURRENCY = 'CRYPTOCURRENCY',
8
+ ELECTRONIC_BANKING = 'ELECTRONIC_BANKING',
9
+ MONEY_ORDER = 'MONEY_ORDER',
10
+ PREPAID_CARD = 'PREPAID_CARD',
11
+ E_WALLET = 'E_WALLET',
12
+ DIRECT_DEBIT = 'DIRECT_DEBIT',
13
+ PAYPAL = 'PAYPAL',
14
+ WIRE_TRANSFER = 'WIRE_TRANSFER',
15
+ GIFT_CARD = 'GIFT_CARD',
16
+ VOUCHER = 'VOUCHER',
17
+ BILLING = 'BILLING',
18
+ }
package/src/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ // index.ts
2
+
3
+ export { IAddress } from './interfaces/i-address';
4
+ export { ICompany } from './interfaces/i-company';
5
+ export { ICoords } from './interfaces/i-coords';
6
+ export { IDeliveryArea } from './interfaces/i-delivery-area';
7
+ export { IDeliveryAreaFixed } from './interfaces/i-delivery-area-fixed';
8
+ export { IMessagerChannel } from './interfaces/i-messager-channel';
9
+ export { IMobyoApiConfig } from './interfaces/i-mobyo-server-api';
10
+ export { IOrigin } from './interfaces/i-origin';
11
+ export { IPaymentMethod } from './interfaces/i-payment-method';
12
+ export { IPaymentProvider } from './interfaces/i-payment-provider';
13
+ export { IPaymentProviderAgent } from './interfaces/i-payment-provider-agent';
14
+ export { IPaymentToken } from './interfaces/i-payment-tokens';
15
+ export { IPaymentTokenData } from './interfaces/i-payment-tokens-data';
16
+
@@ -0,0 +1,13 @@
1
+ export interface IAddress {
2
+ // #region Properties (7)
3
+
4
+ city: string;
5
+ complement?: string;
6
+ neighborhood: string;
7
+ postalCode: string;
8
+ state: string;
9
+ streetName: string;
10
+ streetNumber: string;
11
+
12
+ // #endregion Properties (7)
13
+ }
@@ -0,0 +1,42 @@
1
+ import { DocTypeEnum } from '../enums/doc-type.enum';
2
+ import { IAddress } from './i-address';
3
+ import { IDeliveryArea } from './i-delivery-area';
4
+ import { IDeliveryAreaFixed } from './i-delivery-area-fixed';
5
+ import { IMessagerChannel } from './i-messager-channel';
6
+ import { IMobyoApiConfig } from './i-mobyo-server-api';
7
+ import { IOrigin } from './i-origin';
8
+ import { IPaymentMethod } from './i-payment-method';
9
+ import { IPaymentProvider } from './i-payment-provider';
10
+
11
+ export interface ICompany {
12
+ // #region Properties (27)
13
+
14
+ active: boolean;
15
+ address: IAddress;
16
+ bgImageURL?: string;
17
+ containerId: string;
18
+ createdAt: Date;
19
+ deliveryArea: IDeliveryArea[];
20
+ deliveryAreaFixed?: IDeliveryAreaFixed;
21
+ doc: string;
22
+ docType: DocTypeEnum;
23
+ email: string;
24
+ id: string;
25
+ imageURL?: string;
26
+ logoURL?: string;
27
+ internationalCode: string;
28
+ messagerChannels: IMessagerChannel[];
29
+ config: IMobyoApiConfig;
30
+ name: string;
31
+ origin: IOrigin;
32
+ paymentProvider: IPaymentProvider;
33
+ paymentsMethods: IPaymentMethod[];
34
+ phoneNumber: string;
35
+ pubsubTopic: string;
36
+ fullName: string;
37
+ sandbox: boolean;
38
+ updatedAt: number;
39
+ version: string;
40
+
41
+ // #endregion Properties (27)
42
+ }
@@ -0,0 +1,8 @@
1
+ export interface ICoords {
2
+ // #region Properties (2)
3
+
4
+ latitude: number;
5
+ longitude: number;
6
+
7
+ // #endregion Properties (2)
8
+ }
@@ -0,0 +1,11 @@
1
+ export interface IDeliveryAreaFixed {
2
+ // #region Properties (5)
3
+
4
+ active: boolean;
5
+ deliveryFee: number;
6
+ maxTime: number;
7
+ minTime: number;
8
+ minimumOrderValue: number;
9
+
10
+ // #endregion Properties (5)
11
+ }
@@ -0,0 +1,16 @@
1
+ import { ICoords } from './i-coords';
2
+
3
+ export interface IDeliveryArea {
4
+ // #region Properties (8)
5
+
6
+ deliveryFee: number;
7
+ id: string;
8
+ latlngs: ICoords[];
9
+ maxTime: number;
10
+ minTime: number;
11
+ minimumOrderValue: number;
12
+ name: string;
13
+ sequence: number;
14
+
15
+ // #endregion Properties (8)
16
+ }
@@ -0,0 +1,7 @@
1
+ export interface IMessagerChannel {
2
+ // #region Properties (8)
3
+ channelId: string;
4
+ type: string;
5
+ id: string;
6
+ // #endregion Properties (8)
7
+ }
@@ -0,0 +1,8 @@
1
+ export interface IMobyoApiConfig {
2
+ hasIntegration: boolean;
3
+ hasPrint: boolean;
4
+ integrationUrl: string;
5
+ printCols: number;
6
+ printInterface: string;
7
+ printType: string;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { LeadOriginEnum } from '../enums/lead-origin.enum';
2
+
3
+ export interface IOrigin {
4
+ // #region Properties (6)
5
+
6
+ campaign?: string;
7
+ contactPoint?: string;
8
+ date: Number;
9
+ details?: string;
10
+ referrer?: string;
11
+ type: LeadOriginEnum;
12
+
13
+ // #endregion Properties (6)
14
+ }
@@ -0,0 +1,23 @@
1
+ import { PaymentChannelEnum } from '../enums/payment-channel.enum';
2
+ import { PaymentModeEnum } from '../enums/payment-mode.enum';
3
+ import { PaymentTypeEnum } from '../enums/payment-type.enum';
4
+
5
+ export interface IPaymentMethod {
6
+ // #region Properties (13)
7
+
8
+ active: boolean;
9
+ channel: PaymentChannelEnum;
10
+ createdAt: number;
11
+ fee: number;
12
+ id: string;
13
+ index: number;
14
+ maxAmount: number;
15
+ minAmount: number;
16
+ mode: PaymentModeEnum;
17
+ name: string;
18
+ token: string;
19
+ type: PaymentTypeEnum;
20
+ updatedAt: number;
21
+
22
+ // #endregion Properties (13)
23
+ }
@@ -0,0 +1,8 @@
1
+ export interface IPaymentProviderAgent {
2
+ // #region Properties (1)
3
+
4
+ accountId: string;
5
+ name?: string;
6
+
7
+ // #endregion Properties (1)
8
+ }
@@ -0,0 +1,22 @@
1
+ import { IPaymentProviderAgent } from './i-payment-provider-agent';
2
+ import { IPaymentToken } from './i-payment-tokens';
3
+
4
+ export interface IPaymentProvider {
5
+ // #region Properties (13)
6
+
7
+ accountId: string;
8
+ active: boolean;
9
+ agent: IPaymentProviderAgent;
10
+ customerId: string;
11
+ liveApiToken: string;
12
+ name: string;
13
+ paymentTokens: IPaymentToken;
14
+ subscriptionId: string;
15
+ subscriptions?: string;
16
+ testApiToken: string;
17
+ userToken: string;
18
+ verified: boolean;
19
+ verifiedAt: number;
20
+
21
+ // #endregion Properties (13)
22
+ }
@@ -0,0 +1,15 @@
1
+ // src/models/base.entity.ts
2
+
3
+ export interface IPaymentTokenData {
4
+ // #region Properties (7)
5
+
6
+ bin: string;
7
+ brand: string;
8
+ displayNumber: string;
9
+ firstDigits: string;
10
+ maskedNumber: string;
11
+ month: number;
12
+ year: number;
13
+
14
+ // #endregion Properties (7)
15
+ }
@@ -0,0 +1,16 @@
1
+ // src/models/base.entity.ts
2
+
3
+ import { IPaymentTokenData } from './i-payment-tokens-data';
4
+
5
+
6
+ export interface IPaymentToken {
7
+ // #region Properties (5)
8
+
9
+ customerId: string;
10
+ data: IPaymentTokenData;
11
+ description: string;
12
+ id: string;
13
+ itemType: string;
14
+
15
+ // #endregion Properties (5)
16
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "target": "es5",
5
+ "declaration": true,
6
+ "experimentalDecorators": true,
7
+ "outDir": "./dist"
8
+ },
9
+ "include": [
10
+ "src/**/*"
11
+ ]
12
+ }