@nu-art/ts-short-url-shared 0.401.8 → 0.500.0
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 +6 -10
- package/_entity/short-url/api-def.js +2 -4
- package/_entity/short-url/db-def.d.ts +3 -3
- package/_entity/short-url/db-def.js +7 -5
- package/_entity/short-url/types.d.ts +9 -8
- package/_entity/short-url/types.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +7 -6
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { ApiDefResolver, QueryApi } from '@nu-art/
|
|
2
|
-
import { DB_BaseObject } from '@nu-art/
|
|
3
|
-
export type
|
|
4
|
-
export type ResponseType_ShortUrl = {};
|
|
5
|
-
export type GetShortUrlRequest = DB_BaseObject;
|
|
1
|
+
import { ApiDefResolver, QueryApi } from '@nu-art/api-types';
|
|
2
|
+
import { DB_BaseObject } from '@nu-art/db-api-shared';
|
|
3
|
+
export type GetShortUrlRequest = DB_BaseObject<'short-url'>;
|
|
6
4
|
export type GetShortUrlResponse = {
|
|
7
5
|
shortUrl: string;
|
|
8
6
|
};
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
getShortUrl: QueryApi<GetShortUrlResponse, GetShortUrlRequest>;
|
|
12
|
-
};
|
|
7
|
+
export type API_ShortUrl = {
|
|
8
|
+
getShortUrl: QueryApi<GetShortUrlResponse, GetShortUrlRequest>;
|
|
13
9
|
};
|
|
14
|
-
export declare const ApiDef_ShortUrl: ApiDefResolver<
|
|
10
|
+
export declare const ApiDef_ShortUrl: ApiDefResolver<API_ShortUrl>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { HttpMethod } from '@nu-art/
|
|
1
|
+
import { HttpMethod } from '@nu-art/api-types';
|
|
2
2
|
import { Minute } from '@nu-art/ts-common';
|
|
3
3
|
export const ApiDef_ShortUrl = {
|
|
4
|
-
|
|
5
|
-
getShortUrl: { method: HttpMethod.GET, path: 'v1/short-url/get-short-url', timeout: Minute }
|
|
6
|
-
}
|
|
4
|
+
getShortUrl: { method: HttpMethod.GET, path: '/v1/short-url/get-short-url', timeout: Minute }
|
|
7
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare const DBDef_ShortUrl:
|
|
1
|
+
import { Database } from '@nu-art/db-api-shared';
|
|
2
|
+
import { DatabaseDef_ShortUrl } from './types.js';
|
|
3
|
+
export declare const DBDef_ShortUrl: Database<DatabaseDef_ShortUrl>;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { tsValidateGeneralUrl, tsValidateShortUrl, tsValidateString } from '@nu-art/ts-common';
|
|
2
|
-
const
|
|
2
|
+
const modifiablePropsValidator = {
|
|
3
3
|
fullUrl: tsValidateGeneralUrl(true),
|
|
4
4
|
title: tsValidateString(),
|
|
5
5
|
description: tsValidateString(undefined, false),
|
|
6
6
|
};
|
|
7
|
-
const
|
|
7
|
+
const generatedPropsValidator = {
|
|
8
8
|
_shortUrl: tsValidateShortUrl(),
|
|
9
9
|
};
|
|
10
10
|
export const DBDef_ShortUrl = {
|
|
11
|
-
modifiablePropsValidator: Validator_ModifiableProps,
|
|
12
|
-
generatedPropsValidator: Validator_GeneratedProps,
|
|
13
|
-
versions: ['1.0.0'],
|
|
14
11
|
dbKey: 'short-url',
|
|
15
12
|
entityName: 'short-url',
|
|
13
|
+
modifiablePropsValidator,
|
|
14
|
+
generatedPropsValidator,
|
|
15
|
+
generatedProps: ['_shortUrl'],
|
|
16
|
+
versions: ['1.0.0'],
|
|
17
|
+
uniqueKeys: ['_id'],
|
|
16
18
|
frontend: {
|
|
17
19
|
group: 'app',
|
|
18
20
|
name: 'short-url'
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { DB_Object,
|
|
1
|
+
import { DB_Object, DB_ProtoSeed, DB_Prototype, VersionsDeclaration } from '@nu-art/db-api-shared';
|
|
2
|
+
export declare const ShortUrl_DbKey = "short-url";
|
|
3
|
+
type DBKey = typeof ShortUrl_DbKey;
|
|
2
4
|
type VersionTypes_ShortUrl = {
|
|
3
5
|
'1.0.0': DB_ShortUrl;
|
|
4
6
|
};
|
|
5
7
|
type Versions = VersionsDeclaration<['1.0.0'], VersionTypes_ShortUrl>;
|
|
6
|
-
type Dependencies = {};
|
|
7
8
|
type UniqueKeys = '_id';
|
|
8
|
-
type
|
|
9
|
-
type
|
|
10
|
-
type
|
|
11
|
-
export type DBProto_ShortUrl = DBProto<Proto>;
|
|
12
|
-
export type UI_ShortUrl = DBProto_ShortUrl['uiType'];
|
|
13
|
-
export type DB_ShortUrl = DB_Object & {
|
|
9
|
+
type GeneratedKeys = '_shortUrl';
|
|
10
|
+
type Dependencies = {};
|
|
11
|
+
export type DB_ShortUrl = DB_Object<DBKey> & {
|
|
14
12
|
fullUrl: string;
|
|
15
13
|
title: string;
|
|
16
14
|
description?: string;
|
|
17
15
|
_shortUrl: string;
|
|
18
16
|
};
|
|
17
|
+
/** Previously DBProto_ShortUrl; use DatabaseDef_ShortUrl everywhere. */
|
|
18
|
+
export type DatabaseDef_ShortUrl = DB_Prototype<DB_ProtoSeed<DB_ShortUrl, DBKey, GeneratedKeys, Versions, UniqueKeys, Dependencies>>;
|
|
19
|
+
export type UI_ShortUrl = DatabaseDef_ShortUrl['uiType'];
|
|
19
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const ShortUrl_DbKey = 'short-url';
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const PackageName_tsShortUrl = "ts-short-url";
|
|
2
|
-
export * from
|
|
2
|
+
export * from './_entity/short-url/index.js';
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const PackageName_tsShortUrl = 'ts-short-url';
|
|
2
|
-
export * from
|
|
2
|
+
export * from './_entity/short-url/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nu-art/ts-short-url-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.500.0",
|
|
4
4
|
"description": "ts-short-url - Express & Typescript based backend framework Shared",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TacB0sS",
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
"build": "tsc"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nu-art/
|
|
35
|
-
"@nu-art/
|
|
36
|
-
"@nu-art/
|
|
37
|
-
"@nu-art/
|
|
38
|
-
"@nu-art/
|
|
34
|
+
"@nu-art/api-types": "{{THUNDERSTORM_VERSION}}",
|
|
35
|
+
"@nu-art/db-api-shared": "0.500.0",
|
|
36
|
+
"@nu-art/ts-common": "0.500.0",
|
|
37
|
+
"@nu-art/permissions-shared": "0.500.0",
|
|
38
|
+
"@nu-art/ts-styles": "0.500.0",
|
|
39
|
+
"@nu-art/firebase-shared": "0.500.0",
|
|
39
40
|
"firebase": "^11.9.0",
|
|
40
41
|
"firebase-admin": "13.4.0",
|
|
41
42
|
"firebase-functions": "6.3.2",
|