@nxtedition/types 23.0.49 → 23.0.50
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/dist/nxtpression.d.ts +3 -1
- package/dist/records/domains/index.d.ts +2 -1
- package/dist/records/index.d.ts +1 -1
- package/dist/records/utils.d.ts +4 -2
- package/dist/records/utils.tds.js +1 -1
- package/dist/records/validate/assert-guard.d.ts +3 -4
- package/dist/records/validate/assert.d.ts +3 -4
- package/dist/records/validate/is.d.ts +3 -4
- package/dist/records/validate/schemas.d.ts +4 -5
- package/dist/records/validate/stringify.d.ts +3 -4
- package/dist/records/validate/utils.d.ts +2 -3
- package/dist/records/validate/validate-equals.d.ts +3 -4
- package/dist/records/validate/validate.d.ts +3 -4
- package/package.json +1 -1
package/dist/nxtpression.d.ts
CHANGED
|
@@ -442,7 +442,8 @@ declare interface DesignViewRow<Id = string, Key = string, Value = void> {
|
|
|
442
442
|
value: Value;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
-
declare
|
|
445
|
+
declare interface DomainRecords extends AssetDomainRecords, BundleDomainRecords, CloneDomainRecords, CommentReactionDomainRecords, CommentReadMarkDomainRecords, CommentDomainRecords, ConnectionDomainRecords, ContactDomainRecords, DeepstreamDomainRecords, DesignDomainRecords, EditDomainRecords, EventDomainRecords, FileDomainRecords, GeneralDomainRecords, MediaDomainRecords, MonitorDomainRecords, PanelDomainRecords, PermissionDomainRecords, PipelinePresetDomainRecords, PipelineDomainRecords, PlanningDomainRecords, PrompterDomainRecords, PublishDomainRecords, PublishedDomainRecords, RenderPresetDomainRecords, RenderDomainRecords, RevsDomainRecords, RoleDomainRecords, ScriptDomainRecords, SearchDomainRecords, SettingsDomainRecords, StoryboardDomainRecords, SubtitleStyleDomainRecords, SubtitleDomainRecords, TemplateDomainRecords, UserNotificationStatusDomainRecords, UserNotificationDomainRecords, UserDomainRecords {
|
|
446
|
+
}
|
|
446
447
|
|
|
447
448
|
declare type Dynamic = false | string[];
|
|
448
449
|
|
|
@@ -1946,6 +1947,7 @@ number
|
|
|
1946
1947
|
];
|
|
1947
1948
|
|
|
1948
1949
|
declare interface Records extends KeyedDomainRecords, KeyedProvidedDomainRecords, DbExactRecords, DbProvidedRecord {
|
|
1950
|
+
[key: string]: unknown;
|
|
1949
1951
|
}
|
|
1950
1952
|
|
|
1951
1953
|
declare type RecordState = RecordStateNumber | RecordStateString;
|
|
@@ -74,4 +74,5 @@ export * from './template.ts';
|
|
|
74
74
|
export * from './user-notification-status.ts';
|
|
75
75
|
export * from './user-notification.ts';
|
|
76
76
|
export * from './user.ts';
|
|
77
|
-
export
|
|
77
|
+
export interface DomainRecords extends AssetDomainRecords, BundleDomainRecords, CloneDomainRecords, CommentReactionDomainRecords, CommentReadMarkDomainRecords, CommentDomainRecords, ConnectionDomainRecords, ContactDomainRecords, DeepstreamDomainRecords, DesignDomainRecords, EditDomainRecords, EventDomainRecords, FileDomainRecords, GeneralDomainRecords, MediaDomainRecords, MonitorDomainRecords, PanelDomainRecords, PermissionDomainRecords, PipelinePresetDomainRecords, PipelineDomainRecords, PlanningDomainRecords, PrompterDomainRecords, PublishDomainRecords, PublishedDomainRecords, RenderPresetDomainRecords, RenderDomainRecords, RevsDomainRecords, RoleDomainRecords, ScriptDomainRecords, SearchDomainRecords, SettingsDomainRecords, StoryboardDomainRecords, SubtitleStyleDomainRecords, SubtitleDomainRecords, TemplateDomainRecords, UserNotificationStatusDomainRecords, UserNotificationDomainRecords, UserDomainRecords {
|
|
78
|
+
}
|
package/dist/records/index.d.ts
CHANGED
package/dist/records/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EmptyObject, SingleKeyObject } from 'type-fest';
|
|
2
|
-
import type { DomainRecords, ExactRecords } from './index.ts';
|
|
2
|
+
import type { DomainRecords, DomainRows, ExactRecords } from './index.ts';
|
|
3
3
|
type ProvidedDomainKeys = keyof DomainRecords & `${string}?`;
|
|
4
4
|
type DbDomainKeys = Exclude<keyof DomainRecords, ProvidedDomainKeys>;
|
|
5
5
|
type ProvidedExactKeys = keyof ExactRecords & `${string}?`;
|
|
@@ -17,8 +17,10 @@ type DbProvidedRecord = {
|
|
|
17
17
|
[Name in ProvidedExactKeys as `${Name}${string}`]: GettablePossibleEmpty<ExactRecords[Name]>;
|
|
18
18
|
};
|
|
19
19
|
export interface Records extends KeyedDomainRecords, KeyedProvidedDomainRecords, DbExactRecords, DbProvidedRecord {
|
|
20
|
+
[key: string]: unknown;
|
|
20
21
|
}
|
|
21
|
-
export type RecordNameToType<T extends string> = T extends keyof Records ? Records[T] : unknown;
|
|
22
|
+
export type RecordNameToType<T extends string> = T extends `:${string}` ? GettablePossibleEmpty<DomainRows> : T extends keyof Records ? Records[T] : unknown;
|
|
23
|
+
export type DomainNameToType<T extends string> = T extends keyof DomainRecords ? DomainRecords[T] : unknown;
|
|
22
24
|
declare const providedRecordSymbol: unique symbol;
|
|
23
25
|
export type ProvidedRecord<T> = T & {
|
|
24
26
|
[providedRecordSymbol]: never;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expectType } from 'tsd';
|
|
2
2
|
const getType = (_) => null;
|
|
3
3
|
expectType(getType("asset.tags"));
|
|
4
|
-
|
|
4
|
+
expectType(getType(":user"));
|
|
5
5
|
expectType(getType("id:user.receivedNotifications?"));
|
|
6
6
|
expectType(getType("id:user.receivedNotifications?limit=2"));
|
|
7
7
|
expectType(getType("{}:search?"));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function assertGuardDomainRecord<Domain extends keyof DomainRecords>(domain: Domain, input: unknown): asserts input is DomainRecords[Domain];
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
2
|
+
export declare function assertGuardRecord<Name extends string>(name: Name, input: unknown): asserts input is RecordNameToType<Name>;
|
|
3
|
+
export declare function assertGuardDomainRecord<Domain extends string>(domain: Domain, input: unknown): asserts input is DomainNameToType<Domain>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function assertDomainRecord<Domain extends keyof DomainRecords>(domain: Domain, input: unknown): DomainRecords[Domain];
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
2
|
+
export declare function assertRecord<Name extends string>(name: Name, input: unknown): RecordNameToType<Name>;
|
|
3
|
+
export declare function assertDomainRecord<Domain extends string>(domain: Domain, input: unknown): DomainNameToType<Domain>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function isDomainRecord<Domain extends keyof DomainRecords, Record extends DomainRecords[Domain]>(domain: Domain, input: unknown): input is Record;
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
2
|
+
export declare function isRecord<Name extends string>(name: Name, input: unknown): input is RecordNameToType<Name>;
|
|
3
|
+
export declare function isDomainRecord<Domain extends string>(domain: Domain, input: unknown): input is DomainNameToType<Domain>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { RecordNameToType } from '../utils.ts';
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
3
2
|
import typia from 'typia';
|
|
4
|
-
export declare function getSchemaByRecordName<Name extends
|
|
3
|
+
export declare function getSchemaByRecordName<Name extends string>(name: Name): typia.IJsonSchemaCollection.IV3_1<[
|
|
5
4
|
RecordNameToType<Name>
|
|
6
5
|
]>;
|
|
7
|
-
export declare function getSchemaByDomain<Domain extends
|
|
8
|
-
|
|
6
|
+
export declare function getSchemaByDomain<Domain extends string>(domain: Domain): typia.IJsonSchemaCollection.IV3_1<[
|
|
7
|
+
DomainNameToType<Domain>
|
|
9
8
|
]>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function stringifyDomainRecord<Domain extends keyof DomainRecords, Input extends DomainRecords[Domain]>(domain: Domain, input: Input): string;
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
2
|
+
export declare function stringifyRecord<Name extends string, Input extends RecordNameToType<Name>>(name: Name, input: Input): string;
|
|
3
|
+
export declare function stringifyDomainRecord<Domain extends string, Input extends DomainNameToType<Domain>>(domain: Domain, input: Input): string;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { EmptyObject } from 'type-fest';
|
|
2
|
-
import type { ExactRecords, DomainRecords } from '../index.ts';
|
|
3
2
|
export type ParsedRecordName = ExactRecordName | DomainRecord | DomainRowsRecord;
|
|
4
3
|
export interface ExactRecordName {
|
|
5
4
|
type: "exact";
|
|
6
|
-
exact:
|
|
5
|
+
exact: string;
|
|
7
6
|
}
|
|
8
7
|
export interface DomainRecord {
|
|
9
8
|
type: "domain";
|
|
10
|
-
domain:
|
|
9
|
+
domain: string;
|
|
11
10
|
exact: string;
|
|
12
11
|
}
|
|
13
12
|
export interface DomainRowsRecord {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { RecordNameToType } from '../utils.ts';
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
3
2
|
import typia from 'typia';
|
|
4
|
-
export declare function validateEqualsRecord<Name extends
|
|
5
|
-
export declare function validateEqualsDomainRecord<Domain extends
|
|
3
|
+
export declare function validateEqualsRecord<Name extends string>(name: Name, input: unknown): typia.IValidation<RecordNameToType<Name>>;
|
|
4
|
+
export declare function validateEqualsDomainRecord<Domain extends string>(domain: Domain, input: unknown): typia.IValidation<DomainNameToType<Domain>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { RecordNameToType } from '../utils.ts';
|
|
1
|
+
import type { RecordNameToType, DomainNameToType } from '../index.ts';
|
|
3
2
|
import typia from 'typia';
|
|
4
|
-
export declare function validateRecord<Name extends
|
|
5
|
-
export declare function validateDomainRecord<Domain extends
|
|
3
|
+
export declare function validateRecord<Name extends string>(name: Name, input: unknown): typia.IValidation<RecordNameToType<Name>>;
|
|
4
|
+
export declare function validateDomainRecord<Domain extends string>(domain: Domain, input: unknown): typia.IValidation<DomainNameToType<Domain>>;
|