cecon-interfaces 2.0.25 → 2.0.29
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.
- package/dist/esm2022/payio/activation-batch/entities/activation-batch.entity.mjs +3 -3
- package/dist/esm2022/payio/activation-batch/interfaces/i-activation-batch.mjs +1 -1
- package/dist/esm2022/payio/activation-key/entities/activation-key.entity.mjs +15 -11
- package/dist/esm2022/payio/activation-key/enums/license-type.enum.mjs +1 -2
- package/dist/esm2022/payio/activation-key/interfaces/i-activation-key.mjs +1 -1
- package/dist/esm2022/payio/payload/entities/payload.entity.mjs +1 -1
- package/dist/esm2022/payio/payload/interfaces/i-payload.mjs +1 -1
- package/dist/fesm2022/cecon-interfaces.mjs +12 -9
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/payio/activation-batch/entities/activation-batch.entity.d.ts +3 -3
- package/dist/payio/activation-batch/interfaces/i-activation-batch.d.ts +37 -38
- package/dist/payio/activation-key/entities/activation-key.entity.d.ts +13 -8
- package/dist/payio/activation-key/entities/activation-key.entity.js +12 -8
- package/dist/payio/activation-key/enums/license-type.enum.d.ts +1 -2
- package/dist/payio/activation-key/enums/license-type.enum.js +0 -1
- package/dist/payio/activation-key/interfaces/i-activation-key.d.ts +13 -9
- package/dist/payio/payload/entities/payload.entity.d.ts +1 -1
- package/dist/payio/payload/interfaces/i-payload.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EPayioLicenseType } from
|
|
2
|
-
import { EPayioActivationBatchStatus } from
|
|
3
|
-
import { IPayioActivationBatch } from
|
|
1
|
+
import { EPayioLicenseType } from "../../activation-key/enums/license-type.enum";
|
|
2
|
+
import { EPayioActivationBatchStatus } from "../enums/activation-batch-status.enum";
|
|
3
|
+
import { IPayioActivationBatch } from "../interfaces/i-activation-batch";
|
|
4
4
|
export declare class PayioActivationBatchEntity implements IPayioActivationBatch {
|
|
5
5
|
/** Prazo em dias para ativar as licenças (a partir da criação do lote) */
|
|
6
6
|
activationDeadlineDays: number;
|
|
@@ -1,64 +1,63 @@
|
|
|
1
1
|
import { EPayioLicenseType } from '../../activation-key/enums/license-type.enum';
|
|
2
2
|
import { EPayioActivationBatchStatus } from '../enums/activation-batch-status.enum';
|
|
3
3
|
export interface IPayioActivationBatch {
|
|
4
|
-
/** Identificador único do lote (UUID) */
|
|
5
|
-
id: string;
|
|
6
|
-
/** Número sequencial do lote (ex: "2025/001", "2025/002") */
|
|
7
|
-
batchNumber: string;
|
|
8
|
-
/** Ano de referência do lote */
|
|
9
|
-
year: number;
|
|
10
|
-
/** Número sequencial dentro do ano */
|
|
11
|
-
sequentialNumber: number;
|
|
12
|
-
/** Status atual do lote */
|
|
13
|
-
status: EPayioActivationBatchStatus;
|
|
14
|
-
/** Tipo de licença que será gerada neste lote */
|
|
15
|
-
licenseType: EPayioLicenseType;
|
|
16
|
-
/** Período de validade da licença em meses (para definição comercial) */
|
|
17
|
-
validityPeriodMonths: number;
|
|
18
|
-
/** Período de validade da licença do tipo trial em dias (para definição comercial) */
|
|
19
|
-
validityTrialPeriodDays: number;
|
|
20
4
|
/** Prazo em dias para ativar as licenças (a partir da criação do lote) */
|
|
21
5
|
activationDeadlineDays: number;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
/** Versão ou intervalo de versões do software cobertas */
|
|
25
|
-
versionConstraint: string[];
|
|
6
|
+
/** Quantidade de licenças ativas */
|
|
7
|
+
activeLicenses: number;
|
|
26
8
|
/** ID do aplicativo que será ativado */
|
|
27
9
|
appId: string;
|
|
28
10
|
/** Nome do aplicativo (para facilitar consultas) */
|
|
29
11
|
appName: string;
|
|
30
12
|
/** Slug do aplicativo */
|
|
31
13
|
appSlug: string;
|
|
32
|
-
/** ID do distribuidor que receberá as licenças */
|
|
33
|
-
distributorId: string;
|
|
34
|
-
/** Nome do distribuidor (para facilitar consultas) */
|
|
35
|
-
distributorName: string;
|
|
36
14
|
/** Quantidade de licenças ativadas */
|
|
37
15
|
availableLicenses: number;
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
/** Quantidade de licenças expiradas */
|
|
41
|
-
expiredLicenses: number;
|
|
42
|
-
/** Quantidade de licenças revogadas */
|
|
43
|
-
revokedLicenses: number;
|
|
44
|
-
/** Quantidade total de licenças no lote */
|
|
45
|
-
totalLicenses: number;
|
|
46
|
-
/** Preço unitário por licença */
|
|
47
|
-
unitPrice: number;
|
|
48
|
-
/** Preço total negociado com o distribuidor */
|
|
49
|
-
negotiatedPrice: number;
|
|
16
|
+
/** Número sequencial do lote (ex: "2025/001", "2025/002") */
|
|
17
|
+
batchNumber: string;
|
|
50
18
|
/** Data de criação do lote */
|
|
51
19
|
createdAt: Date;
|
|
52
|
-
/** Data da última atualização */
|
|
53
|
-
updatedAt: Date;
|
|
54
20
|
/** ID do admin que criou o lote */
|
|
55
21
|
createdBy: string;
|
|
22
|
+
/** ID do distribuidor que receberá as licenças */
|
|
23
|
+
distributorId: string;
|
|
24
|
+
/** Nome do distribuidor (para facilitar consultas) */
|
|
25
|
+
distributorName: string;
|
|
26
|
+
/** Quantidade de licenças expiradas */
|
|
27
|
+
expiredLicenses: number;
|
|
28
|
+
/** Dias de tolerância após expiração */
|
|
29
|
+
gracePeriodDays: number;
|
|
30
|
+
/** Identificador único do lote (UUID) */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Tipo de licença que será gerada neste lote */
|
|
33
|
+
licenseType: EPayioLicenseType;
|
|
56
34
|
/** Logs de operações do lote */
|
|
57
35
|
logs: string[];
|
|
36
|
+
/** Preço total negociado com o distribuidor */
|
|
37
|
+
negotiatedPrice: number;
|
|
58
38
|
/** Observações ou notas sobre o lote */
|
|
59
39
|
notes?: string;
|
|
40
|
+
/** Quantidade de licenças revogadas */
|
|
41
|
+
revokedLicenses: number;
|
|
60
42
|
/** Indica se é ambiente sandbox */
|
|
61
43
|
sandbox: boolean;
|
|
44
|
+
/** Número sequencial dentro do ano */
|
|
45
|
+
sequentialNumber: number;
|
|
46
|
+
/** Status atual do lote */
|
|
47
|
+
status: EPayioActivationBatchStatus;
|
|
62
48
|
/** Tags para busca e indexação */
|
|
63
49
|
tags: string[];
|
|
50
|
+
/** Quantidade total de licenças no lote */
|
|
51
|
+
totalLicenses: number;
|
|
52
|
+
/** Preço unitário por licença */
|
|
53
|
+
unitPrice: number;
|
|
54
|
+
/** Data da última atualização */
|
|
55
|
+
updatedAt: Date;
|
|
56
|
+
/** Tipo de licença que será gerada neste lote */
|
|
57
|
+
/** Período de validade da licença do tipo trial em dias (para definição comercial) */
|
|
58
|
+
validityTrialPeriodDays: number;
|
|
59
|
+
/** Versão ou intervalo de versões do software cobertas */
|
|
60
|
+
versionConstraint: string[];
|
|
61
|
+
/** Ano de referência do lote */
|
|
62
|
+
year: number;
|
|
64
63
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { EPayioActivationKeyStatus } from
|
|
2
|
-
import { EPayioLicenseType } from
|
|
3
|
-
import { IPayioActivationKey } from
|
|
1
|
+
import { EPayioActivationKeyStatus } from "../enums/activation-key-status.enum";
|
|
2
|
+
import { EPayioLicenseType } from "../enums/license-type.enum";
|
|
3
|
+
import { IPayioActivationKey } from "../interfaces/i-activation-key";
|
|
4
4
|
export declare class PayioActivationKeyEntity implements IPayioActivationKey {
|
|
5
|
-
|
|
5
|
+
activatedAt: Date | null;
|
|
6
6
|
allowMultipleTrialActivations: boolean;
|
|
7
|
-
|
|
7
|
+
allowMultipleTrialCount: number;
|
|
8
|
+
allowMultipleTrialLimit: number;
|
|
9
|
+
amount: number;
|
|
10
|
+
appId: string;
|
|
8
11
|
appSlug: string | null;
|
|
9
12
|
batchId: string;
|
|
10
13
|
companyId: string | null;
|
|
11
14
|
companyName: string | null;
|
|
12
|
-
confirmationKey: boolean;
|
|
13
15
|
createdAt: Date;
|
|
14
|
-
machineUid: string | null;
|
|
15
16
|
distributorId: string;
|
|
16
17
|
distributorName: string;
|
|
17
18
|
expiresAt: Date | null;
|
|
@@ -22,11 +23,15 @@ export declare class PayioActivationKeyEntity implements IPayioActivationKey {
|
|
|
22
23
|
key: string | null;
|
|
23
24
|
licenseType: EPayioLicenseType;
|
|
24
25
|
logs: string[];
|
|
26
|
+
machineUid: string;
|
|
25
27
|
notes: string | null;
|
|
28
|
+
paidAt: Date | null;
|
|
29
|
+
paymentId: string | null;
|
|
30
|
+
paymentMethod: string | null;
|
|
31
|
+
revokedAt: Date | null;
|
|
26
32
|
status: EPayioActivationKeyStatus;
|
|
27
33
|
tags: string[];
|
|
28
34
|
updatedAt: Date;
|
|
29
|
-
validityPeriodMonths: number;
|
|
30
35
|
validityTrialPeriodDays: number;
|
|
31
36
|
versionConstraint: string[];
|
|
32
37
|
constructor(data?: Partial<PayioActivationKeyEntity>);
|
|
@@ -7,11 +7,14 @@ var PayioActivationKeyEntity = /** @class */ (function () {
|
|
|
7
7
|
function PayioActivationKeyEntity(data) {
|
|
8
8
|
// === CAMPOS PREENCHIDOS NA ATIVAÇÃO ===
|
|
9
9
|
// Data em que a chave foi ativada (null = não ativada)
|
|
10
|
-
this.
|
|
10
|
+
this.activatedAt = null;
|
|
11
11
|
this.allowMultipleTrialActivations = false;
|
|
12
|
+
this.allowMultipleTrialCount = 0;
|
|
13
|
+
this.allowMultipleTrialLimit = 0;
|
|
14
|
+
this.amount = 0; // Valor da licença (copiado do lote ou adicionado por superadmin)
|
|
12
15
|
// === REFERÊNCIAS DO SISTEMA ===
|
|
13
16
|
// ID do aplicativo (copiado do batch)
|
|
14
|
-
this.appId =
|
|
17
|
+
this.appId = '';
|
|
15
18
|
// Slug do aplicativo (copiado do batch)
|
|
16
19
|
this.appSlug = null;
|
|
17
20
|
// === REFERÊNCIA AO LOTE (fonte das configurações) ===
|
|
@@ -20,12 +23,9 @@ var PayioActivationKeyEntity = /** @class */ (function () {
|
|
|
20
23
|
// ID da empresa (preenchido na ativação)
|
|
21
24
|
this.companyId = null;
|
|
22
25
|
this.companyName = null;
|
|
23
|
-
this.confirmationKey = false;
|
|
24
26
|
// === AUDITORIA ===
|
|
25
27
|
// Data de criação da chave
|
|
26
28
|
this.createdAt = new Date();
|
|
27
|
-
// ID do dispositivo (preenchido na ativação)
|
|
28
|
-
this.machineUid = null;
|
|
29
29
|
// === DADOS DE DISTRIBUIÇÃO (copiados do batch) ===
|
|
30
30
|
// ID do distribuidor
|
|
31
31
|
this.distributorId = '';
|
|
@@ -45,16 +45,20 @@ var PayioActivationKeyEntity = /** @class */ (function () {
|
|
|
45
45
|
// Tipo de licença (copiado do batch)
|
|
46
46
|
this.licenseType = license_type_enum_1.EPayioLicenseType.TRIAL;
|
|
47
47
|
this.logs = [];
|
|
48
|
+
// ID do dispositivo (preenchido na ativação)
|
|
49
|
+
this.machineUid = '';
|
|
48
50
|
// Metadados livres para suporte
|
|
49
51
|
this.notes = null;
|
|
52
|
+
this.paidAt = null;
|
|
53
|
+
this.paymentId = null;
|
|
54
|
+
this.paymentMethod = null;
|
|
55
|
+
this.revokedAt = null;
|
|
50
56
|
// Status da chave
|
|
51
57
|
this.status = activation_key_status_enum_1.EPayioActivationKeyStatus.AVAILABLE;
|
|
52
58
|
// Tags para categorização
|
|
53
59
|
this.tags = [];
|
|
54
60
|
this.updatedAt = new Date();
|
|
55
|
-
|
|
56
|
-
this.validityPeriodMonths = 12; // 1 ano;
|
|
57
|
-
this.validityTrialPeriodDays = 0;
|
|
61
|
+
this.validityTrialPeriodDays = 15; // 15 dias;
|
|
58
62
|
// Versão do software (copiado do batch)
|
|
59
63
|
this.versionConstraint = [];
|
|
60
64
|
if (data) {
|
|
@@ -7,5 +7,4 @@ var EPayioLicenseType;
|
|
|
7
7
|
EPayioLicenseType["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
8
8
|
EPayioLicenseType["PERPETUAL"] = "PERPETUAL";
|
|
9
9
|
EPayioLicenseType["SANDBOX"] = "SANDBOX";
|
|
10
|
-
EPayioLicenseType["CARD"] = "CARD";
|
|
11
10
|
})(EPayioLicenseType || (exports.EPayioLicenseType = EPayioLicenseType = {}));
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import { EPayioActivationKeyStatus } from
|
|
2
|
-
import { EPayioLicenseType } from
|
|
1
|
+
import { EPayioActivationKeyStatus } from "../enums/activation-key-status.enum";
|
|
2
|
+
import { EPayioLicenseType } from "../enums/license-type.enum";
|
|
3
3
|
export interface IPayioActivationKey {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
activatedAt: Date | null;
|
|
5
|
+
allowMultipleTrialActivations: boolean;
|
|
6
|
+
allowMultipleTrialCount: number;
|
|
7
|
+
allowMultipleTrialLimit: number;
|
|
8
|
+
amount: number;
|
|
9
|
+
appId: string;
|
|
6
10
|
appSlug: string | null;
|
|
7
11
|
batchId: string;
|
|
8
12
|
companyId: string | null;
|
|
9
13
|
companyName: string | null;
|
|
10
|
-
confirmationKey: boolean;
|
|
11
14
|
createdAt: Date;
|
|
12
|
-
machineUid: string | null;
|
|
13
15
|
distributorId: string;
|
|
14
16
|
distributorName: string;
|
|
15
17
|
expiresAt: Date | null;
|
|
16
18
|
gracePeriodDays: number;
|
|
17
19
|
hardwareFingerprint: string | null;
|
|
18
20
|
id: string;
|
|
19
|
-
installationAt: Date | null;
|
|
20
21
|
key: string | null;
|
|
21
22
|
licenseType: EPayioLicenseType;
|
|
22
23
|
logs: string[];
|
|
24
|
+
machineUid: string;
|
|
23
25
|
notes: string | null;
|
|
26
|
+
paidAt: Date | null;
|
|
27
|
+
paymentId: string | null;
|
|
28
|
+
paymentMethod: string | null;
|
|
29
|
+
revokedAt: Date | null;
|
|
24
30
|
status: EPayioActivationKeyStatus;
|
|
25
31
|
tags: string[];
|
|
26
32
|
updatedAt: Date;
|
|
27
|
-
validityPeriodMonths: number;
|
|
28
33
|
validityTrialPeriodDays: number;
|
|
29
|
-
allowMultipleTrialActivations: boolean;
|
|
30
34
|
versionConstraint: string[];
|
|
31
35
|
}
|
|
@@ -9,7 +9,7 @@ export declare class PayioJwtPayloadEntity implements IPayioJwtPayload {
|
|
|
9
9
|
app: PayioJwtPayloadAppEntity | null;
|
|
10
10
|
aud: string | string[];
|
|
11
11
|
/** @deprecated use machine instead */
|
|
12
|
-
device
|
|
12
|
+
device?: PayioJwtPayloadDeviceEntity | null;
|
|
13
13
|
distributorId: string | null;
|
|
14
14
|
exp?: number;
|
|
15
15
|
iat: number;
|
|
@@ -14,7 +14,7 @@ export interface IPayioJwtPayload {
|
|
|
14
14
|
aud: string | string[];
|
|
15
15
|
activation?: IPayioJwtPayloadActivation | null;
|
|
16
16
|
/** @deprecated use machine instead */
|
|
17
|
-
device
|
|
17
|
+
device?: IPayioJwtPayloadDevice | null;
|
|
18
18
|
distributorId: string | null;
|
|
19
19
|
/**
|
|
20
20
|
* (Expiração): Timestamp de quando o JWT expira
|