@bprotsyk/aso-core 1.2.204 → 1.2.206

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/lib/index.d.ts CHANGED
@@ -38,3 +38,4 @@ export { IKeitaroOffer } from "./keitaro/keitaro-offer";
38
38
  export { IKeitaroStream } from "./keitaro/keitaro-stream";
39
39
  export { ICloudflareDomainStatus, ICloudflareDomainType, ICloudflareDomain } from "./models/cloudflare-domain";
40
40
  export { IDomain, DomainStatus, DomainTarget, CONST_CLOUFLARE_STATUS_READY } from "./models/domain";
41
+ export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, NamecheapBuyRequestSchema } from "./models/namecheap-domain";
package/lib/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = exports.KeitaroUtils = exports.KeitaroService = exports.ColoredText = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.ASOConfigFetch = exports.AlternativeOnActivityResult = exports.AlternativeOnBackPressed = exports.AlternativeNavigation = exports.AlternativeStorageType = exports.AlternativeNetworkTool = exports.AlternativeLogicType = exports.AlternativeSourceType = exports.AlternativeLayoutType = exports.FlashAppType = exports.PlugType = exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.IntegrationVersion = exports.ASO_v5 = exports.ASO_v4 = exports.ASO_v3 = exports.ASO_v2 = exports.ASO_v1 = exports.ASO_v0 = void 0;
26
+ exports.NamecheapBuyRequestSchema = exports.CONST_CLOUFLARE_STATUS_READY = exports.DomainTarget = exports.DomainStatus = exports.ICloudflareDomainType = exports.ICloudflareDomainStatus = exports.KeitaroUtils = exports.KeitaroService = exports.ColoredText = exports.ShapeDiv = exports.PanelUserSchema = exports.PanelUserAccessScope = exports.ASOConfigFetch = exports.AlternativeOnActivityResult = exports.AlternativeOnBackPressed = exports.AlternativeNavigation = exports.AlternativeStorageType = exports.AlternativeNetworkTool = exports.AlternativeLogicType = exports.AlternativeSourceType = exports.AlternativeLayoutType = exports.FlashAppType = exports.PlugType = exports.updateSchemaAndMoveValue = exports.FlashAppSchema = exports.IntegrationVersion = exports.ASO_v5 = exports.ASO_v4 = exports.ASO_v3 = exports.ASO_v2 = exports.ASO_v1 = exports.ASO_v0 = void 0;
27
27
  exports.ASO_v0 = __importStar(require("./aso/config/aso-config-v0"));
28
28
  exports.ASO_v1 = __importStar(require("./aso/config/aso-config-v1"));
29
29
  exports.ASO_v2 = __importStar(require("./aso/config/aso-config-v2"));
@@ -64,3 +64,5 @@ var domain_1 = require("./models/domain");
64
64
  Object.defineProperty(exports, "DomainStatus", { enumerable: true, get: function () { return domain_1.DomainStatus; } });
65
65
  Object.defineProperty(exports, "DomainTarget", { enumerable: true, get: function () { return domain_1.DomainTarget; } });
66
66
  Object.defineProperty(exports, "CONST_CLOUFLARE_STATUS_READY", { enumerable: true, get: function () { return domain_1.CONST_CLOUFLARE_STATUS_READY; } });
