Skip to content

Commit 643454b

Browse files
committed
Fix optionals
1 parent 48e0ea9 commit 643454b

File tree

9 files changed

+87
-87
lines changed

9 files changed

+87
-87
lines changed

src/services/account.ts

Lines changed: 38 additions & 38 deletions
Large diffs are not rendered by default.

src/services/avatars.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class Avatars extends Service {
2828
* @throws {AppwriteException}
2929
* @returns {ArrayBuffer}
3030
*/
31-
getBrowser(params?: { code: Browser, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;
31+
getBrowser(params: { code: Browser, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;
3232
/**
3333
* You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.
3434
*
@@ -108,7 +108,7 @@ export class Avatars extends Service {
108108
* @throws {AppwriteException}
109109
* @returns {ArrayBuffer}
110110
*/
111-
getCreditCard(params?: { code: CreditCard, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;
111+
getCreditCard(params: { code: CreditCard, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;
112112
/**
113113
* The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
114114
*
@@ -185,7 +185,7 @@ export class Avatars extends Service {
185185
* @throws {AppwriteException}
186186
* @returns {ArrayBuffer}
187187
*/
188-
getFavicon(params?: { url: string }): Promise<ArrayBuffer>;
188+
getFavicon(params: { url: string }): Promise<ArrayBuffer>;
189189
/**
190190
* Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
191191
*
@@ -247,7 +247,7 @@ export class Avatars extends Service {
247247
* @throws {AppwriteException}
248248
* @returns {ArrayBuffer}
249249
*/
250-
getFlag(params?: { code: Flag, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;
250+
getFlag(params: { code: Flag, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;
251251
/**
252252
* You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
253253
*
@@ -328,7 +328,7 @@ export class Avatars extends Service {
328328
* @throws {AppwriteException}
329329
* @returns {ArrayBuffer}
330330
*/
331-
getImage(params?: { url: string, width?: number, height?: number }): Promise<ArrayBuffer>;
331+
getImage(params: { url: string, width?: number, height?: number }): Promise<ArrayBuffer>;
332332
/**
333333
* Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
334334
*
@@ -490,7 +490,7 @@ export class Avatars extends Service {
490490
* @throws {AppwriteException}
491491
* @returns {ArrayBuffer}
492492
*/
493-
getQR(params?: { text: string, size?: number, margin?: number, download?: boolean }): Promise<ArrayBuffer>;
493+
getQR(params: { text: string, size?: number, margin?: number, download?: boolean }): Promise<ArrayBuffer>;
494494
/**
495495
* Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
496496
*

src/services/databases.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Databases extends Service {
2323
* @returns {Promise}
2424
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
2525
*/
26-
listDocuments<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, queries?: string[] }): Promise<Models.DocumentList<Document>>;
26+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, queries?: string[] }): Promise<Models.DocumentList<Document>>;
2727
/**
2828
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
2929
*
@@ -87,7 +87,7 @@ export class Databases extends Service {
8787
* @returns {Promise}
8888
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.
8989
*/
90-
createDocument<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[] }): Promise<Document>;
90+
createDocument<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[] }): Promise<Document>;
9191
/**
9292
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
9393
*
@@ -176,7 +176,7 @@ export class Databases extends Service {
176176
* @returns {Promise}
177177
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.
178178
*/
179-
getDocument<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, documentId: string, queries?: string[] }): Promise<Document>;
179+
getDocument<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, queries?: string[] }): Promise<Document>;
180180
/**
181181
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
182182
*
@@ -247,7 +247,7 @@ export class Databases extends Service {
247247
* @returns {Promise}
248248
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.
249249
*/
250-
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[] }): Promise<Document>;
250+
upsertDocument<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[] }): Promise<Document>;
251251
/**
252252
* Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
253253
*
@@ -333,7 +333,7 @@ export class Databases extends Service {
333333
* @returns {Promise}
334334
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.
335335
*/
336-
updateDocument<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[] }): Promise<Document>;
336+
updateDocument<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, data?: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Partial<Omit<Document, keyof Models.Document>>, permissions?: string[] }): Promise<Document>;
337337
/**
338338
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
339339
*
@@ -413,7 +413,7 @@ export class Databases extends Service {
413413
* @returns {Promise}
414414
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.
415415
*/
416-
deleteDocument(params?: { databaseId: string, collectionId: string, documentId: string }): Promise<{}>;
416+
deleteDocument(params: { databaseId: string, collectionId: string, documentId: string }): Promise<{}>;
417417
/**
418418
* Delete a document by its unique ID.
419419
*
@@ -479,7 +479,7 @@ export class Databases extends Service {
479479
* @returns {Promise}
480480
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
481481
*/
482-
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number }): Promise<Document>;
482+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number }): Promise<Document>;
483483
/**
484484
* Decrement a specific attribute of a document by a given value.
485485
*
@@ -566,7 +566,7 @@ export class Databases extends Service {
566566
* @returns {Promise}
567567
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
568568
*/
569-
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params?: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number }): Promise<Document>;
569+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number }): Promise<Document>;
570570
/**
571571
* Increment a specific attribute of a document by a given value.
572572
*

src/services/functions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class Functions extends Service {
2222
* @throws {AppwriteException}
2323
* @returns {Promise}
2424
*/
25-
listExecutions(params?: { functionId: string, queries?: string[] }): Promise<Models.ExecutionList>;
25+
listExecutions(params: { functionId: string, queries?: string[] }): Promise<Models.ExecutionList>;
2626
/**
2727
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
2828
*
@@ -80,7 +80,7 @@ export class Functions extends Service {
8080
* @throws {AppwriteException}
8181
* @returns {Promise}
8282
*/
83-
createExecution(params?: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }): Promise<Models.Execution>;
83+
createExecution(params: { functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string }): Promise<Models.Execution>;
8484
/**
8585
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
8686
*
@@ -169,7 +169,7 @@ export class Functions extends Service {
169169
* @throws {AppwriteException}
170170
* @returns {Promise}
171171
*/
172-
getExecution(params?: { functionId: string, executionId: string }): Promise<Models.Execution>;
172+
getExecution(params: { functionId: string, executionId: string }): Promise<Models.Execution>;
173173
/**
174174
* Get a function execution log by its unique ID.
175175
*

src/services/graphql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class Graphql extends Service {
2020
* @throws {AppwriteException}
2121
* @returns {Promise}
2222
*/
23-
query(params?: { query: object }): Promise<{}>;
23+
query(params: { query: object }): Promise<{}>;
2424
/**
2525
* Execute a GraphQL mutation.
2626
*
@@ -70,7 +70,7 @@ export class Graphql extends Service {
7070
* @throws {AppwriteException}
7171
* @returns {Promise}
7272
*/
73-
mutation(params?: { query: object }): Promise<{}>;
73+
mutation(params: { query: object }): Promise<{}>;
7474
/**
7575
* Execute a GraphQL mutation.
7676
*

src/services/messaging.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class Messaging extends Service {
2222
* @throws {AppwriteException}
2323
* @returns {Promise}
2424
*/
25-
createSubscriber(params?: { topicId: string, subscriberId: string, targetId: string }): Promise<Models.Subscriber>;
25+
createSubscriber(params: { topicId: string, subscriberId: string, targetId: string }): Promise<Models.Subscriber>;
2626
/**
2727
* Create a new subscriber.
2828
*
@@ -91,7 +91,7 @@ export class Messaging extends Service {
9191
* @throws {AppwriteException}
9292
* @returns {Promise}
9393
*/
94-
deleteSubscriber(params?: { topicId: string, subscriberId: string }): Promise<{}>;
94+
deleteSubscriber(params: { topicId: string, subscriberId: string }): Promise<{}>;
9595
/**
9696
* Delete a subscriber by its unique ID.
9797
*

src/services/storage.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class Storage extends Service {
2424
* @throws {AppwriteException}
2525
* @returns {Promise}
2626
*/
27-
listFiles(params?: { bucketId: string, queries?: string[], search?: string }): Promise<Models.FileList>;
27+
listFiles(params: { bucketId: string, queries?: string[], search?: string }): Promise<Models.FileList>;
2828
/**
2929
* Get a list of all the user files. You can use the query params to filter your results.
3030
*
@@ -93,7 +93,7 @@ export class Storage extends Service {
9393
* @throws {AppwriteException}
9494
* @returns {Promise}
9595
*/
96-
async createFile(params?: { bucketId: string, fileId: string, file: {name: string, type: string, size: number, uri: string}, permissions?: string[] , onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;
96+
async createFile(params: { bucketId: string, fileId: string, file: {name: string, type: string, size: number, uri: string}, permissions?: string[] , onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;
9797
/**
9898
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
9999
*
@@ -233,7 +233,7 @@ export class Storage extends Service {
233233
* @throws {AppwriteException}
234234
* @returns {Promise}
235235
*/
236-
getFile(params?: { bucketId: string, fileId: string }): Promise<Models.File>;
236+
getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;
237237
/**
238238
* Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
239239
*
@@ -288,7 +288,7 @@ export class Storage extends Service {
288288
* @throws {AppwriteException}
289289
* @returns {Promise}
290290
*/
291-
updateFile(params?: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;
291+
updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;
292292
/**
293293
* Update a file by its unique ID. Only users with write permissions have access to update this resource.
294294
*
@@ -356,7 +356,7 @@ export class Storage extends Service {
356356
* @throws {AppwriteException}
357357
* @returns {Promise}
358358
*/
359-
deleteFile(params?: { bucketId: string, fileId: string }): Promise<{}>;
359+
deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;
360360
/**
361361
* Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
362362
*
@@ -411,7 +411,7 @@ export class Storage extends Service {
411411
* @throws {AppwriteException}
412412
* @returns {ArrayBuffer}
413413
*/
414-
getFileDownload(params?: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;
414+
getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;
415415
/**
416416
* Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
417417
*
@@ -489,7 +489,7 @@ export class Storage extends Service {
489489
* @throws {AppwriteException}
490490
* @returns {ArrayBuffer}
491491
*/
492-
getFilePreview(params?: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): Promise<ArrayBuffer>;
492+
getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): Promise<ArrayBuffer>;
493493
/**
494494
* Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
495495
*
@@ -633,7 +633,7 @@ export class Storage extends Service {
633633
* @throws {AppwriteException}
634634
* @returns {ArrayBuffer}
635635
*/
636-
getFileView(params?: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;
636+
getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;
637637
/**
638638
* Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
639639
*

0 commit comments

Comments
 (0)