@authenty/authapi-types 1.0.29 → 1.0.31
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/index.d.ts +91 -5
- package/dist/index.js +22 -3
- package/package.json +1 -1
- package/src/index.ts +107 -4
- package/dist/admin.d.ts +0 -19
- package/dist/admin.js +0 -9
- package/dist/cronjobs.d.ts +0 -8
- package/dist/cronjobs.js +0 -2
- package/dist/general.d.ts +0 -227
- package/dist/general.js +0 -10
- package/dist/package.json +0 -18
- package/dist/payment-system.d.ts +0 -44
- package/dist/payment-system.js +0 -44
- package/dist/src/index.d.ts +0 -623
- package/dist/src/index.js +0 -425
- package/dist/src/tools.d.ts +0 -1
- package/dist/src/tools.js +0 -16
package/dist/index.d.ts
CHANGED
|
@@ -671,10 +671,87 @@ export declare namespace AuthApi {
|
|
|
671
671
|
}>;
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
+
namespace support {
|
|
675
|
+
namespace newReport {
|
|
676
|
+
type POST = {
|
|
677
|
+
msg?: string;
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
}
|
|
674
681
|
namespace report {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
682
|
+
namespace users {
|
|
683
|
+
type GET = {
|
|
684
|
+
totalUsers: number;
|
|
685
|
+
usersByCountry: Array<{
|
|
686
|
+
countryId: number | null;
|
|
687
|
+
countryName: string;
|
|
688
|
+
count: number;
|
|
689
|
+
}>;
|
|
690
|
+
usersByState: Array<{
|
|
691
|
+
stateId: number | null;
|
|
692
|
+
stateName: string;
|
|
693
|
+
stateUf: string | null;
|
|
694
|
+
count: number;
|
|
695
|
+
}>;
|
|
696
|
+
usersWithActiveSubscription: number;
|
|
697
|
+
};
|
|
698
|
+
namespace timeline {
|
|
699
|
+
type GET = {
|
|
700
|
+
timeline: Array<{
|
|
701
|
+
month: string;
|
|
702
|
+
users: number;
|
|
703
|
+
purchases: number;
|
|
704
|
+
}>;
|
|
705
|
+
summary: {
|
|
706
|
+
totalUsers: number;
|
|
707
|
+
totalPurchases: number;
|
|
708
|
+
iniDate: string;
|
|
709
|
+
endDate: string;
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
namespace cumulativeTimeline {
|
|
714
|
+
type GET = {
|
|
715
|
+
timeline2: Array<{
|
|
716
|
+
month: string;
|
|
717
|
+
activeUsers: number;
|
|
718
|
+
paidSubscriptions: number;
|
|
719
|
+
}>;
|
|
720
|
+
summary: {
|
|
721
|
+
iniDate: string;
|
|
722
|
+
endDate: string;
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
namespace usage {
|
|
727
|
+
namespace monthly {
|
|
728
|
+
type GET = {
|
|
729
|
+
users: Array<{
|
|
730
|
+
userId: number;
|
|
731
|
+
userName: string;
|
|
732
|
+
userEmail: string;
|
|
733
|
+
monthlyUsage: Array<{
|
|
734
|
+
month: string;
|
|
735
|
+
totalMinutes: number;
|
|
736
|
+
totalHours: number;
|
|
737
|
+
byProduct: Array<{
|
|
738
|
+
productId: number;
|
|
739
|
+
productTitle: string;
|
|
740
|
+
minutes: number;
|
|
741
|
+
}>;
|
|
742
|
+
}>;
|
|
743
|
+
}>;
|
|
744
|
+
summary: {
|
|
745
|
+
totalUsers: number;
|
|
746
|
+
totalSessions: number;
|
|
747
|
+
totalMinutes: number;
|
|
748
|
+
iniDate: string;
|
|
749
|
+
endDate: string;
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
678
755
|
}
|
|
679
756
|
namespace admin {
|
|
680
757
|
namespace purchases {
|
|
@@ -814,9 +891,18 @@ export declare namespace AuthApi {
|
|
|
814
891
|
status: () => Promise<responses.ApiResponse<auxiliarTypes.CronjobsStatuses>>;
|
|
815
892
|
run: (name: string) => Promise<responses.ApiResponse<responses.cronJobs.run.POST>>;
|
|
816
893
|
};
|
|
894
|
+
reports: {
|
|
895
|
+
users: () => Promise<responses.ApiResponse<responses.report.users.GET>>;
|
|
896
|
+
usersMonthlyUsage: (iniDate?: string, endDate?: string, userId?: number) => Promise<responses.ApiResponse<responses.report.users.usage.monthly.GET>>;
|
|
897
|
+
usersTimeline: (iniDate?: string, endDate?: string) => Promise<responses.ApiResponse<responses.report.users.timeline.GET>>;
|
|
898
|
+
usersCumulativeTimeline: (iniDate?: string, endDate?: string) => Promise<responses.ApiResponse<responses.report.users.cumulativeTimeline.GET>>;
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
support: {
|
|
902
|
+
newReport: (id: string, data: any) => Promise<responses.ApiResponse<responses.support.newReport.POST>>;
|
|
817
903
|
};
|
|
818
|
-
|
|
819
|
-
|
|
904
|
+
track: {
|
|
905
|
+
route: (route: string) => Promise<responses.ApiResponse<any>>;
|
|
820
906
|
};
|
|
821
907
|
}
|
|
822
908
|
}
|
package/dist/index.js
CHANGED
|
@@ -253,17 +253,36 @@ var AuthApi;
|
|
|
253
253
|
run: async (name) => {
|
|
254
254
|
return await this.request('POST', `admin/cronjobs/run/${name}`, {});
|
|
255
255
|
}
|
|
256
|
+
},
|
|
257
|
+
reports: {
|
|
258
|
+
users: async () => {
|
|
259
|
+
return await this.request('GET', 'report/users', {});
|
|
260
|
+
},
|
|
261
|
+
usersMonthlyUsage: async (iniDate, endDate, userId) => {
|
|
262
|
+
return await this.request('GET', 'report/users/usage/monthly', { iniDate, endDate, userId });
|
|
263
|
+
},
|
|
264
|
+
usersTimeline: async (iniDate, endDate) => {
|
|
265
|
+
return await this.request('GET', 'report/users/timeline', { iniDate, endDate });
|
|
266
|
+
},
|
|
267
|
+
usersCumulativeTimeline: async (iniDate, endDate) => {
|
|
268
|
+
return await this.request('GET', 'report/users/cumulative-timeline', { iniDate, endDate });
|
|
269
|
+
},
|
|
256
270
|
}
|
|
257
271
|
};
|
|
258
|
-
this.
|
|
259
|
-
|
|
260
|
-
return await this.request('POST', '
|
|
272
|
+
this.support = {
|
|
273
|
+
newReport: async (id, data) => {
|
|
274
|
+
return await this.request('POST', 'support/newReport', {
|
|
261
275
|
id,
|
|
262
276
|
data: (0, tools_1.safeStringify)(data),
|
|
263
277
|
appVersion: 'unknown'
|
|
264
278
|
});
|
|
265
279
|
}
|
|
266
280
|
};
|
|
281
|
+
this.track = {
|
|
282
|
+
route: async (route) => {
|
|
283
|
+
return await this.request('POST', 'track/route', { route });
|
|
284
|
+
}
|
|
285
|
+
};
|
|
267
286
|
this.baseURL = config.baseURL;
|
|
268
287
|
this.tokenStorage = config.tokenStorage;
|
|
269
288
|
this.onTokenUpdate = config.onTokenUpdate;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -689,8 +689,91 @@ export namespace AuthApi {
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
+
export namespace support {
|
|
693
|
+
export namespace newReport {
|
|
694
|
+
export type POST = { msg?: string };
|
|
695
|
+
}
|
|
696
|
+
}
|
|
692
697
|
export namespace report {
|
|
693
|
-
|
|
698
|
+
|
|
699
|
+
export namespace users {
|
|
700
|
+
|
|
701
|
+
export type GET = {
|
|
702
|
+
totalUsers: number;
|
|
703
|
+
usersByCountry: Array<{
|
|
704
|
+
countryId: number | null;
|
|
705
|
+
countryName: string;
|
|
706
|
+
count: number;
|
|
707
|
+
}>;
|
|
708
|
+
usersByState: Array<{
|
|
709
|
+
stateId: number | null;
|
|
710
|
+
stateName: string;
|
|
711
|
+
stateUf: string | null;
|
|
712
|
+
count: number;
|
|
713
|
+
}>;
|
|
714
|
+
usersWithActiveSubscription: number;
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
export namespace timeline {
|
|
718
|
+
export type GET = {
|
|
719
|
+
timeline: Array<{
|
|
720
|
+
month: string;
|
|
721
|
+
users: number;
|
|
722
|
+
purchases: number;
|
|
723
|
+
}>;
|
|
724
|
+
summary: {
|
|
725
|
+
totalUsers: number;
|
|
726
|
+
totalPurchases: number;
|
|
727
|
+
iniDate: string;
|
|
728
|
+
endDate: string;
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
export namespace cumulativeTimeline {
|
|
734
|
+
export type GET = {
|
|
735
|
+
timeline2: Array<{
|
|
736
|
+
month: string;
|
|
737
|
+
activeUsers: number;
|
|
738
|
+
paidSubscriptions: number;
|
|
739
|
+
}>;
|
|
740
|
+
summary: {
|
|
741
|
+
iniDate: string;
|
|
742
|
+
endDate: string;
|
|
743
|
+
};
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export namespace usage {
|
|
748
|
+
export namespace monthly {
|
|
749
|
+
export type GET = {
|
|
750
|
+
users: Array<{
|
|
751
|
+
userId: number;
|
|
752
|
+
userName: string;
|
|
753
|
+
userEmail: string;
|
|
754
|
+
monthlyUsage: Array<{
|
|
755
|
+
month: string;
|
|
756
|
+
totalMinutes: number;
|
|
757
|
+
totalHours: number;
|
|
758
|
+
byProduct: Array<{
|
|
759
|
+
productId: number;
|
|
760
|
+
productTitle: string;
|
|
761
|
+
minutes: number;
|
|
762
|
+
}>;
|
|
763
|
+
}>;
|
|
764
|
+
}>;
|
|
765
|
+
summary: {
|
|
766
|
+
totalUsers: number;
|
|
767
|
+
totalSessions: number;
|
|
768
|
+
totalMinutes: number;
|
|
769
|
+
iniDate: string;
|
|
770
|
+
endDate: string;
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
}
|
|
694
777
|
}
|
|
695
778
|
|
|
696
779
|
export namespace admin {
|
|
@@ -1109,13 +1192,28 @@ export namespace AuthApi {
|
|
|
1109
1192
|
run: async (name: string) => {
|
|
1110
1193
|
return await this.request<responses.cronJobs.run.POST>('POST', `admin/cronjobs/run/${name}`, {});
|
|
1111
1194
|
}
|
|
1195
|
+
},
|
|
1196
|
+
|
|
1197
|
+
reports: {
|
|
1198
|
+
users: async () => {
|
|
1199
|
+
return await this.request<responses.report.users.GET>('GET', 'report/users', {});
|
|
1200
|
+
},
|
|
1201
|
+
usersMonthlyUsage: async (iniDate?: string, endDate?: string, userId?: number) => {
|
|
1202
|
+
return await this.request<responses.report.users.usage.monthly.GET>('GET', 'report/users/usage/monthly', { iniDate, endDate, userId });
|
|
1203
|
+
},
|
|
1204
|
+
usersTimeline: async (iniDate?: string, endDate?: string) => {
|
|
1205
|
+
return await this.request<responses.report.users.timeline.GET>('GET', 'report/users/timeline', { iniDate, endDate });
|
|
1206
|
+
},
|
|
1207
|
+
usersCumulativeTimeline: async (iniDate?: string, endDate?: string) => {
|
|
1208
|
+
return await this.request<responses.report.users.cumulativeTimeline.GET>('GET', 'report/users/cumulative-timeline', { iniDate, endDate });
|
|
1209
|
+
},
|
|
1112
1210
|
}
|
|
1113
1211
|
}
|
|
1114
1212
|
|
|
1115
|
-
public
|
|
1116
|
-
|
|
1213
|
+
public support = {
|
|
1214
|
+
newReport: async (id: string, data: any) => {
|
|
1117
1215
|
|
|
1118
|
-
return await this.request<responses.
|
|
1216
|
+
return await this.request<responses.support.newReport.POST>('POST', 'support/newReport', {
|
|
1119
1217
|
id,
|
|
1120
1218
|
data: safeStringify(data),
|
|
1121
1219
|
appVersion: 'unknown'
|
|
@@ -1123,6 +1221,11 @@ export namespace AuthApi {
|
|
|
1123
1221
|
}
|
|
1124
1222
|
}
|
|
1125
1223
|
|
|
1224
|
+
public track = {
|
|
1225
|
+
route: async (route: string) => {
|
|
1226
|
+
return await this.request('POST', 'track/route', { route });
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1126
1229
|
}
|
|
1127
1230
|
|
|
1128
1231
|
}
|
package/dist/admin.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare enum Privilege {
|
|
2
|
-
NONE = 0,
|
|
3
|
-
READ = 1,
|
|
4
|
-
WRITE = 2
|
|
5
|
-
}
|
|
6
|
-
export type PrivilegeTable = {
|
|
7
|
-
users: Privilege;
|
|
8
|
-
products: Privilege;
|
|
9
|
-
courses: Privilege;
|
|
10
|
-
consultancies: Privilege;
|
|
11
|
-
bundles: Privilege;
|
|
12
|
-
logs: Privilege;
|
|
13
|
-
support: Privilege;
|
|
14
|
-
leads: Privilege;
|
|
15
|
-
paymentSystem: Privilege;
|
|
16
|
-
adminMaster: Privilege;
|
|
17
|
-
activityTrakking: Privilege;
|
|
18
|
-
financial: Privilege;
|
|
19
|
-
};
|
package/dist/admin.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Privilege = void 0;
|
|
4
|
-
var Privilege;
|
|
5
|
-
(function (Privilege) {
|
|
6
|
-
Privilege[Privilege["NONE"] = 0] = "NONE";
|
|
7
|
-
Privilege[Privilege["READ"] = 1] = "READ";
|
|
8
|
-
Privilege[Privilege["WRITE"] = 2] = "WRITE";
|
|
9
|
-
})(Privilege || (exports.Privilege = Privilege = {}));
|
package/dist/cronjobs.d.ts
DELETED
package/dist/cronjobs.js
DELETED
package/dist/general.d.ts
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { PrivilegeTable } from "./admin";
|
|
2
|
-
import { PG_PurchaseLicenseStatus, PG_PurchasePaymentStatus, PG_PurchaseType } from "./payment-system";
|
|
3
|
-
export declare enum BundleType {
|
|
4
|
-
BUNDLE = 0,
|
|
5
|
-
SYMBOLIC_PRODUCT = 1,
|
|
6
|
-
SYMBOLIC_COURSE = 2,
|
|
7
|
-
SYMBOLIC_CONSULTANCY = 3
|
|
8
|
-
}
|
|
9
|
-
export type Product = {
|
|
10
|
-
id: number;
|
|
11
|
-
title: string;
|
|
12
|
-
short: string;
|
|
13
|
-
resume: string;
|
|
14
|
-
video: string;
|
|
15
|
-
imgUrls: string | null;
|
|
16
|
-
logo: string;
|
|
17
|
-
themeImage: string;
|
|
18
|
-
themeColor: string;
|
|
19
|
-
themeVideo: string;
|
|
20
|
-
url: string;
|
|
21
|
-
type: number;
|
|
22
|
-
period_test: number;
|
|
23
|
-
created: string;
|
|
24
|
-
deletedAt?: string | null;
|
|
25
|
-
Levels?: ProductLevel[];
|
|
26
|
-
};
|
|
27
|
-
export type ProductLevel = {
|
|
28
|
-
id: number;
|
|
29
|
-
productID: number;
|
|
30
|
-
level: number;
|
|
31
|
-
short: string;
|
|
32
|
-
Product?: Product;
|
|
33
|
-
store_bundles_levels?: {
|
|
34
|
-
id: number;
|
|
35
|
-
bundleID: number;
|
|
36
|
-
levelID: number;
|
|
37
|
-
quantity: number;
|
|
38
|
-
Bundle?: Bundle;
|
|
39
|
-
}[];
|
|
40
|
-
};
|
|
41
|
-
export type Course = {
|
|
42
|
-
id: number;
|
|
43
|
-
type: number;
|
|
44
|
-
name: string;
|
|
45
|
-
short: string;
|
|
46
|
-
resume: string;
|
|
47
|
-
img_landscape: string;
|
|
48
|
-
img_square: string;
|
|
49
|
-
workload: number;
|
|
50
|
-
langID: number;
|
|
51
|
-
num_classes?: number;
|
|
52
|
-
seats: number;
|
|
53
|
-
url?: string;
|
|
54
|
-
dates: string;
|
|
55
|
-
local: string;
|
|
56
|
-
local_url: string;
|
|
57
|
-
date_mat_s?: string;
|
|
58
|
-
date_mat_e?: string;
|
|
59
|
-
date_ends?: string;
|
|
60
|
-
email_enrollment?: string;
|
|
61
|
-
email_before?: string;
|
|
62
|
-
email_after?: string;
|
|
63
|
-
date_c: string;
|
|
64
|
-
date_r?: string | null;
|
|
65
|
-
};
|
|
66
|
-
export type Consultancy = {
|
|
67
|
-
id: number;
|
|
68
|
-
teacherID: number;
|
|
69
|
-
type: number;
|
|
70
|
-
name: string;
|
|
71
|
-
short: string;
|
|
72
|
-
resume: string;
|
|
73
|
-
img_landscape: string;
|
|
74
|
-
img_square: string;
|
|
75
|
-
workload: number;
|
|
76
|
-
langID: number;
|
|
77
|
-
url?: string;
|
|
78
|
-
datetime: string;
|
|
79
|
-
date_mat_s?: string;
|
|
80
|
-
date_mat_e?: string;
|
|
81
|
-
date_ends?: string;
|
|
82
|
-
email_enrollment: string;
|
|
83
|
-
email_before: string;
|
|
84
|
-
email_after: string;
|
|
85
|
-
date_c: string;
|
|
86
|
-
date_r?: string | null;
|
|
87
|
-
};
|
|
88
|
-
export type Bundle = {
|
|
89
|
-
id: number;
|
|
90
|
-
type: BundleType;
|
|
91
|
-
title?: string;
|
|
92
|
-
short?: string;
|
|
93
|
-
resume?: string;
|
|
94
|
-
img: string;
|
|
95
|
-
themeImage: string;
|
|
96
|
-
themeColor: string;
|
|
97
|
-
shareLimit: number;
|
|
98
|
-
created: string;
|
|
99
|
-
active: boolean;
|
|
100
|
-
showInSite: boolean;
|
|
101
|
-
defaultMetaArray: string;
|
|
102
|
-
deletedAt?: string | null;
|
|
103
|
-
Levels?: {
|
|
104
|
-
id: number;
|
|
105
|
-
bundleID: number;
|
|
106
|
-
levelID: number;
|
|
107
|
-
quantity: number;
|
|
108
|
-
Level: ProductLevel;
|
|
109
|
-
}[];
|
|
110
|
-
Courses?: {
|
|
111
|
-
id: number;
|
|
112
|
-
bundleID: number;
|
|
113
|
-
courseID: number;
|
|
114
|
-
quantity: number;
|
|
115
|
-
Course: Course;
|
|
116
|
-
}[];
|
|
117
|
-
Consultancies?: {
|
|
118
|
-
id: number;
|
|
119
|
-
bundleID: number;
|
|
120
|
-
consultancyID: number;
|
|
121
|
-
quantity: number;
|
|
122
|
-
Consultancy: Consultancy;
|
|
123
|
-
}[];
|
|
124
|
-
store_bundles_paymethod: PaymentMethod[];
|
|
125
|
-
};
|
|
126
|
-
export type PaymentMethod = {
|
|
127
|
-
id: number;
|
|
128
|
-
bundleID: number;
|
|
129
|
-
price: number;
|
|
130
|
-
fromprice: number;
|
|
131
|
-
period_renew: number;
|
|
132
|
-
period_grace: number;
|
|
133
|
-
gatewayHash: string;
|
|
134
|
-
allowBoleto: boolean;
|
|
135
|
-
gatewayID: number;
|
|
136
|
-
Bundle?: Bundle;
|
|
137
|
-
};
|
|
138
|
-
export type Purchase = {
|
|
139
|
-
paghash: string;
|
|
140
|
-
id: number;
|
|
141
|
-
price: number;
|
|
142
|
-
licenseStatus: PG_PurchaseLicenseStatus;
|
|
143
|
-
paymentStatus: PG_PurchasePaymentStatus;
|
|
144
|
-
type_step: PG_PurchaseType;
|
|
145
|
-
PaymentMethod: PaymentMethod;
|
|
146
|
-
Wallet?: Wallet;
|
|
147
|
-
walletID: number;
|
|
148
|
-
createdAt: string;
|
|
149
|
-
paymentDueAt: string | null;
|
|
150
|
-
owner: string;
|
|
151
|
-
invoiceUrl?: string;
|
|
152
|
-
nfUrl?: string;
|
|
153
|
-
isAdmin?: boolean;
|
|
154
|
-
meta_data?: Record<string, any>;
|
|
155
|
-
PurchaseShares?: PurchaseShare[];
|
|
156
|
-
Levels?: {
|
|
157
|
-
Level: ProductLevel;
|
|
158
|
-
quant: number;
|
|
159
|
-
}[];
|
|
160
|
-
};
|
|
161
|
-
export type Wallet = {
|
|
162
|
-
id: number;
|
|
163
|
-
userID: number;
|
|
164
|
-
balance?: number;
|
|
165
|
-
Purchases?: Purchase[];
|
|
166
|
-
};
|
|
167
|
-
export type PurchaseShare = {
|
|
168
|
-
id: number;
|
|
169
|
-
purchaseID: number;
|
|
170
|
-
userID: number;
|
|
171
|
-
Purchase: Purchase;
|
|
172
|
-
};
|
|
173
|
-
export type LocalUser = {
|
|
174
|
-
id: number;
|
|
175
|
-
fullname: string;
|
|
176
|
-
email: string;
|
|
177
|
-
lang: number;
|
|
178
|
-
avatar: string;
|
|
179
|
-
end_city?: number;
|
|
180
|
-
end_comp?: string;
|
|
181
|
-
end_country: number;
|
|
182
|
-
end_district?: string;
|
|
183
|
-
end_n?: string;
|
|
184
|
-
end_state?: number;
|
|
185
|
-
end_street?: string;
|
|
186
|
-
end_zip?: string;
|
|
187
|
-
email_verif: boolean;
|
|
188
|
-
fiscal_verif: boolean;
|
|
189
|
-
terms: boolean;
|
|
190
|
-
cpf?: string;
|
|
191
|
-
newslatter?: boolean;
|
|
192
|
-
allow_purchase?: boolean;
|
|
193
|
-
allow_license?: boolean;
|
|
194
|
-
date_c?: Date | string;
|
|
195
|
-
date_r?: Date | string | null;
|
|
196
|
-
Wallets?: Wallet[];
|
|
197
|
-
PurchasesShares?: PurchaseShare[];
|
|
198
|
-
Sys_admUser_config?: AdminUserConfig;
|
|
199
|
-
Sys_adminUser?: PrivilegeTable;
|
|
200
|
-
};
|
|
201
|
-
export type AdminUserConfig = {
|
|
202
|
-
campaigns_blacklist: string;
|
|
203
|
-
deletedAt: Date | null;
|
|
204
|
-
userID: number;
|
|
205
|
-
};
|
|
206
|
-
export type availableSoftware_auxType = {
|
|
207
|
-
Level: ProductLevel;
|
|
208
|
-
quantity: number;
|
|
209
|
-
purchaseId: number | null;
|
|
210
|
-
type: 'free' | 'own' | 'shared';
|
|
211
|
-
};
|
|
212
|
-
export type LogEntry = {
|
|
213
|
-
appId: string;
|
|
214
|
-
logCode: number;
|
|
215
|
-
content: string;
|
|
216
|
-
timestamp?: string;
|
|
217
|
-
metadata?: {
|
|
218
|
-
requestId: string;
|
|
219
|
-
endpoint: string;
|
|
220
|
-
method: string;
|
|
221
|
-
userId?: number;
|
|
222
|
-
ip?: string;
|
|
223
|
-
browser?: string;
|
|
224
|
-
system?: string;
|
|
225
|
-
referer?: string;
|
|
226
|
-
};
|
|
227
|
-
};
|
package/dist/general.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BundleType = void 0;
|
|
4
|
-
var BundleType;
|
|
5
|
-
(function (BundleType) {
|
|
6
|
-
BundleType[BundleType["BUNDLE"] = 0] = "BUNDLE";
|
|
7
|
-
BundleType[BundleType["SYMBOLIC_PRODUCT"] = 1] = "SYMBOLIC_PRODUCT";
|
|
8
|
-
BundleType[BundleType["SYMBOLIC_COURSE"] = 2] = "SYMBOLIC_COURSE";
|
|
9
|
-
BundleType[BundleType["SYMBOLIC_CONSULTANCY"] = 3] = "SYMBOLIC_CONSULTANCY";
|
|
10
|
-
})(BundleType || (exports.BundleType = BundleType = {}));
|
package/dist/package.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@authenty/authapi-types",
|
|
3
|
-
"version": "1.0.12",
|
|
4
|
-
"description": "Shared types for Authenty API",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"prebuild": "node IncrementVersion.js",
|
|
9
|
-
"build": "tsc",
|
|
10
|
-
"dev": "tsc -w"
|
|
11
|
-
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"access": "public"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"typescript": "^5.0.0"
|
|
17
|
-
}
|
|
18
|
-
}
|
package/dist/payment-system.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export type PG_Customer = {
|
|
2
|
-
id: string;
|
|
3
|
-
email: string;
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
export declare enum PG_PurchaseLicenseStatus {
|
|
7
|
-
UNKNOWN = 0,//Nunca será atualizado automaticamente!!
|
|
8
|
-
OPEN = 3,//ABERTA - Aguardando pagamento
|
|
9
|
-
EXPIRED = 1,//VENCEU - Era PAGAMENTO, e acabou prazo pra uso acabou
|
|
10
|
-
PAID = 5,//PAGA - Pagamento realizado com sucesso - é pagamento único
|
|
11
|
-
ACTIVE = 6,//ATIVO - Assinatura ativa e em dia
|
|
12
|
-
RECYCLING = 4,//RETENTANDO - Tentativa de renovação automática falhou, mas ainda está no prazo para pagar manualmente
|
|
13
|
-
CANCELED = 2
|
|
14
|
-
}
|
|
15
|
-
export declare const PG_PurchaseLicenseStatus_GroupActive: PG_PurchaseLicenseStatus[];
|
|
16
|
-
export declare enum PG_PurchasePaymentStatus {
|
|
17
|
-
UNKNOWN = 0,//pendent or unknown
|
|
18
|
-
ACTIVE = 1,
|
|
19
|
-
CANCELED = 2,
|
|
20
|
-
REFUNDED = 3,
|
|
21
|
-
REMOVED = 4,// REMOVIDO DO GATEWAY - Não há mais registro do pagamento no gateway
|
|
22
|
-
PENDING = 5
|
|
23
|
-
}
|
|
24
|
-
export declare enum PG_PurchaseType {
|
|
25
|
-
SESSION = 0,//o registro se trata de uma sessão de compra (ex: intenção de compra preparada para redirecionar o usuário ao gateway. Ainda não é um pagamento nem uma assinatura ativa)
|
|
26
|
-
STANDARD = 1,//Pagamento único
|
|
27
|
-
RECURRENT = 2
|
|
28
|
-
}
|
|
29
|
-
export type PG_Purchase = {
|
|
30
|
-
id: string;
|
|
31
|
-
amount: number;
|
|
32
|
-
recurrent: boolean;
|
|
33
|
-
type: PG_PurchaseType;
|
|
34
|
-
paymentStatus: PG_PurchasePaymentStatus;
|
|
35
|
-
url: string | null;
|
|
36
|
-
dueTime: Date | null;
|
|
37
|
-
};
|
|
38
|
-
export declare enum PG_RecurrenceType {
|
|
39
|
-
NONE = 0,
|
|
40
|
-
DAILY = 1,
|
|
41
|
-
WEEKLY = 2,
|
|
42
|
-
MONTHLY = 3,
|
|
43
|
-
YEARLY = 4
|
|
44
|
-
}
|
package/dist/payment-system.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PG_RecurrenceType = exports.PG_PurchaseType = exports.PG_PurchasePaymentStatus = exports.PG_PurchaseLicenseStatus_GroupActive = exports.PG_PurchaseLicenseStatus = void 0;
|
|
4
|
-
var PG_PurchaseLicenseStatus;
|
|
5
|
-
(function (PG_PurchaseLicenseStatus) {
|
|
6
|
-
// Pagamentos ou Assinaturas
|
|
7
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["UNKNOWN"] = 0] = "UNKNOWN";
|
|
8
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["OPEN"] = 3] = "OPEN";
|
|
9
|
-
// Pagamentos
|
|
10
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["EXPIRED"] = 1] = "EXPIRED";
|
|
11
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["PAID"] = 5] = "PAID";
|
|
12
|
-
// Assinaturas
|
|
13
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["ACTIVE"] = 6] = "ACTIVE";
|
|
14
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["RECYCLING"] = 4] = "RECYCLING";
|
|
15
|
-
PG_PurchaseLicenseStatus[PG_PurchaseLicenseStatus["CANCELED"] = 2] = "CANCELED";
|
|
16
|
-
})(PG_PurchaseLicenseStatus || (exports.PG_PurchaseLicenseStatus = PG_PurchaseLicenseStatus = {}));
|
|
17
|
-
exports.PG_PurchaseLicenseStatus_GroupActive = [
|
|
18
|
-
PG_PurchaseLicenseStatus.PAID,
|
|
19
|
-
PG_PurchaseLicenseStatus.ACTIVE,
|
|
20
|
-
PG_PurchaseLicenseStatus.RECYCLING,
|
|
21
|
-
];
|
|
22
|
-
var PG_PurchasePaymentStatus;
|
|
23
|
-
(function (PG_PurchasePaymentStatus) {
|
|
24
|
-
PG_PurchasePaymentStatus[PG_PurchasePaymentStatus["UNKNOWN"] = 0] = "UNKNOWN";
|
|
25
|
-
PG_PurchasePaymentStatus[PG_PurchasePaymentStatus["ACTIVE"] = 1] = "ACTIVE";
|
|
26
|
-
PG_PurchasePaymentStatus[PG_PurchasePaymentStatus["CANCELED"] = 2] = "CANCELED";
|
|
27
|
-
PG_PurchasePaymentStatus[PG_PurchasePaymentStatus["REFUNDED"] = 3] = "REFUNDED";
|
|
28
|
-
PG_PurchasePaymentStatus[PG_PurchasePaymentStatus["REMOVED"] = 4] = "REMOVED";
|
|
29
|
-
PG_PurchasePaymentStatus[PG_PurchasePaymentStatus["PENDING"] = 5] = "PENDING";
|
|
30
|
-
})(PG_PurchasePaymentStatus || (exports.PG_PurchasePaymentStatus = PG_PurchasePaymentStatus = {}));
|
|
31
|
-
var PG_PurchaseType;
|
|
32
|
-
(function (PG_PurchaseType) {
|
|
33
|
-
PG_PurchaseType[PG_PurchaseType["SESSION"] = 0] = "SESSION";
|
|
34
|
-
PG_PurchaseType[PG_PurchaseType["STANDARD"] = 1] = "STANDARD";
|
|
35
|
-
PG_PurchaseType[PG_PurchaseType["RECURRENT"] = 2] = "RECURRENT";
|
|
36
|
-
})(PG_PurchaseType || (exports.PG_PurchaseType = PG_PurchaseType = {}));
|
|
37
|
-
var PG_RecurrenceType;
|
|
38
|
-
(function (PG_RecurrenceType) {
|
|
39
|
-
PG_RecurrenceType[PG_RecurrenceType["NONE"] = 0] = "NONE";
|
|
40
|
-
PG_RecurrenceType[PG_RecurrenceType["DAILY"] = 1] = "DAILY";
|
|
41
|
-
PG_RecurrenceType[PG_RecurrenceType["WEEKLY"] = 2] = "WEEKLY";
|
|
42
|
-
PG_RecurrenceType[PG_RecurrenceType["MONTHLY"] = 3] = "MONTHLY";
|
|
43
|
-
PG_RecurrenceType[PG_RecurrenceType["YEARLY"] = 4] = "YEARLY";
|
|
44
|
-
})(PG_RecurrenceType || (exports.PG_RecurrenceType = PG_RecurrenceType = {}));
|