@aneuhold/core-ts-db-lib 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/documents/common/ApiKey.d.ts +2 -4
- package/lib/documents/common/ApiKey.d.ts.map +1 -1
- package/lib/documents/dashboard/UserConfig.d.ts +2 -4
- package/lib/documents/dashboard/UserConfig.d.ts.map +1 -1
- package/lib/index.d.ts +6 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +30 -4
- package/package.json +1 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ObjectId } from 'bson';
|
|
2
2
|
import BaseDocument from '../BaseDocument';
|
|
3
3
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
errors: string[];
|
|
7
|
-
};
|
|
4
|
+
import { DocumentValidator } from '../../schemas/validators/DocumentValidator';
|
|
5
|
+
export declare const validateApiKey: DocumentValidator<ApiKey>;
|
|
8
6
|
/**
|
|
9
7
|
* A document containing an API key for a particular user. This is stored
|
|
10
8
|
* separately from the {@link User} document to enhance security a bit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKey.d.ts","sourceRoot":"","sources":["../../../src/documents/common/ApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,cAAc,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiKey.d.ts","sourceRoot":"","sources":["../../../src/documents/common/ApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,cAAc,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,MAAM,CAQpD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,YAAa,YAAW,cAAc;IACxE;;OAEG;IACH,GAAG,sDAAuB;IAE1B;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC;IAEjB;;OAEG;gBACS,MAAM,EAAE,QAAQ;CAI7B"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ObjectId } from 'bson';
|
|
2
2
|
import BaseDocumentWithType from '../BaseDocumentWithType';
|
|
3
3
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
errors: string[];
|
|
7
|
-
};
|
|
4
|
+
import { DocumentValidator } from '../../schemas/validators/DocumentValidator';
|
|
5
|
+
export declare const validateDashboardUserConfig: DocumentValidator<DashboardUserConfig>;
|
|
8
6
|
export default class DashboardUserConfig extends BaseDocumentWithType implements RequiredUserId {
|
|
9
7
|
static docType: string;
|
|
10
8
|
docType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/UserConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,cAAc,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/UserConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,cAAc,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CACzD,mBAAmB,CASpB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,mBACnB,SAAQ,oBACR,YAAW,cAAc;IAEzB,MAAM,CAAC,OAAO,SAAgB;IAE9B,OAAO,SAA+B;IAEtC;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,aAAa,UAAS;gBAEV,OAAO,EAAE,QAAQ;CAI9B"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import BaseDocument from './documents/BaseDocument';
|
|
2
2
|
import BaseDocumentWithType from './documents/BaseDocumentWithType';
|
|
3
|
-
import ApiKey from './documents/common/ApiKey';
|
|
4
|
-
import User from './documents/common/User';
|
|
5
|
-
import DashboardUserConfig from './documents/dashboard/UserConfig';
|
|
3
|
+
import ApiKey, { validateApiKey } from './documents/common/ApiKey';
|
|
4
|
+
import User, { validateUser } from './documents/common/User';
|
|
5
|
+
import DashboardUserConfig, { validateDashboardUserConfig } from './documents/dashboard/UserConfig';
|
|
6
6
|
import RequiredUserId from './schemas/required-refs/RequiredUserId';
|
|
7
|
-
|
|
8
|
-
export
|
|
7
|
+
import { DocumentValidator } from './schemas/validators/DocumentValidator';
|
|
8
|
+
export { User, validateUser, ApiKey, validateApiKey, DashboardUserConfig, validateDashboardUserConfig, BaseDocument, BaseDocumentWithType, RequiredUserId };
|
|
9
|
+
export type { DocumentValidator };
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AACpE,OAAO,MAAM,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AACpE,OAAO,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,mBAAmB,EAAE,EAC1B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAG3E,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC3B,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACf,CAAC;AAGF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,18 +1,44 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RequiredUserId = exports.BaseDocumentWithType = exports.BaseDocument = exports.DashboardUserConfig = exports.ApiKey = exports.User = void 0;
|
|
29
|
+
exports.RequiredUserId = exports.BaseDocumentWithType = exports.BaseDocument = exports.validateDashboardUserConfig = exports.DashboardUserConfig = exports.validateApiKey = exports.ApiKey = exports.validateUser = exports.User = void 0;
|
|
7
30
|
const BaseDocument_1 = __importDefault(require("./documents/BaseDocument"));
|
|
8
31
|
exports.BaseDocument = BaseDocument_1.default;
|
|
9
32
|
const BaseDocumentWithType_1 = __importDefault(require("./documents/BaseDocumentWithType"));
|
|
10
33
|
exports.BaseDocumentWithType = BaseDocumentWithType_1.default;
|
|
11
|
-
const ApiKey_1 =
|
|
34
|
+
const ApiKey_1 = __importStar(require("./documents/common/ApiKey"));
|
|
12
35
|
exports.ApiKey = ApiKey_1.default;
|
|
13
|
-
|
|
36
|
+
Object.defineProperty(exports, "validateApiKey", { enumerable: true, get: function () { return ApiKey_1.validateApiKey; } });
|
|
37
|
+
const User_1 = __importStar(require("./documents/common/User"));
|
|
14
38
|
exports.User = User_1.default;
|
|
15
|
-
|
|
39
|
+
Object.defineProperty(exports, "validateUser", { enumerable: true, get: function () { return User_1.validateUser; } });
|
|
40
|
+
const UserConfig_1 = __importStar(require("./documents/dashboard/UserConfig"));
|
|
16
41
|
exports.DashboardUserConfig = UserConfig_1.default;
|
|
42
|
+
Object.defineProperty(exports, "validateDashboardUserConfig", { enumerable: true, get: function () { return UserConfig_1.validateDashboardUserConfig; } });
|
|
17
43
|
const RequiredUserId_1 = __importDefault(require("./schemas/required-refs/RequiredUserId"));
|
|
18
44
|
exports.RequiredUserId = RequiredUserId_1.default;
|