@nu-art/ts-short-url-backend 0.500.0 → 0.500.6
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/_entity/short-url/ModuleBE_ShortUrlDB.d.ts +1 -1
- package/_entity/short-url/ModuleBE_ShortUrlDB.js +1 -1
- package/_entity/short-url/permissions.d.ts +1 -9
- package/_entity/short-url/permissions.js +2 -23
- package/function-module/Module_ShortUrlResolver.d.ts +2 -2
- package/function-module/Module_ShortUrlResolver.js +2 -2
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/package.json +10 -10
- package/_entity/short-url/index.d.ts +0 -3
- package/_entity/short-url/index.js +0 -3
|
@@ -7,7 +7,7 @@ export declare class ModuleBE_ShortUrlDB_Class extends ModuleBE_BaseDB<DatabaseD
|
|
|
7
7
|
constructor();
|
|
8
8
|
init(): void;
|
|
9
9
|
getShortUrl(params: API_ShortUrl['getShortUrl']['Params']): Promise<API_ShortUrl['getShortUrl']['Response']>;
|
|
10
|
-
protected preWriteProcessing(dbInstance: UI_ShortUrl, originalDbInstance: DB_ShortUrl
|
|
10
|
+
protected preWriteProcessing(dbInstance: UI_ShortUrl, originalDbInstance: DB_ShortUrl): Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
export declare const ModuleBE_ShortUrlDB: ModuleBE_ShortUrlDB_Class;
|
|
13
13
|
export {};
|
|
@@ -63,7 +63,7 @@ let ModuleBE_ShortUrlDB_Class = (() => {
|
|
|
63
63
|
shortUrl: `${this.config.BaseShortUrl}${dbDoc._shortUrl}`
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
async preWriteProcessing(dbInstance, originalDbInstance
|
|
66
|
+
async preWriteProcessing(dbInstance, originalDbInstance) {
|
|
67
67
|
if (!dbInstance._shortUrl)
|
|
68
68
|
dbInstance._shortUrl = generateShortURL();
|
|
69
69
|
}
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DefaultDef_Package } from '@nu-art/permissions-backend';
|
|
3
|
-
export declare const Domain_ShortUrl: Readonly<{
|
|
4
|
-
_id: import("@nu-art/db-api-shared").DB_UniqueId<"permissions--domain">;
|
|
5
|
-
namespace: "short-url";
|
|
6
|
-
}>;
|
|
7
|
-
export declare const PermissionKeyBE_ShortUrlView: PermissionKey_BE<"permission-key--short-url-view">;
|
|
8
|
-
export declare const PermissionKeyBE_ShortUrlEdit: PermissionKey_BE<"permission-key--short-url-edit">;
|
|
9
|
-
export declare const Permissions_ShortUrl: DefaultDef_Package;
|
|
1
|
+
export {};
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ModuleBE_ShortUrlDB } from './ModuleBE_ShortUrlDB.js';
|
|
4
|
-
import { DomainNamespace_ShortUrl, PermissionKey_ShortUrlEdit, PermissionKey_ShortUrlView } from '@nu-art/ts-short-url-shared';
|
|
5
|
-
import { asBrandedId } from '@nu-art/db-api-shared';
|
|
6
|
-
export const Domain_ShortUrl = Object.freeze({
|
|
7
|
-
_id: asBrandedId('8a7614bc128ee1fb6ddf896c46922ab3'),
|
|
8
|
-
namespace: DomainNamespace_ShortUrl
|
|
9
|
-
});
|
|
10
|
-
export const PermissionKeyBE_ShortUrlView = new PermissionKey_BE(PermissionKey_ShortUrlView, () => defaultValueResolver(DomainNamespace_ShortUrl, DefaultAccessLevel_Read.value));
|
|
11
|
-
export const PermissionKeyBE_ShortUrlEdit = new PermissionKey_BE(PermissionKey_ShortUrlEdit, () => defaultValueResolver(DomainNamespace_ShortUrl, DefaultAccessLevel_Write.value));
|
|
12
|
-
export const Permissions_ShortUrl = {
|
|
13
|
-
name: Domain_ShortUrl.namespace,
|
|
14
|
-
domains: [
|
|
15
|
-
{
|
|
16
|
-
...Domain_ShortUrl,
|
|
17
|
-
levels: [...DuplicateDefaultAccessLevels(Domain_ShortUrl._id)],
|
|
18
|
-
dbNames: [
|
|
19
|
-
ModuleBE_ShortUrlDB.dbDef
|
|
20
|
-
].map(dbDef => dbDef.dbKey)
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
};
|
|
1
|
+
export {};
|
|
2
|
+
// Legacy domain-level permissions removed; use scope-based permissions.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleBE_ExpressFunction_Class } from '@nu-art/firebase-backend';
|
|
2
2
|
import { Express } from 'express';
|
|
3
3
|
import { HttpsFunction } from 'firebase-functions/v2/https';
|
|
4
|
-
declare class Module_ShortUrlResolver_Class extends
|
|
4
|
+
declare class Module_ShortUrlResolver_Class extends ModuleBE_ExpressFunction_Class {
|
|
5
5
|
constructor(name?: string);
|
|
6
6
|
private handleError;
|
|
7
7
|
protected createFunction(_express: Express): HttpsFunction;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleBE_ExpressFunction_Class } from '@nu-art/firebase-backend';
|
|
2
2
|
import { tsValidateResult, tsValidateShortUrl } from '@nu-art/ts-common';
|
|
3
3
|
import { HttpCodes } from '@nu-art/ts-common/core/exceptions/http-codes';
|
|
4
4
|
import { ModuleBE_ShortUrlDB } from '../_entity/short-url/ModuleBE_ShortUrlDB.js';
|
|
5
|
-
class Module_ShortUrlResolver_Class extends
|
|
5
|
+
class Module_ShortUrlResolver_Class extends ModuleBE_ExpressFunction_Class {
|
|
6
6
|
constructor(name = 'url') {
|
|
7
7
|
super(name);
|
|
8
8
|
this.setDefaultConfig({ options: {} });
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export * from './function-module/Module_ShortUrlResolver.js';
|
|
2
|
-
export * from './_entity/short-url/
|
|
2
|
+
export * from './_entity/short-url/ModuleBE_ShortUrlDB.js';
|
|
3
|
+
export * from './_entity/short-url/module-pack.js';
|
|
4
|
+
export * from './_entity/short-url/permissions.js';
|
package/index.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export * from './function-module/Module_ShortUrlResolver.js';
|
|
2
|
-
export * from './_entity/short-url/
|
|
2
|
+
export * from './_entity/short-url/ModuleBE_ShortUrlDB.js';
|
|
3
|
+
export * from './_entity/short-url/module-pack.js';
|
|
4
|
+
export * from './_entity/short-url/permissions.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nu-art/ts-short-url-backend",
|
|
3
|
-
"version": "0.500.
|
|
3
|
+
"version": "0.500.6",
|
|
4
4
|
"description": "ts-short-url - Express & Typescript based backend framework Backend",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TacB0sS",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"build": "tsc"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nu-art/ts-short-url-shared": "0.500.
|
|
35
|
-
"@nu-art/firebase-backend": "0.500.
|
|
36
|
-
"@nu-art/firebase-shared": "0.500.
|
|
37
|
-
"@nu-art/permissions-backend": "0.500.
|
|
38
|
-
"@nu-art/permissions-shared": "0.500.
|
|
39
|
-
"@nu-art/db-api-shared": "0.500.
|
|
40
|
-
"@nu-art/ts-common": "0.500.
|
|
34
|
+
"@nu-art/ts-short-url-shared": "0.500.6",
|
|
35
|
+
"@nu-art/firebase-backend": "0.500.6",
|
|
36
|
+
"@nu-art/firebase-shared": "0.500.6",
|
|
37
|
+
"@nu-art/permissions-backend": "0.500.6",
|
|
38
|
+
"@nu-art/permissions-shared": "0.500.6",
|
|
39
|
+
"@nu-art/db-api-shared": "0.500.6",
|
|
40
|
+
"@nu-art/ts-common": "0.500.6",
|
|
41
41
|
"firebase": "^11.9.0",
|
|
42
42
|
"firebase-admin": "13.4.0",
|
|
43
43
|
"firebase-functions": "6.3.2",
|
|
44
44
|
"react": "^18.0.0",
|
|
45
|
-
"@nu-art/db-api-backend": "0.500.
|
|
46
|
-
"@nu-art/http-server": "
|
|
45
|
+
"@nu-art/db-api-backend": "0.500.6",
|
|
46
|
+
"@nu-art/http-server": "0.500.6"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^18.0.0",
|