@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.
@@ -1,14 +1,10 @@
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;
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 ApiStruct_ShortUrl = {
10
- _v1: {
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<ApiStruct_ShortUrl>;
10
+ export declare const ApiDef_ShortUrl: ApiDefResolver<API_ShortUrl>;
@@ -1,7 +1,5 @@
1
- import { HttpMethod } from '@nu-art/thunderstorm-shared';
1
+ import { HttpMethod } from '@nu-art/api-types';
2
2
  import { Minute } from '@nu-art/ts-common';
3
3
  export const ApiDef_ShortUrl = {
4
- _v1: {
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 { DBProto_ShortUrl } from './types.js';
2
- import { DBDef_V3 } from '@nu-art/ts-common';
3
- export declare const DBDef_ShortUrl: DBDef_V3<DBProto_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 Validator_ModifiableProps = {
2
+ const modifiablePropsValidator = {
3
3
  fullUrl: tsValidateGeneralUrl(true),
4
4
  title: tsValidateString(),
5
5
  description: tsValidateString(undefined, false),
6
6
  };
7
- const Validator_GeneratedProps = {
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, DBProto, Proto_DB_Object, VersionsDeclaration } from '@nu-art/ts-common';
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 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 & {
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 "./_entity/short-url/index.js";
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 "./_entity/short-url/index.js";
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.401.8",
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/ts-common": "0.401.8",
35
- "@nu-art/thunderstorm-shared": "0.401.8",
36
- "@nu-art/permissions-shared": "0.401.8",
37
- "@nu-art/ts-styles": "0.401.8",
38
- "@nu-art/firebase-shared": "0.401.8",
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",