@powerhousedao/shared 6.0.2-staging.1 → 6.0.2-staging.3
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/README.md +1 -1
- package/dist/actions-CAH-hbfc.d.ts +2444 -0
- package/dist/actions-CAH-hbfc.d.ts.map +1 -0
- package/dist/analytics/index.d.ts +42 -4
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +307 -4
- package/dist/analytics/index.js.map +1 -1
- package/dist/clis/index.d.mts +12039 -0
- package/dist/clis/index.d.mts.map +1 -0
- package/dist/clis/index.mjs +7274 -0
- package/dist/clis/index.mjs.map +1 -0
- package/dist/connect/index.d.ts +377 -1
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +253 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/constants-xNwF0jSl.d.ts +8 -0
- package/dist/constants-xNwF0jSl.d.ts.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +40 -0
- package/dist/constants.js.map +1 -0
- package/dist/document-drive/index.d.ts +157 -0
- package/dist/document-drive/index.d.ts.map +1 -0
- package/dist/document-drive/index.js +963 -0
- package/dist/document-drive/index.js.map +1 -0
- package/dist/document-model/index.d.ts +5 -5
- package/dist/document-model/index.js +3386 -2
- package/dist/document-model/index.js.map +1 -1
- package/dist/document-model/mock.d.ts +2 -0
- package/dist/document-model/mock.js +9 -0
- package/dist/document-model/mock.js.map +1 -0
- package/dist/document-model/utils.d.ts +3 -0
- package/dist/document-model/utils.js +3 -0
- package/dist/index-D0E78WnU.d.ts +1 -0
- package/dist/index-DPTdhtLL.d.ts +307 -0
- package/dist/index-DPTdhtLL.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -0
- package/dist/mock-Cgn-VBF_.d.ts +7 -0
- package/dist/mock-Cgn-VBF_.d.ts.map +1 -0
- package/dist/processors/index.d.ts +2 -5
- package/dist/processors/index.js +116 -3
- package/dist/processors/index.js.map +1 -1
- package/dist/registry/index.d.ts +60 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +116 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/types-1E8sqdB9.d.ts +410 -0
- package/dist/types-1E8sqdB9.d.ts.map +1 -0
- package/dist/types-BFDlQkXZ.d.ts +158 -0
- package/dist/types-BFDlQkXZ.d.ts.map +1 -0
- package/dist/utils-CJF4w5Bp.d.ts +9 -0
- package/dist/utils-CJF4w5Bp.d.ts.map +1 -0
- package/dist/utils-bCWnsmtD.js +70 -0
- package/dist/utils-bCWnsmtD.js.map +1 -0
- package/package.json +62 -12
- package/dist/analytics/analytics-path.d.ts +0 -36
- package/dist/analytics/analytics-path.d.ts.map +0 -1
- package/dist/analytics/analytics-path.js +0 -170
- package/dist/analytics/analytics-path.js.map +0 -1
- package/dist/analytics/analytics-period.d.ts +0 -40
- package/dist/analytics/analytics-period.d.ts.map +0 -1
- package/dist/analytics/analytics-period.js +0 -204
- package/dist/analytics/analytics-period.js.map +0 -1
- package/dist/analytics/constants.d.ts +0 -35
- package/dist/analytics/constants.d.ts.map +0 -1
- package/dist/analytics/constants.js +0 -40
- package/dist/analytics/constants.js.map +0 -1
- package/dist/analytics/types.d.ts +0 -85
- package/dist/analytics/types.d.ts.map +0 -1
- package/dist/analytics/types.js +0 -2
- package/dist/analytics/types.js.map +0 -1
- package/dist/connect/env-config.d.ts +0 -862
- package/dist/connect/env-config.d.ts.map +0 -1
- package/dist/connect/env-config.js +0 -525
- package/dist/connect/env-config.js.map +0 -1
- package/dist/document-model/core/actions.d.ts +0 -62
- package/dist/document-model/core/actions.d.ts.map +0 -1
- package/dist/document-model/core/actions.js +0 -2
- package/dist/document-model/core/actions.js.map +0 -1
- package/dist/document-model/core/constants.d.ts +0 -6
- package/dist/document-model/core/constants.d.ts.map +0 -1
- package/dist/document-model/core/constants.js +0 -8
- package/dist/document-model/core/constants.js.map +0 -1
- package/dist/document-model/core/documents.d.ts +0 -102
- package/dist/document-model/core/documents.d.ts.map +0 -1
- package/dist/document-model/core/documents.js +0 -2
- package/dist/document-model/core/documents.js.map +0 -1
- package/dist/document-model/core/operations.d.ts +0 -74
- package/dist/document-model/core/operations.d.ts.map +0 -1
- package/dist/document-model/core/operations.js +0 -2
- package/dist/document-model/core/operations.js.map +0 -1
- package/dist/document-model/core/ph-types.d.ts +0 -7
- package/dist/document-model/core/ph-types.d.ts.map +0 -1
- package/dist/document-model/core/ph-types.js +0 -2
- package/dist/document-model/core/ph-types.js.map +0 -1
- package/dist/document-model/core/signatures.d.ts +0 -52
- package/dist/document-model/core/signatures.d.ts.map +0 -1
- package/dist/document-model/core/signatures.js +0 -2
- package/dist/document-model/core/signatures.js.map +0 -1
- package/dist/document-model/core/state.d.ts +0 -38
- package/dist/document-model/core/state.d.ts.map +0 -1
- package/dist/document-model/core/state.js +0 -2
- package/dist/document-model/core/state.js.map +0 -1
- package/dist/document-model/core/types.d.ts +0 -533
- package/dist/document-model/core/types.d.ts.map +0 -1
- package/dist/document-model/core/types.js +0 -2
- package/dist/document-model/core/types.js.map +0 -1
- package/dist/document-model/core/upgrades.d.ts +0 -24
- package/dist/document-model/core/upgrades.d.ts.map +0 -1
- package/dist/document-model/core/upgrades.js +0 -2
- package/dist/document-model/core/upgrades.js.map +0 -1
- package/dist/document-model/index.d.ts.map +0 -1
- package/dist/document-model/types.d.ts +0 -97
- package/dist/document-model/types.d.ts.map +0 -1
- package/dist/document-model/types.js +0 -2
- package/dist/document-model/types.js.map +0 -1
- package/dist/processors/constants.d.ts +0 -4
- package/dist/processors/constants.d.ts.map +0 -1
- package/dist/processors/constants.js +0 -4
- package/dist/processors/constants.js.map +0 -1
- package/dist/processors/drive-analytics/document-processor.d.ts +0 -10
- package/dist/processors/drive-analytics/document-processor.d.ts.map +0 -1
- package/dist/processors/drive-analytics/document-processor.js +0 -43
- package/dist/processors/drive-analytics/document-processor.js.map +0 -1
- package/dist/processors/drive-analytics/drive-processor.d.ts +0 -10
- package/dist/processors/drive-analytics/drive-processor.d.ts.map +0 -1
- package/dist/processors/drive-analytics/drive-processor.js +0 -85
- package/dist/processors/drive-analytics/drive-processor.js.map +0 -1
- package/dist/processors/drive-analytics/index.d.ts +0 -10
- package/dist/processors/drive-analytics/index.d.ts.map +0 -1
- package/dist/processors/drive-analytics/index.js +0 -28
- package/dist/processors/drive-analytics/index.js.map +0 -1
- package/dist/processors/drive-analytics/types.d.ts +0 -3
- package/dist/processors/drive-analytics/types.d.ts.map +0 -1
- package/dist/processors/drive-analytics/types.js +0 -2
- package/dist/processors/drive-analytics/types.js.map +0 -1
- package/dist/processors/index.d.ts.map +0 -1
- package/dist/processors/relational/types.d.ts +0 -72
- package/dist/processors/relational/types.d.ts.map +0 -1
- package/dist/processors/relational/types.js +0 -45
- package/dist/processors/relational/types.js.map +0 -1
- package/dist/processors/relational/utils.d.ts +0 -29
- package/dist/processors/relational/utils.d.ts.map +0 -1
- package/dist/processors/relational/utils.js +0 -67
- package/dist/processors/relational/utils.js.map +0 -1
- package/dist/processors/types.d.ts +0 -90
- package/dist/processors/types.d.ts.map +0 -1
- package/dist/processors/types.js +0 -2
- package/dist/processors/types.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { AnalyticsPeriodType, AnalyticsSerializerTypes } from "./constants.js";
|
|
2
|
-
export class AnalyticsPeriod {
|
|
3
|
-
get type() {
|
|
4
|
-
return this._type;
|
|
5
|
-
}
|
|
6
|
-
get year() {
|
|
7
|
-
return this._year;
|
|
8
|
-
}
|
|
9
|
-
get quarter() {
|
|
10
|
-
return this._quarter;
|
|
11
|
-
}
|
|
12
|
-
get month() {
|
|
13
|
-
return this._month;
|
|
14
|
-
}
|
|
15
|
-
_type = AnalyticsPeriodType.Year;
|
|
16
|
-
_year = 1970;
|
|
17
|
-
_quarter = null;
|
|
18
|
-
_month = null;
|
|
19
|
-
toJSON() {
|
|
20
|
-
return {
|
|
21
|
-
_t: AnalyticsSerializerTypes.AnalyticsPeriod,
|
|
22
|
-
_v: this.toString(),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
static fromString(period) {
|
|
26
|
-
let result;
|
|
27
|
-
if (period.length === 4) {
|
|
28
|
-
result = new AnalyticsPeriod(Number.parseInt(period));
|
|
29
|
-
}
|
|
30
|
-
else if (period.length === 7) {
|
|
31
|
-
if (period[4] !== "/") {
|
|
32
|
-
throw new Error(`Invalid period string: '${period}'`);
|
|
33
|
-
}
|
|
34
|
-
else if (period[5] === "Q") {
|
|
35
|
-
result = new AnalyticsPeriod(Number.parseInt(period.slice(0, 4)), Number.parseInt(period[6]));
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
result = new AnalyticsPeriod(Number.parseInt(period.slice(0, 4)), undefined, Number.parseInt(period.slice(5)));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
throw new Error(`Invalid period string: '${period}'`);
|
|
43
|
-
}
|
|
44
|
-
return result;
|
|
45
|
-
}
|
|
46
|
-
static fillRange(p1, p2) {
|
|
47
|
-
const obj1 = typeof p1 === "string" ? AnalyticsPeriod.fromString(p1) : p1, obj2 = typeof p2 === "string" ? AnalyticsPeriod.fromString(p2) : p2;
|
|
48
|
-
if (obj1.type !== obj2.type) {
|
|
49
|
-
throw new Error(`Cannot fill range of different type periods ${obj1.toString()} and ${obj2.toString()}.`);
|
|
50
|
-
}
|
|
51
|
-
const [first, last] = obj1.comesBefore(obj2) ? [obj1, obj2] : [obj2, obj1];
|
|
52
|
-
const result = [first];
|
|
53
|
-
let next = first.nextPeriod();
|
|
54
|
-
while (next.comesBefore(last)) {
|
|
55
|
-
result.push(next);
|
|
56
|
-
next = next.nextPeriod();
|
|
57
|
-
}
|
|
58
|
-
if (!last.equals(first)) {
|
|
59
|
-
result.push(last);
|
|
60
|
-
}
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
static normalizeQuarters(year, quarter) {
|
|
64
|
-
const newYear = year + Math.floor((quarter - 1) / 4);
|
|
65
|
-
const newQuarter = moduloButWithoutBugs(quarter - 1, 4) + 1;
|
|
66
|
-
return [newYear, newQuarter, undefined];
|
|
67
|
-
}
|
|
68
|
-
static normalizeMonths(year, month) {
|
|
69
|
-
const newYear = year + Math.floor((month - 1) / 12);
|
|
70
|
-
const newMonth = moduloButWithoutBugs(month - 1, 12) + 1;
|
|
71
|
-
const newQuarter = Math.floor((newMonth - 1) / 3) + 1;
|
|
72
|
-
return [newYear, newQuarter, newMonth];
|
|
73
|
-
}
|
|
74
|
-
constructor(year, quarter, month) {
|
|
75
|
-
this._initAsYear(year);
|
|
76
|
-
if (quarter !== undefined) {
|
|
77
|
-
this._initAsQuarter(quarter);
|
|
78
|
-
}
|
|
79
|
-
if (month !== undefined) {
|
|
80
|
-
this._initAsMonth(month);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
equals(period) {
|
|
84
|
-
return (this.toString() ===
|
|
85
|
-
(typeof period === "string" ? period : period.toString()));
|
|
86
|
-
}
|
|
87
|
-
toString() {
|
|
88
|
-
let result = this._year + (this._type === AnalyticsPeriodType.Year ? "" : "/");
|
|
89
|
-
if (this._type === AnalyticsPeriodType.Quarter) {
|
|
90
|
-
result += "Q" + this._quarter;
|
|
91
|
-
}
|
|
92
|
-
else if (this._type === AnalyticsPeriodType.Month) {
|
|
93
|
-
if (this._month < 10) {
|
|
94
|
-
result += "0";
|
|
95
|
-
}
|
|
96
|
-
result += this._month;
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
startAsSqlDate() {
|
|
101
|
-
let result = this._year + "-";
|
|
102
|
-
switch (this._type) {
|
|
103
|
-
case AnalyticsPeriodType.Month:
|
|
104
|
-
result += (this._month < 10 ? "0" : "") + this.month;
|
|
105
|
-
break;
|
|
106
|
-
case AnalyticsPeriodType.Quarter: {
|
|
107
|
-
const firstMonth = (this._quarter - 1) * 3 + 1;
|
|
108
|
-
result += (firstMonth < 10 ? "0" : "") + firstMonth;
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
case AnalyticsPeriodType.Year:
|
|
112
|
-
result += "01";
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
return result + "-01";
|
|
116
|
-
}
|
|
117
|
-
comesAfter(period) {
|
|
118
|
-
return this._start() > period._end();
|
|
119
|
-
}
|
|
120
|
-
comesBefore(period) {
|
|
121
|
-
return period._start() > this._end();
|
|
122
|
-
}
|
|
123
|
-
contains(period) {
|
|
124
|
-
return this._start() <= period._start() && this._end() >= period._end();
|
|
125
|
-
}
|
|
126
|
-
firstMonth() {
|
|
127
|
-
let month = this._month || 1;
|
|
128
|
-
if (this._type === AnalyticsPeriodType.Quarter) {
|
|
129
|
-
month = (this._quarter - 1) * 3 + 1;
|
|
130
|
-
}
|
|
131
|
-
return new AnalyticsPeriod(this._year, undefined, month);
|
|
132
|
-
}
|
|
133
|
-
lastMonth() {
|
|
134
|
-
let month = this._month || 12;
|
|
135
|
-
if (this._type === AnalyticsPeriodType.Quarter) {
|
|
136
|
-
month = this._quarter * 3;
|
|
137
|
-
}
|
|
138
|
-
return new AnalyticsPeriod(this._year, undefined, month);
|
|
139
|
-
}
|
|
140
|
-
nextPeriod(n = 1) {
|
|
141
|
-
return this._addPeriods(n);
|
|
142
|
-
}
|
|
143
|
-
previousPeriod(n = 1) {
|
|
144
|
-
return this._addPeriods(-n);
|
|
145
|
-
}
|
|
146
|
-
_start() {
|
|
147
|
-
return this._getNumericComparator(false);
|
|
148
|
-
}
|
|
149
|
-
_end() {
|
|
150
|
-
return this._getNumericComparator(true);
|
|
151
|
-
}
|
|
152
|
-
_getNumericComparator(endOfPeriod) {
|
|
153
|
-
const defaultQuarter = endOfPeriod ? 4 : 1, defaultMonth = ((this._quarter || defaultQuarter) - 1) * 3 + (endOfPeriod ? 3 : 1), result = this._year * 1000 +
|
|
154
|
-
(this._quarter || defaultQuarter) * 100 +
|
|
155
|
-
(this._month || defaultMonth);
|
|
156
|
-
return result;
|
|
157
|
-
}
|
|
158
|
-
_addPeriods(periods) {
|
|
159
|
-
let result;
|
|
160
|
-
if (this._type === AnalyticsPeriodType.Year) {
|
|
161
|
-
result = new AnalyticsPeriod(this._year + periods);
|
|
162
|
-
}
|
|
163
|
-
else if (this._type === AnalyticsPeriodType.Quarter) {
|
|
164
|
-
const [y, q] = AnalyticsPeriod.normalizeQuarters(this._year, this._quarter + periods);
|
|
165
|
-
result = new AnalyticsPeriod(y, q);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
const [y, _, m] = AnalyticsPeriod.normalizeMonths(this._year, this._month + periods);
|
|
169
|
-
result = new AnalyticsPeriod(y, undefined, m);
|
|
170
|
-
}
|
|
171
|
-
return result;
|
|
172
|
-
}
|
|
173
|
-
_initAsYear(year) {
|
|
174
|
-
if (year < 1970 || year > 2100) {
|
|
175
|
-
throw new Error(`Invalid period year: '${year}'`);
|
|
176
|
-
}
|
|
177
|
-
this._year = year;
|
|
178
|
-
}
|
|
179
|
-
_initAsQuarter(quarter) {
|
|
180
|
-
if (quarter < 1 || quarter > 4) {
|
|
181
|
-
throw new Error(`Invalid period quarter: ${quarter}`);
|
|
182
|
-
}
|
|
183
|
-
this._quarter = quarter;
|
|
184
|
-
this._type = AnalyticsPeriodType.Quarter;
|
|
185
|
-
}
|
|
186
|
-
_initAsMonth(month) {
|
|
187
|
-
if (month < 1 || month > 12) {
|
|
188
|
-
throw new Error(`Invalid period month: ${month}`);
|
|
189
|
-
}
|
|
190
|
-
if (this.quarter == null) {
|
|
191
|
-
this._initAsQuarter(Math.floor((month - 1) / 3) + 1);
|
|
192
|
-
}
|
|
193
|
-
else if (this.quarter !== Math.floor((month - 1) / 3) + 1) {
|
|
194
|
-
throw new Error(`Period month ${month} outside of quarter ${this.quarter}`);
|
|
195
|
-
}
|
|
196
|
-
this._month = month;
|
|
197
|
-
this._type = AnalyticsPeriodType.Month;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// See https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers
|
|
201
|
-
function moduloButWithoutBugs(base, n) {
|
|
202
|
-
return ((base % n) + n) % n;
|
|
203
|
-
}
|
|
204
|
-
//# sourceMappingURL=analytics-period.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-period.js","sourceRoot":"","sources":["../../analytics/analytics-period.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,MAAM,OAAO,eAAe;IAC1B,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEO,KAAK,GAAwB,mBAAmB,CAAC,IAAI,CAAC;IACtD,KAAK,GAAW,IAAI,CAAC;IACrB,QAAQ,GAAkB,IAAI,CAAC;IAC/B,MAAM,GAAkB,IAAI,CAAC;IAE9B,MAAM;QACX,OAAO;YACL,EAAE,EAAE,wBAAwB,CAAC,eAAe;YAC5C,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE;SACpB,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,MAAc;QACrC,IAAI,MAAuB,CAAC;QAE5B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,GA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
|
6
|
-
export declare enum AnalyticsPeriodType {
|
|
7
|
-
Year = 0,
|
|
8
|
-
Quarter = 1,
|
|
9
|
-
Month = 2
|
|
10
|
-
}
|
|
11
|
-
export declare enum AnalyticsMetric {
|
|
12
|
-
Budget = 0,
|
|
13
|
-
Forecast = 1,
|
|
14
|
-
Actuals = 2,
|
|
15
|
-
PaymentsOnChain = 3,
|
|
16
|
-
PaymentsOffChainIncluded = 4,
|
|
17
|
-
FTEs = 5
|
|
18
|
-
}
|
|
19
|
-
export declare enum CompoundOperator {
|
|
20
|
-
VectorAdd = 0,
|
|
21
|
-
VectorSubtract = 1,
|
|
22
|
-
ScalarMultiply = 2,
|
|
23
|
-
ScalarDivide = 3
|
|
24
|
-
}
|
|
25
|
-
export declare enum AnalyticsGranularity {
|
|
26
|
-
Total = 0,
|
|
27
|
-
Annual = 1,
|
|
28
|
-
SemiAnnual = 2,
|
|
29
|
-
Quarterly = 3,
|
|
30
|
-
Monthly = 4,
|
|
31
|
-
Weekly = 5,
|
|
32
|
-
Daily = 6,
|
|
33
|
-
Hourly = 7
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../analytics/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,aAAa,IAAA;IACb,oBAAoB,IAAA;IACpB,eAAe,IAAA;CAChB;AAED,oBAAY,mBAAmB;IAC7B,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,KAAK,IAAA;CACN;AAED,oBAAY,eAAe;IACzB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,eAAe,IAAA;IACf,wBAAwB,IAAA;IACxB,IAAI,IAAA;CACL;AACD,oBAAY,gBAAgB;IAC1B,SAAS,IAAA;IACT,cAAc,IAAA;IACd,cAAc,IAAA;IACd,YAAY,IAAA;CACb;AACD,oBAAY,oBAAoB;IAC9B,KAAK,IAAA;IACL,MAAM,IAAA;IACN,UAAU,IAAA;IACV,SAAS,IAAA;IACT,OAAO,IAAA;IACP,MAAM,IAAA;IACN,KAAK,IAAA;IACL,MAAM,IAAA;CACP"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export var AnalyticsSerializerTypes;
|
|
2
|
-
(function (AnalyticsSerializerTypes) {
|
|
3
|
-
AnalyticsSerializerTypes[AnalyticsSerializerTypes["AnalyticsPath"] = 0] = "AnalyticsPath";
|
|
4
|
-
AnalyticsSerializerTypes[AnalyticsSerializerTypes["AnalyticsPathSegment"] = 1] = "AnalyticsPathSegment";
|
|
5
|
-
AnalyticsSerializerTypes[AnalyticsSerializerTypes["AnalyticsPeriod"] = 2] = "AnalyticsPeriod";
|
|
6
|
-
})(AnalyticsSerializerTypes || (AnalyticsSerializerTypes = {}));
|
|
7
|
-
export var AnalyticsPeriodType;
|
|
8
|
-
(function (AnalyticsPeriodType) {
|
|
9
|
-
AnalyticsPeriodType[AnalyticsPeriodType["Year"] = 0] = "Year";
|
|
10
|
-
AnalyticsPeriodType[AnalyticsPeriodType["Quarter"] = 1] = "Quarter";
|
|
11
|
-
AnalyticsPeriodType[AnalyticsPeriodType["Month"] = 2] = "Month";
|
|
12
|
-
})(AnalyticsPeriodType || (AnalyticsPeriodType = {}));
|
|
13
|
-
export var AnalyticsMetric;
|
|
14
|
-
(function (AnalyticsMetric) {
|
|
15
|
-
AnalyticsMetric[AnalyticsMetric["Budget"] = 0] = "Budget";
|
|
16
|
-
AnalyticsMetric[AnalyticsMetric["Forecast"] = 1] = "Forecast";
|
|
17
|
-
AnalyticsMetric[AnalyticsMetric["Actuals"] = 2] = "Actuals";
|
|
18
|
-
AnalyticsMetric[AnalyticsMetric["PaymentsOnChain"] = 3] = "PaymentsOnChain";
|
|
19
|
-
AnalyticsMetric[AnalyticsMetric["PaymentsOffChainIncluded"] = 4] = "PaymentsOffChainIncluded";
|
|
20
|
-
AnalyticsMetric[AnalyticsMetric["FTEs"] = 5] = "FTEs";
|
|
21
|
-
})(AnalyticsMetric || (AnalyticsMetric = {}));
|
|
22
|
-
export var CompoundOperator;
|
|
23
|
-
(function (CompoundOperator) {
|
|
24
|
-
CompoundOperator[CompoundOperator["VectorAdd"] = 0] = "VectorAdd";
|
|
25
|
-
CompoundOperator[CompoundOperator["VectorSubtract"] = 1] = "VectorSubtract";
|
|
26
|
-
CompoundOperator[CompoundOperator["ScalarMultiply"] = 2] = "ScalarMultiply";
|
|
27
|
-
CompoundOperator[CompoundOperator["ScalarDivide"] = 3] = "ScalarDivide";
|
|
28
|
-
})(CompoundOperator || (CompoundOperator = {}));
|
|
29
|
-
export var AnalyticsGranularity;
|
|
30
|
-
(function (AnalyticsGranularity) {
|
|
31
|
-
AnalyticsGranularity[AnalyticsGranularity["Total"] = 0] = "Total";
|
|
32
|
-
AnalyticsGranularity[AnalyticsGranularity["Annual"] = 1] = "Annual";
|
|
33
|
-
AnalyticsGranularity[AnalyticsGranularity["SemiAnnual"] = 2] = "SemiAnnual";
|
|
34
|
-
AnalyticsGranularity[AnalyticsGranularity["Quarterly"] = 3] = "Quarterly";
|
|
35
|
-
AnalyticsGranularity[AnalyticsGranularity["Monthly"] = 4] = "Monthly";
|
|
36
|
-
AnalyticsGranularity[AnalyticsGranularity["Weekly"] = 5] = "Weekly";
|
|
37
|
-
AnalyticsGranularity[AnalyticsGranularity["Daily"] = 6] = "Daily";
|
|
38
|
-
AnalyticsGranularity[AnalyticsGranularity["Hourly"] = 7] = "Hourly";
|
|
39
|
-
})(AnalyticsGranularity || (AnalyticsGranularity = {}));
|
|
40
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../analytics/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,yFAAa,CAAA;IACb,uGAAoB,CAAA;IACpB,6FAAe,CAAA;AACjB,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,6DAAI,CAAA;IACJ,mEAAO,CAAA;IACP,+DAAK,CAAA;AACP,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,yDAAM,CAAA;IACN,6DAAQ,CAAA;IACR,2DAAO,CAAA;IACP,2EAAe,CAAA;IACf,6FAAwB,CAAA;IACxB,qDAAI,CAAA;AACN,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AACD,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,iEAAS,CAAA;IACT,2EAAc,CAAA;IACd,2EAAc,CAAA;IACd,uEAAY,CAAA;AACd,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AACD,MAAM,CAAN,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,iEAAK,CAAA;IACL,mEAAM,CAAA;IACN,2EAAU,CAAA;IACV,yEAAS,CAAA;IACT,qEAAO,CAAA;IACP,mEAAM,CAAA;IACN,iEAAK,CAAA;IACL,mEAAM,CAAA;AACR,CAAC,EATW,oBAAoB,KAApB,oBAAoB,QAS/B"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { DateTime } from "luxon";
|
|
2
|
-
import type { AnalyticsPath } from "./analytics-path.js";
|
|
3
|
-
import type { AnalyticsGranularity, CompoundOperator } from "./constants.js";
|
|
4
|
-
export type AnalyticsSeriesQuery = {
|
|
5
|
-
start: DateTime | null;
|
|
6
|
-
end: DateTime | null;
|
|
7
|
-
metrics: string[];
|
|
8
|
-
currency?: AnalyticsPath;
|
|
9
|
-
select: Record<string, AnalyticsPath[]>;
|
|
10
|
-
};
|
|
11
|
-
export type AnalyticsQuery = AnalyticsSeriesQuery & {
|
|
12
|
-
granularity: AnalyticsGranularity;
|
|
13
|
-
lod: Record<string, number | null>;
|
|
14
|
-
};
|
|
15
|
-
export type AnalyticsSeries<D = string | AnalyticsDimension> = {
|
|
16
|
-
source: AnalyticsPath;
|
|
17
|
-
start: DateTime;
|
|
18
|
-
end: DateTime | null;
|
|
19
|
-
metric: string;
|
|
20
|
-
value: number;
|
|
21
|
-
unit: string | null;
|
|
22
|
-
fn: string;
|
|
23
|
-
params: Record<string, unknown> | null;
|
|
24
|
-
dimensions: Record<string, D>;
|
|
25
|
-
};
|
|
26
|
-
export type AnalyticsDimension = {
|
|
27
|
-
path: AnalyticsPath;
|
|
28
|
-
icon: string;
|
|
29
|
-
label: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
export type CompoundAnalyticsQuery = {
|
|
33
|
-
start: DateTime | null;
|
|
34
|
-
end: DateTime | null;
|
|
35
|
-
granularity: AnalyticsGranularity;
|
|
36
|
-
lod: Record<string, number | null>;
|
|
37
|
-
select: Record<string, AnalyticsPath[]>;
|
|
38
|
-
expression: CompoundAnalyticsExpression;
|
|
39
|
-
};
|
|
40
|
-
export type CompoundAnalyticsExpression = {
|
|
41
|
-
inputs: CompoundAnalyticsInputs;
|
|
42
|
-
operator: CompoundOperator;
|
|
43
|
-
operand: AnalyticsOperand;
|
|
44
|
-
resultCurrency?: AnalyticsPath;
|
|
45
|
-
};
|
|
46
|
-
export type CompoundAnalyticsInputs = {
|
|
47
|
-
metrics: string[];
|
|
48
|
-
currency?: AnalyticsPath;
|
|
49
|
-
};
|
|
50
|
-
export type AnalyticsOperand = {
|
|
51
|
-
metric: string;
|
|
52
|
-
currency?: AnalyticsPath;
|
|
53
|
-
useSum: boolean;
|
|
54
|
-
};
|
|
55
|
-
export type MultiCurrencyConversion = {
|
|
56
|
-
targetCurrency?: AnalyticsPath;
|
|
57
|
-
conversions: ConversionMetric[];
|
|
58
|
-
};
|
|
59
|
-
export type ConversionMetric = {
|
|
60
|
-
metric: string;
|
|
61
|
-
currency?: AnalyticsPath;
|
|
62
|
-
};
|
|
63
|
-
export type AnalyticsSeriesInput = {
|
|
64
|
-
start: DateTime;
|
|
65
|
-
end?: DateTime | null;
|
|
66
|
-
source: AnalyticsPath;
|
|
67
|
-
metric: string;
|
|
68
|
-
value: number;
|
|
69
|
-
unit?: string | null;
|
|
70
|
-
fn?: string | null;
|
|
71
|
-
params?: Record<string, any> | null;
|
|
72
|
-
dimensions: Record<string, AnalyticsPath>;
|
|
73
|
-
dimensionMetadata?: Record<string, string>;
|
|
74
|
-
};
|
|
75
|
-
export type AnalyticsUpdateCallback = (source: AnalyticsPath) => void;
|
|
76
|
-
export interface IAnalyticsStore {
|
|
77
|
-
clearSeriesBySource: (source: AnalyticsPath, cleanUpDimensions?: boolean) => Promise<number>;
|
|
78
|
-
clearEmptyAnalyticsDimensions: () => Promise<number>;
|
|
79
|
-
getMatchingSeries: (query: AnalyticsSeriesQuery) => Promise<AnalyticsSeries[]>;
|
|
80
|
-
addSeriesValue: (input: AnalyticsSeriesInput) => Promise<void>;
|
|
81
|
-
addSeriesValues: (inputs: AnalyticsSeriesInput[]) => Promise<void>;
|
|
82
|
-
getDimensions: () => Promise<any>;
|
|
83
|
-
subscribeToSource: (source: AnalyticsPath, callback: AnalyticsUpdateCallback) => () => void;
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../analytics/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,QAAQ,GAAG,IAAI,CA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