@authenty/authapi-types 1.0.2 → 1.0.4

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/general.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PrivilegeTable } from "./admin";
2
+ import { PG_PurchaseLicenseStatus, PG_PurchasePaymentStatus, PG_PurchaseType } from "./payment-system";
2
3
  export declare enum BundleType {
3
4
  BUNDLE = 0,
4
5
  SYMBOLIC_PRODUCT = 1,
@@ -86,7 +87,7 @@ export type Consultancy = {
86
87
  };
87
88
  export type Bundle = {
88
89
  id: number;
89
- type: number;
90
+ type: BundleType;
90
91
  title?: string;
91
92
  short?: string;
92
93
  resume?: string;
@@ -99,27 +100,27 @@ export type Bundle = {
99
100
  showInSite: boolean;
100
101
  defaultMetaArray: string;
101
102
  deletedAt?: string | null;
102
- Levels?: Array<{
103
+ Levels?: {
103
104
  id: number;
104
105
  bundleID: number;
105
106
  levelID: number;
106
107
  quantity: number;
107
108
  Level: ProductLevel;
108
- }>;
109
- Courses?: Array<{
109
+ }[];
110
+ Courses?: {
110
111
  id: number;
111
112
  bundleID: number;
112
113
  courseID: number;
113
114
  quantity: number;
114
115
  Course: Course;
115
- }>;
116
- Consultancies?: Array<{
116
+ }[];
117
+ Consultancies?: {
117
118
  id: number;
118
119
  bundleID: number;
119
120
  consultancyID: number;
120
121
  quantity: number;
121
122
  Consultancy: Consultancy;
122
- }>;
123
+ }[];
123
124
  store_bundles_paymethod: PaymentMethod[];
124
125
  };
125
126
  export type PaymentMethod = {
@@ -134,35 +135,13 @@ export type PaymentMethod = {
134
135
  gatewayID: number;
135
136
  Bundle?: Bundle;
136
137
  };
137
- export declare enum PurchaseStatus {
138
- NORMAL = 0,
139
- EXPIRED = 1,
140
- CANCELED = 2,
141
- OPEN = 3,
142
- RECYCLING = 4,
143
- PAYED = 5,
144
- ACTIVE = 6
145
- }
146
- export declare enum PurchaseCycle {
147
- UNKNOWN = 0,
148
- ACTIVE = 1,
149
- CANCELED = 2,
150
- REFUNDED = 3,
151
- REMOVED = 4,
152
- Nonrefundable = 5
153
- }
154
- export declare enum PurchaseTypeStep {
155
- SESSION = 0,
156
- PAYMENT = 1,
157
- SUBSCRIPTION = 2
158
- }
159
138
  export type Purchase = {
160
139
  paghash: string;
161
140
  id: number;
162
141
  price: number;
163
- licenseStatus: PurchaseStatus;
164
- paymentStatus: PurchaseCycle;
165
- type_step: PurchaseTypeStep;
142
+ licenseStatus: PG_PurchaseLicenseStatus;
143
+ paymentStatus: PG_PurchasePaymentStatus;
144
+ type_step: PG_PurchaseType;
166
145
  PaymentMethod: PaymentMethod;
167
146
  Wallet?: Wallet;
168
147
  walletID: number;
@@ -173,6 +152,11 @@ export type Purchase = {
173
152
  nfUrl?: string;
174
153
  isAdmin?: boolean;
175
154
  meta_data?: Record<string, any>;
155
+ PurchaseShares?: PurchaseShare[];
156
+ Levels?: {
157
+ Level: ProductLevel;
158
+ quant: number;
159
+ }[];
176
160
  };
177
161
  export type Wallet = {
178
162
  id: number;
@@ -210,13 +194,14 @@ export type LocalUser = {
210
194
  date_r?: Date | string | null;
211
195
  Wallets?: Wallet[];
212
196
  PurchasesShares?: PurchaseShare[];
213
- Sys_admUser_config?: {
214
- campaigns_blacklist: string;
215
- deletedAt: Date | null;
216
- userID: number;
217
- };
197
+ Sys_admUser_config?: AdminUserConfig;
218
198
  Sys_adminUser?: PrivilegeTable;
219
199
  };
200
+ export type AdminUserConfig = {
201
+ campaigns_blacklist: string;
202
+ deletedAt: Date | null;
203
+ userID: number;
204
+ };
220
205
  export type LogEntry = {
221
206
  appId: string;
222
207
  logCode: number;
package/dist/general.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PurchaseTypeStep = exports.PurchaseCycle = exports.PurchaseStatus = exports.BundleType = void 0;
3
+ exports.BundleType = void 0;
4
4
  var BundleType;
5
5
  (function (BundleType) {
6
6
  BundleType[BundleType["BUNDLE"] = 0] = "BUNDLE";
@@ -8,28 +8,3 @@ var BundleType;
8
8
  BundleType[BundleType["SYMBOLIC_COURSE"] = 2] = "SYMBOLIC_COURSE";
9
9
  BundleType[BundleType["SYMBOLIC_CONSULTANCY"] = 3] = "SYMBOLIC_CONSULTANCY";
10
10
  })(BundleType || (exports.BundleType = BundleType = {}));
11
- var PurchaseStatus;
12
- (function (PurchaseStatus) {
13
- PurchaseStatus[PurchaseStatus["NORMAL"] = 0] = "NORMAL";
14
- PurchaseStatus[PurchaseStatus["EXPIRED"] = 1] = "EXPIRED";
15
- PurchaseStatus[PurchaseStatus["CANCELED"] = 2] = "CANCELED";
16
- PurchaseStatus[PurchaseStatus["OPEN"] = 3] = "OPEN";
17
- PurchaseStatus[PurchaseStatus["RECYCLING"] = 4] = "RECYCLING";
18
- PurchaseStatus[PurchaseStatus["PAYED"] = 5] = "PAYED";
19
- PurchaseStatus[PurchaseStatus["ACTIVE"] = 6] = "ACTIVE";
20
- })(PurchaseStatus || (exports.PurchaseStatus = PurchaseStatus = {}));
21
- var PurchaseCycle;
22
- (function (PurchaseCycle) {
23
- PurchaseCycle[PurchaseCycle["UNKNOWN"] = 0] = "UNKNOWN";
24
- PurchaseCycle[PurchaseCycle["ACTIVE"] = 1] = "ACTIVE";
25
- PurchaseCycle[PurchaseCycle["CANCELED"] = 2] = "CANCELED";
26
- PurchaseCycle[PurchaseCycle["REFUNDED"] = 3] = "REFUNDED";
27
- PurchaseCycle[PurchaseCycle["REMOVED"] = 4] = "REMOVED";
28
- PurchaseCycle[PurchaseCycle["Nonrefundable"] = 5] = "Nonrefundable";
29
- })(PurchaseCycle || (exports.PurchaseCycle = PurchaseCycle = {}));
30
- var PurchaseTypeStep;
31
- (function (PurchaseTypeStep) {
32
- PurchaseTypeStep[PurchaseTypeStep["SESSION"] = 0] = "SESSION";
33
- PurchaseTypeStep[PurchaseTypeStep["PAYMENT"] = 1] = "PAYMENT";
34
- PurchaseTypeStep[PurchaseTypeStep["SUBSCRIPTION"] = 2] = "SUBSCRIPTION";
35
- })(PurchaseTypeStep || (exports.PurchaseTypeStep = PurchaseTypeStep = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authenty/authapi-types",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Shared types for Authenty API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/general.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PrivilegeTable } from "./admin";
2
+ import { PG_PurchaseLicenseStatus, PG_PurchasePaymentStatus, PG_PurchaseType } from "./payment-system";
2
3
 
3
4
  export enum BundleType {
4
5
  BUNDLE = 0,
@@ -92,7 +93,7 @@ export type Consultancy = {
92
93
 
93
94
  export type Bundle = {
94
95
  id: number;
95
- type: number;
96
+ type: BundleType;
96
97
  title?: string;
97
98
  short?: string;
98
99
  resume?: string;
@@ -105,27 +106,27 @@ export type Bundle = {
105
106
  showInSite: boolean;
106
107
  defaultMetaArray: string;
107
108
  deletedAt?: string | null;
108
- Levels?: Array<{
109
+ Levels?: {
109
110
  id: number;
110
111
  bundleID: number;
111
112
  levelID: number;
112
113
  quantity: number;
113
114
  Level: ProductLevel;
114
- }>;
115
- Courses?: Array<{
115
+ }[];
116
+ Courses?: {
116
117
  id: number;
117
118
  bundleID: number;
118
119
  courseID: number;
119
120
  quantity: number;
120
121
  Course: Course;
121
- }>;
122
- Consultancies?: Array<{
122
+ }[];
123
+ Consultancies?: {
123
124
  id: number;
124
125
  bundleID: number;
125
126
  consultancyID: number;
126
127
  quantity: number;
127
128
  Consultancy: Consultancy;
128
- }>;
129
+ }[];
129
130
  store_bundles_paymethod: PaymentMethod[];
130
131
  }
131
132
 
@@ -142,36 +143,13 @@ export type PaymentMethod = {
142
143
  Bundle?: Bundle;
143
144
  }
144
145
 
145
- export enum PurchaseStatus {
146
- NORMAL = 0,
147
- EXPIRED = 1,
148
- CANCELED = 2,
149
- OPEN = 3,
150
- RECYCLING = 4,
151
- PAYED = 5,
152
- ACTIVE = 6
153
- }
154
- export enum PurchaseCycle {
155
- UNKNOWN = 0,
156
- ACTIVE = 1,
157
- CANCELED = 2,
158
- REFUNDED = 3,
159
- REMOVED = 4,
160
- Nonrefundable = 5
161
- }
162
- export enum PurchaseTypeStep {
163
- SESSION = 0,
164
- PAYMENT = 1,
165
- SUBSCRIPTION = 2
166
- }
167
-
168
146
  export type Purchase = {
169
147
  paghash: string;
170
148
  id: number;
171
149
  price: number;
172
- licenseStatus: PurchaseStatus;
173
- paymentStatus: PurchaseCycle,
174
- type_step: PurchaseTypeStep,
150
+ licenseStatus: PG_PurchaseLicenseStatus;
151
+ paymentStatus: PG_PurchasePaymentStatus,
152
+ type_step: PG_PurchaseType,
175
153
  PaymentMethod: PaymentMethod;
176
154
  Wallet?: Wallet;
177
155
  walletID: number;
@@ -182,6 +160,11 @@ export type Purchase = {
182
160
  nfUrl?: string;
183
161
  isAdmin?: boolean;
184
162
  meta_data?: Record<string, any>;
163
+ PurchaseShares?: PurchaseShare[];
164
+ Levels?: {
165
+ Level: ProductLevel
166
+ quant: number
167
+ }[]
185
168
  }
186
169
 
187
170
  export type Wallet = {
@@ -226,14 +209,14 @@ export type LocalUser = {
226
209
  Wallets?: Wallet[];
227
210
  PurchasesShares?: PurchaseShare[];
228
211
 
229
- Sys_admUser_config?: {
230
- campaigns_blacklist:string,
231
- deletedAt: Date | null,
232
- userID: number
233
- },
212
+ Sys_admUser_config?: AdminUserConfig,
234
213
  Sys_adminUser?: PrivilegeTable
235
214
  }
236
-
215
+ export type AdminUserConfig = {
216
+ campaigns_blacklist:string,
217
+ deletedAt: Date | null,
218
+ userID: number
219
+ }
237
220
 
238
221
  // Tipos para logs do sistema
239
222
  export type LogEntry = {