Skip to content

Commit

Permalink
fix: updated types as per swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth9890 committed Sep 10, 2024
1 parent 27ceb3b commit 3f9a8bd
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export type HelperPaginatedResponse = {
meta?: HelperMeta;
};

export type ModelAccessLevel = 'Read' | 'Write';
export type ModelACLRequest = { address?: string; roles?: ModelAccessLevel[] };

export type ModelAccessLevel = 'view' | 'update' | 'delete' | 'share';

export type ModelAccountCreateRequest = {
message: string;
Expand All @@ -57,8 +59,7 @@ export type ModelAuthRequest = {
};

export type ModelCreateDataAssetRequest = {
acl?: ModelRoleRequest[];
// eslint-disable-next-line @typescript-eslint/ban-types
acl?: ModelACLRequest[];
claim?: {};
data_model_id?: number;
expiration_date?: string;
Expand All @@ -74,7 +75,6 @@ export type ModelDataModel = {
deleted_at?: string;
description?: string;
id?: number;
// eslint-disable-next-line @typescript-eslint/ban-types
schema?: {};
tags?: string[];
title?: string;
Expand All @@ -92,32 +92,33 @@ export type ModelMyAccountResponse = {
wallet_address?: string;
};

export type ModelPublicACL = {
address?: string;
created_at?: string;
data_asset_id?: number;
roles?: string[];
solana_address?: string;
updated_at?: string;
};

export type ModelPublicDataAsset = {
acl?: ModelPublicACL[];
created_at?: string;
created_by?: string;
data_model_id?: number;
expiration_date?: string;
fid?: string;
id?: number;
name?: string;
roles?: ModelPublicRole[];
size?: number;
tags?: string[];
transaction_id?: string;
type?: string;
updated_at?: string;
};

export type ModelPublicRole = {
created_at?: string;
data_asset_id?: number;
role?: string;
updated_at?: string;
wallet_address?: string;
};

export type ModelRoleRequest = { address?: string; role?: ModelAccessLevel };

export type ModelTokenResponse = { token?: string };

export type ModelUpdateDataAssetRequest = {};

export type ResponsesEntityRemovedResponse = { message?: string };

0 comments on commit 3f9a8bd

Please sign in to comment.