@infinitetoken/lumber-kit 0.4.19 → 0.4.21
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 +65 -15
- package/dist/index.d.mts +359 -0
- package/dist/index.d.ts +359 -0
- package/dist/index.js +124 -0
- package/dist/index.mjs +83 -0
- package/package.json +22 -25
- package/dist/cjs/constants/index.d.ts +0 -3
- package/dist/cjs/constants/index.d.ts.map +0 -1
- package/dist/cjs/constants/index.js +0 -18
- package/dist/cjs/constants/logLevel.d.ts +0 -17
- package/dist/cjs/constants/logLevel.d.ts.map +0 -1
- package/dist/cjs/constants/logLevel.js +0 -31
- package/dist/cjs/constants/subscription.d.ts +0 -27
- package/dist/cjs/constants/subscription.d.ts.map +0 -1
- package/dist/cjs/constants/subscription.js +0 -28
- package/dist/cjs/index.d.ts +0 -4
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -19
- package/dist/cjs/types/app.d.ts +0 -62
- package/dist/cjs/types/app.d.ts.map +0 -1
- package/dist/cjs/types/app.js +0 -2
- package/dist/cjs/types/deviceLink.d.ts +0 -19
- package/dist/cjs/types/deviceLink.d.ts.map +0 -1
- package/dist/cjs/types/deviceLink.js +0 -2
- package/dist/cjs/types/index.d.ts +0 -9
- package/dist/cjs/types/index.d.ts.map +0 -1
- package/dist/cjs/types/index.js +0 -24
- package/dist/cjs/types/log.d.ts +0 -59
- package/dist/cjs/types/log.d.ts.map +0 -1
- package/dist/cjs/types/log.js +0 -2
- package/dist/cjs/types/note.d.ts +0 -40
- package/dist/cjs/types/note.d.ts.map +0 -1
- package/dist/cjs/types/note.js +0 -2
- package/dist/cjs/types/response.d.ts +0 -14
- package/dist/cjs/types/response.d.ts.map +0 -1
- package/dist/cjs/types/response.js +0 -2
- package/dist/cjs/types/team.d.ts +0 -34
- package/dist/cjs/types/team.d.ts.map +0 -1
- package/dist/cjs/types/team.js +0 -2
- package/dist/cjs/types/timeseries.d.ts +0 -30
- package/dist/cjs/types/timeseries.d.ts.map +0 -1
- package/dist/cjs/types/timeseries.js +0 -2
- package/dist/cjs/types/user.d.ts +0 -34
- package/dist/cjs/types/user.d.ts.map +0 -1
- package/dist/cjs/types/user.js +0 -2
- package/dist/cjs/utils/index.d.ts +0 -12
- package/dist/cjs/utils/index.d.ts.map +0 -1
- package/dist/cjs/utils/index.js +0 -33
- package/dist/esm/constants/index.d.ts +0 -3
- package/dist/esm/constants/index.d.ts.map +0 -1
- package/dist/esm/constants/index.js +0 -2
- package/dist/esm/constants/logLevel.d.ts +0 -17
- package/dist/esm/constants/logLevel.d.ts.map +0 -1
- package/dist/esm/constants/logLevel.js +0 -28
- package/dist/esm/constants/subscription.d.ts +0 -27
- package/dist/esm/constants/subscription.d.ts.map +0 -1
- package/dist/esm/constants/subscription.js +0 -25
- package/dist/esm/index.d.ts +0 -4
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/package.json +0 -1
- package/dist/esm/types/app.d.ts +0 -62
- package/dist/esm/types/app.d.ts.map +0 -1
- package/dist/esm/types/app.js +0 -1
- package/dist/esm/types/deviceLink.d.ts +0 -19
- package/dist/esm/types/deviceLink.d.ts.map +0 -1
- package/dist/esm/types/deviceLink.js +0 -1
- package/dist/esm/types/index.d.ts +0 -9
- package/dist/esm/types/index.d.ts.map +0 -1
- package/dist/esm/types/index.js +0 -8
- package/dist/esm/types/log.d.ts +0 -59
- package/dist/esm/types/log.d.ts.map +0 -1
- package/dist/esm/types/log.js +0 -1
- package/dist/esm/types/note.d.ts +0 -40
- package/dist/esm/types/note.d.ts.map +0 -1
- package/dist/esm/types/note.js +0 -1
- package/dist/esm/types/response.d.ts +0 -14
- package/dist/esm/types/response.d.ts.map +0 -1
- package/dist/esm/types/response.js +0 -1
- package/dist/esm/types/team.d.ts +0 -34
- package/dist/esm/types/team.d.ts.map +0 -1
- package/dist/esm/types/team.js +0 -1
- package/dist/esm/types/timeseries.d.ts +0 -30
- package/dist/esm/types/timeseries.d.ts.map +0 -1
- package/dist/esm/types/timeseries.js +0 -1
- package/dist/esm/types/user.d.ts +0 -34
- package/dist/esm/types/user.d.ts.map +0 -1
- package/dist/esm/types/user.js +0 -1
- package/dist/esm/utils/index.d.ts +0 -12
- package/dist/esm/utils/index.d.ts.map +0 -1
- package/dist/esm/utils/index.js +0 -23
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,31 +0,0 @@
|
|
|
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 */];
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/cjs/index.d.ts
DELETED
package/dist/cjs/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./constants"), exports);
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
19
|
-
__exportStar(require("./utils"), exports);
|
package/dist/cjs/types/app.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
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
|
-
teamId?: string;
|
|
56
|
-
from?: string;
|
|
57
|
-
to?: string;
|
|
58
|
-
sort?: string;
|
|
59
|
-
limit?: number;
|
|
60
|
-
cursor?: string;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/cjs/types/app.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
};
|
|
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);
|
package/dist/cjs/types/log.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { LogLevel } from '../constants';
|
|
2
|
-
/**
|
|
3
|
-
* Structured log context content.
|
|
4
|
-
*/
|
|
5
|
-
export interface LogContext {
|
|
6
|
-
requestId?: string;
|
|
7
|
-
traceId?: string;
|
|
8
|
-
code?: string;
|
|
9
|
-
method?: string;
|
|
10
|
-
line?: number;
|
|
11
|
-
column?: number;
|
|
12
|
-
note?: string;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Encrypted private container.
|
|
17
|
-
* payload = base64(authTag + ciphertext)
|
|
18
|
-
* nonce = base64(random IV)
|
|
19
|
-
* keyVersion enables future rotation support.
|
|
20
|
-
*/
|
|
21
|
-
export interface LogPrivate {
|
|
22
|
-
payload: string;
|
|
23
|
-
nonce: string;
|
|
24
|
-
keyVersion: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* API response shape for a stored log.
|
|
28
|
-
*/
|
|
29
|
-
export interface LogRecord {
|
|
30
|
-
id: string;
|
|
31
|
-
createdAt: string;
|
|
32
|
-
updatedAt: string;
|
|
33
|
-
appId: string;
|
|
34
|
-
requestId?: string;
|
|
35
|
-
traceId?: string;
|
|
36
|
-
level: LogLevel;
|
|
37
|
-
message: string;
|
|
38
|
-
flagged: boolean;
|
|
39
|
-
context?: LogContext;
|
|
40
|
-
metadata?: Record<string, unknown>;
|
|
41
|
-
private?: LogPrivate;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Filter params for GET /logs.
|
|
45
|
-
*/
|
|
46
|
-
export interface LogsQuery {
|
|
47
|
-
appIds?: string[];
|
|
48
|
-
requestId?: string;
|
|
49
|
-
traceId?: string;
|
|
50
|
-
levels?: LogLevel[];
|
|
51
|
-
text?: string;
|
|
52
|
-
flagged?: boolean;
|
|
53
|
-
from?: string;
|
|
54
|
-
to?: string;
|
|
55
|
-
sort?: string;
|
|
56
|
-
limit?: number;
|
|
57
|
-
cursor?: string;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/types/log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IAEf,OAAO,EAAE,OAAO,CAAA;IAEhB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAElC,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/cjs/types/log.js
DELETED
package/dist/cjs/types/note.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Encrypted note content.
|
|
3
|
-
* payload = base64(authTag + ciphertext)
|
|
4
|
-
* nonce = base64(random IV)
|
|
5
|
-
* keyVersion enables future key rotation.
|
|
6
|
-
*/
|
|
7
|
-
export interface NotePrivate {
|
|
8
|
-
payload: string;
|
|
9
|
-
nonce: string;
|
|
10
|
-
keyVersion: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A short user-authored note, encrypted with the app key.
|
|
14
|
-
* Visible to all members of the associated app.
|
|
15
|
-
* Query by teamId in NotesQuery to build a cross-app team feed.
|
|
16
|
-
*/
|
|
17
|
-
export interface NoteRecord {
|
|
18
|
-
id: string;
|
|
19
|
-
createdAt: string;
|
|
20
|
-
updatedAt: string;
|
|
21
|
-
appId: string;
|
|
22
|
-
userId: string;
|
|
23
|
-
logId?: string;
|
|
24
|
-
private: NotePrivate;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Filter params for GET /notes.
|
|
28
|
-
*/
|
|
29
|
-
export interface NotesQuery {
|
|
30
|
-
appId?: string;
|
|
31
|
-
teamId?: string;
|
|
32
|
-
userId?: string;
|
|
33
|
-
logId?: string;
|
|
34
|
-
from?: string;
|
|
35
|
-
to?: string;
|
|
36
|
-
sort?: string;
|
|
37
|
-
limit?: number;
|
|
38
|
-
cursor?: string;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=note.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../../src/types/note.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,OAAO,EAAE,WAAW,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/cjs/types/note.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface ResponseMetadata {
|
|
2
|
-
requestId: string;
|
|
3
|
-
durationMs: number;
|
|
4
|
-
warnings?: string[];
|
|
5
|
-
cursor?: string | null;
|
|
6
|
-
hasMore?: boolean;
|
|
7
|
-
count?: number;
|
|
8
|
-
hiddenCount?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ApiResponse<T> {
|
|
11
|
-
data: T;
|
|
12
|
-
metadata: ResponseMetadata;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/types/response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAA;IACP,QAAQ,EAAE,gBAAgB,CAAA;CAC3B"}
|
package/dist/cjs/types/team.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SubscriptionLevel } from '../constants';
|
|
2
|
-
/**
|
|
3
|
-
* An organization that owns apps and pays for member usage.
|
|
4
|
-
* Team subscriptionLevel takes precedence over individual member levels.
|
|
5
|
-
*/
|
|
6
|
-
export interface TeamRecord {
|
|
7
|
-
id: string;
|
|
8
|
-
createdAt: string;
|
|
9
|
-
updatedAt: string;
|
|
10
|
-
name: string;
|
|
11
|
-
color?: string;
|
|
12
|
-
imageUrl?: string;
|
|
13
|
-
subscriptionLevel: SubscriptionLevel;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Membership of a user in a team.
|
|
17
|
-
*/
|
|
18
|
-
export interface TeamMemberRecord {
|
|
19
|
-
id: string;
|
|
20
|
-
createdAt: string;
|
|
21
|
-
updatedAt: string;
|
|
22
|
-
teamId: string;
|
|
23
|
-
userId: string;
|
|
24
|
-
role: 'owner' | 'admin' | 'member';
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Filter params for GET /teams.
|
|
28
|
-
*/
|
|
29
|
-
export interface TeamsQuery {
|
|
30
|
-
sort?: string;
|
|
31
|
-
limit?: number;
|
|
32
|
-
cursor?: string;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=team.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../../src/types/team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,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,iBAAiB,EAAE,iBAAiB,CAAA;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IAEd,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/cjs/types/team.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A single time bucket in a timeseries response.
|
|
3
|
-
* date is an ISO date string (YYYY-MM-DD for 'day', ISO datetime for 'hour').
|
|
4
|
-
* byLevel optionally breaks down the count per LogLevel for severity-tinted rendering.
|
|
5
|
-
*/
|
|
6
|
-
export interface TimeseriesBucket {
|
|
7
|
-
date: string;
|
|
8
|
-
count: number;
|
|
9
|
-
byLevel?: Partial<Record<number, number>>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Generic timeseries aggregate response. Reusable across logs, notifications, messages, etc.
|
|
13
|
-
*/
|
|
14
|
-
export interface TimeseriesResponse {
|
|
15
|
-
buckets: TimeseriesBucket[];
|
|
16
|
-
from: string;
|
|
17
|
-
to: string;
|
|
18
|
-
interval: 'day' | 'hour';
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Filter params for GET /logs/timeseries.
|
|
22
|
-
*/
|
|
23
|
-
export interface LogTimeseriesQuery {
|
|
24
|
-
appIds?: string[];
|
|
25
|
-
levels?: number[];
|
|
26
|
-
from?: string;
|
|
27
|
-
to?: string;
|
|
28
|
-
interval?: 'day' | 'hour';
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=timeseries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeseries.d.ts","sourceRoot":"","sources":["../../../src/types/timeseries.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CAC1B"}
|
package/dist/cjs/types/user.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export type Appearance = 'system' | 'dark' | 'light';
|
|
2
|
-
export interface PushToken {
|
|
3
|
-
token: string;
|
|
4
|
-
deviceId?: string;
|
|
5
|
-
platform?: 'ios' | 'android' | 'web';
|
|
6
|
-
}
|
|
7
|
-
export interface NotificationPreference {
|
|
8
|
-
enabled?: boolean;
|
|
9
|
-
minimumLevel?: number;
|
|
10
|
-
lastReadAt?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface NotificationPreferences {
|
|
13
|
-
enabled?: boolean;
|
|
14
|
-
minimumLevel?: number;
|
|
15
|
-
perApp?: Record<string, NotificationPreference>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Public user profile returned from API.
|
|
19
|
-
*/
|
|
20
|
-
export interface UserRecord {
|
|
21
|
-
id: string;
|
|
22
|
-
createdAt: string;
|
|
23
|
-
updatedAt: string;
|
|
24
|
-
email: string;
|
|
25
|
-
name?: string;
|
|
26
|
-
publicKey?: string;
|
|
27
|
-
appearance?: Appearance;
|
|
28
|
-
color?: string;
|
|
29
|
-
imageUrl?: string;
|
|
30
|
-
agreedToTermsVersion?: string;
|
|
31
|
-
notificationPreferences: NotificationPreferences;
|
|
32
|
-
pushTokens: PushToken[];
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/user.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,KAAK,CAAA;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAA;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,UAAU,EAAE,SAAS,EAAE,CAAA;CACxB"}
|
package/dist/cjs/types/user.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LogLevel, SubscriptionLevel } from '../constants';
|
|
2
|
-
import { Appearance, DeviceLinkStatus, TeamMemberRecord } from '../types';
|
|
3
|
-
export declare const isValidAppearance: (value: unknown) => value is Appearance;
|
|
4
|
-
/** Accepts 3- and 6-digit hex color strings (#rgb, #rrggbb). */
|
|
5
|
-
export declare const isValidColor: (value: string) => boolean;
|
|
6
|
-
export declare const isValidLogLevel: (value: unknown) => value is LogLevel;
|
|
7
|
-
export declare const isValidSubscriptionLevel: (value: unknown) => value is SubscriptionLevel;
|
|
8
|
-
export declare const isValidDeviceLinkStatus: (value: unknown) => value is DeviceLinkStatus;
|
|
9
|
-
export declare const isValidTeamMemberRole: (value: unknown) => value is TeamMemberRecord["role"];
|
|
10
|
-
/** Accepts any valid absolute URL (https://..., http://..., etc.). */
|
|
11
|
-
export declare const isValidImageUrl: (value: unknown) => value is string;
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,iBAAiB,EAAsB,MAAM,cAAc,CAAA;AACzF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAIzE,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,UAA4D,CAAA;AAExH,gEAAgE;AAChE,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAA2D,CAAA;AAExG,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAA6D,CAAA;AAEvH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,iBAAyF,CAAA;AAI5J,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,gBAA0E,CAAA;AAI5I,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,gBAAgB,CAAC,MAAM,CAAgE,CAAA;AAEvJ,sEAAsE;AACtE,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAQzD,CAAA"}
|
package/dist/cjs/utils/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isValidImageUrl = exports.isValidTeamMemberRole = exports.isValidDeviceLinkStatus = exports.isValidSubscriptionLevel = exports.isValidLogLevel = exports.isValidColor = exports.isValidAppearance = void 0;
|
|
4
|
-
const constants_1 = require("../constants");
|
|
5
|
-
const appearanceValues = ['system', 'dark', 'light'];
|
|
6
|
-
const isValidAppearance = (value) => appearanceValues.includes(value);
|
|
7
|
-
exports.isValidAppearance = isValidAppearance;
|
|
8
|
-
/** Accepts 3- and 6-digit hex color strings (#rgb, #rrggbb). */
|
|
9
|
-
const isValidColor = (value) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(value);
|
|
10
|
-
exports.isValidColor = isValidColor;
|
|
11
|
-
const isValidLogLevel = (value) => constants_1.logLevels.includes(value);
|
|
12
|
-
exports.isValidLogLevel = isValidLogLevel;
|
|
13
|
-
const isValidSubscriptionLevel = (value) => constants_1.subscriptionLevels.includes(value);
|
|
14
|
-
exports.isValidSubscriptionLevel = isValidSubscriptionLevel;
|
|
15
|
-
const deviceLinkStatuses = ['pending', 'approved', 'denied'];
|
|
16
|
-
const isValidDeviceLinkStatus = (value) => deviceLinkStatuses.includes(value);
|
|
17
|
-
exports.isValidDeviceLinkStatus = isValidDeviceLinkStatus;
|
|
18
|
-
const teamMemberRoles = ['owner', 'admin', 'member'];
|
|
19
|
-
const isValidTeamMemberRole = (value) => teamMemberRoles.includes(value);
|
|
20
|
-
exports.isValidTeamMemberRole = isValidTeamMemberRole;
|
|
21
|
-
/** Accepts any valid absolute URL (https://..., http://..., etc.). */
|
|
22
|
-
const isValidImageUrl = (value) => {
|
|
23
|
-
if (typeof value !== 'string' || value.length === 0)
|
|
24
|
-
return false;
|
|
25
|
-
try {
|
|
26
|
-
new URL(value);
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.isValidImageUrl = isValidImageUrl;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|