namirasoft-site-map 1.4.7 → 1.4.8
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/build.js +0 -1
- package/dist/build.js.map +1 -1
- package/dist/maps/TimifyMap.d.ts +5 -0
- package/dist/maps/TimifyMap.js +13 -0
- package/dist/maps/TimifyMap.js.map +1 -0
- package/package.json +1 -1
- package/src/Globe.ts +142 -142
- package/src/build.ts +1 -1
- package/src/maps/index.ts +23 -23
package/dist/build.js
CHANGED
package/dist/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,qDAAmD;AAEnD,IAAI,QAAQ,GACR;IACI,UAAU;IACV,UAAU;IACV,aAAa;IACb,aAAa;IACb,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,kBAAkB;IAClB,MAAM;IACN,cAAc;IACd,OAAO;IACP,SAAS;IACT,cAAc;IACd,KAAK;IACL,SAAS;IACT,cAAc;IACd,YAAY;IACZ,qBAAqB;IACrB,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,qDAAmD;AAEnD,IAAI,QAAQ,GACR;IACI,UAAU;IACV,UAAU;IACV,aAAa;IACb,aAAa;IACb,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,kBAAkB;IAClB,MAAM;IACN,cAAc;IACd,OAAO;IACP,SAAS;IACT,cAAc;IACd,KAAK;IACL,SAAS;IACT,cAAc;IACd,YAAY;IACZ,qBAAqB;IACrB,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,WAAW;CAOd,CAAC;AACN,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC3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SAAS,CAAC,SAAS,CAAC,CAAC;IAC7G,CAAC;IACD,CAAC;QACG,IAAI,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,IAAI,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;QAC7F,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnE,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAChH,CAAC;IAED,YAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAC/C,YAAE,CAAC,aAAa,CAAC,qBAAqB,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimifyMap = void 0;
|
|
4
|
+
const namirasoft_timify_1 = require("namirasoft-timify");
|
|
5
|
+
const BaseMap_1 = require("../BaseMap");
|
|
6
|
+
class TimifyMap extends BaseMap_1.BaseMap {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(new namirasoft_timify_1.NamirasoftTimifyMetaDatabase());
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.TimifyMap = TimifyMap;
|
|
12
|
+
;
|
|
13
|
+
//# sourceMappingURL=TimifyMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimifyMap.js","sourceRoot":"","sources":["../../src/maps/TimifyMap.ts"],"names":[],"mappings":";;;AAAA,yDAAyF;AACzF,wCAAqC;AAErC,MAAa,SAAU,SAAQ,iBAA6D;IAExF;QAEI,KAAK,CAAC,IAAI,gDAA4B,EAAE,CAAC,CAAC;IAC9C,CAAC;CACJ;AAND,8BAMC;AAAA,CAAC"}
|
package/package.json
CHANGED
package/src/Globe.ts
CHANGED
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
2
|
-
import { BaseMap } from "./BaseMap";
|
|
3
|
-
// tables import start
|
|
4
|
-
import { APILinkMap } from "./maps/APILinkMap";
|
|
5
|
-
import { APINewsMap } from "./maps/APINewsMap";
|
|
6
|
-
import { APIProductMap } from "./maps/APIProductMap";
|
|
7
|
-
import { APIServiceMap } from "./maps/APIServiceMap";
|
|
8
|
-
import { APIWorkMap } from "./maps/APIWorkMap";
|
|
9
|
-
import { AccessMap } from "./maps/AccessMap";
|
|
10
|
-
import { AccountMap } from "./maps/AccountMap";
|
|
11
|
-
import { AlarmMap } from "./maps/AlarmMap";
|
|
12
|
-
import { BalanceMap } from "./maps/BalanceMap";
|
|
13
|
-
import { ContentTemplateMap } from "./maps/ContentTemplateMap";
|
|
14
|
-
import { DataMap } from "./maps/DataMap";
|
|
15
|
-
import { EmailSenderMap } from "./maps/EmailSenderMap";
|
|
16
|
-
import { FieldMap } from "./maps/FieldMap";
|
|
17
|
-
import { HistoryMap } from "./maps/HistoryMap";
|
|
18
|
-
import { JobArrangerMap } from "./maps/JobArrangerMap";
|
|
19
|
-
import { LogMap } from "./maps/LogMap";
|
|
20
|
-
import { MessageMap } from "./maps/MessageMap";
|
|
21
|
-
import { NWSMaxMindMap } from "./maps/NWSMaxMindMap";
|
|
22
|
-
import { NWSRegionMap } from "./maps/NWSRegionMap";
|
|
23
|
-
import { NotificationSenderMap } from "./maps/NotificationSenderMap";
|
|
24
|
-
import { PaymentMap } from "./maps/PaymentMap";
|
|
25
|
-
import { SMSSenderMap } from "./maps/SMSSenderMap";
|
|
26
|
-
import { SecretMap } from "./maps/SecretMap";
|
|
27
|
-
import { WorkspaceMap } from "./maps/WorkspaceMap";
|
|
28
|
-
// tables import end
|
|
29
|
-
|
|
30
|
-
export class Globe
|
|
31
|
-
{
|
|
32
|
-
public static namirasoft: Globe = new Globe();
|
|
33
|
-
// tables define start
|
|
34
|
-
public api_link: APILinkMap;
|
|
35
|
-
public api_news: APINewsMap;
|
|
36
|
-
public api_product: APIProductMap;
|
|
37
|
-
public api_service: APIServiceMap;
|
|
38
|
-
public api_work: APIWorkMap;
|
|
39
|
-
public access: AccessMap;
|
|
40
|
-
public account: AccountMap;
|
|
41
|
-
public alarm: AlarmMap;
|
|
42
|
-
public balance: BalanceMap;
|
|
43
|
-
public content_template: ContentTemplateMap;
|
|
44
|
-
public data: DataMap;
|
|
45
|
-
public email_sender: EmailSenderMap;
|
|
46
|
-
public field: FieldMap;
|
|
47
|
-
public history: HistoryMap;
|
|
48
|
-
public job_arranger: JobArrangerMap;
|
|
49
|
-
public log: LogMap;
|
|
50
|
-
public message: MessageMap;
|
|
51
|
-
public nws_max_mind: NWSMaxMindMap;
|
|
52
|
-
public nws_region: NWSRegionMap;
|
|
53
|
-
public notification_sender: NotificationSenderMap;
|
|
54
|
-
public payment: PaymentMap;
|
|
55
|
-
public sms_sender: SMSSenderMap;
|
|
56
|
-
public secret: SecretMap;
|
|
57
|
-
public workspace: WorkspaceMap;
|
|
58
|
-
// tables define end
|
|
59
|
-
constructor()
|
|
60
|
-
{
|
|
61
|
-
// tables init start
|
|
62
|
-
this.api_link = new APILinkMap();
|
|
63
|
-
this.api_news = new APINewsMap();
|
|
64
|
-
this.api_product = new APIProductMap();
|
|
65
|
-
this.api_service = new APIServiceMap();
|
|
66
|
-
this.api_work = new APIWorkMap();
|
|
67
|
-
this.access = new AccessMap();
|
|
68
|
-
this.account = new AccountMap();
|
|
69
|
-
this.alarm = new AlarmMap();
|
|
70
|
-
this.balance = new BalanceMap();
|
|
71
|
-
this.content_template = new ContentTemplateMap();
|
|
72
|
-
this.data = new DataMap();
|
|
73
|
-
this.email_sender = new EmailSenderMap();
|
|
74
|
-
this.field = new FieldMap();
|
|
75
|
-
this.history = new HistoryMap();
|
|
76
|
-
this.job_arranger = new JobArrangerMap();
|
|
77
|
-
this.log = new LogMap();
|
|
78
|
-
this.message = new MessageMap();
|
|
79
|
-
this.nws_max_mind = new NWSMaxMindMap();
|
|
80
|
-
this.nws_region = new NWSRegionMap();
|
|
81
|
-
this.notification_sender = new NotificationSenderMap();
|
|
82
|
-
this.payment = new PaymentMap();
|
|
83
|
-
this.sms_sender = new SMSSenderMap();
|
|
84
|
-
this.secret = new SecretMap();
|
|
85
|
-
this.workspace = new WorkspaceMap();
|
|
86
|
-
// tables init end
|
|
87
|
-
|
|
88
|
-
this.api_product.meta.tables.product.front_end.getViewLink = (id: string) =>
|
|
89
|
-
{
|
|
90
|
-
return Globe.namirasoft.getByProductID(id).meta.product.link;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
forEachProduct<T>(handler: (map: BaseMap<NSBaseMetaDatabase, any>) => T | null): T | null
|
|
94
|
-
{
|
|
95
|
-
for (let key of Object.keys(this))
|
|
96
|
-
{
|
|
97
|
-
let obj = (this as any)[key];
|
|
98
|
-
if (obj?.meta)
|
|
99
|
-
{
|
|
100
|
-
let ans = handler(obj);
|
|
101
|
-
if (ans)
|
|
102
|
-
return ans;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
getByProductID(product_id: string): BaseMap<NSBaseMetaDatabase, any>
|
|
108
|
-
{
|
|
109
|
-
let ans = this.forEachProduct(m =>
|
|
110
|
-
{
|
|
111
|
-
if (m.meta.product.id === product_id)
|
|
112
|
-
return m;
|
|
113
|
-
return null;
|
|
114
|
-
});
|
|
115
|
-
if (ans)
|
|
116
|
-
return ans;
|
|
117
|
-
throw new Error(`Map could not be found for product id: ${product_id}`);
|
|
118
|
-
}
|
|
119
|
-
getByShortName(short_name: string):
|
|
120
|
-
{
|
|
121
|
-
product: {
|
|
122
|
-
id: string;
|
|
123
|
-
name: string;
|
|
124
|
-
headline: string;
|
|
125
|
-
description: string;
|
|
126
|
-
logo: string;
|
|
127
|
-
link: string;
|
|
128
|
-
};
|
|
129
|
-
table: NSBaseMetaTable;
|
|
130
|
-
}
|
|
131
|
-
{
|
|
132
|
-
let ans = this.forEachProduct(product =>
|
|
133
|
-
{
|
|
134
|
-
for (let table in product.meta.tables)
|
|
135
|
-
if (product.meta.tables[table].uuid.short === short_name)
|
|
136
|
-
return { product: product.meta.product, table: product.meta.tables[table] };
|
|
137
|
-
return null;
|
|
138
|
-
});
|
|
139
|
-
if (ans)
|
|
140
|
-
return ans;
|
|
141
|
-
throw new Error(`Result could not be found for short name: ${short_name}`);
|
|
142
|
-
}
|
|
1
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
2
|
+
import { BaseMap } from "./BaseMap";
|
|
3
|
+
// tables import start
|
|
4
|
+
import { APILinkMap } from "./maps/APILinkMap";
|
|
5
|
+
import { APINewsMap } from "./maps/APINewsMap";
|
|
6
|
+
import { APIProductMap } from "./maps/APIProductMap";
|
|
7
|
+
import { APIServiceMap } from "./maps/APIServiceMap";
|
|
8
|
+
import { APIWorkMap } from "./maps/APIWorkMap";
|
|
9
|
+
import { AccessMap } from "./maps/AccessMap";
|
|
10
|
+
import { AccountMap } from "./maps/AccountMap";
|
|
11
|
+
import { AlarmMap } from "./maps/AlarmMap";
|
|
12
|
+
import { BalanceMap } from "./maps/BalanceMap";
|
|
13
|
+
import { ContentTemplateMap } from "./maps/ContentTemplateMap";
|
|
14
|
+
import { DataMap } from "./maps/DataMap";
|
|
15
|
+
import { EmailSenderMap } from "./maps/EmailSenderMap";
|
|
16
|
+
import { FieldMap } from "./maps/FieldMap";
|
|
17
|
+
import { HistoryMap } from "./maps/HistoryMap";
|
|
18
|
+
import { JobArrangerMap } from "./maps/JobArrangerMap";
|
|
19
|
+
import { LogMap } from "./maps/LogMap";
|
|
20
|
+
import { MessageMap } from "./maps/MessageMap";
|
|
21
|
+
import { NWSMaxMindMap } from "./maps/NWSMaxMindMap";
|
|
22
|
+
import { NWSRegionMap } from "./maps/NWSRegionMap";
|
|
23
|
+
import { NotificationSenderMap } from "./maps/NotificationSenderMap";
|
|
24
|
+
import { PaymentMap } from "./maps/PaymentMap";
|
|
25
|
+
import { SMSSenderMap } from "./maps/SMSSenderMap";
|
|
26
|
+
import { SecretMap } from "./maps/SecretMap";
|
|
27
|
+
import { WorkspaceMap } from "./maps/WorkspaceMap";
|
|
28
|
+
// tables import end
|
|
29
|
+
|
|
30
|
+
export class Globe
|
|
31
|
+
{
|
|
32
|
+
public static namirasoft: Globe = new Globe();
|
|
33
|
+
// tables define start
|
|
34
|
+
public api_link: APILinkMap;
|
|
35
|
+
public api_news: APINewsMap;
|
|
36
|
+
public api_product: APIProductMap;
|
|
37
|
+
public api_service: APIServiceMap;
|
|
38
|
+
public api_work: APIWorkMap;
|
|
39
|
+
public access: AccessMap;
|
|
40
|
+
public account: AccountMap;
|
|
41
|
+
public alarm: AlarmMap;
|
|
42
|
+
public balance: BalanceMap;
|
|
43
|
+
public content_template: ContentTemplateMap;
|
|
44
|
+
public data: DataMap;
|
|
45
|
+
public email_sender: EmailSenderMap;
|
|
46
|
+
public field: FieldMap;
|
|
47
|
+
public history: HistoryMap;
|
|
48
|
+
public job_arranger: JobArrangerMap;
|
|
49
|
+
public log: LogMap;
|
|
50
|
+
public message: MessageMap;
|
|
51
|
+
public nws_max_mind: NWSMaxMindMap;
|
|
52
|
+
public nws_region: NWSRegionMap;
|
|
53
|
+
public notification_sender: NotificationSenderMap;
|
|
54
|
+
public payment: PaymentMap;
|
|
55
|
+
public sms_sender: SMSSenderMap;
|
|
56
|
+
public secret: SecretMap;
|
|
57
|
+
public workspace: WorkspaceMap;
|
|
58
|
+
// tables define end
|
|
59
|
+
constructor()
|
|
60
|
+
{
|
|
61
|
+
// tables init start
|
|
62
|
+
this.api_link = new APILinkMap();
|
|
63
|
+
this.api_news = new APINewsMap();
|
|
64
|
+
this.api_product = new APIProductMap();
|
|
65
|
+
this.api_service = new APIServiceMap();
|
|
66
|
+
this.api_work = new APIWorkMap();
|
|
67
|
+
this.access = new AccessMap();
|
|
68
|
+
this.account = new AccountMap();
|
|
69
|
+
this.alarm = new AlarmMap();
|
|
70
|
+
this.balance = new BalanceMap();
|
|
71
|
+
this.content_template = new ContentTemplateMap();
|
|
72
|
+
this.data = new DataMap();
|
|
73
|
+
this.email_sender = new EmailSenderMap();
|
|
74
|
+
this.field = new FieldMap();
|
|
75
|
+
this.history = new HistoryMap();
|
|
76
|
+
this.job_arranger = new JobArrangerMap();
|
|
77
|
+
this.log = new LogMap();
|
|
78
|
+
this.message = new MessageMap();
|
|
79
|
+
this.nws_max_mind = new NWSMaxMindMap();
|
|
80
|
+
this.nws_region = new NWSRegionMap();
|
|
81
|
+
this.notification_sender = new NotificationSenderMap();
|
|
82
|
+
this.payment = new PaymentMap();
|
|
83
|
+
this.sms_sender = new SMSSenderMap();
|
|
84
|
+
this.secret = new SecretMap();
|
|
85
|
+
this.workspace = new WorkspaceMap();
|
|
86
|
+
// tables init end
|
|
87
|
+
|
|
88
|
+
this.api_product.meta.tables.product.front_end.getViewLink = (id: string) =>
|
|
89
|
+
{
|
|
90
|
+
return Globe.namirasoft.getByProductID(id).meta.product.link;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
forEachProduct<T>(handler: (map: BaseMap<NSBaseMetaDatabase, any>) => T | null): T | null
|
|
94
|
+
{
|
|
95
|
+
for (let key of Object.keys(this))
|
|
96
|
+
{
|
|
97
|
+
let obj = (this as any)[key];
|
|
98
|
+
if (obj?.meta)
|
|
99
|
+
{
|
|
100
|
+
let ans = handler(obj);
|
|
101
|
+
if (ans)
|
|
102
|
+
return ans;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
getByProductID(product_id: string): BaseMap<NSBaseMetaDatabase, any>
|
|
108
|
+
{
|
|
109
|
+
let ans = this.forEachProduct(m =>
|
|
110
|
+
{
|
|
111
|
+
if (m.meta.product.id === product_id)
|
|
112
|
+
return m;
|
|
113
|
+
return null;
|
|
114
|
+
});
|
|
115
|
+
if (ans)
|
|
116
|
+
return ans;
|
|
117
|
+
throw new Error(`Map could not be found for product id: ${product_id}`);
|
|
118
|
+
}
|
|
119
|
+
getByShortName(short_name: string):
|
|
120
|
+
{
|
|
121
|
+
product: {
|
|
122
|
+
id: string;
|
|
123
|
+
name: string;
|
|
124
|
+
headline: string;
|
|
125
|
+
description: string;
|
|
126
|
+
logo: string;
|
|
127
|
+
link: string;
|
|
128
|
+
};
|
|
129
|
+
table: NSBaseMetaTable;
|
|
130
|
+
}
|
|
131
|
+
{
|
|
132
|
+
let ans = this.forEachProduct(product =>
|
|
133
|
+
{
|
|
134
|
+
for (let table in product.meta.tables)
|
|
135
|
+
if (product.meta.tables[table].uuid.short === short_name)
|
|
136
|
+
return { product: product.meta.product, table: product.meta.tables[table] };
|
|
137
|
+
return null;
|
|
138
|
+
});
|
|
139
|
+
if (ans)
|
|
140
|
+
return ans;
|
|
141
|
+
throw new Error(`Result could not be found for short name: ${short_name}`);
|
|
142
|
+
}
|
|
143
143
|
};
|
package/src/build.ts
CHANGED
package/src/maps/index.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export * from "./APILinkMap";
|
|
2
|
-
export * from "./APINewsMap";
|
|
3
|
-
export * from "./APIProductMap";
|
|
4
|
-
export * from "./APIServiceMap";
|
|
5
|
-
export * from "./APIWorkMap";
|
|
6
|
-
export * from "./AccessMap";
|
|
7
|
-
export * from "./AccountMap";
|
|
8
|
-
export * from "./AlarmMap";
|
|
9
|
-
export * from "./BalanceMap";
|
|
10
|
-
export * from "./ContentTemplateMap";
|
|
11
|
-
export * from "./DataMap";
|
|
12
|
-
export * from "./EmailSenderMap";
|
|
13
|
-
export * from "./FieldMap";
|
|
14
|
-
export * from "./HistoryMap";
|
|
15
|
-
export * from "./JobArrangerMap";
|
|
16
|
-
export * from "./LogMap";
|
|
17
|
-
export * from "./MessageMap";
|
|
18
|
-
export * from "./NWSMaxMindMap";
|
|
19
|
-
export * from "./NWSRegionMap";
|
|
20
|
-
export * from "./NotificationSenderMap";
|
|
21
|
-
export * from "./PaymentMap";
|
|
22
|
-
export * from "./SMSSenderMap";
|
|
23
|
-
export * from "./SecretMap";
|
|
1
|
+
export * from "./APILinkMap";
|
|
2
|
+
export * from "./APINewsMap";
|
|
3
|
+
export * from "./APIProductMap";
|
|
4
|
+
export * from "./APIServiceMap";
|
|
5
|
+
export * from "./APIWorkMap";
|
|
6
|
+
export * from "./AccessMap";
|
|
7
|
+
export * from "./AccountMap";
|
|
8
|
+
export * from "./AlarmMap";
|
|
9
|
+
export * from "./BalanceMap";
|
|
10
|
+
export * from "./ContentTemplateMap";
|
|
11
|
+
export * from "./DataMap";
|
|
12
|
+
export * from "./EmailSenderMap";
|
|
13
|
+
export * from "./FieldMap";
|
|
14
|
+
export * from "./HistoryMap";
|
|
15
|
+
export * from "./JobArrangerMap";
|
|
16
|
+
export * from "./LogMap";
|
|
17
|
+
export * from "./MessageMap";
|
|
18
|
+
export * from "./NWSMaxMindMap";
|
|
19
|
+
export * from "./NWSRegionMap";
|
|
20
|
+
export * from "./NotificationSenderMap";
|
|
21
|
+
export * from "./PaymentMap";
|
|
22
|
+
export * from "./SMSSenderMap";
|
|
23
|
+
export * from "./SecretMap";
|
|
24
24
|
export * from "./WorkspaceMap";
|