@infinitetoken/lumber-kit 0.4.0 → 0.4.1
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/cjs/constants/index.d.ts +2 -42
- package/dist/cjs/constants/index.d.ts.map +1 -1
- package/dist/cjs/constants/index.js +16 -53
- package/dist/cjs/constants/logLevel.d.ts +17 -0
- package/dist/cjs/constants/logLevel.d.ts.map +1 -0
- package/dist/cjs/constants/logLevel.js +31 -0
- package/dist/cjs/constants/subscription.d.ts +27 -0
- package/dist/cjs/constants/subscription.d.ts.map +1 -0
- package/dist/cjs/constants/subscription.js +28 -0
- package/dist/cjs/types/app.d.ts +61 -0
- package/dist/cjs/types/app.d.ts.map +1 -0
- package/dist/cjs/types/app.js +2 -0
- package/dist/cjs/types/deviceLink.d.ts +19 -0
- package/dist/cjs/types/deviceLink.d.ts.map +1 -0
- package/dist/cjs/types/deviceLink.js +2 -0
- package/dist/cjs/types/index.d.ts +8 -247
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +22 -0
- package/dist/cjs/types/log.d.ts +57 -0
- package/dist/cjs/types/log.d.ts.map +1 -0
- package/dist/cjs/types/log.js +2 -0
- package/dist/cjs/types/note.d.ts +38 -0
- package/dist/cjs/types/note.d.ts.map +1 -0
- package/dist/cjs/types/note.js +2 -0
- package/dist/cjs/types/response.d.ts +14 -0
- package/dist/cjs/types/response.d.ts.map +1 -0
- package/dist/cjs/types/response.js +2 -0
- package/dist/cjs/types/team.d.ts +34 -0
- package/dist/cjs/types/team.d.ts.map +1 -0
- package/dist/cjs/types/team.js +2 -0
- package/dist/cjs/types/timeseries.d.ts +30 -0
- package/dist/cjs/types/timeseries.d.ts.map +1 -0
- package/dist/cjs/types/timeseries.js +2 -0
- package/dist/cjs/types/user.d.ts +33 -0
- package/dist/cjs/types/user.d.ts.map +1 -0
- package/dist/cjs/types/user.js +2 -0
- package/dist/esm/constants/index.d.ts +2 -42
- package/dist/esm/constants/index.d.ts.map +1 -1
- package/dist/esm/constants/index.js +2 -52
- package/dist/esm/constants/logLevel.d.ts +17 -0
- package/dist/esm/constants/logLevel.d.ts.map +1 -0
- package/dist/esm/constants/logLevel.js +28 -0
- package/dist/esm/constants/subscription.d.ts +27 -0
- package/dist/esm/constants/subscription.d.ts.map +1 -0
- package/dist/esm/constants/subscription.js +25 -0
- package/dist/esm/types/app.d.ts +61 -0
- package/dist/esm/types/app.d.ts.map +1 -0
- package/dist/esm/types/app.js +1 -0
- package/dist/esm/types/deviceLink.d.ts +19 -0
- package/dist/esm/types/deviceLink.d.ts.map +1 -0
- package/dist/esm/types/deviceLink.js +1 -0
- package/dist/esm/types/index.d.ts +8 -247
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/index.js +8 -1
- package/dist/esm/types/log.d.ts +57 -0
- package/dist/esm/types/log.d.ts.map +1 -0
- package/dist/esm/types/log.js +1 -0
- package/dist/esm/types/note.d.ts +38 -0
- package/dist/esm/types/note.d.ts.map +1 -0
- package/dist/esm/types/note.js +1 -0
- package/dist/esm/types/response.d.ts +14 -0
- package/dist/esm/types/response.d.ts.map +1 -0
- package/dist/esm/types/response.js +1 -0
- package/dist/esm/types/team.d.ts +34 -0
- package/dist/esm/types/team.d.ts.map +1 -0
- package/dist/esm/types/team.js +1 -0
- package/dist/esm/types/timeseries.d.ts +30 -0
- package/dist/esm/types/timeseries.d.ts.map +1 -0
- package/dist/esm/types/timeseries.js +1 -0
- package/dist/esm/types/user.d.ts +33 -0
- package/dist/esm/types/user.d.ts.map +1 -0
- package/dist/esm/types/user.js +1 -0
- package/package.json +1 -1
|
@@ -1,43 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
Debug = 0,
|
|
4
|
-
Info = 1,
|
|
5
|
-
Warn = 2,
|
|
6
|
-
Error = 3,
|
|
7
|
-
Fatal = 4
|
|
8
|
-
}
|
|
9
|
-
/** String name for each log level. */
|
|
10
|
-
export type LogLevelName = 'debug' | 'info' | 'warn' | 'error' | 'fatal';
|
|
11
|
-
/** Maps numeric log level to its lowercase string name. */
|
|
12
|
-
export declare const logLevelToName: Record<number, LogLevelName>;
|
|
13
|
-
/** Maps lowercase log level name to its numeric value. */
|
|
14
|
-
export declare const logLevelNameToLevel: Record<LogLevelName, LogLevel>;
|
|
15
|
-
/** All valid log levels, ordered from least to most severe. */
|
|
16
|
-
export declare const logLevels: readonly LogLevel[];
|
|
17
|
-
/** User subscription level. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
18
|
-
export declare const enum SubscriptionLevel {
|
|
19
|
-
Hobby = 0,
|
|
20
|
-
Dev = 1,
|
|
21
|
-
Pro = 2,
|
|
22
|
-
Enterprise = 3
|
|
23
|
-
}
|
|
24
|
-
/** String name for each subscription level, suitable for display and Redux state. */
|
|
25
|
-
export type SubscriptionLevelName = 'hobby' | 'dev' | 'pro' | 'enterprise';
|
|
26
|
-
/** Maps numeric subscription level to its string level name. */
|
|
27
|
-
export declare const subscriptionLevelToName: Record<SubscriptionLevel, SubscriptionLevelName>;
|
|
28
|
-
/** All valid subscription levels, ordered from least to most severe. */
|
|
29
|
-
export declare const subscriptionLevels: readonly SubscriptionLevel[];
|
|
30
|
-
export type SubscriptionLimits = {
|
|
31
|
-
apps: number;
|
|
32
|
-
seats: number;
|
|
33
|
-
apiKeys: number;
|
|
34
|
-
logRetentionDays: number;
|
|
35
|
-
monthlyLogs: number;
|
|
36
|
-
/** Whether real-time WebSocket log streaming is available. */
|
|
37
|
-
realtimeLogs: boolean;
|
|
38
|
-
/** Minimum log level that triggers a push notification. Infinity means push is disabled. */
|
|
39
|
-
minPushLevel: number;
|
|
40
|
-
};
|
|
41
|
-
/** Per-level resource limits. Use Infinity to mean unlimited or disabled. */
|
|
42
|
-
export declare const subscriptionLimits: Record<SubscriptionLevel, SubscriptionLimits>;
|
|
1
|
+
export * from './logLevel';
|
|
2
|
+
export * from './subscription';
|
|
43
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,55 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.logLevelToName = {
|
|
16
|
-
[0 /* LogLevel.Debug */]: 'debug',
|
|
17
|
-
[1 /* LogLevel.Info */]: 'info',
|
|
18
|
-
[2 /* LogLevel.Warn */]: 'warn',
|
|
19
|
-
[3 /* LogLevel.Error */]: 'error',
|
|
20
|
-
[4 /* LogLevel.Fatal */]: 'fatal'
|
|
21
|
-
};
|
|
22
|
-
/** Maps lowercase log level name to its numeric value. */
|
|
23
|
-
exports.logLevelNameToLevel = {
|
|
24
|
-
debug: 0 /* LogLevel.Debug */,
|
|
25
|
-
info: 1 /* LogLevel.Info */,
|
|
26
|
-
warn: 2 /* LogLevel.Warn */,
|
|
27
|
-
error: 3 /* LogLevel.Error */,
|
|
28
|
-
fatal: 4 /* LogLevel.Fatal */
|
|
29
|
-
};
|
|
30
|
-
/** All valid log levels, ordered from least to most severe. */
|
|
31
|
-
exports.logLevels = [0 /* LogLevel.Debug */, 1 /* LogLevel.Info */, 2 /* LogLevel.Warn */, 3 /* LogLevel.Error */, 4 /* LogLevel.Fatal */];
|
|
32
|
-
/** User subscription level. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
33
|
-
var SubscriptionLevel;
|
|
34
|
-
(function (SubscriptionLevel) {
|
|
35
|
-
SubscriptionLevel[SubscriptionLevel["Hobby"] = 0] = "Hobby";
|
|
36
|
-
SubscriptionLevel[SubscriptionLevel["Dev"] = 1] = "Dev";
|
|
37
|
-
SubscriptionLevel[SubscriptionLevel["Pro"] = 2] = "Pro";
|
|
38
|
-
SubscriptionLevel[SubscriptionLevel["Enterprise"] = 3] = "Enterprise";
|
|
39
|
-
})(SubscriptionLevel || (exports.SubscriptionLevel = SubscriptionLevel = {}));
|
|
40
|
-
/** Maps numeric subscription level to its string level name. */
|
|
41
|
-
exports.subscriptionLevelToName = {
|
|
42
|
-
[0 /* SubscriptionLevel.Hobby */]: 'hobby',
|
|
43
|
-
[1 /* SubscriptionLevel.Dev */]: 'dev',
|
|
44
|
-
[2 /* SubscriptionLevel.Pro */]: 'pro',
|
|
45
|
-
[3 /* SubscriptionLevel.Enterprise */]: 'enterprise'
|
|
46
|
-
};
|
|
47
|
-
/** All valid subscription levels, ordered from least to most severe. */
|
|
48
|
-
exports.subscriptionLevels = [0 /* SubscriptionLevel.Hobby */, 1 /* SubscriptionLevel.Dev */, 2 /* SubscriptionLevel.Pro */, 3 /* SubscriptionLevel.Enterprise */];
|
|
49
|
-
/** Per-level resource limits. Use Infinity to mean unlimited or disabled. */
|
|
50
|
-
exports.subscriptionLimits = {
|
|
51
|
-
[0 /* SubscriptionLevel.Hobby */]: { apps: 5, seats: 1, apiKeys: 1, logRetentionDays: 7, monthlyLogs: 10000, realtimeLogs: false, minPushLevel: Infinity },
|
|
52
|
-
[1 /* SubscriptionLevel.Dev */]: { apps: 10, seats: 5, apiKeys: 5, logRetentionDays: 30, monthlyLogs: 250000, realtimeLogs: true, minPushLevel: 3 /* LogLevel.Error */ },
|
|
53
|
-
[2 /* SubscriptionLevel.Pro */]: { apps: 20, seats: 20, apiKeys: 15, logRetentionDays: 90, monthlyLogs: 2000000, realtimeLogs: true, minPushLevel: 2 /* LogLevel.Warn */ },
|
|
54
|
-
[3 /* SubscriptionLevel.Enterprise */]: { apps: Infinity, seats: Infinity, apiKeys: Infinity, logRetentionDays: Infinity, monthlyLogs: Infinity, realtimeLogs: true, minPushLevel: 0 /* LogLevel.Debug */ }
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
55
15
|
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./logLevel"), exports);
|
|
18
|
+
__exportStar(require("./subscription"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Log severity level. Numeric values match the existing Lumber-API level field. */
|
|
2
|
+
export declare const enum LogLevel {
|
|
3
|
+
Debug = 0,
|
|
4
|
+
Info = 1,
|
|
5
|
+
Warn = 2,
|
|
6
|
+
Error = 3,
|
|
7
|
+
Fatal = 4
|
|
8
|
+
}
|
|
9
|
+
/** String name for each log level. */
|
|
10
|
+
export type LogLevelName = 'debug' | 'info' | 'warn' | 'error' | 'fatal';
|
|
11
|
+
/** Maps numeric log level to its lowercase string name. */
|
|
12
|
+
export declare const logLevelToName: Record<number, LogLevelName>;
|
|
13
|
+
/** Maps lowercase log level name to its numeric value. */
|
|
14
|
+
export declare const logLevelNameToLevel: Record<LogLevelName, LogLevel>;
|
|
15
|
+
/** All valid log levels, ordered from least to most severe. */
|
|
16
|
+
export declare const logLevels: readonly LogLevel[];
|
|
17
|
+
//# sourceMappingURL=logLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logLevel.d.ts","sourceRoot":"","sources":["../../../src/constants/logLevel.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,0BAAkB,QAAQ;IACxB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;AAExE,2DAA2D;AAC3D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAMvD,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAM9D,CAAA;AAED,+DAA+D;AAC/D,eAAO,MAAM,SAAS,EAAE,SAAS,QAAQ,EAAmF,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Source: D-01 (locked decision — do not change numeric values without a semver major bump)
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.logLevels = exports.logLevelNameToLevel = exports.logLevelToName = exports.LogLevel = void 0;
|
|
5
|
+
/** Log severity level. Numeric values match the existing Lumber-API level field. */
|
|
6
|
+
var LogLevel;
|
|
7
|
+
(function (LogLevel) {
|
|
8
|
+
LogLevel[LogLevel["Debug"] = 0] = "Debug";
|
|
9
|
+
LogLevel[LogLevel["Info"] = 1] = "Info";
|
|
10
|
+
LogLevel[LogLevel["Warn"] = 2] = "Warn";
|
|
11
|
+
LogLevel[LogLevel["Error"] = 3] = "Error";
|
|
12
|
+
LogLevel[LogLevel["Fatal"] = 4] = "Fatal";
|
|
13
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
14
|
+
/** Maps numeric log level to its lowercase string name. */
|
|
15
|
+
exports.logLevelToName = {
|
|
16
|
+
[0 /* LogLevel.Debug */]: 'debug',
|
|
17
|
+
[1 /* LogLevel.Info */]: 'info',
|
|
18
|
+
[2 /* LogLevel.Warn */]: 'warn',
|
|
19
|
+
[3 /* LogLevel.Error */]: 'error',
|
|
20
|
+
[4 /* LogLevel.Fatal */]: 'fatal'
|
|
21
|
+
};
|
|
22
|
+
/** Maps lowercase log level name to its numeric value. */
|
|
23
|
+
exports.logLevelNameToLevel = {
|
|
24
|
+
debug: 0 /* LogLevel.Debug */,
|
|
25
|
+
info: 1 /* LogLevel.Info */,
|
|
26
|
+
warn: 2 /* LogLevel.Warn */,
|
|
27
|
+
error: 3 /* LogLevel.Error */,
|
|
28
|
+
fatal: 4 /* LogLevel.Fatal */
|
|
29
|
+
};
|
|
30
|
+
/** All valid log levels, ordered from least to most severe. */
|
|
31
|
+
exports.logLevels = [0 /* LogLevel.Debug */, 1 /* LogLevel.Info */, 2 /* LogLevel.Warn */, 3 /* LogLevel.Error */, 4 /* LogLevel.Fatal */];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** User subscription level. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
2
|
+
export declare const enum SubscriptionLevel {
|
|
3
|
+
Hobby = 0,
|
|
4
|
+
Dev = 1,
|
|
5
|
+
Pro = 2,
|
|
6
|
+
Enterprise = 3
|
|
7
|
+
}
|
|
8
|
+
/** String name for each subscription level, suitable for display and Redux state. */
|
|
9
|
+
export type SubscriptionLevelName = 'hobby' | 'dev' | 'pro' | 'enterprise';
|
|
10
|
+
/** Maps numeric subscription level to its string level name. */
|
|
11
|
+
export declare const subscriptionLevelToName: Record<SubscriptionLevel, SubscriptionLevelName>;
|
|
12
|
+
/** All valid subscription levels, ordered from least to most severe. */
|
|
13
|
+
export declare const subscriptionLevels: readonly SubscriptionLevel[];
|
|
14
|
+
export type SubscriptionLimits = {
|
|
15
|
+
apps: number;
|
|
16
|
+
seats: number;
|
|
17
|
+
apiKeys: number;
|
|
18
|
+
logRetentionDays: number;
|
|
19
|
+
monthlyLogs: number;
|
|
20
|
+
/** Whether real-time WebSocket log streaming is available. */
|
|
21
|
+
realtimeLogs: boolean;
|
|
22
|
+
/** Minimum log level that triggers a push notification. Infinity means push is disabled. */
|
|
23
|
+
minPushLevel: number;
|
|
24
|
+
};
|
|
25
|
+
/** Per-level resource limits. Use Infinity to mean unlimited or disabled. */
|
|
26
|
+
export declare const subscriptionLimits: Record<SubscriptionLevel, SubscriptionLimits>;
|
|
27
|
+
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../src/constants/subscription.ts"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,0BAAkB,iBAAiB;IACjC,KAAK,IAAI;IACT,GAAG,IAAI;IACP,GAAG,IAAI;IACP,UAAU,IAAI;CACf;AAED,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,YAAY,CAAA;AAE1E,gEAAgE;AAChE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,iBAAiB,EAAE,qBAAqB,CAKpF,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,EAAE,SAAS,iBAAiB,EAA0G,CAAA;AAErK,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,8DAA8D;IAC9D,YAAY,EAAE,OAAO,CAAA;IACrB,4FAA4F;IAC5F,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAK5E,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Source: D-02 (locked decision — do not change numeric values without a semver major bump)
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.subscriptionLimits = exports.subscriptionLevels = exports.subscriptionLevelToName = exports.SubscriptionLevel = void 0;
|
|
5
|
+
/** User subscription level. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
6
|
+
var SubscriptionLevel;
|
|
7
|
+
(function (SubscriptionLevel) {
|
|
8
|
+
SubscriptionLevel[SubscriptionLevel["Hobby"] = 0] = "Hobby";
|
|
9
|
+
SubscriptionLevel[SubscriptionLevel["Dev"] = 1] = "Dev";
|
|
10
|
+
SubscriptionLevel[SubscriptionLevel["Pro"] = 2] = "Pro";
|
|
11
|
+
SubscriptionLevel[SubscriptionLevel["Enterprise"] = 3] = "Enterprise";
|
|
12
|
+
})(SubscriptionLevel || (exports.SubscriptionLevel = SubscriptionLevel = {}));
|
|
13
|
+
/** Maps numeric subscription level to its string level name. */
|
|
14
|
+
exports.subscriptionLevelToName = {
|
|
15
|
+
[0 /* SubscriptionLevel.Hobby */]: 'hobby',
|
|
16
|
+
[1 /* SubscriptionLevel.Dev */]: 'dev',
|
|
17
|
+
[2 /* SubscriptionLevel.Pro */]: 'pro',
|
|
18
|
+
[3 /* SubscriptionLevel.Enterprise */]: 'enterprise'
|
|
19
|
+
};
|
|
20
|
+
/** All valid subscription levels, ordered from least to most severe. */
|
|
21
|
+
exports.subscriptionLevels = [0 /* SubscriptionLevel.Hobby */, 1 /* SubscriptionLevel.Dev */, 2 /* SubscriptionLevel.Pro */, 3 /* SubscriptionLevel.Enterprise */];
|
|
22
|
+
/** Per-level resource limits. Use Infinity to mean unlimited or disabled. */
|
|
23
|
+
exports.subscriptionLimits = {
|
|
24
|
+
[0 /* SubscriptionLevel.Hobby */]: { apps: 5, seats: 1, apiKeys: 1, logRetentionDays: 7, monthlyLogs: 10000, realtimeLogs: false, minPushLevel: Infinity },
|
|
25
|
+
[1 /* SubscriptionLevel.Dev */]: { apps: 10, seats: 5, apiKeys: 5, logRetentionDays: 30, monthlyLogs: 250000, realtimeLogs: true, minPushLevel: 3 /* LogLevel.Error */ },
|
|
26
|
+
[2 /* SubscriptionLevel.Pro */]: { apps: 20, seats: 20, apiKeys: 15, logRetentionDays: 90, monthlyLogs: 2000000, realtimeLogs: true, minPushLevel: 2 /* LogLevel.Warn */ },
|
|
27
|
+
[3 /* SubscriptionLevel.Enterprise */]: { apps: Infinity, seats: Infinity, apiKeys: Infinity, logRetentionDays: Infinity, monthlyLogs: Infinity, realtimeLogs: true, minPushLevel: 0 /* LogLevel.Debug */ }
|
|
28
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapped application encryption key for a specific user.
|
|
3
|
+
*/
|
|
4
|
+
export interface AppEncryptedKey {
|
|
5
|
+
userId: string;
|
|
6
|
+
encryptedKey: string;
|
|
7
|
+
keyVersion: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* API response shape for a listed or fetched app.
|
|
11
|
+
* encryptedKey is the requesting user's wrapped copy of the app key, or null if none exists.
|
|
12
|
+
*/
|
|
13
|
+
export interface AppRecord {
|
|
14
|
+
id: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
name: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
imageUrl?: string;
|
|
20
|
+
teamId?: string;
|
|
21
|
+
encryptedKey: string | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* App creation response.
|
|
25
|
+
* Initial wrapped encryption key may optionally be returned.
|
|
26
|
+
*/
|
|
27
|
+
export interface AppCreatedRecord extends AppRecord {
|
|
28
|
+
apiKey?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Machine authentication credential.
|
|
32
|
+
*/
|
|
33
|
+
export interface ApiKeyRecord {
|
|
34
|
+
id: string;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
appId: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* External guest granted access to a specific app without being a team member.
|
|
42
|
+
*/
|
|
43
|
+
export interface GuestRecord {
|
|
44
|
+
id: string;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
appId: string;
|
|
48
|
+
userId: string;
|
|
49
|
+
role: 'owner' | 'admin' | 'read' | 'write';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Filter params for GET /apps.
|
|
53
|
+
*/
|
|
54
|
+
export interface AppsQuery {
|
|
55
|
+
limit?: number;
|
|
56
|
+
cursor?: string;
|
|
57
|
+
sort?: string;
|
|
58
|
+
from?: string;
|
|
59
|
+
to?: string;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/types/app.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IAEb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IAEd,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type DeviceLinkStatus = 'pending' | 'approved' | 'denied';
|
|
2
|
+
/**
|
|
3
|
+
* Response from POST /device-links.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeviceLinkCreatedRecord {
|
|
6
|
+
id: string;
|
|
7
|
+
expiresAt: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Response from GET /device-links/:id.
|
|
11
|
+
* encryptedKey is present only when status is 'approved'.
|
|
12
|
+
*/
|
|
13
|
+
export interface DeviceLinkRecord {
|
|
14
|
+
id: string;
|
|
15
|
+
status: DeviceLinkStatus;
|
|
16
|
+
encryptedKey?: string;
|
|
17
|
+
expiresAt: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=deviceLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceLink.d.ts","sourceRoot":"","sources":["../../../src/types/deviceLink.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEhE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,gBAAgB,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -1,248 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
code?: string;
|
|
10
|
-
method?: string;
|
|
11
|
-
line?: number;
|
|
12
|
-
column?: number;
|
|
13
|
-
note?: string;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Encrypted private container.
|
|
18
|
-
* payload = base64(authTag + ciphertext)
|
|
19
|
-
* nonce = base64(random IV)
|
|
20
|
-
* keyVersion enables future rotation support.
|
|
21
|
-
*/
|
|
22
|
-
export interface LogPrivate {
|
|
23
|
-
payload: string;
|
|
24
|
-
nonce: string;
|
|
25
|
-
keyVersion: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Encrypted note content.
|
|
29
|
-
* payload = base64(authTag + ciphertext)
|
|
30
|
-
* nonce = base64(random IV)
|
|
31
|
-
* keyVersion enables future key rotation.
|
|
32
|
-
*/
|
|
33
|
-
export interface NotePrivate {
|
|
34
|
-
payload: string;
|
|
35
|
-
nonce: string;
|
|
36
|
-
keyVersion: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* API response shape for a stored log.
|
|
40
|
-
*/
|
|
41
|
-
export interface LogRecord {
|
|
42
|
-
id: string;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
updatedAt: string;
|
|
45
|
-
appId: string;
|
|
46
|
-
requestId?: string;
|
|
47
|
-
traceId?: string;
|
|
48
|
-
level: LogLevel;
|
|
49
|
-
message: string;
|
|
50
|
-
flagged: boolean;
|
|
51
|
-
context?: LogContext;
|
|
52
|
-
metadata?: Record<string, unknown>;
|
|
53
|
-
private?: LogPrivate;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Wrapped application encryption key for a specific user.
|
|
57
|
-
*/
|
|
58
|
-
export interface AppEncryptedKey {
|
|
59
|
-
userId: string;
|
|
60
|
-
encryptedKey: string;
|
|
61
|
-
keyVersion: number;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* API response shape for a listed or fetched app.
|
|
65
|
-
* encryptedKey is the requesting user's wrapped copy of the app key, or null if none exists.
|
|
66
|
-
*/
|
|
67
|
-
export interface AppRecord {
|
|
68
|
-
id: string;
|
|
69
|
-
createdAt: string;
|
|
70
|
-
updatedAt: string;
|
|
71
|
-
name: string;
|
|
72
|
-
color?: string;
|
|
73
|
-
imageUrl?: string;
|
|
74
|
-
teamId?: string;
|
|
75
|
-
encryptedKey: string | null;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* App creation response.
|
|
79
|
-
* Initial wrapped encryption key may optionally be returned.
|
|
80
|
-
*/
|
|
81
|
-
export interface AppCreatedRecord extends AppRecord {
|
|
82
|
-
apiKey?: string;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* An organization that owns apps and pays for member usage.
|
|
86
|
-
* Team subscriptionLevel takes precedence over individual member levels.
|
|
87
|
-
*/
|
|
88
|
-
export interface TeamRecord {
|
|
89
|
-
id: string;
|
|
90
|
-
createdAt: string;
|
|
91
|
-
updatedAt: string;
|
|
92
|
-
name: string;
|
|
93
|
-
color?: string;
|
|
94
|
-
imageUrl?: string;
|
|
95
|
-
subscriptionLevel: SubscriptionLevel;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Membership of a user in a team.
|
|
99
|
-
*/
|
|
100
|
-
export interface TeamMemberRecord {
|
|
101
|
-
id: string;
|
|
102
|
-
createdAt: string;
|
|
103
|
-
updatedAt: string;
|
|
104
|
-
teamId: string;
|
|
105
|
-
userId: string;
|
|
106
|
-
role: 'owner' | 'admin' | 'member';
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Machine authentication credential.
|
|
110
|
-
*/
|
|
111
|
-
export interface ApiKeyRecord {
|
|
112
|
-
id: string;
|
|
113
|
-
createdAt: string;
|
|
114
|
-
updatedAt: string;
|
|
115
|
-
appId: string;
|
|
116
|
-
name?: string;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* External guest granted access to a specific app without being a team member.
|
|
120
|
-
*/
|
|
121
|
-
export interface GuestRecord {
|
|
122
|
-
id: string;
|
|
123
|
-
createdAt: string;
|
|
124
|
-
updatedAt: string;
|
|
125
|
-
appId: string;
|
|
126
|
-
userId: string;
|
|
127
|
-
role: 'owner' | 'admin' | 'read' | 'write';
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* A short user-authored note, encrypted with the app key.
|
|
131
|
-
* Visible to all members of the associated app.
|
|
132
|
-
* Query by teamId in NotesQuery to build a cross-app team feed.
|
|
133
|
-
*/
|
|
134
|
-
export interface NoteRecord {
|
|
135
|
-
id: string;
|
|
136
|
-
createdAt: string;
|
|
137
|
-
updatedAt: string;
|
|
138
|
-
appId: string;
|
|
139
|
-
userId: string;
|
|
140
|
-
private: NotePrivate;
|
|
141
|
-
}
|
|
142
|
-
export interface PushToken {
|
|
143
|
-
token: string;
|
|
144
|
-
deviceId?: string;
|
|
145
|
-
platform?: 'ios' | 'android' | 'web';
|
|
146
|
-
}
|
|
147
|
-
export interface NotificationPreference {
|
|
148
|
-
enabled?: boolean;
|
|
149
|
-
minimumLevel?: number;
|
|
150
|
-
}
|
|
151
|
-
export interface NotificationPreferences {
|
|
152
|
-
enabled?: boolean;
|
|
153
|
-
minimumLevel?: number;
|
|
154
|
-
perApp?: Record<string, NotificationPreference>;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Public user profile returned from API.
|
|
158
|
-
*/
|
|
159
|
-
export interface UserRecord {
|
|
160
|
-
id: string;
|
|
161
|
-
createdAt: string;
|
|
162
|
-
updatedAt: string;
|
|
163
|
-
email: string;
|
|
164
|
-
publicKey?: string;
|
|
165
|
-
appearance?: Appearance;
|
|
166
|
-
color?: string;
|
|
167
|
-
imageUrl?: string;
|
|
168
|
-
agreedToTermsVersion?: string;
|
|
169
|
-
notificationPreferences: NotificationPreferences;
|
|
170
|
-
pushTokens: PushToken[];
|
|
171
|
-
}
|
|
172
|
-
export interface ResponseMetadata {
|
|
173
|
-
requestId: string;
|
|
174
|
-
durationMs: number;
|
|
175
|
-
warnings?: string[];
|
|
176
|
-
cursor?: string | null;
|
|
177
|
-
hasMore?: boolean;
|
|
178
|
-
count?: number;
|
|
179
|
-
hiddenCount?: number;
|
|
180
|
-
}
|
|
181
|
-
export interface ApiResponse<T> {
|
|
182
|
-
data: T;
|
|
183
|
-
metadata: ResponseMetadata;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Filter params for GET /logs.
|
|
187
|
-
*/
|
|
188
|
-
export interface LogsQuery {
|
|
189
|
-
appIds?: string[];
|
|
190
|
-
levels?: LogLevel[];
|
|
191
|
-
text?: string;
|
|
192
|
-
flagged?: boolean;
|
|
193
|
-
from?: string;
|
|
194
|
-
to?: string;
|
|
195
|
-
sort?: string;
|
|
196
|
-
limit?: number;
|
|
197
|
-
cursor?: string;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Filter params for GET /apps.
|
|
201
|
-
*/
|
|
202
|
-
export interface AppsQuery {
|
|
203
|
-
limit?: number;
|
|
204
|
-
cursor?: string;
|
|
205
|
-
sort?: string;
|
|
206
|
-
from?: string;
|
|
207
|
-
to?: string;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Filter params for GET /teams.
|
|
211
|
-
*/
|
|
212
|
-
export interface TeamsQuery {
|
|
213
|
-
limit?: number;
|
|
214
|
-
cursor?: string;
|
|
215
|
-
sort?: string;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Filter params for GET /notes.
|
|
219
|
-
*/
|
|
220
|
-
export interface NotesQuery {
|
|
221
|
-
appId?: string;
|
|
222
|
-
teamId?: string;
|
|
223
|
-
userId?: string;
|
|
224
|
-
from?: string;
|
|
225
|
-
to?: string;
|
|
226
|
-
sort?: string;
|
|
227
|
-
limit?: number;
|
|
228
|
-
cursor?: string;
|
|
229
|
-
}
|
|
230
|
-
export type DeviceLinkStatus = 'pending' | 'approved' | 'denied';
|
|
231
|
-
/**
|
|
232
|
-
* Response from POST /device-links.
|
|
233
|
-
*/
|
|
234
|
-
export interface DeviceLinkCreatedRecord {
|
|
235
|
-
id: string;
|
|
236
|
-
expiresAt: string;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Response from GET /device-links/:id.
|
|
240
|
-
* encryptedKey is present only when status is 'approved'.
|
|
241
|
-
*/
|
|
242
|
-
export interface DeviceLinkRecord {
|
|
243
|
-
id: string;
|
|
244
|
-
status: DeviceLinkStatus;
|
|
245
|
-
encryptedKey?: string;
|
|
246
|
-
expiresAt: string;
|
|
247
|
-
}
|
|
1
|
+
export * from './app';
|
|
2
|
+
export * from './deviceLink';
|
|
3
|
+
export * from './log';
|
|
4
|
+
export * from './note';
|
|
5
|
+
export * from './response';
|
|
6
|
+
export * from './team';
|
|
7
|
+
export * from './timeseries';
|
|
8
|
+
export * from './user';
|
|
248
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,cAAc,CAAA;AAC5B,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA"}
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./app"), exports);
|
|
18
|
+
__exportStar(require("./deviceLink"), exports);
|
|
19
|
+
__exportStar(require("./log"), exports);
|
|
20
|
+
__exportStar(require("./note"), exports);
|
|
21
|
+
__exportStar(require("./response"), exports);
|
|
22
|
+
__exportStar(require("./team"), exports);
|
|
23
|
+
__exportStar(require("./timeseries"), exports);
|
|
24
|
+
__exportStar(require("./user"), exports);
|