@nu-art/ts-short-url-shared 0.400.5
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/api-def.d.ts +14 -0
- package/_entity/short-url/api-def.js +7 -0
- package/_entity/short-url/consts.d.ts +3 -0
- package/_entity/short-url/consts.js +3 -0
- package/_entity/short-url/db-def.d.ts +3 -0
- package/_entity/short-url/db-def.js +23 -0
- package/_entity/short-url/index.d.ts +4 -0
- package/_entity/short-url/index.js +5 -0
- package/_entity/short-url/types.d.ts +19 -0
- package/_entity/short-url/types.js +1 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +63 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApiDefResolver, QueryApi } from '@nu-art/thunderstorm-shared';
|
|
2
|
+
import { DB_BaseObject } from '@nu-art/ts-common';
|
|
3
|
+
export type RequestType_ShortUrl = {};
|
|
4
|
+
export type ResponseType_ShortUrl = {};
|
|
5
|
+
export type GetShortUrlRequest = DB_BaseObject;
|
|
6
|
+
export type GetShortUrlResponse = {
|
|
7
|
+
shortUrl: string;
|
|
8
|
+
};
|
|
9
|
+
export type ApiStruct_ShortUrl = {
|
|
10
|
+
_v1: {
|
|
11
|
+
getShortUrl: QueryApi<GetShortUrlResponse, GetShortUrlRequest>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const ApiDef_ShortUrl: ApiDefResolver<ApiStruct_ShortUrl>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tsValidateGeneralUrl, tsValidateShortUrl, tsValidateString } from '@nu-art/ts-common';
|
|
2
|
+
const Validator_ModifiableProps = {
|
|
3
|
+
fullUrl: tsValidateGeneralUrl(true),
|
|
4
|
+
title: tsValidateString(),
|
|
5
|
+
description: tsValidateString(undefined, false),
|
|
6
|
+
};
|
|
7
|
+
const Validator_GeneratedProps = {
|
|
8
|
+
_shortUrl: tsValidateShortUrl(),
|
|
9
|
+
};
|
|
10
|
+
export const DBDef_ShortUrl = {
|
|
11
|
+
modifiablePropsValidator: Validator_ModifiableProps,
|
|
12
|
+
generatedPropsValidator: Validator_GeneratedProps,
|
|
13
|
+
versions: ['1.0.0'],
|
|
14
|
+
dbKey: 'short-url',
|
|
15
|
+
entityName: 'short-url',
|
|
16
|
+
frontend: {
|
|
17
|
+
group: 'app',
|
|
18
|
+
name: 'short-url'
|
|
19
|
+
},
|
|
20
|
+
backend: {
|
|
21
|
+
name: 'short-url'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DB_Object, DBProto, Proto_DB_Object, VersionsDeclaration } from '@nu-art/ts-common';
|
|
2
|
+
type VersionTypes_ShortUrl = {
|
|
3
|
+
'1.0.0': DB_ShortUrl;
|
|
4
|
+
};
|
|
5
|
+
type Versions = VersionsDeclaration<['1.0.0'], VersionTypes_ShortUrl>;
|
|
6
|
+
type Dependencies = {};
|
|
7
|
+
type UniqueKeys = '_id';
|
|
8
|
+
type GeneratedProps = '_shortUrl';
|
|
9
|
+
type DBKey = 'short-url';
|
|
10
|
+
type Proto = Proto_DB_Object<DB_ShortUrl, DBKey, GeneratedProps, Versions, UniqueKeys, Dependencies>;
|
|
11
|
+
export type DBProto_ShortUrl = DBProto<Proto>;
|
|
12
|
+
export type UI_ShortUrl = DBProto_ShortUrl['uiType'];
|
|
13
|
+
export type DB_ShortUrl = DB_Object & {
|
|
14
|
+
fullUrl: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
_shortUrl: string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nu-art/ts-short-url-shared",
|
|
3
|
+
"version": "0.400.5",
|
|
4
|
+
"description": "ts-short-url - Express & Typescript based backend framework Shared",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"TacB0sS",
|
|
7
|
+
"infra",
|
|
8
|
+
"nu-art",
|
|
9
|
+
"thunderstorm",
|
|
10
|
+
"typescript",
|
|
11
|
+
"ts-short-url"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/nu-art-js/thunderstorm",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/nu-art-js/thunderstorm/issues"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"directory": "dist",
|
|
19
|
+
"linkDirectory": true
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+ssh://git@github.com:nu-art-js/thunderstorm.git"
|
|
24
|
+
},
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"author": "TacB0sS",
|
|
27
|
+
"files": [
|
|
28
|
+
"**/*"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@nu-art/ts-common": "0.400.5",
|
|
35
|
+
"@nu-art/thunderstorm-shared": "0.400.5",
|
|
36
|
+
"@nu-art/permissions-shared": "0.400.5",
|
|
37
|
+
"@nu-art/ts-styles": "0.400.5",
|
|
38
|
+
"@nu-art/firebase-shared": "0.400.5",
|
|
39
|
+
"firebase": "^11.9.0",
|
|
40
|
+
"firebase-admin": "13.4.0",
|
|
41
|
+
"firebase-functions": "6.3.2",
|
|
42
|
+
"react": "^18.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/react": "^18.0.0",
|
|
46
|
+
"@types/chai": "^4.3.4",
|
|
47
|
+
"@types/mocha": "^10.0.1"
|
|
48
|
+
},
|
|
49
|
+
"unitConfig": {
|
|
50
|
+
"type": "typescript-lib"
|
|
51
|
+
},
|
|
52
|
+
"type": "module",
|
|
53
|
+
"exports": {
|
|
54
|
+
".": {
|
|
55
|
+
"types": "./index.d.ts",
|
|
56
|
+
"import": "./index.js"
|
|
57
|
+
},
|
|
58
|
+
"./*": {
|
|
59
|
+
"types": "./*.d.ts",
|
|
60
|
+
"import": "./*.js"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|