Skip to content

Commit 6e824e0

Browse files
Merge pull request #552 from appwrite/fix-node-types
Fx: Node types
2 parents 92f0da7 + abdd812 commit 6e824e0

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

templates/node/index.d.ts.twig

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,35 @@ declare module "{{ language.params.npmPackage|caseDash }}" {
167167

168168
static limit(value: number): string;
169169

170-
static offset = (value: number): string;
170+
static offset(value: number): string;
171171

172172
private static addQuery(attribute: string, method: string, value: QueryTypes): string;
173173

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+
}
198+
177199
{% for service in spec.services %}
178200
export class {{ service.name | caseUcfirst }} extends Service {
179201
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)