@bprotsyk/aso-core 2.1.32 → 2.1.35

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.
Files changed (105) hide show
  1. package/README.md +1 -1
  2. package/lib/app/app-integration.d.ts +53 -53
  3. package/lib/app/app-integration.js +63 -63
  4. package/lib/app/app-list-item.d.ts +5 -5
  5. package/lib/app/app-list-item.js +2 -2
  6. package/lib/app/app-type.d.ts +4 -4
  7. package/lib/app/app-type.js +8 -8
  8. package/lib/app/app.d.ts +208 -207
  9. package/lib/app/app.js +156 -161
  10. package/lib/general/cloudflare-domain.d.ts +42 -42
  11. package/lib/general/cloudflare-domain.js +12 -12
  12. package/lib/general/domain.d.ts +108 -108
  13. package/lib/general/domain.js +61 -61
  14. package/lib/general/namecheap-domain.d.ts +85 -85
  15. package/lib/general/namecheap-domain.js +14 -14
  16. package/lib/general/push.d.ts +6 -6
  17. package/lib/general/push.js +2 -2
  18. package/lib/general/queue.d.ts +2 -2
  19. package/lib/general/queue.js +1 -1
  20. package/lib/general/shape.d.ts +18 -18
  21. package/lib/general/shape.js +36 -36
  22. package/lib/index.d.ts +26 -26
  23. package/lib/index.js +69 -69
  24. package/lib/keitaro/keitaro-campaign.d.ts +31 -31
  25. package/lib/keitaro/keitaro-campaign.js +5 -5
  26. package/lib/keitaro/keitaro-domain.d.ts +6 -6
  27. package/lib/keitaro/keitaro-domain.js +2 -2
  28. package/lib/keitaro/keitaro-offer.d.ts +7 -7
  29. package/lib/keitaro/keitaro-offer.js +2 -2
  30. package/lib/keitaro/keitaro-stream.d.ts +20 -20
  31. package/lib/keitaro/keitaro-stream.js +2 -2
  32. package/lib/network/keitaro/http.d.ts +2 -2
  33. package/lib/network/keitaro/http.js +12 -12
  34. package/lib/network/keitaro/keitaro-service.d.ts +48 -48
  35. package/lib/network/keitaro/keitaro-service.js +263 -263
  36. package/lib/offers/list.d.ts +37 -37
  37. package/lib/offers/list.js +12 -12
  38. package/lib/offers/offer.d.ts +91 -91
  39. package/lib/offers/offer.js +42 -42
  40. package/lib/offers/offerwall/offerwall-home-dialog-data.d.ts +6 -6
  41. package/lib/offers/offerwall/offerwall-home-dialog-data.js +2 -2
  42. package/lib/offers/offerwall/offerwall-offer.d.ts +12 -12
  43. package/lib/offers/offerwall/offerwall-offer.js +2 -2
  44. package/lib/offers/offerwall/offerwall-response.d.ts +6 -6
  45. package/lib/offers/offerwall/offerwall-response.js +2 -2
  46. package/lib/offers/offerwall/offerwall-section.d.ts +6 -6
  47. package/lib/offers/offerwall/offerwall-section.js +2 -2
  48. package/lib/offers/section.d.ts +47 -47
  49. package/lib/offers/section.js +20 -20
  50. package/lib/panel/app/upsert-flash-app-request.d.ts +31 -31
  51. package/lib/panel/app/upsert-flash-app-request.js +2 -2
  52. package/lib/panel/auth.d.ts +9 -9
  53. package/lib/panel/auth.js +2 -2
  54. package/lib/panel/flash/upsert-flash-app-request.d.ts +31 -31
  55. package/lib/panel/flash/upsert-flash-app-request.js +2 -2
  56. package/lib/panel/user.d.ts +46 -46
  57. package/lib/panel/user.js +28 -28
  58. package/lib/templates/nginx-template.conf +35 -35
  59. package/lib/templates/nginx-template.d.ts +1 -1
  60. package/lib/templates/nginx-template.js +39 -39
  61. package/lib/templates/nginx-template.ts +35 -35
  62. package/lib/utils/general.d.ts +11 -11
  63. package/lib/utils/general.js +40 -40
  64. package/lib/utils/huawei/converter.d.ts +2 -2
  65. package/lib/utils/huawei/converter.js +53 -53
  66. package/lib/utils/keitaro-utils.d.ts +13 -13
  67. package/lib/utils/keitaro-utils.js +569 -569
  68. package/lib/utils/server-util.js +303 -303
  69. package/package.json +51 -51
  70. package/src/app/app-integration.ts +66 -66
  71. package/src/app/app-list-item.ts +4 -4
  72. package/src/app/app-type.ts +3 -3
  73. package/src/app/app.ts +317 -322
  74. package/src/general/cloudflare-domain.ts +44 -44
  75. package/src/general/domain.ts +105 -105
  76. package/src/general/namecheap-domain.ts +63 -63
  77. package/src/general/push.ts +5 -5
  78. package/src/general/queue.ts +4 -4
  79. package/src/general/shape.tsx +55 -55
  80. package/src/index.ts +32 -32
  81. package/src/keitaro/keitaro-campaign.ts +35 -35
  82. package/src/keitaro/keitaro-domain.ts +5 -5
  83. package/src/keitaro/keitaro-offer.ts +6 -6
  84. package/src/keitaro/keitaro-stream.ts +19 -19
  85. package/src/network/keitaro/http.ts +8 -8
  86. package/src/network/keitaro/keitaro-service.ts +325 -325
  87. package/src/offers/list.ts +19 -19
  88. package/src/offers/offer.ts +80 -80
  89. package/src/offers/offerwall/offerwall-home-dialog-data.ts +6 -6
  90. package/src/offers/offerwall/offerwall-offer.ts +12 -12
  91. package/src/offers/offerwall/offerwall-response.ts +7 -7
  92. package/src/offers/offerwall/offerwall-section.ts +7 -7
  93. package/src/offers/section.ts +29 -29
  94. package/src/panel/app/upsert-flash-app-request.ts +39 -39
  95. package/src/panel/auth.ts +9 -9
  96. package/src/panel/user.ts +38 -38
  97. package/src/templates/nginx-template.ts +35 -35
  98. package/src/utils/data.csv +65 -65
  99. package/src/utils/general.ts +36 -36
  100. package/src/utils/huawei/converter.ts +55 -55
  101. package/src/utils/keitaro-utils.ts +663 -663
  102. package/src/utils/map-apps.json +4747 -4747
  103. package/src/utils/server-util.ts +368 -368
  104. package/src/utils/update-postbacks.js +27 -27
  105. package/tsconfig.json +20 -20
