@bprotsyk/aso-core 1.2.220 → 1.2.225

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 (85) hide show
  1. package/docs/assets/search.js +1 -1
  2. package/docs/functions/ColoredText.html +2 -2
  3. package/docs/functions/ShapeDiv.html +2 -2
  4. package/docs/index.html +2 -2
  5. package/docs/interfaces/IUpsertFlashAppRequest.html +48 -48
  6. package/docs/interfaces/IUpsertFlashAppResponse.html +10 -10
  7. package/docs/modules.html +4 -4
  8. package/docs/variables/FlashAppSchema.html +2 -2
  9. package/docs/variables/PanelUserSchema.html +2 -2
  10. package/lib/app/app-integration.d.ts +53 -0
  11. package/lib/app/app-integration.js +63 -0
  12. package/lib/app/app-list-item.d.ts +5 -0
  13. package/lib/app/app-list-item.js +2 -0
  14. package/lib/app/app-type.d.ts +4 -0
  15. package/lib/app/app-type.js +8 -0
  16. package/lib/app/app.d.ts +177 -0
  17. package/lib/app/app.js +216 -0
  18. package/lib/general/cloudflare-domain.d.ts +42 -0
  19. package/lib/general/cloudflare-domain.js +12 -0
  20. package/lib/general/colored-text.d.ts +7 -0
  21. package/lib/general/colored-text.js +28 -0
  22. package/lib/general/domain.d.ts +92 -0
  23. package/lib/general/domain.js +38 -0
  24. package/lib/general/namecheap-domain.d.ts +80 -0
  25. package/lib/general/namecheap-domain.js +14 -0
  26. package/lib/general/push.d.ts +6 -0
  27. package/lib/general/push.js +2 -0
  28. package/lib/general/queue.d.ts +1 -0
  29. package/lib/general/queue.js +2 -0
  30. package/lib/general/shape.d.ts +18 -0
  31. package/lib/general/shape.js +36 -0
  32. package/lib/index.d.ts +14 -33
  33. package/lib/index.js +29 -29
  34. package/lib/network/keitaro/keitaro-service.d.ts +4 -4
  35. package/lib/offers/list.d.ts +37 -0
  36. package/lib/offers/list.js +12 -0
  37. package/lib/offers/offer.d.ts +95 -0
  38. package/lib/offers/offer.js +38 -0
  39. package/lib/offers/section.d.ts +47 -0
  40. package/lib/offers/section.js +20 -0
  41. package/lib/panel/flash/create-flash-app-request.d.ts +3 -3
  42. package/lib/panel/flash/upsert-flash-app-request.d.ts +4 -4
  43. package/lib/utils/keitaro-utils.d.ts +7 -7
  44. package/package.json +1 -1
  45. package/src/{flash/flash-app-integration.ts → app/app-integration.ts} +1 -1
  46. package/src/{flash/flash-app-list-item.ts → app/app-list-item.ts} +1 -1
  47. package/src/{flash/flash-app-type.ts → app/app-type.ts} +1 -1
  48. package/src/{flash/flash-app.ts → app/app.ts} +19 -9
  49. package/src/{models → general}/domain.ts +1 -1
  50. package/src/index.ts +14 -35
  51. package/src/network/keitaro/keitaro-service.ts +4 -4
  52. package/src/offers/list.ts +20 -0
  53. package/src/offers/offer.ts +77 -0
  54. package/src/offers/section.ts +30 -0
  55. package/src/panel/flash/upsert-flash-app-request.ts +4 -4
  56. package/src/utils/keitaro-utils.ts +10 -10
  57. package/src/aso/config/aso-config-v0.ts +0 -441
  58. package/src/aso/config/aso-config-v1.ts +0 -440
  59. package/src/aso/config/aso-config-v2.ts +0 -399
  60. package/src/aso/config/aso-config-v3.ts +0 -396
  61. package/src/aso/config/aso-config-v4.ts +0 -305
  62. package/src/aso/config/aso-config-v5.ts +0 -328
  63. package/src/aso/config/aso-default-config.ts +0 -67
  64. package/src/aso/config/aso-single-response.ts +0 -6
  65. package/src/aso/offer/aso-customized-offer.ts +0 -12
  66. package/src/aso/offer/aso-offer-response.ts +0 -7
  67. package/src/aso/offer/aso-offer-section.ts +0 -7
  68. package/src/aso/offer/aso-single-offer.ts +0 -5
  69. package/src/aso/offerwall/auth/offerwall-auth-config.ts +0 -17
  70. package/src/aso/offerwall/auth/offerwall-auth-localization.ts +0 -9
  71. package/src/aso/offerwall/auth/offerwall-auth-submit-request.ts +0 -3
  72. package/src/aso/offerwall/auth/offerwall-auth-submit-response.ts +0 -3
  73. package/src/aso/offerwall/offerwall-home-dialog-data.ts +0 -6
  74. package/src/aso/offerwall/offerwall-offer.ts +0 -9
  75. package/src/aso/offerwall/offerwall-response.ts +0 -7
  76. package/src/aso/offerwall/offerwall-section.ts +0 -7
  77. package/src/aso/usage-logs/aso-config-fetch-entry.ts +0 -31
  78. package/src/shared/colored-text.tsx +0 -38
  79. package/src/shared/offer.ts +0 -12
  80. package/src/utils/app-gathering-utils.ts +0 -15
  81. /package/src/{models → general}/cloudflare-domain.ts +0 -0
  82. /package/src/{models → general}/namecheap-domain.ts +0 -0
  83. /package/src/{shared → general}/push.ts +0 -0
  84. /package/src/{shared → general}/queue.ts +0 -0
  85. /package/src/{shared → general}/shape.tsx +0 -0