67
+ var namecheap_domain_1 = require("./models/namecheap-domain");
68
+ Object.defineProperty(exports, "NamecheapBuyRequestSchema", { enumerable: true, get: function () { return namecheap_domain_1.NamecheapBuyRequestSchema; } });
@@ -48,7 +48,8 @@ export interface IDomain extends Document {
48
48
  export declare const CONST_CLOUFLARE_STATUS_READY = "active";
49
49
  export declare enum DomainStatus {
50
50
  PENDING = "pending",
51
- READY = "ready"
51
+ READY = "ready",
52
+ READY_AND_NOTIFIED = "ready-and-notified"
52
53
  }
53
54
  export declare enum DomainTarget {
54
55
  PANEL = "panel",
@@ -7,6 +7,7 @@ var DomainStatus;
7
7
  (function (DomainStatus) {
8
8
  DomainStatus["PENDING"] = "pending";
9
9
  DomainStatus["READY"] = "ready";
10
+ DomainStatus["READY_AND_NOTIFIED"] = "ready-and-notified";
10
11
  })(DomainStatus = exports.DomainStatus || (exports.DomainStatus = {}));
11
12
  var DomainTarget;
12
13
  (function (DomainTarget) {
@@ -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: string;
70
+ }
71
+ export declare const NamecheapBuyRequestSchema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
72
+ id?: string | undefined;
73
+ ip?: string | undefined;
74
+ fullfilled?: boolean | undefined;
75
+ domains?: {
76
+ name?: string | undefined;
77
+ available?: boolean | undefined;
78
+ price?: string | undefined;
79
+ } | undefined;
80
+ }>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NamecheapBuyRequestSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ exports.NamecheapBuyRequestSchema = new mongoose_1.Schema({
6
+ domains: {
7
+ name: String,
8
+ price: String,
9
+ available: Boolean
10
+ },
11
+ ip: String,
12
+ fullfilled: Boolean,
13
+ id: String
14
+ });
@@ -10,7 +10,7 @@ function convertMillisToDate(millis) {
10
10
  }
11
11
  exports.convertMillisToDate = convertMillisToDate;
12
12
  function getTimestampsForTodayAndYesterday() {
13
- const offset = 2;
13
+ const offset = -2;
14
14
  const now = new Date(new Date().getTime() + offset * 3600 * 1000);
15
15
  const todayStart = new Date(now);
16
16
  todayStart.setUTCHours(0, 0, 0, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bprotsyk/aso-core",
3
- "version": "1.2.204",
3
+ "version": "1.2.206",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -46,4 +46,5 @@ export { IKeitaroOffer } from "./keitaro/keitaro-offer"
46
46
  export { IKeitaroStream } from "./keitaro/keitaro-stream"
47
47
 
48
48
  export { ICloudflareDomainStatus, ICloudflareDomainType, ICloudflareDomain } from "./models/cloudflare-domain"
49
- export { IDomain, DomainStatus, DomainTarget, CONST_CLOUFLARE_STATUS_READY } from "./models/domain"
49
+ export { IDomain, DomainStatus, DomainTarget, CONST_CLOUFLARE_STATUS_READY } from "./models/domain"
50
+ export { INamecheapDomain, INamecheapBuyRequest, INamecheapContactInfo, NamecheapBuyRequestSchema } from "./models/namecheap-domain"
@@ -28,7 +28,8 @@ export const CONST_CLOUFLARE_STATUS_READY = "active"
28
28
 
29
29
  export enum DomainStatus {
30
30
  PENDING = "pending",
31
- READY = "ready"
31
+ READY = "ready",
32
+ READY_AND_NOTIFIED = "ready-and-notified"
32
33
  }
33
34
 
34
35
  export enum DomainTarget {
@@ -56,4 +57,4 @@ export const DomainSchema = new Schema({
56
57
  txtRecords: [String],
57
58
  target: String,
58
59
  assignedTo: [Number]
59
- });
60
+ })
@@ -0,0 +1,56 @@
1
+ import { Schema } from "mongoose"
2
+
3
+ export interface INamecheapDomain {
4
+ ID: string
5
+ Name: string
6
+ User: string
7
+ Created: string
8
+ Expires: string
9
+ IsExpired: 'true' | 'false'
10
+ IsLocked: 'true' | 'false'
11
+ AutoRenew: 'true' | 'false'
12
+ WhoisGuard: 'ENABLED' | 'DISABLED'
13
+ IsPremium: 'true' | 'false'
14
+ IsOurDNS: 'true' | 'false'
15
+ }
16
+
17
+ export interface INamecheapContactInfo {
18
+ FirstName: string;
19
+ LastName: string;
20
+ Address1: string;
21
+ City: string;
22
+ StateProvince: string;
23
+ PostalCode: string;
24
+ Country: string;
25
+ Phone: string;
26
+ EmailAddress: string;
27
+ Address2?: string;
28
+ }
29
+
30
+ export interface INamecheapBuyRequest extends Document {
31
+ domains: {
32
+ name: string,
33
+ price: number,
34
+ available: boolean
35
+ }[]
36
+ ip: string,
37
+ fullfilled: boolean,
38
+ id: string
39
+ }
40
+
41
+ export interface NamecheapBuyResult {
42
+ succeed: { [key: string]: string },
43
+ failed: { [key: string]: string },
44
+ paidTotal: string
45
+ }
46
+
47
+ export const NamecheapBuyRequestSchema = new Schema({
48
+ domains: {
49
+ name: String,
50
+ price: String,
51
+ available: Boolean
52
+ },
53
+ ip: String,
54
+ fullfilled: Boolean,
55
+ id: String
56
+ })
@@ -7,7 +7,7 @@ export function convertMillisToDate(millis: number): string {
7
7
  }
8
8
 
9
9
  export function getTimestampsForTodayAndYesterday() {
10
- const offset = 2
10
+ const offset = - 2
11
11
  const now = new Date(new Date().getTime() + offset * 3600 * 1000)
12
12
  const todayStart = new Date(now)
13
13
  todayStart.setUTCHours(0, 0, 0, 0)