Back to Apitable

.BasicModuleAttachmentInterfaceApi

packages/api-client/BasicModuleAttachmentInterfaceApi.md

1.13.0-beta.18.1 KB
Original Source

.BasicModuleAttachmentInterfaceApi

All URIs are relative to http://backend/api/v1

MethodHTTP requestDescription
citePOST /base/attach/citeChanges in the number of references to space attachment resources
readReviewsGET /base/attach/readReviewsPaging query pictures that need manual review
submitAuditResultPOST /base/attach/submitAuditResultSubmit image review results
uploadPOST /base/attach/uploadUpload resources
urlUploadPOST /base/attach/urlUploadImage URL upload interface

cite

ResponseDataVoid cite(spaceAssetOpRo)

The same attachment needs to pass the token repeatedly

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .BasicModuleAttachmentInterfaceApi(configuration);

let body:.BasicModuleAttachmentInterfaceApiCiteRequest = {
  // SpaceAssetOpRo
  spaceAssetOpRo: {
    addToken: [
      {
        token: "token_example",
        name: "name_example",
      },
    ],
    removeToken: [
      {
        token: "token_example",
        name: "name_example",
      },
    ],
    nodeId: "dst10",
  },
};

apiInstance.cite(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
spaceAssetOpRoSpaceAssetOpRo

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

readReviews

ResponseDataPageInfoAssetsAuditVo readReviews()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .BasicModuleAttachmentInterfaceApi(configuration);

let body:.BasicModuleAttachmentInterfaceApiReadReviewsRequest = {
  // Page
  page: {
    records: [
      {},
    ],
    total: 1,
    size: 1,
    current: 1,
    orders: [
      {
        column: "column_example",
        asc: true,
      },
    ],
    optimizeCountSql: true,
    searchCount: true,
    optimizeJoinOfCountSql: true,
    countId: "countId_example",
    maxLimit: 1,
    pages: 1,
  },
  // string | Page params
  pageObjectParams: "{"pageNo":1,"pageSize":20}",
};

apiInstance.readReviews(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
pagePagedefaults to undefined
pageObjectParams[string]Page paramsdefaults to undefined

Return type

ResponseDataPageInfoAssetsAuditVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

submitAuditResult

ResponseDataVoid submitAuditResult(assetsAuditRo)

Submit the image review results, enter the reviewer's name when submitting

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .BasicModuleAttachmentInterfaceApi(configuration);

let body:.BasicModuleAttachmentInterfaceApiSubmitAuditResultRequest = {
  // AssetsAuditRo
  assetsAuditRo: {
    assetlist: [
      {
        assetFileUrl: "space/2020/03/27/1243592950910349313",
        auditResultSuggestion: "block",
      },
    ],
    auditorUserId: "0122454826077721",
    auditorName: "name",
  },
};

apiInstance.submitAuditResult(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
assetsAuditRoAssetsAuditRo

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

upload

ResponseDataAssetUploadResult upload()

Upload resource files, any file type is unlimited

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .BasicModuleAttachmentInterfaceApi(configuration);

let body:.BasicModuleAttachmentInterfaceApiUploadRequest = {
  // AttachOpRo (optional)
  attachOpRo: {
    file: { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' },
    type: 0,
    nodeId: "dst10",
    data: "FutureIsComing",
  },
};

apiInstance.upload(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
attachOpRoAttachOpRo

Return type

ResponseDataAssetUploadResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

urlUpload

ResponseDataAssetUploadResult urlUpload()

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .BasicModuleAttachmentInterfaceApi(configuration);

let body:.BasicModuleAttachmentInterfaceApiUrlUploadRequest = {
  // AttachUrlOpRo (optional)
  attachUrlOpRo: {
    url: "url_example",
    type: 0,
    nodeId: "dst10",
  },
};

apiInstance.urlUpload(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
attachUrlOpRoAttachUrlOpRo

Return type

ResponseDataAssetUploadResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]