package/lib/app/app.js CHANGED
@@ -1,161 +1,156 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppSchema = exports.PlugType = exports.IntegrationVersion = exports.EPlatform = exports.EImageFormat = void 0;
4
- const app_type_1 = require("./app-type");
5
- const mongoose_1 = require("mongoose");
6
- const util = require("util");
7
- var EImageFormat;
8
- (function (EImageFormat) {
9
- EImageFormat["PNG"] = "png";
10
- EImageFormat["JPEG"] = "jpg";
11
- EImageFormat["WEBP"] = "webp";
12
- })(EImageFormat = exports.EImageFormat || (exports.EImageFormat = {}));
13
- var EPlatform;
14
- (function (EPlatform) {
15
- EPlatform["GENERAL"] = "@";
16
- EPlatform["HUAWEI"] = "hw";
17
- EPlatform["SAMSUNG"] = "sm";
18
- EPlatform["ruSTORE"] = "rs";
19
- EPlatform["XIAOMI"] = "xm";
20
- EPlatform["APKPURE"] = "ap";
21
- EPlatform["TELEGRAM"] = "tg";
22
- EPlatform["AMAZON"] = "am";
23
- })(EPlatform = exports.EPlatform || (exports.EPlatform = {}));
24
- var IntegrationVersion;
25
- (function (IntegrationVersion) {
26
- IntegrationVersion["NONE"] = "NONE";
27
- // Telegram
28
- IntegrationVersion["TELEGRAM"] = "TELEGRAM";
29
- // Banner
30
- IntegrationVersion["BANNER"] = "BANNER";
31
- // Native OfferWall
32
- IntegrationVersion["NATIVE_OFFERWALLET"] = "NATIVE_OFFERWALLET";
33
- // Web
34
- IntegrationVersion["WEB"] = "WEB";
35
- // Web Direct
36
- IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
37
- // PWA
38
- IntegrationVersion["PWA"] = "PWA";
39
- })(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
40
- var PlugType;
41
- (function (PlugType) {
42
- PlugType["PASTEBIN"] = "PASTEBIN";
43
- PlugType["GIST"] = "GIST";
44
- PlugType["OTHER"] = "OTHER";
45
- })(PlugType = exports.PlugType || (exports.PlugType = {}));
46
- exports.AppSchema = new mongoose_1.Schema({
47
- id: {
48
- type: Number,
49
- unique: true,
50
- required: true
51
- },
52
- enabled: {
53
- type: Boolean,
54
- required: true,
55
- default: false
56
- },
57
- proxied: {
58
- type: Boolean,
59
- require: true,
60
- default: true
61
- },
62
- imageFormat: {
63
- type: String,
64
- enum: EImageFormat,
65
- default: EImageFormat.PNG
66
- },
67
- bundle: {
68
- type: String,
69
- unique: true,
70
- required: true
71
- },
72
- name: String,
73
- trackingUrl: {
74
- type: String,
75
- default: null
76
- },
77
- pushesEnabled: Boolean,
78
- integrationVersion: {
79
- type: String,
80
- enum: IntegrationVersion,
81
- default: null
82
- },
83
- type: {
84
- type: String,
85
- enum: app_type_1.AppType,
86
- default: app_type_1.AppType.GAMBLING
87
- },
88
- geos: {
89
- type: String,
90
- required: true
91
- },
92
- geo: {
93
- type: [String]
94
- },
95
- onesignalAppId: {
96
- type: String,
97
- required: false
98
- },
99
- onesignalRestApiKey: {
100
- type: String,
101
- required: false
102
- },
103
- appmetricaApiKey: {
104
- type: String,
105
- required: false
106
- },
107
- appmetricaAppId: {
108
- type: Number,
109
- required: false
110
- },
111
- externalParams: {
112
- showButton: Boolean,
113
- schema: String,
114
- autoRedirect: Boolean,
115
- },
116
- keitaroData: {
117
- trackingCampaignId: {
118
- type: Number,
119
- // unique: true,
120
- required: true,
121
- default: 0
122
- },
123
- trackingCampaignName: {
124
- type: String,
125
- // unique: true,
126
- required: true,
127
- default: "none"
128
- },
129
- trackingCampaignAlias: {
130
- type: String,
131
- // unique: true,
132
- required: true,
133
- default: "none"
134
- },
135
- trackingDomainId: {
136
- type: Number,
137
- required: true,
138
- default: 0
139
- },
140
- trackingDomainName: {
141
- type: String,
142
- required: true,
143
- default: "none"
144
- },
145
- },
146
- removeDataParams: Object,
147
- privacyPolicyParams: Object,
148
- offersStubParams: Object,
149
- bannerParams: Object,
150
- directParams: Object,
151
- domainParams: {
152
- name: {
153
- type: String,
154
- unique: true
155
- },
156
- clouflareZone: {
157
- type: String,
158
- },
159
- },
160
- platforms: Object
161
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppSchema = exports.PlugType = exports.IntegrationVersion = exports.EPlatform = exports.EImageFormat = void 0;
4
+ const app_type_1 = require("./app-type");
5
+ const mongoose_1 = require("mongoose");
6
+ const util = require("util");
7
+ var EImageFormat;
8
+ (function (EImageFormat) {
9
+ EImageFormat["PNG"] = "png";
10
+ EImageFormat["JPEG"] = "jpg";
11
+ EImageFormat["WEBP"] = "webp";
12
+ })(EImageFormat = exports.EImageFormat || (exports.EImageFormat = {}));
13
+ var EPlatform;
14
+ (function (EPlatform) {
15
+ EPlatform["GENERAL"] = "@";
16
+ EPlatform["HUAWEI"] = "hw";
17
+ EPlatform["SAMSUNG"] = "sm";
18
+ EPlatform["ruSTORE"] = "rs";
19
+ EPlatform["XIAOMI"] = "xm";
20
+ EPlatform["APKPURE"] = "ap";
21
+ EPlatform["TELEGRAM"] = "tg";
22
+ EPlatform["AMAZON"] = "am";
23
+ })(EPlatform = exports.EPlatform || (exports.EPlatform = {}));
24
+ var IntegrationVersion;
25
+ (function (IntegrationVersion) {
26
+ IntegrationVersion["NONE"] = "MVVM";
27
+ IntegrationVersion["POLICY"] = "POLICY";
28
+ IntegrationVersion["OFFER_STUB"] = "OFFER_STUB";
29
+ IntegrationVersion["DIRECT"] = "DIRECT";
30
+ IntegrationVersion["WEB"] = "WEB";
31
+ IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
32
+ IntegrationVersion["BANNER"] = "BANNER";
33
+ IntegrationVersion["PWA"] = "PWA";
34
+ })(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
35
+ var PlugType;
36
+ (function (PlugType) {
37
+ PlugType["PASTEBIN"] = "PASTEBIN";
38
+ PlugType["GIST"] = "GIST";
39
+ PlugType["OTHER"] = "OTHER";
40
+ })(PlugType = exports.PlugType || (exports.PlugType = {}));
41
+ exports.AppSchema = new mongoose_1.Schema({
42
+ id: {
43
+ type: Number,
44
+ unique: true,
45
+ required: true
46
+ },
47
+ enabled: {
48
+ type: Boolean,
49
+ required: true,
50
+ default: false
51
+ },
52
+ proxied: {
53
+ type: Boolean,
54
+ require: true,
55
+ default: true
56
+ },
57
+ imageFormat: {
58
+ type: String,
59
+ enum: EImageFormat,
60
+ default: EImageFormat.PNG
61
+ },
62
+ bundle: {
63
+ type: String,
64
+ unique: true,
65
+ required: true
66
+ },
67
+ name: String,
68
+ trackingUrl: {
69
+ type: String,
70
+ default: null
71
+ },
72
+ pushesEnabled: Boolean,
73
+ integrationVersion: {
74
+ type: String,
75
+ enum: IntegrationVersion,
76
+ default: null
77
+ },
78
+ type: {
79
+ type: String,
80
+ enum: app_type_1.AppType,
81
+ default: app_type_1.AppType.GAMBLING
82
+ },
83
+ geos: {
84
+ type: String,
85
+ required: true
86
+ },
87
+ geo: {
88
+ type: [String]
89
+ },
90
+ onesignalAppId: {
91
+ type: String,
92
+ required: false
93
+ },
94
+ onesignalRestApiKey: {
95
+ type: String,
96
+ required: false
97
+ },
98
+ appmetricaApiKey: {
99
+ type: String,
100
+ required: false
101
+ },
102
+ appmetricaAppId: {
103
+ type: Number,
104
+ required: false
105
+ },
106
+ externalParams: {
107
+ showButton: Boolean,
108
+ schema: String,
109
+ autoRedirect: Boolean,
110
+ },
111
+ keitaroData: {
112
+ trackingCampaignId: {
113
+ type: Number,
114
+ // unique: true,
115
+ required: true,
116
+ default: 0
117
+ },
118
+ trackingCampaignName: {
119
+ type: String,
120
+ // unique: true,
121
+ required: true,
122
+ default: "none"
123
+ },
124
+ trackingCampaignAlias: {
125
+ type: String,
126
+ // unique: true,
127
+ required: true,
128
+ default: "none"
129
+ },
130
+ trackingDomainId: {
131
+ type: Number,
132
+ required: true,
133
+ default: 0
134
+ },
135
+ trackingDomainName: {
136
+ type: String,
137
+ required: true,
138
+ default: "none"
139
+ },
140
+ },
141
+ removeDataParams: Object,
142
+ privacyPolicyParams: Object,
143
+ offersStubParams: Object,
144
+ bannerParams: Object,
145
+ directParams: Object,
146
+ domainParams: {
147
+ name: {
148
+ type: String,
149
+ unique: true
150
+ },
151
+ clouflareZone: {
152
+ type: String,
153
+ },
154
+ },
155
+ platforms: Object
156
+ });
@@ -1,42 +1,42 @@
1
- export interface ICloudflareDomain {
2
- id: string;
3
- name: string;
4
- status: string;
5
- paused: boolean;
6
- type: string;
7
- development_mode: number;
8
- name_servers: string[];
9
- original_name_servers: string[];
10
- original_registrar: string | null;
11
- original_dnshost: string | null;
12
- modified_on: Date;
13
- created_on: Date;
14
- }
15
- export interface ICloudflareDomainRecord {
16
- id: string;
17
- zone_id: string;
18
- zone_name: string;
19
- name: string;
20
- type: string;
21
- content: string;
22
- proxiable: boolean;
23
- proxied: boolean;
24
- ttl: number;
25
- locked: boolean;
26
- meta: {
27
- auto_added: boolean;
28
- managed_by_apps: boolean;
29
- managed_by_argo_tunnel: boolean;
30
- };
31
- comment: string;
32
- tags: string[];
33
- created_on: string;
34
- modified_on: string;
35
- }
36
- export declare enum ICloudflareDomainStatus {
37
- PENDING = "pending"
38
- }
39
- export declare enum ICloudflareDomainType {
40
- FULL = "full",
41
- FLEXIBLE = "flexible"
42
- }
1
+ export interface ICloudflareDomain {
2
+ id: string;
3
+ name: string;
4
+ status: string;
5
+ paused: boolean;
6
+ type: string;
7
+ development_mode: number;
8
+ name_servers: string[];
9
+ original_name_servers: string[];
10
+ original_registrar: string | null;
11
+ original_dnshost: string | null;
12
+ modified_on: Date;
13
+ created_on: Date;
14
+ }
15
+ export interface ICloudflareDomainRecord {
16
+ id: string;
17
+ zone_id: string;
18
+ zone_name: string;
19
+ name: string;
20
+ type: string;
21
+ content: string;
22
+ proxiable: boolean;
23
+ proxied: boolean;
24
+ ttl: number;
25
+ locked: boolean;
26
+ meta: {
27
+ auto_added: boolean;
28
+ managed_by_apps: boolean;
29
+ managed_by_argo_tunnel: boolean;
30
+ };
31
+ comment: string;
32
+ tags: string[];
33
+ created_on: string;
34
+ modified_on: string;
35
+ }
36
+ export declare enum ICloudflareDomainStatus {
37
+ PENDING = "pending"
38
+ }
39
+ export declare enum ICloudflareDomainType {
40
+ FULL = "full",
41
+ FLEXIBLE = "flexible"
42
+ }
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = void 0;
4
- var ICloudflareDomainStatus;
5
- (function (ICloudflareDomainStatus) {
6
- ICloudflareDomainStatus["PENDING"] = "pending";
7
- })(ICloudflareDomainStatus = exports.ICloudflareDomainStatus || (exports.ICloudflareDomainStatus = {}));
8
- var ICloudflareDomainType;
9
- (function (ICloudflareDomainType) {
10
- ICloudflareDomainType["FULL"] = "full";
11
- ICloudflareDomainType["FLEXIBLE"] = "flexible";
12
- })(ICloudflareDomainType = exports.ICloudflareDomainType || (exports.ICloudflareDomainType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = void 0;
4
+ var ICloudflareDomainStatus;
5
+ (function (ICloudflareDomainStatus) {
6
+ ICloudflareDomainStatus["PENDING"] = "pending";
7
+ })(ICloudflareDomainStatus = exports.ICloudflareDomainStatus || (exports.ICloudflareDomainStatus = {}));
8
+ var ICloudflareDomainType;
9
+ (function (ICloudflareDomainType) {
10
+ ICloudflareDomainType["FULL"] = "full";
11
+ ICloudflareDomainType["FLEXIBLE"] = "flexible";
12
+ })(ICloudflareDomainType = exports.ICloudflareDomainType || (exports.ICloudflareDomainType = {}));
@@ -1,108 +1,108 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose/types/inferschematype" />
25
- import { ICloudflareDomainType } from "general/cloudflare-domain";
26
- import { Document, Model, Schema } from "mongoose";
27
- export interface IDomain extends Document {
28
- id: string;
29
- namecheapId: string;
30
- isUpdating: boolean;
31
- name: string;
32
- caption: string;
33
- status: DomainStatus;
34
- cloudflareStatus: string;
35
- paused: boolean;
36
- type: ICloudflareDomainType;
37
- autorenew: boolean;
38
- nameServers: string[];
39
- originalNameServers: string[];
40
- originalRegistrar: string | null;
41
- originalDNSHost: string | null;
42
- createdAt: number;
43
- expiresAt: number;
44
- ip: string;
45
- subdomain: string | null;
46
- txtRecords: string[];
47
- mxRecord: string;
48
- target: DomainTarget;
49
- assignedTo: number[];
50
- archived: boolean;
51
- title: string | String;
52
- note: string;
53
- proxied: boolean;
54
- }
55
- export interface IDomainsBuyRequestResponse {
56
- requestId: string;
57
- totalPrice: number;
58
- info: {
59
- name: string;
60
- price: number;
61
- }[];
62
- }
63
- export interface IDomainSetupResult {
64
- succeed: string[];
65
- failed: string[];
66
- }
67
- export declare const CONST_CLOUFLARE_STATUS_READY = "active";
68
- export declare enum DomainStatus {
69
- PENDING = "pending",
70
- READY = "ready",
71
- READY_AND_NOTIFIED = "ready-and-notified",
72
- WITHOUT_CLOUDFLARE = "without-cloudflare"
73
- }
74
- export declare enum DomainTarget {
75
- KEITARO = "keitaro",
76
- HOSTING = "hosting",
77
- OTHER = "other",
78
- MAIN = "main",
79
- UNKNOWN = "unknown"
80
- }
81
- export declare let getDomainTargetByIp: (ip: string) => DomainTarget;
82
- export declare const DomainSchema: Schema<any, Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
83
- nameServers: string[];
84
- originalNameServers: string[];
85
- txtRecords: string[];
86
- assignedTo: number[];
87
- id?: string | undefined;
88
- name?: string | undefined;
89
- type?: string | undefined;
90
- caption?: string | undefined;
91
- title?: string | undefined;
92
- proxied?: boolean | undefined;
93
- namecheapId?: string | undefined;
94
- status?: string | undefined;
95
- isUpdating?: boolean | undefined;
96
- cloudflareStatus?: string | undefined;
97
- paused?: boolean | undefined;
98
- originalRegistrar?: string | undefined;
99
- originalDNSHost?: string | undefined;
100
- createdAt?: number | undefined;
101
- expiresAt?: number | undefined;
102
- ip?: string | undefined;
103
- subdomain?: string | undefined;
104
- mxRecord?: string | undefined;
105
- target?: string | undefined;
106
- archived?: boolean | undefined;
107
- note?: string | undefined;
108
- }>;
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import { ICloudflareDomainType } from "general/cloudflare-domain";
26
+ import { Document, Model, Schema } from "mongoose";
27
+ export interface IDomain extends Document {
28
+ id: string;
29
+ namecheapId: string;
30
+ isUpdating: boolean;
31
+ name: string;
32
+ caption: string;
33
+ status: DomainStatus;
34
+ cloudflareStatus: string;
35
+ paused: boolean;
36
+ type: ICloudflareDomainType;
37
+ autorenew: boolean;
38
+ nameServers: string[];
39
+ originalNameServers: string[];
40
+ originalRegistrar: string | null;
41
+ originalDNSHost: string | null;
42
+ createdAt: number;
43
+ expiresAt: number;
44
+ ip: string;
45
+ subdomain: string | null;
46
+ txtRecords: string[];
47
+ mxRecord: string;
48
+ target: DomainTarget;
49
+ assignedTo: number[];
50
+ archived: boolean;
51
+ title: string | String;
52
+ note: string;
53
+ proxied: boolean;
54
+ }
55
+ export interface IDomainsBuyRequestResponse {
56
+ requestId: string;
57
+ totalPrice: number;
58
+ info: {
59
+ name: string;
60
+ price: number;
61
+ }[];
62
+ }
63
+ export interface IDomainSetupResult {
64
+ succeed: string[];
65
+ failed: string[];
66
+ }
67
+ export declare const CONST_CLOUFLARE_STATUS_READY = "active";
68
+ export declare enum DomainStatus {
69
+ PENDING = "pending",
70
+ READY = "ready",
71
+ READY_AND_NOTIFIED = "ready-and-notified",
72
+ WITHOUT_CLOUDFLARE = "without-cloudflare"
73
+ }
74
+ export declare enum DomainTarget {
75
+ KEITARO = "keitaro",
76
+ HOSTING = "hosting",
77
+ OTHER = "other",
78
+ MAIN = "main",
79
+ UNKNOWN = "unknown"
80
+ }
81
+ export declare let getDomainTargetByIp: (ip: string) => DomainTarget;
82
+ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
83
+ nameServers: string[];
84
+ originalNameServers: string[];
85
+ txtRecords: string[];
86
+ assignedTo: number[];
87
+ id?: string | undefined;
88
+ name?: string | undefined;
89
+ type?: string | undefined;
90
+ caption?: string | undefined;
91
+ title?: string | undefined;
92
+ proxied?: boolean | undefined;
93
+ namecheapId?: string | undefined;
94
+ status?: string | undefined;
95
+ isUpdating?: boolean | undefined;
96
+ cloudflareStatus?: string | undefined;
97
+ paused?: boolean | undefined;
98
+ originalRegistrar?: string | undefined;
99
+ originalDNSHost?: string | undefined;
100
+ createdAt?: number | undefined;
101
+ expiresAt?: number | undefined;
102
+ ip?: string | undefined;
103
+ subdomain?: string | undefined;
104
+ mxRecord?: string | undefined;
105
+ target?: string | undefined;
106
+ archived?: boolean | undefined;
107
+ note?: string | undefined;
108
+ }>;