From 84f7c7aa5ea97098c6d62cd56c489a1690e3263b Mon Sep 17 00:00:00 2001 From: amit <1mitccc@gmail.com> Date: Mon, 16 Dec 2024 23:22:27 +0530 Subject: [PATCH] feat: add orderBy in google drive folder and file syncs --- .../file/services/googledrive/index.ts | 1 + .../folder/services/googledrive/index.ts | 1 + packages/api/swagger/swagger-spec.yaml | 107 +++++++++++++----- 3 files changed, 81 insertions(+), 28 deletions(-) diff --git a/packages/api/src/filestorage/file/services/googledrive/index.ts b/packages/api/src/filestorage/file/services/googledrive/index.ts index c4be3bf17..348138fa4 100644 --- a/packages/api/src/filestorage/file/services/googledrive/index.ts +++ b/packages/api/src/filestorage/file/services/googledrive/index.ts @@ -172,6 +172,7 @@ export class GoogleDriveService implements IFileService { pageToken: pageToken, includeItemsFromAllDrives: true, supportsAllDrives: true, + orderBy: 'modifiedTime', }), ); diff --git a/packages/api/src/filestorage/folder/services/googledrive/index.ts b/packages/api/src/filestorage/folder/services/googledrive/index.ts index 3dbdb127f..e866001e8 100644 --- a/packages/api/src/filestorage/folder/services/googledrive/index.ts +++ b/packages/api/src/filestorage/folder/services/googledrive/index.ts @@ -174,6 +174,7 @@ export class GoogleDriveFolderService implements IFolderService { pageToken, includeItemsFromAllDrives: true, supportsAllDrives: true, + orderBy: 'modifiedTime', ...(driveId !== 'root' && { driveId, corpora: 'drive', diff --git a/packages/api/swagger/swagger-spec.yaml b/packages/api/swagger/swagger-spec.yaml index 19066fefe..5d199b697 100644 --- a/packages/api/swagger/swagger-spec.yaml +++ b/packages/api/swagger/swagger-spec.yaml @@ -107,8 +107,6 @@ paths: schema: type: string responses: - '200': - description: '' '201': description: '' content: @@ -129,8 +127,6 @@ paths: schema: type: string responses: - '200': - description: '' '201': description: '' content: @@ -185,6 +181,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -309,6 +306,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -400,6 +398,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -489,6 +488,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -612,12 +612,6 @@ paths: responses: '200': description: Pull frequency updated successfully - '201': - description: '' - content: - application/json: - schema: - type: object tags: *ref_5 x-speakeasy-group: sync get: @@ -657,6 +651,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -781,6 +776,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -905,6 +901,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1028,6 +1025,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1152,6 +1150,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1276,6 +1275,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1367,6 +1367,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1490,6 +1491,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1581,6 +1583,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1673,6 +1676,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1800,6 +1804,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1891,6 +1896,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2190,11 +2196,15 @@ paths: required: false in: query schema: + minimum: 1 + default: 1 type: number - name: limit required: false in: query schema: + minimum: 1 + default: 10 type: number responses: '200': @@ -2230,6 +2240,12 @@ paths: application/json: schema: type: object + '201': + description: '' + content: + application/json: + schema: + type: object tags: &ref_21 - passthrough x-speakeasy-group: passthrough @@ -2275,6 +2291,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2404,6 +2421,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2535,6 +2553,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2664,6 +2683,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2793,6 +2813,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2887,6 +2908,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2981,6 +3003,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3109,6 +3132,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3203,6 +3227,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3331,6 +3356,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3425,6 +3451,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3549,6 +3576,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3640,6 +3668,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3765,6 +3794,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3857,6 +3887,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3949,6 +3980,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4041,6 +4073,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4165,6 +4198,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4257,6 +4291,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4381,6 +4416,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4473,6 +4509,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4597,6 +4634,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4688,6 +4726,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4813,6 +4852,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4937,6 +4977,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5029,6 +5070,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5154,6 +5196,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5245,6 +5288,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5337,6 +5381,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5429,6 +5474,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5521,6 +5567,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5612,6 +5659,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5736,6 +5784,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5860,6 +5909,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5951,6 +6001,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6042,6 +6093,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6164,6 +6216,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6286,6 +6339,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6375,6 +6429,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6465,6 +6520,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6595,7 +6651,6 @@ components: password_hash: type: string required: - - id_user - email - password_hash Connection: @@ -6683,8 +6738,8 @@ components: description: The unique UUID of the webhook. endpoint_description: type: string - example: Webhook to receive connection events nullable: true + example: Webhook to receive connection events description: The description of the webhook. url: type: string @@ -6722,8 +6777,8 @@ components: last_update: format: date-time type: string - example: '2024-10-01T12:00:00Z' nullable: true + example: '2024-10-01T12:00:00Z' description: The last update date of the webhook. required: - id_webhook_endpoint @@ -6758,7 +6813,6 @@ components: type: string required: - url - - description - scope SignatureVerificationDto: type: object @@ -8725,8 +8779,6 @@ components: - id_project - name - sync_mode - - pull_frequency - - redirect_url - id_user - id_connector_set CreateProjectDto: @@ -9095,10 +9147,10 @@ components: type: object properties: method: - type: string enum: - GET - POST + type: string path: type: string nullable: true @@ -9117,12 +9169,11 @@ components: type: object additionalProperties: true nullable: true + headers: + type: object required: - method - path - - data - - request_format - - overrideBaseUrl UnifiedMarketingautomationActionOutput: type: object properties: {} @@ -11829,7 +11880,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The UUID of the drive tied to the file nullable: true - permission: + permissions: type: string example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The UUID of the permission tied to the file @@ -11908,7 +11959,7 @@ components: - size - folder_id - drive_id - - permission + - permissions - shared_link UnifiedFilestorageFileInput: type: object @@ -11943,7 +11994,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The UUID of the drive tied to the file nullable: true - permission: + permissions: type: string example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f description: The UUID of the permission tied to the file @@ -11968,7 +12019,7 @@ components: - size - folder_id - drive_id - - permission + - permissions - shared_link UnifiedFilestorageFolderOutput: type: object @@ -12007,7 +12058,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The UUID of the shared link tied to the folder - permission: + permissions: type: string example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true @@ -12077,7 +12128,7 @@ components: - drive_id - parent_folder_id - shared_link - - permission + - permissions UnifiedFilestorageFolderInput: type: object properties: @@ -12115,7 +12166,7 @@ components: example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true description: The UUID of the shared link tied to the folder - permission: + permissions: type: string example: 801f9ede-c698-4e66-a7fc-48d19eebaa4f nullable: true @@ -12136,7 +12187,7 @@ components: - drive_id - parent_folder_id - shared_link - - permission + - permissions UnifiedFilestorageGroupOutput: type: object properties: