Skip to content

Commit 62e15d6

Browse files
committed
Update node type definitions with new classes
1 parent eba0b96 commit 62e15d6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

templates/node/index.d.ts.twig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,29 @@ declare module "{{ language.params.npmPackage|caseDash }}" {
174174
private static parseValues(value: QueryTypes): string;
175175
}
176176

177+
export class ID {
178+
static unique = (): string;
179+
static custom = (id: string): string;
180+
}
181+
182+
export class Permission {
183+
static read = (role: string): string;
184+
static write = (role: string): string;
185+
static create = (role: string): string;
186+
static update = (role: string): string;
187+
static delete = (role: string): string;
188+
}
189+
190+
export class Role {
191+
static any = (): string;
192+
static user = (id: string, status?: string): string;
193+
static users = (status?: string): string;
194+
static guests = (): string;
195+
static team = (id: string, role?: string): string;
196+
static member = (id: string): string;
197+
static status = (status: string): string;
198+
}
199+
177200
{% for service in spec.services %}
178201
export class {{ service.name | caseUcfirst }} extends Service {
179202
constructor(client: Client{% for parameter in service.globalParams %}, {{ parameter.name | caseCamel | escapeKeyword }}: {{ parameter | typeName }}{% if not parameter.required %}|null{% endif %}{% endfor %});

0 commit comments

Comments
 (0)