@@ -0,0 +1,177 @@
1
+ import { AlternativeLayoutType, AlternativeLogicType, AlternativeNavigation, AlternativeNetworkTool, AlternativeOnActivityResult, AlternativeOnBackPressed, AlternativeSourceType, AlternativeStorageType } from "index";
2
+ import { AppType } from "./app-type";
3
+ import mongoose, { Document, Model } from "mongoose";
4
+ import { AlternativeFullscreen } from "app/app-integration";
5
+ export interface IApp extends Document {
6
+ id: number;
7
+ enabled: boolean;
8
+ name: string;
9
+ trackingUrl?: string;
10
+ bundle: string;
11
+ pushesEnabled?: boolean;
12
+ sourceUrl?: string;
13
+ policyUrl?: string;
14
+ type: AppType;
15
+ geos: string;
16
+ onesignalAppId: string;
17
+ onesignalRestApiKey: string;
18
+ webInterfaceName: string;
19
+ generationOptions: IAppGenerationOptions;
20
+ keitaroData: IAppKeitaroData | null;
21
+ integrationVersion: IntegrationVersion;
22
+ integrationAlterations?: IntegrationAlterations;
23
+ removeDataParams?: IRemoveDataParams;
24
+ privacyPolicyParams?: IPrivacyPolicyParams;
25
+ offersStubParams?: IOffersStubParams;
26
+ directParams?: IDirectParams;
27
+ bannerParams?: IBannerParams;
28
+ remoteServerParams?: IRemoteServerParams;
29
+ domainParams: IDomainParams;
30
+ developerParams: IDeveloperParams;
31
+ offersListId: number;
32
+ }
33
+ export interface IRemoteServerParams {
34
+ ip: string;
35
+ port: string;
36
+ password: string;
37
+ }
38
+ export interface IOffersStubParams {
39
+ offersPath: string;
40
+ imagesPath: string;
41
+ }
42
+ export interface IDomainParams {
43
+ name: string;
44
+ clouflareZone: string;
45
+ }
46
+ export interface IDirectParams {
47
+ path: string;
48
+ response: string;
49
+ }
50
+ export interface IBannerParams {
51
+ dataPath: string;
52
+ imagePath: string;
53
+ imageParam: string;
54
+ linkParam: string;
55
+ showStubOnError?: boolean;
56
+ }
57
+ export interface IRemoveDataParams {
58
+ buttonText: string;
59
+ resultText: string;
60
+ errorText: string;
61
+ inputHint: string;
62
+ dark: boolean;
63
+ path: string;
64
+ callbackFunctionName: string;
65
+ toSplashAfterSuccess: boolean;
66
+ }
67
+ export interface IPrivacyPolicyParams {
68
+ showButtonQuery: string;
69
+ button?: {
70
+ text: string;
71
+ };
72
+ mustRead: boolean;
73
+ dark: boolean;
74
+ path: string;
75
+ advertisingIdQuery: string;
76
+ confirmFunctionName: string;
77
+ redirectFunctionName: string;
78
+ redirect: boolean;
79
+ }
80
+ export declare enum IntegrationVersion {
81
+ MVVM = "MVVM",
82
+ POLICY = "POLICY",
83
+ OFFER_STUB = "OFFER_STUB",
84
+ DIRECT = "DIRECT",
85
+ WEB = "WEB",
86
+ WEB_DIRECT = "WEB_DIRECT",
87
+ BANNER = "BANNER"
88
+ }
89
+ export interface IntegrationAlterations {
90
+ networkTool: AlternativeNetworkTool;
91
+ logicType: AlternativeLogicType;
92
+ navigation: AlternativeNavigation;
93
+ storageType: AlternativeStorageType;
94
+ sourceType: AlternativeSourceType;
95
+ onBackPressed: AlternativeOnBackPressed;
96
+ onActivityResult: AlternativeOnActivityResult;
97
+ layoutType: AlternativeLayoutType;
98
+ fullscreen: AlternativeFullscreen;
99
+ }
100
+ export interface IAppGenerationOptions {
101
+ splashName: string;
102
+ webViewName: string;
103
+ linkName: string;
104
+ }
105
+ export interface IDeveloperParams {
106
+ name: string;
107
+ email: string;
108
+ organization: string;
109
+ }
110
+ export interface IAppKeitaroData {
111
+ redirectCampaignId: number;
112
+ redirectCampaignName: string;
113
+ redirectCampaignAlias: string;
114
+ redirectDomainId: number;
115
+ redirectDomainName: string;
116
+ trackingCampaignId: number;
117
+ trackingCampaignName: string;
118
+ trackingCampaignAlias: string;
119
+ trackingDomainId: number;
120
+ trackingDomainName: string;
121
+ clickIdParameterName: string;
122
+ offerIdParameterName: string;
123
+ }
124
+ export declare enum PlugType {
125
+ PASTEBIN = "PASTEBIN",
126
+ GIST = "GIST",
127
+ OTHER = "OTHER"
128
+ }
129
+ export declare const AppSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
130
+ type: string;
131
+ enabled: boolean;
132
+ id: number;
133
+ bundle: string;
134
+ trackingUrl: string;
135
+ geos: string;
136
+ integrationVersion: string;
137
+ name?: string | undefined;
138
+ webInterfaceName?: string | undefined;
139
+ pushesEnabled?: boolean | undefined;
140
+ sourceUrl?: string | undefined;
141
+ integrationAlterations?: any;
142
+ removeDataParams?: any;
143
+ privacyPolicyParams?: any;
144
+ offersStubParams?: any;
145
+ bannerParams?: any;
146
+ directParams?: any;
147
+ remoteServerParams?: any;
148
+ policyUrl?: string | undefined;
149
+ onesignalAppId?: string | undefined;
150
+ onesignalRestApiKey?: string | undefined;
151
+ linkPath?: string | undefined;
152
+ generationOptions?: {
153
+ splashName?: string | undefined;
154
+ webViewName?: string | undefined;
155
+ linkName?: string | undefined;
156
+ savedName?: string | undefined;
157
+ } | undefined;
158
+ keitaroData?: {
159
+ redirectCampaignId: number;
160
+ redirectCampaignName: string;
161
+ redirectCampaignAlias: string;
162
+ redirectDomainId: number;
163
+ redirectDomainName: string;
164
+ trackingCampaignId: number;
165
+ trackingCampaignName: string;
166
+ trackingCampaignAlias: string;
167
+ trackingDomainId: number;
168
+ trackingDomainName: string;
169
+ clickIdParameterName?: string | undefined;
170
+ offerIdParameterName?: string | undefined;
171
+ } | undefined;
172
+ domainParams?: {
173
+ name?: string | undefined;
174
+ clouflareZone?: string | undefined;
175
+ } | undefined;
176
+ }>;
177
+ export declare function updateSchemaAndMoveValue(model: Model<IApp>): Promise<void>;
package/lib/app/app.js ADDED
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateSchemaAndMoveValue = exports.AppSchema = exports.PlugType = exports.IntegrationVersion = void 0;
4
+ const app_type_1 = require("./app-type");
5
+ const mongoose_1 = require("mongoose");
6
+ const util = require("util");
7
+ var IntegrationVersion;
8
+ (function (IntegrationVersion) {
9
+ IntegrationVersion["MVVM"] = "MVVM";
10
+ IntegrationVersion["POLICY"] = "POLICY";
11
+ IntegrationVersion["OFFER_STUB"] = "OFFER_STUB";
12
+ IntegrationVersion["DIRECT"] = "DIRECT";
13
+ IntegrationVersion["WEB"] = "WEB";
14
+ IntegrationVersion["WEB_DIRECT"] = "WEB_DIRECT";
15
+ IntegrationVersion["BANNER"] = "BANNER";
16
+ })(IntegrationVersion = exports.IntegrationVersion || (exports.IntegrationVersion = {}));
17
+ var PlugType;
18
+ (function (PlugType) {
19
+ PlugType["PASTEBIN"] = "PASTEBIN";
20
+ PlugType["GIST"] = "GIST";
21
+ PlugType["OTHER"] = "OTHER";
22
+ })(PlugType = exports.PlugType || (exports.PlugType = {}));
23
+ exports.AppSchema = new mongoose_1.Schema({
24
+ id: {
25
+ type: Number,
26
+ unique: true,
27
+ required: true
28
+ },
29
+ enabled: {
30
+ type: Boolean,
31
+ required: true,
32
+ default: false
33
+ },
34
+ bundle: {
35
+ type: String,
36
+ unique: true,
37
+ required: true
38
+ },
39
+ name: String,
40
+ trackingUrl: {
41
+ type: String,
42
+ default: null
43
+ },
44
+ webInterfaceName: String,
45
+ pushesEnabled: Boolean,
46
+ sourceUrl: String,
47
+ policyUrl: {
48
+ type: String,
49
+ // unique: true,
50
+ required: false
51
+ },
52
+ type: {
53
+ type: String,
54
+ enum: app_type_1.AppType,
55
+ default: app_type_1.AppType.GAMBLING
56
+ },
57
+ geos: {
58
+ type: String,
59
+ required: true
60
+ },
61
+ onesignalAppId: {
62
+ type: String,
63
+ required: false
64
+ },
65
+ onesignalRestApiKey: {
66
+ type: String,
67
+ required: false
68
+ },
69
+ linkPath: {
70
+ type: String
71
+ },
72
+ integrationVersion: {
73
+ type: String,
74
+ default: IntegrationVersion.OFFER_STUB,
75
+ enum: IntegrationVersion
76
+ },
77
+ integrationAlterations: Object,
78
+ generationOptions: {
79
+ splashName: {
80
+ type: String,
81
+ },
82
+ webViewName: {
83
+ type: String,
84
+ },
85
+ linkName: {
86
+ type: String,
87
+ },
88
+ savedName: {
89
+ type: String,
90
+ },
91
+ },
92
+ keitaroData: {
93
+ redirectCampaignId: {
94
+ type: Number,
95
+ // unique: true,
96
+ required: true,
97
+ default: 0
98
+ },
99
+ redirectCampaignName: {
100
+ type: String,
101
+ // unique: true,
102
+ required: true,
103
+ default: "none"
104
+ },
105
+ redirectCampaignAlias: {
106
+ type: String,
107
+ // unique: true,
108
+ required: true,
109
+ default: "none"
110
+ },
111
+ redirectDomainId: {
112
+ type: Number,
113
+ required: true,
114
+ default: 0
115
+ },
116
+ redirectDomainName: {
117
+ type: String,
118
+ required: true,
119
+ default: "none"
120
+ },
121
+ trackingCampaignId: {
122
+ type: Number,
123
+ // unique: true,
124
+ required: true,
125
+ default: 0
126
+ },
127
+ trackingCampaignName: {
128
+ type: String,
129
+ // unique: true,
130
+ required: true,
131
+ default: "none"
132
+ },
133
+ trackingCampaignAlias: {
134
+ type: String,
135
+ // unique: true,
136
+ required: true,
137
+ default: "none"
138
+ },
139
+ trackingDomainId: {
140
+ type: Number,
141
+ required: true,
142
+ default: 0
143
+ },
144
+ trackingDomainName: {
145
+ type: String,
146
+ required: true,
147
+ default: "none"
148
+ },
149
+ clickIdParameterName: String,
150
+ offerIdParameterName: String,
151
+ },
152
+ removeDataParams: Object,
153
+ privacyPolicyParams: Object,
154
+ offersStubParams: Object,
155
+ bannerParams: Object,
156
+ directParams: Object,
157
+ remoteServerParams: Object,
158
+ domainParams: {
159
+ name: {
160
+ type: String,
161
+ unique: true
162
+ },
163
+ clouflareZone: {
164
+ type: String,
165
+ unique: true
166
+ },
167
+ }
168
+ });
169
+ // TODO app type (casino / fin)
170
+ async function updateSchemaAndMoveValue(model) {
171
+ await model.syncIndexes();
172
+ let pipelineStage = [
173
+ {
174
+ // $set: {
175
+ // city: "$employee_addr.city",
176
+ // street: "$employee_addr.street",
177
+ // apartment: "$employee_addr.apartment",
178
+ // employee_addr: "$$REMOVE"
179
+ // },
180
+ $set: {
181
+ "plugStatus": "$$REMOVE",
182
+ "reservePlugStatus": "$$REMOVE",
183
+ }
184
+ }
185
+ ];
186
+ let aggregation = model.aggregate(pipelineStage);
187
+ try {
188
+ await model.collection.dropIndex("plugStatus");
189
+ }
190
+ catch (e) { }
191
+ try {
192
+ await model.collection.dropIndex("reservePlugStatus");
193
+ }
194
+ catch (e) { }
195
+ // await model.schema.dropIndex("generationOptions.keyPassword_1")
196
+ await aggregation.exec();
197
+ const updateOperation = {
198
+ $set: {
199
+ plugId: "none"
200
+ },
201
+ // $addToSet
202
+ $unset: [
203
+ "pastebinUrl",
204
+ "email",
205
+ "generationOptions.keyFileName",
206
+ "generationOptions.keyDeveloperName",
207
+ "generationOptions.keyDeveloperOrganization",
208
+ "generationOptions.keyCountryCode",
209
+ "generationOptions.keyCity",
210
+ "generationOptions.keyAlias",
211
+ "generationOptions.keyPassword",
212
+ ],
213
+ };
214
+ await model.updateMany({}, updateOperation);
215
+ }
216
+ exports.updateSchemaAndMoveValue = updateSchemaAndMoveValue;
@@ -0,0 +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
+ }
@@ -0,0 +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 = {}));
@@ -0,0 +1,7 @@
1
+ import { IColoredString } from 'aso/config/aso-config-v0';
2
+ export interface IColoredTextProps {
3
+ coloredText: IColoredString;
4
+ className: string;
5
+ }
6
+ export declare function ColoredText({ coloredText, className }: IColoredTextProps): import("react/jsx-runtime").JSX.Element;
7
+ export default ColoredText;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ColoredText = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const StyledColoredSpan = styled_components_1.default.span `
10
+ color: ${(props) => props.color};
11
+ display: inline;
12
+ `;
13
+ function ColoredText({ coloredText, className }) {
14
+ const { text, colors } = coloredText;
15
+ let startIndex = 0;
16
+ const spans = [];
17
+ for (const { from, to, color } of colors) {
18
+ spans.push((0, jsx_runtime_1.jsx)("span", { children: text.slice(startIndex, from) }, `text_${startIndex}`));
19
+ spans.push((0, jsx_runtime_1.jsx)(StyledColoredSpan, { color: color, children: text.slice(from, to) }, `text_${from}`));
20
+ startIndex = to;
21
+ }
22
+ if (startIndex < text.length) {
23
+ spans.push((0, jsx_runtime_1.jsx)("span", { children: text.slice(startIndex) }, `text_${startIndex}`));
24
+ }
25
+ return (0, jsx_runtime_1.jsx)("div", { className: className, children: spans });
26
+ }
27
+ exports.ColoredText = ColoredText;
28
+ exports.default = ColoredText;
@@ -0,0 +1,92 @@
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
+ name: string;
31
+ caption: string;
32
+ status: DomainStatus;
33
+ cloudflareStatus: string;
34
+ paused: boolean;
35
+ type: ICloudflareDomainType;
36
+ autorenew: boolean;
37
+ nameServers: string[];
38
+ originalNameServers: string[];
39
+ originalRegistrar: string | null;
40
+ originalDNSHost: string | null;
41
+ createdAt: number;
42
+ expiresAt: number;
43
+ ip: string;
44
+ subdomain: string | null;
45
+ txtRecords: string[];
46
+ target: DomainTarget;
47
+ assignedTo: number[];
48
+ }
49
+ export interface IDomainsBuyRequestResponse {
50
+ requestId: string;
51
+ totalPrice: number;
52
+ info: {
53
+ name: string;
54
+ price: number;
55
+ }[];
56
+ }
57
+ export interface IDomainSetupResult {
58
+ succeed: string[];
59
+ failed: string[];
60
+ }
61
+ export declare const CONST_CLOUFLARE_STATUS_READY = "active";
62
+ export declare enum DomainStatus {
63
+ PENDING = "pending",
64
+ READY = "ready",
65
+ READY_AND_NOTIFIED = "ready-and-notified"
66
+ }
67
+ export declare enum DomainTarget {
68
+ PANEL = "panel",
69
+ KEITARO = "keitaro",
70
+ OTHER = "other"
71
+ }
72
+ export declare const DomainSchema: Schema<any, Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
73
+ nameServers: string[];
74
+ originalNameServers: string[];
75
+ txtRecords: string[];
76
+ assignedTo: number[];
77
+ name?: string | undefined;
78
+ type?: string | undefined;
79
+ paused?: boolean | undefined;
80
+ caption?: string | undefined;
81
+ status?: string | undefined;
82
+ id?: string | undefined;
83
+ target?: string | undefined;
84
+ namecheapId?: string | undefined;
85
+ cloudflareStatus?: string | undefined;
86
+ originalRegistrar?: string | undefined;
87
+ originalDNSHost?: string | undefined;
88
+ createdAt?: number | undefined;
89
+ expiresAt?: number | undefined;
90
+ ip?: string | undefined;
91
+ subdomain?: string | undefined;
92
+ }>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DomainSchema = exports.DomainTarget = exports.DomainStatus = exports.CONST_CLOUFLARE_STATUS_READY = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ exports.CONST_CLOUFLARE_STATUS_READY = "active";
6
+ var DomainStatus;
7
+ (function (DomainStatus) {
8
+ DomainStatus["PENDING"] = "pending";
9
+ DomainStatus["READY"] = "ready";
10
+ DomainStatus["READY_AND_NOTIFIED"] = "ready-and-notified";
11
+ })(DomainStatus = exports.DomainStatus || (exports.DomainStatus = {}));
12
+ var DomainTarget;
13
+ (function (DomainTarget) {
14
+ DomainTarget["PANEL"] = "panel";
15
+ DomainTarget["KEITARO"] = "keitaro";
16
+ DomainTarget["OTHER"] = "other";
17
+ })(DomainTarget = exports.DomainTarget || (exports.DomainTarget = {}));
18
+ exports.DomainSchema = new mongoose_1.Schema({
19
+ id: String,
20
+ namecheapId: String,
21
+ name: String,
22
+ caption: String,
23
+ status: String,
24
+ cloudflareStatus: String,
25
+ paused: Boolean,
26
+ type: String,
27
+ nameServers: [String],
28
+ originalNameServers: [String],
29
+ originalRegistrar: String,
30
+ originalDNSHost: String,
31
+ createdAt: Number,
32
+ expiresAt: Number,
33
+ ip: String,
34
+ subdomain: String,
35
+ txtRecords: [String],
36
+ target: String,
37
+ assignedTo: [Number]
38
+ });
@@ -0,0 +1,80 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="mongoose/types/aggregate" />
3
+ /// <reference types="mongoose/types/callback" />
4
+ /// <reference types="mongoose/types/collection" />
5
+ /// <reference types="mongoose/types/connection" />
6
+ /// <reference types="mongoose/types/cursor" />
7
+ /// <reference types="mongoose/types/document" />
8
+ /// <reference types="mongoose/types/error" />
9
+ /// <reference types="mongoose/types/expressions" />
10
+ /// <reference types="mongoose/types/helpers" />
11
+ /// <reference types="mongoose/types/middlewares" />
12
+ /// <reference types="mongoose/types/indexes" />
13
+ /// <reference types="mongoose/types/models" />
14
+ /// <reference types="mongoose/types/mongooseoptions" />
15
+ /// <reference types="mongoose/types/pipelinestage" />
16
+ /// <reference types="mongoose/types/populate" />
17
+ /// <reference types="mongoose/types/query" />
18
+ /// <reference types="mongoose/types/schemaoptions" />
19
+ /// <reference types="mongoose/types/schematypes" />
20
+ /// <reference types="mongoose/types/session" />
21
+ /// <reference types="mongoose/types/types" />
22
+ /// <reference types="mongoose/types/utility" />
23
+ /// <reference types="mongoose/types/validation" />
24
+ /// <reference types="mongoose/types/virtuals" />
25
+ /// <reference types="mongoose/types/inferschematype" />
26
+ import { Schema } from "mongoose";
27
+ export interface INamecheapDomain {
28
+ ID: string;
29
+ Name: string;
30
+ User: string;
31
+ Created: string;
32
+ Expires: string;
33
+ IsExpired: 'true' | 'false';
34
+ IsLocked: 'true' | 'false';
35
+ AutoRenew: 'true' | 'false';
36
+ WhoisGuard: 'ENABLED' | 'DISABLED';
37
+ IsPremium: 'true' | 'false';
38
+ IsOurDNS: 'true' | 'false';
39
+ }
40
+ export interface INamecheapContactInfo {
41
+ FirstName: string;
42
+ LastName: string;
43
+ Address1: string;
44
+ City: string;
45
+ StateProvince: string;
46
+ PostalCode: string;
47
+ Country: string;
48
+ Phone: string;
49
+ EmailAddress: string;
50
+ Address2?: string;
51
+ }
52
+ export interface INamecheapBuyRequest extends Document {
53
+ domains: {
54
+ name: string;
55
+ price: number;
56
+ available: boolean;
57
+ }[];
58
+ ip: string;
59
+ fullfilled: boolean;
60
+ id: string;
61
+ }
62
+ export interface NamecheapBuyResult {
63
+ succeed: {
64
+ [key: string]: string;
65
+ };
66
+ failed: {
67
+ [key: string]: string;
68
+ };
69
+ paidTotal: number;
70
+ }
71
+ export declare const NamecheapBuyRequestSchema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
72
+ domains: {
73
+ name?: string | undefined;
74
+ available?: boolean | undefined;
75
+ price?: string | undefined;
76
+ }[];
77
+ id?: string | undefined;
78
+ ip?: string | undefined;
79
+ fullfilled?: boolean | undefined;
80
+ }>;