new PackageMigrations repository
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PackageModelBaseModel } from './PackageModelBaseModel';
|
||||
|
||||
export type PackageCreateModel = PackageModelBaseModel;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PackageModelBaseModel } from './PackageModelBaseModel';
|
||||
|
||||
export type PackageDefinitionModel = (PackageModelBaseModel & {
|
||||
key?: string;
|
||||
packagePath?: string;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PackageMigrationStatusModel = {
|
||||
packageName?: string;
|
||||
hasPendingMigrations?: boolean;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PackageModelBaseModel = {
|
||||
name?: string;
|
||||
contentNodeId?: string | null;
|
||||
contentLoadChildNodes?: boolean;
|
||||
mediaKeys?: Array<string>;
|
||||
mediaLoadChildNodes?: boolean;
|
||||
documentTypes?: Array<string>;
|
||||
mediaTypes?: Array<string>;
|
||||
dataTypes?: Array<string>;
|
||||
templates?: Array<string>;
|
||||
partialViews?: Array<string>;
|
||||
stylesheets?: Array<string>;
|
||||
scripts?: Array<string>;
|
||||
languages?: Array<string>;
|
||||
dictionaryItems?: Array<string>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PackageModelBaseModel } from './PackageModelBaseModel';
|
||||
|
||||
export type PackageUpdateModel = (PackageModelBaseModel & {
|
||||
packagePath?: string;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PackageDefinitionModel } from './PackageDefinitionModel';
|
||||
|
||||
export type PagedPackageDefinitionModel = {
|
||||
total: number;
|
||||
items: Array<PackageDefinitionModel>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PackageMigrationStatusModel } from './PackageMigrationStatusModel';
|
||||
|
||||
export type PagedPackageMigrationStatusModel = {
|
||||
total: number;
|
||||
items: Array<PackageMigrationStatusModel>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PackageCreateModel } from '../models/PackageCreateModel';
|
||||
import type { PackageDefinitionModel } from '../models/PackageDefinitionModel';
|
||||
import type { PackageUpdateModel } from '../models/PackageUpdateModel';
|
||||
import type { PagedPackageDefinitionModel } from '../models/PagedPackageDefinitionModel';
|
||||
import type { PagedPackageMigrationStatusModel } from '../models/PagedPackageMigrationStatusModel';
|
||||
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
|
||||
export class PackageResource {
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static postPackageByNameRunMigration({
|
||||
name,
|
||||
}: {
|
||||
name: string,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/umbraco/management/api/v1/package/{name}/run-migration',
|
||||
path: {
|
||||
'name': name,
|
||||
},
|
||||
errors: {
|
||||
404: `Not Found`,
|
||||
409: `Conflict`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns PagedPackageDefinitionModel Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPackageCreated({
|
||||
skip,
|
||||
take = 100,
|
||||
}: {
|
||||
skip?: number,
|
||||
take?: number,
|
||||
}): CancelablePromise<PagedPackageDefinitionModel> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/package/created',
|
||||
query: {
|
||||
'skip': skip,
|
||||
'take': take,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns string Created
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static postPackageCreated({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody?: PackageCreateModel,
|
||||
}): CancelablePromise<string> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/umbraco/management/api/v1/package/created',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
responseHeader: 'Location',
|
||||
errors: {
|
||||
400: `Bad Request`,
|
||||
404: `Not Found`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPackageCreatedByKey({
|
||||
key,
|
||||
}: {
|
||||
key: string,
|
||||
}): CancelablePromise<PackageDefinitionModel> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/package/created/{key}',
|
||||
path: {
|
||||
'key': key,
|
||||
},
|
||||
errors: {
|
||||
404: `Not Found`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static deletePackageCreatedByKey({
|
||||
key,
|
||||
}: {
|
||||
key: string,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'DELETE',
|
||||
url: '/umbraco/management/api/v1/package/created/{key}',
|
||||
path: {
|
||||
'key': key,
|
||||
},
|
||||
errors: {
|
||||
404: `Not Found`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static putPackageCreatedByKey({
|
||||
key,
|
||||
requestBody,
|
||||
}: {
|
||||
key: string,
|
||||
requestBody?: PackageUpdateModel,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'PUT',
|
||||
url: '/umbraco/management/api/v1/package/created/{key}',
|
||||
path: {
|
||||
'key': key,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
404: `Not Found`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns binary Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPackageCreatedByKeyDownload({
|
||||
key,
|
||||
}: {
|
||||
key: string,
|
||||
}): CancelablePromise<Blob> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/package/created/{key}/download',
|
||||
path: {
|
||||
'key': key,
|
||||
},
|
||||
errors: {
|
||||
404: `Not Found`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns PagedPackageMigrationStatusModel Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPackageMigrationStatus({
|
||||
skip,
|
||||
take = 100,
|
||||
}: {
|
||||
skip?: number,
|
||||
take?: number,
|
||||
}): CancelablePromise<PagedPackageMigrationStatusModel> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/umbraco/management/api/v1/package/migration-status',
|
||||
query: {
|
||||
'skip': skip,
|
||||
'take': take,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user