npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arcnetdev/arcnet-payio-interfaces

v1.0.90

Published

Interfaces TypeScript para o sistema PayIO

Downloads

320

Readme

cecon-interfaces-payio

Interfaces, entities e enums padronizados para projetos Cecon (React, Angular, etc).

Instalação

Após publicar no npm:

npm install cecon-interfaces-payio

Uso

Importe as interfaces, enums ou entities diretamente:

import { ICreditPlan } from 'cecon-interfaces-payio/General/Interfaces/ICreditPlan';
import { ECycle } from 'cecon-interfaces-payio/General/Enums/ECycle';
import { CreditPlanEntity } from 'cecon-interfaces-payio/General/Entities/CreditPlanEntity';

Organização das pastas

  • As pastas de domínio (ex: Plans, Subscriptions, Products) devem conter apenas interfaces, entities e enums específicos daquele domínio.
  • A pasta General serve para interfaces, entities e enums genéricos e reutilizáveis, que podem ser importados em várias outras entidades ou domínios. Considere como se as pastas de domínio fossem "privadas" e a General fosse "pública" para todo o projeto.

Estrutura sugerida

files/
├── credit-plans
│   ├── entities
│       ├── credit-plan.entity.ts
│       └── index.ts         // exporta entities
│   ├── enums
│       ├── type.enum.ts
│       └── index.ts         // exporta enums
│   ├── interfaces
│       ├── credit-plan.interface.ts
│       └── index.ts         // exporta interfaces
├── index.ts                 // exporta as pastas
├── general
│   ├── entities
│   ├── enums
│   ├── interfaces
├── index.ts
index.ts

Padrão recomendado:

  • Cada subpasta (entities, enums, interfaces) deve ter um index.ts exportando todos os arquivos do tipo.
  • O index.ts da pasta principal (ex: credit-plans) exporta os index das subpastas.
  • O index.ts da raiz exporta os index das pastas de domínio e General.

Assim, os imports ficam simples e centralizados:

import { ICreditPlan } from '@arcnetdev/arcnet-payio-interfaces/files/credit-plans';

Scripts

  • npm run build — Compila os arquivos TypeScript para a pasta dist.
  • npm run release — Publica o pacote no npm (executa o build, muda versao, atualiza dist).

Publicação

  1. Faça login no npm (caso não esteja logado ainda):
    npm login
  2. Compile o projeto:
    npm run build
  3. Publique:
    npm run release

Boas práticas e padrões de nomenclatura

  • Nome das interfaces: sempre iniciar com 'I' e usar PascalCase. Exemplo: IPayment, IUser, ITransaction.
  • Nome dos arquivos de interface: usar kebab-case e terminar com .interface.ts. Exemplo: payment.interface.ts, user.interface.ts.
  • Propriedades das interfaces: usar snake_case (nome_foo). Exemplo: user_id, payment_method, created_at.
  • Nome dos enums: sempre iniciar com 'E' e usar PascalCase. Exemplo: EPaymentStatus, EUserRole.
  • Nome dos arquivos de enum: usar kebab-case e terminar com .enum.ts. Exemplo: payment-status.enum.ts, user-role.enum.ts.
  • Valores dos enums: usar snake_case em string. Exemplo:
    export enum EUserRole {
    	ADMIN = "admin",
    	CUSTOMER = "customer"
    }
    export enum EPaymentMethod {
    	CREDIT_CARD = "credit_card"
    }
  • Exemplo de interface seguindo o padrão snake_case:
    export interface IUser {
    	id: number;
    	user_name: string;
    	email_address: string;
    	created_at: Date;
    	last_login: Date;
    	is_active: boolean;
    }
  • Estrutura sugerida:
    src/
    	interfaces/
    		payment.interface.ts
    		user.interface.ts
    		transaction.interface.ts
    	enums/
    		payment-status.enum.ts
    		user-role.enum.ts
  • Recomendado configurar o ESLint para reforçar esses padrões:
    {
    	"rules": {
    		"@typescript-eslint/naming-convention": [
    			"error",
    			{
    				"selector": "interface",
    				"format": ["PascalCase"],
    				"prefix": ["I"]
    			},
    			{
    				"selector": "enum",
    				"format": ["PascalCase"],
    				"prefix": ["E"]
    			}
    		]
    	}
    }

Observações

  • Mantenha as interfaces, enums e entities organizadas por domínio.
  • Sempre exporte os arquivos para facilitar o uso em outros projetos.