Browse Source

fix(nc-gui): update swagger file

Ramesh Mane 6 days ago
parent
commit
073bc47909
  1. 47
      packages/nc-gui/components/dlg/share-and-collaborate/CustomUrl.vue
  2. 6
      packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
  3. 4
      packages/nocodb/src/schema/swagger-v2.json
  4. 8
      packages/nocodb/src/schema/swagger.json

47
packages/nc-gui/components/dlg/share-and-collaborate/CustomUrl.vue

@ -1,16 +1,57 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { ViewType } from 'nocodb-sdk' import type { StringOrNullType } from 'nocodb-sdk'
interface Props { interface Props {
view: ViewType & { meta: object & Record<string, any> } /**
* The unique identifier for the custom URL.
*/
id?: StringOrNullType
/**
* The base URL of the dashboard.
*/
dashboardUrl: string dashboardUrl: string
/**
* The search query to be appended to the custom URL.
*/
searchQuery?: string
/**
* The tooltip text to be displayed.
*/
tooltip?: string
/**
* A function to copy the custom URL to the clipboard.
*
* @param customUrl The custom URL to be copied.
* @returns A promise that resolves to a boolean indicating whether the copy operation was successful.
*/
copyCustomUrl: (customUrl: string) => Promise<boolean>
} }
defineProps<Props>() defineProps<Props>()
</script> </script>
<template> <template>
<span class="hidden"></span> <div class="flex flex-col justify-between mt-1 py-2 px-3 bg-gray-50 rounded-md">
<div class="flex flex-row items-center justify-between">
<div class="flex text-black items-center gap-1">
{{ $t('title.customUrl') }}
</div>
<NcTooltip>
<template #title>
<div class="text-center">
{{ $t('msg.info.thisFeatureIsOnlyAvailableInEnterpriseEdition') }}
</div>
</template>
<a-switch
:checked="false"
disabled
class="share-custom-url-toggle !mt-0.25"
data-testid="share-custom-url-toggle"
size="small"
/>
</NcTooltip>
</div>
</div>
</template> </template>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

6
packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue

@ -1,9 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import type { StringOrNullType } from 'nocodb-sdk';
interface ShareBase { interface ShareBase {
uuid?: string uuid?: string
url?: string url?: string
role?: string role?: string
fk_custom_url_id?: string fk_custom_url_id?: StringOrNullType
} }
enum ShareBaseRole { enum ShareBaseRole {
@ -52,7 +54,7 @@ const loadBase = async () => {
uuid: res.uuid, uuid: res.uuid,
url: res.url, url: res.url,
role: res.roles, role: res.roles,
fk_custom_url_id: res?.fk_custom_url_id, fk_custom_url_id: res?.fk_custom_url_id || null,
} }
} catch (e: any) { } catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e)) message.error(await extractSdkResponseErrorMsg(e))

4
packages/nocodb/src/schema/swagger-v2.json

@ -2651,6 +2651,10 @@
"roles": { "roles": {
"type": "string", "type": "string",
"example": "viewer" "example": "viewer"
},
"fk_custom_url_id": {
"$ref": "#/components/schemas/StringOrNull",
"description": "ID of custom url"
} }
} }
}, },

8
packages/nocodb/src/schema/swagger.json

@ -3120,6 +3120,10 @@
"roles": { "roles": {
"type": "string", "type": "string",
"example": "viewer" "example": "viewer"
},
"fk_custom_url_id": {
"$ref": "#/components/schemas/StringOrNull",
"description": "ID of custom url"
} }
} }
}, },
@ -3245,6 +3249,10 @@
"roles": { "roles": {
"type": "string", "type": "string",
"example": "viewer" "example": "viewer"
},
"fk_custom_url_id": {
"$ref": "#/components/schemas/StringOrNull",
"description": "ID of custom url"
} }
} }
} }

Loading…
Cancel
Save