π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
feat: API v3 - workspace-user - keep only required props
Pranav C4fce06779fbf
diff --git a/packages/nocodb/src/db/BaseModelSqlv2/nested-link-preparator.ts b/packages/nocodb/src/db/BaseModelSqlv2/nested-link-preparator.tsindex 8753001984..a616bc05f3 100644--- a/packages/nocodb/src/db/BaseModelSqlv2/nested-link-preparator.ts+++ b/packages/nocodb/src/db/BaseModelSqlv2/nested-link-preparator.ts@@ -31,7 +31,7 @@ export class NestedLinkPreparator {baseModel.context,);- const { refContext } = colOptions.getRelContext(baseModel.context)+ const { refContext } = colOptions.getRelContext(baseModel.context);const refModel = await Model.get(refContext,@@ -55,13 +55,10 @@ export class NestedLinkPreparator {continue;}- const refBaseModel = await Model.getBaseModelSQL(- refContext,- {- model: refModel,- dbDriver: baseModel.dbDriver,- },- );+ const refBaseModel = await Model.getBaseModelSQL(refContext, {+ model: refModel,+ dbDriver: baseModel.dbDriver,+ });switch (colOptions.type) {case RelationTypes.BELONGS_TO:diff --git a/packages/nocodb/src/models/User.ts b/packages/nocodb/src/models/User.tsindex 4d591190f8..19f05bd5e6 100644--- a/packages/nocodb/src/models/User.ts+++ b/packages/nocodb/src/models/User.ts@@ -76,7 +76,7 @@ export default class User implements UserType {'meta',]);- // // Todo: @rameshmane7218 uncomment this part in onboarding flow pr+ // // Todo: @rameshmane7218 uncomment this part in onboarding flow pr// // Set is_new_user to true for new users if not explicitly set// if (insertObj.is_new_user === undefined) {// insertObj.is_new_user = true;diff --git a/packages/nocodb/src/schema/swagger-v3.json b/packages/nocodb/src/schema/swagger-v3.jsonindex 0968758b67..36f1bff56d 100644--- a/packages/nocodb/src/schema/swagger-v3.json+++ b/packages/nocodb/src/schema/swagger-v3.json@@ -7344,26 +7344,14 @@"type": "object","description": "Workspace user information","properties": {- "id": {- "type": "string",- "description": "Unique identifier for the user"- },"email": {"type": "string","format": "email","description": "Email address of the user"},- "name": {- "type": "string",- "description": "Display name of the user"- },- "workspace_roles": {- "$ref": "#/components/schemas/WorkspaceRoles",- "description": "Workspace roles assigned to the user"- },- "workspace_id": {+ "user_id": {"type": "string",- "description": "Unique identifier for the workspace"+ "description": "Unique identifier for the user"},"created_at": {"type": "string",@@ -7375,16 +7363,12 @@"format": "date-time","description": "Timestamp when the user was last updated in the workspace"},- "invite_accepted": {- "type": "boolean",- "description": "Whether the user has accepted the workspace invitation"- },- "invite_token": {- "type": "string",- "description": "Invitation token for the user"+ "workspace_roles": {+ "$ref": "#/components/schemas/WorkspaceRoles",+ "description": "Workspace roles assigned to the user"}},- "required": ["id", "email", "workspace_roles"]+ "required": ["email", "user_id", "created_at", "updated_at", "workspace_role"]},"WorkspaceUserCreate": {"type": "object",@@ -7399,13 +7383,9 @@"format": "email","description": "Email address of the user (optional if id is provided)"},- "user_name": {- "type": "string",- "description": "Name of the user (optional)"- },- "workspace_role": {+ "workspace_roles": {"$ref": "#/components/schemas/WorkspaceRoles",- "description": "Workspace role to assign to the user"+ "description": "Workspace roles assigned to the user"}},"required": ["workspace_role"]@@ -7423,9 +7403,9 @@"format": "email","description": "Email address of the user (optional if id is provided)"},- "workspace_role": {+ "workspace_roles": {"$ref": "#/components/schemas/WorkspaceRoles",- "description": "New workspace role to assign to the user"+ "description": "Workspace roles assigned to the user"}},"required": ["workspace_role"]