mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-29 00:01:20 +00:00
initiall commit
This commit is contained in:
commit
7ddfb1f52b
276 files changed
+37629
No files matched your search
@@ -0,0 +1,229 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Collection } from '../models/Collection';
|
||||
import type { CollectionListResponse } from '../models/CollectionListResponse';
|
||||
import type { CreateCollectionRequest } from '../models/CreateCollectionRequest';
|
||||
import type { CreateDocumentRequest } from '../models/CreateDocumentRequest';
|
||||
import type { Document } from '../models/Document';
|
||||
import type { DocumentListResponse } from '../models/DocumentListResponse';
|
||||
import type { UpdateCollectionRequest } from '../models/UpdateCollectionRequest';
|
||||
import type { UpdateDocumentRequest } from '../models/UpdateDocumentRequest';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class CollectionsService {
|
||||
/**
|
||||
* @returns CollectionListResponse List of collections in the project
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listCollections({
|
||||
projectId,
|
||||
}: {
|
||||
projectId: string,
|
||||
}): CancelablePromise<CollectionListResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/collections',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Collection Collection created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createCollection({
|
||||
projectId,
|
||||
requestBody,
|
||||
}: {
|
||||
projectId: string,
|
||||
requestBody: CreateCollectionRequest,
|
||||
}): CancelablePromise<Collection> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/projects/{projectID}/collections',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Collection Collection details
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getCollection({
|
||||
projectId,
|
||||
collectionId,
|
||||
}: {
|
||||
projectId: string,
|
||||
collectionId: string,
|
||||
}): CancelablePromise<Collection> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/collections/{collectionID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'collectionID': collectionId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Collection Collection updated
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateCollection({
|
||||
projectId,
|
||||
collectionId,
|
||||
requestBody,
|
||||
}: {
|
||||
projectId: string,
|
||||
collectionId: string,
|
||||
requestBody: UpdateCollectionRequest,
|
||||
}): CancelablePromise<Collection> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/projects/{projectID}/collections/{collectionID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'collectionID': collectionId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteCollection({
|
||||
projectId,
|
||||
collectionId,
|
||||
}: {
|
||||
projectId: string,
|
||||
collectionId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/projects/{projectID}/collections/{collectionID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'collectionID': collectionId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns DocumentListResponse List of documents in the collection
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listDocuments({
|
||||
collectionId,
|
||||
limit = 50,
|
||||
offset,
|
||||
}: {
|
||||
collectionId: string,
|
||||
limit?: number,
|
||||
offset?: number,
|
||||
}): CancelablePromise<DocumentListResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/collections/{collectionID}/documents',
|
||||
path: {
|
||||
'collectionID': collectionId,
|
||||
},
|
||||
query: {
|
||||
'limit': limit,
|
||||
'offset': offset,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Document Document created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createDocument({
|
||||
collectionId,
|
||||
requestBody,
|
||||
}: {
|
||||
collectionId: string,
|
||||
requestBody: CreateDocumentRequest,
|
||||
}): CancelablePromise<Document> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/collections/{collectionID}/documents',
|
||||
path: {
|
||||
'collectionID': collectionId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Document Document details
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getDocument({
|
||||
collectionId,
|
||||
documentId,
|
||||
}: {
|
||||
collectionId: string,
|
||||
documentId: string,
|
||||
}): CancelablePromise<Document> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/collections/{collectionID}/documents/{documentID}',
|
||||
path: {
|
||||
'collectionID': collectionId,
|
||||
'documentID': documentId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Document Document updated
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateDocument({
|
||||
collectionId,
|
||||
documentId,
|
||||
requestBody,
|
||||
}: {
|
||||
collectionId: string,
|
||||
documentId: string,
|
||||
requestBody: UpdateDocumentRequest,
|
||||
}): CancelablePromise<Document> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/collections/{collectionID}/documents/{documentID}',
|
||||
path: {
|
||||
'collectionID': collectionId,
|
||||
'documentID': documentId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteDocument({
|
||||
collectionId,
|
||||
documentId,
|
||||
}: {
|
||||
collectionId: string,
|
||||
documentId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/collections/{collectionID}/documents/{documentID}',
|
||||
path: {
|
||||
'collectionID': collectionId,
|
||||
'documentID': documentId,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { HealthStatus } from '../models/HealthStatus';
|
||||
import type { ReadinessStatus } from '../models/ReadinessStatus';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class HealthService {
|
||||
/**
|
||||
* @returns HealthStatus Liveness check
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getLiveness(): CancelablePromise<HealthStatus> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/health/liveness',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns ReadinessStatus Readiness check
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getReadiness(): CancelablePromise<ReadinessStatus> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/health/readiness',
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { AcceptInvitationRequest } from '../models/AcceptInvitationRequest';
|
||||
import type { CreateInvitationRequest } from '../models/CreateInvitationRequest';
|
||||
import type { CreateOrganizationRequest } from '../models/CreateOrganizationRequest';
|
||||
import type { Invitation } from '../models/Invitation';
|
||||
import type { OrganizationInvitation } from '../models/OrganizationInvitation';
|
||||
import type { OrganizationMember } from '../models/OrganizationMember';
|
||||
import type { OrganizationMembership } from '../models/OrganizationMembership';
|
||||
import type { UpdateOrganizationMemberRoleRequest } from '../models/UpdateOrganizationMemberRoleRequest';
|
||||
import type { UpdateOrganizationRequest } from '../models/UpdateOrganizationRequest';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class OrganizationsService {
|
||||
/**
|
||||
* @returns any Organizations for the current user
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listOrganizations(): CancelablePromise<{
|
||||
items: Array<OrganizationMembership>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/organizations',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns OrganizationMembership Organization created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createOrganization({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: CreateOrganizationRequest,
|
||||
}): CancelablePromise<OrganizationMembership> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/organizations',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateOrganization({
|
||||
organizationId,
|
||||
requestBody,
|
||||
}: {
|
||||
organizationId: string,
|
||||
requestBody: UpdateOrganizationRequest,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/organizations/{organizationID}',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteOrganization({
|
||||
organizationId,
|
||||
}: {
|
||||
organizationId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/organizations/{organizationID}',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns any Members of an organization
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listOrganizationMembers({
|
||||
organizationId,
|
||||
}: {
|
||||
organizationId: string,
|
||||
}): CancelablePromise<{
|
||||
items: Array<OrganizationMember>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/organizations/{organizationID}/members',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns OrganizationMember Organization member role updated
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateOrganizationMemberRole({
|
||||
organizationId,
|
||||
userId,
|
||||
requestBody,
|
||||
}: {
|
||||
organizationId: string,
|
||||
userId: string,
|
||||
requestBody: UpdateOrganizationMemberRoleRequest,
|
||||
}): CancelablePromise<OrganizationMember> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/organizations/{organizationID}/members/{userID}',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
'userID': userId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static removeOrganizationMember({
|
||||
organizationId,
|
||||
userId,
|
||||
}: {
|
||||
organizationId: string,
|
||||
userId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/organizations/{organizationID}/members/{userID}',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
'userID': userId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns any Invitations for an organization
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listOrganizationInvitations({
|
||||
organizationId,
|
||||
}: {
|
||||
organizationId: string,
|
||||
}): CancelablePromise<{
|
||||
items: Array<OrganizationInvitation>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/organizations/{organizationID}/invitations',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Invitation Invitation created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createInvitation({
|
||||
organizationId,
|
||||
requestBody,
|
||||
}: {
|
||||
organizationId: string,
|
||||
requestBody: CreateInvitationRequest,
|
||||
}): CancelablePromise<Invitation> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/organizations/{organizationID}/invitations',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static revokeInvitation({
|
||||
organizationId,
|
||||
invitationId,
|
||||
}: {
|
||||
organizationId: string,
|
||||
invitationId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/organizations/{organizationID}/invitations/{invitationID}',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
'invitationID': invitationId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static acceptInvitation({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: AcceptInvitationRequest,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/invitations/accept',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { BootstrapRequest } from '../models/BootstrapRequest';
|
||||
import type { BootstrapResponse } from '../models/BootstrapResponse';
|
||||
import type { MeResponse } from '../models/MeResponse';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class PlatformService {
|
||||
/**
|
||||
* @returns MeResponse Current authenticated user and tenancy summary
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getMe(): CancelablePromise<MeResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/me',
|
||||
errors: {
|
||||
401: `Error response`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns BootstrapResponse Platform bootstrapped
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static bootstrapPlatform({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: BootstrapRequest,
|
||||
}): CancelablePromise<BootstrapResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/bootstrap',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
409: `Error response`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiKey } from '../models/ApiKey';
|
||||
import type { AuditLogListResponse } from '../models/AuditLogListResponse';
|
||||
import type { CreateApiKeyRequest } from '../models/CreateApiKeyRequest';
|
||||
import type { CreatedApiKey } from '../models/CreatedApiKey';
|
||||
import type { CreateProjectRequest } from '../models/CreateProjectRequest';
|
||||
import type { Project } from '../models/Project';
|
||||
import type { ProjectMember } from '../models/ProjectMember';
|
||||
import type { ProjectOverview } from '../models/ProjectOverview';
|
||||
import type { UpdateProjectMemberRoleRequest } from '../models/UpdateProjectMemberRoleRequest';
|
||||
import type { UpdateProjectRequest } from '../models/UpdateProjectRequest';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class ProjectsService {
|
||||
/**
|
||||
* @returns any Projects within an organization
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listProjects({
|
||||
organizationId,
|
||||
q,
|
||||
}: {
|
||||
organizationId: string,
|
||||
q?: string,
|
||||
}): CancelablePromise<{
|
||||
items: Array<Project>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/organizations/{organizationID}/projects',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
query: {
|
||||
'q': q,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Project Project created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createProject({
|
||||
organizationId,
|
||||
requestBody,
|
||||
}: {
|
||||
organizationId: string,
|
||||
requestBody: CreateProjectRequest,
|
||||
}): CancelablePromise<Project> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/organizations/{organizationID}/projects',
|
||||
path: {
|
||||
'organizationID': organizationId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns ProjectOverview Aggregated project overview metrics
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getProjectOverview({
|
||||
projectId,
|
||||
}: {
|
||||
projectId: string,
|
||||
}): CancelablePromise<ProjectOverview> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/overview',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns any API keys for a project
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listApiKeys({
|
||||
projectId,
|
||||
}: {
|
||||
projectId: string,
|
||||
}): CancelablePromise<{
|
||||
items: Array<ApiKey>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/api-keys',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns CreatedApiKey API key created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createApiKey({
|
||||
projectId,
|
||||
requestBody,
|
||||
}: {
|
||||
projectId: string,
|
||||
requestBody: CreateApiKeyRequest,
|
||||
}): CancelablePromise<CreatedApiKey> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/projects/{projectID}/api-keys',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateProject({
|
||||
projectId,
|
||||
requestBody,
|
||||
}: {
|
||||
projectId: string,
|
||||
requestBody: UpdateProjectRequest,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/projects/{projectID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteProject({
|
||||
projectId,
|
||||
}: {
|
||||
projectId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/projects/{projectID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns any Members of a project
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listProjectMembers({
|
||||
projectId,
|
||||
}: {
|
||||
projectId: string,
|
||||
}): CancelablePromise<{
|
||||
items: Array<ProjectMember>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/members',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns ProjectMember Project member role updated
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateProjectMemberRole({
|
||||
projectId,
|
||||
userId,
|
||||
requestBody,
|
||||
}: {
|
||||
projectId: string,
|
||||
userId: string,
|
||||
requestBody: UpdateProjectMemberRoleRequest,
|
||||
}): CancelablePromise<ProjectMember> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/projects/{projectID}/members/{userID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'userID': userId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static removeProjectMember({
|
||||
projectId,
|
||||
userId,
|
||||
}: {
|
||||
projectId: string,
|
||||
userId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/projects/{projectID}/members/{userID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'userID': userId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static revokeApiKey({
|
||||
projectId,
|
||||
apiKeyId,
|
||||
}: {
|
||||
projectId: string,
|
||||
apiKeyId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/projects/{projectID}/api-keys/{apiKeyID}',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
'apiKeyID': apiKeyId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns AuditLogListResponse Audit logs for a project
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listAuditLogs({
|
||||
projectId,
|
||||
q,
|
||||
action,
|
||||
limit = 50,
|
||||
offset,
|
||||
}: {
|
||||
projectId: string,
|
||||
q?: string,
|
||||
action?: string,
|
||||
limit?: number,
|
||||
offset?: number,
|
||||
}): CancelablePromise<AuditLogListResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/audit-logs',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
query: {
|
||||
'q': q,
|
||||
'action': action,
|
||||
'limit': limit,
|
||||
'offset': offset,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Bucket } from '../models/Bucket';
|
||||
import type { BucketObject } from '../models/BucketObject';
|
||||
import type { BucketObjectListResponse } from '../models/BucketObjectListResponse';
|
||||
import type { CopyBucketObjectRequest } from '../models/CopyBucketObjectRequest';
|
||||
import type { CreateBucketRequest } from '../models/CreateBucketRequest';
|
||||
import type { UpdateBucketObjectRequest } from '../models/UpdateBucketObjectRequest';
|
||||
import type { UpdateBucketRequest } from '../models/UpdateBucketRequest';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class StorageService {
|
||||
/**
|
||||
* @returns any Buckets for a project
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listBuckets({
|
||||
projectId,
|
||||
q,
|
||||
}: {
|
||||
projectId: string,
|
||||
q?: string,
|
||||
}): CancelablePromise<{
|
||||
items: Array<Bucket>;
|
||||
}> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/projects/{projectID}/buckets',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
query: {
|
||||
'q': q,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns Bucket Bucket created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static createBucket({
|
||||
projectId,
|
||||
requestBody,
|
||||
}: {
|
||||
projectId: string,
|
||||
requestBody: CreateBucketRequest,
|
||||
}): CancelablePromise<Bucket> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/projects/{projectID}/buckets',
|
||||
path: {
|
||||
'projectID': projectId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns BucketObjectListResponse Bucket objects
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static listBucketObjects({
|
||||
bucketId,
|
||||
q,
|
||||
limit = 50,
|
||||
offset,
|
||||
}: {
|
||||
bucketId: string,
|
||||
q?: string,
|
||||
limit?: number,
|
||||
offset?: number,
|
||||
}): CancelablePromise<BucketObjectListResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/buckets/{bucketID}/objects',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
},
|
||||
query: {
|
||||
'q': q,
|
||||
'limit': limit,
|
||||
'offset': offset,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns BucketObject Bucket object created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static uploadBucketObject({
|
||||
bucketId,
|
||||
formData,
|
||||
}: {
|
||||
bucketId: string,
|
||||
formData: {
|
||||
objectKey?: string;
|
||||
file: Blob;
|
||||
},
|
||||
}): CancelablePromise<BucketObject> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/buckets/{bucketID}/objects',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
},
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns BucketObject Bucket object copied
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static copyBucketObject({
|
||||
bucketId,
|
||||
requestBody,
|
||||
}: {
|
||||
bucketId: string,
|
||||
requestBody: CopyBucketObjectRequest,
|
||||
}): CancelablePromise<BucketObject> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/buckets/{bucketID}/object-copies',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateBucket({
|
||||
bucketId,
|
||||
requestBody,
|
||||
}: {
|
||||
bucketId: string,
|
||||
requestBody: UpdateBucketRequest,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/buckets/{bucketID}',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteBucket({
|
||||
bucketId,
|
||||
}: {
|
||||
bucketId: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/buckets/{bucketID}',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns binary Bucket object bytes
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static downloadBucketObject({
|
||||
bucketId,
|
||||
objectKey,
|
||||
}: {
|
||||
bucketId: string,
|
||||
objectKey: string,
|
||||
}): CancelablePromise<Blob> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/buckets/{bucketID}/objects/{objectKey}',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
'objectKey': objectKey,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateBucketObject({
|
||||
bucketId,
|
||||
objectKey,
|
||||
requestBody,
|
||||
}: {
|
||||
bucketId: string,
|
||||
objectKey: string,
|
||||
requestBody: UpdateBucketObjectRequest,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PATCH',
|
||||
url: '/buckets/{bucketID}/objects/{objectKey}',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
'objectKey': objectKey,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @returns void
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deleteBucketObject({
|
||||
bucketId,
|
||||
objectKey,
|
||||
}: {
|
||||
bucketId: string,
|
||||
objectKey: string,
|
||||
}): CancelablePromise<void> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/buckets/{bucketID}/objects/{objectKey}',
|
||||
path: {
|
||||
'bucketID': bucketId,
|
||||
'objectKey': objectKey,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user