@kommerz/ts-client 1.153.0 → 1.167.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarnrc +1 -0
- package/dist/apis/CustomersApi.d.ts +2 -2
- package/dist/apis/EditorTypeApi.d.ts +75 -0
- package/dist/apis/EditorTypeApi.js +321 -0
- package/dist/apis/FileDirectoriesApi.d.ts +19 -16
- package/dist/apis/FileDirectoriesApi.js +60 -73
- package/dist/apis/FileDirectorySharesApi.d.ts +34 -6
- package/dist/apis/FileDirectorySharesApi.js +141 -19
- package/dist/apis/FileUploadsApi.d.ts +55 -0
- package/dist/apis/FileUploadsApi.js +251 -0
- package/dist/apis/FilesApi.d.ts +17 -1
- package/dist/apis/FilesApi.js +83 -4
- package/dist/apis/InvoicesApi.d.ts +4 -26
- package/dist/apis/InvoicesApi.js +3 -68
- package/dist/apis/KanbanCardsApi.d.ts +2 -2
- package/dist/apis/MentionsApi.js +1 -1
- package/dist/apis/StatisticsApi.js +1 -1
- package/dist/apis/TenantsApi.d.ts +1 -1
- package/dist/apis/UnitsApi.d.ts +2 -2
- package/dist/apis/UsageMonitorApi.js +1 -1
- package/dist/apis/UsersMeApi.d.ts +19 -0
- package/dist/apis/UsersMeApi.js +100 -0
- package/dist/apis/WorkflowProcessesApi.d.ts +27 -5
- package/dist/apis/WorkflowProcessesApi.js +100 -8
- package/dist/apis/WorkflowsApi.d.ts +19 -8
- package/dist/apis/WorkflowsApi.js +56 -10
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/models/AcceptanceDocumentDto.js +2 -2
- package/dist/models/AcceptanceDocumentLogEntry.js +1 -1
- package/dist/models/AcceptanceDocumentLogEntryData.d.ts +2 -2
- package/dist/models/AcceptancePortalAcceptDto.d.ts +7 -0
- package/dist/models/AcceptancePortalAcceptDto.js +5 -0
- package/dist/models/AccessTokenDto.js +1 -1
- package/dist/models/AccountingScheduleDto.js +3 -3
- package/dist/models/AccountingSettlementDto.js +3 -3
- package/dist/models/AccountingSplitPair.d.ts +1 -1
- package/dist/models/AccountingTransactionDto.js +1 -1
- package/dist/models/ActivityDto.js +1 -1
- package/dist/models/ApprovalEntryDto.js +2 -2
- package/dist/models/CalendarAttendeeDto.d.ts +51 -0
- package/dist/models/CalendarAttendeeDto.js +59 -0
- package/dist/models/CalendarEntryDto.d.ts +7 -0
- package/dist/models/CalendarEntryDto.js +3 -0
- package/dist/models/CenterStatementDto.js +2 -2
- package/dist/models/CommentDto.js +1 -1
- package/dist/models/ConfigKey.d.ts +1 -0
- package/dist/models/ConfigKey.js +2 -1
- package/dist/models/CustomerDto.d.ts +6 -6
- package/dist/models/CustomerDto.js +0 -3
- package/dist/models/DunningLetterDto.d.ts +1 -1
- package/dist/models/EditorTypeDto.d.ts +61 -0
- package/dist/models/EditorTypeDto.js +60 -0
- package/dist/models/EmailDto.d.ts +3 -3
- package/dist/models/EmailDto.js +1 -1
- package/dist/models/EntityAccessTokenDto.d.ts +31 -0
- package/dist/models/EntityAccessTokenDto.js +50 -0
- package/dist/models/EntityType.d.ts +2 -0
- package/dist/models/EntityType.js +3 -1
- package/dist/models/FileDetailsDto.d.ts +25 -13
- package/dist/models/FileDetailsDto.js +7 -5
- package/dist/models/FileDirectoryDto.d.ts +4 -4
- package/dist/models/FileDirectoryDto.js +1 -1
- package/dist/models/FileDto.d.ts +13 -1
- package/dist/models/FileDto.js +3 -1
- package/dist/models/FileMovementDto.d.ts +7 -7
- package/dist/models/FileMovementDto.js +2 -2
- package/dist/models/FileSelectionDto.d.ts +2 -2
- package/dist/models/FileShareDto.d.ts +4 -4
- package/dist/models/FileShareDto.js +5 -6
- package/dist/models/FileUploadDto.d.ts +67 -0
- package/dist/models/FileUploadDto.js +60 -0
- package/dist/models/FileUploadManifestDto.d.ts +31 -0
- package/dist/models/FileUploadManifestDto.js +50 -0
- package/dist/models/FileUploadPartDto.d.ts +31 -0
- package/dist/models/{AccessShareDto.js → FileUploadPartDto.js} +17 -17
- package/dist/models/GetAllAbsenceEntries200Response.d.ts +2 -2
- package/dist/models/GetAllAbsenceEntries200Response.js +2 -6
- package/dist/models/GetAllAbsenceTypes200Response.d.ts +2 -2
- package/dist/models/GetAllAbsenceTypes200Response.js +2 -6
- package/dist/models/GetAllAcceptanceDocuments200Response.d.ts +2 -2
- package/dist/models/GetAllAcceptanceDocuments200Response.js +2 -6
- package/dist/models/GetAllAccessTokens200Response.d.ts +2 -2
- package/dist/models/GetAllAccessTokens200Response.js +2 -6
- package/dist/models/GetAllAccountingCenters200Response.d.ts +2 -2
- package/dist/models/GetAllAccountingCenters200Response.js +2 -6
- package/dist/models/GetAllAccountingLedgers200Response.d.ts +2 -2
- package/dist/models/GetAllAccountingLedgers200Response.js +2 -6
- package/dist/models/GetAllAccountingReceipts200Response.d.ts +2 -2
- package/dist/models/GetAllAccountingReceipts200Response.js +2 -6
- package/dist/models/GetAllAccountingSettlements200Response.d.ts +2 -2
- package/dist/models/GetAllAccountingSettlements200Response.js +2 -6
- package/dist/models/GetAllAccountingTransactions200Response.d.ts +2 -2
- package/dist/models/GetAllAccountingTransactions200Response.js +2 -6
- package/dist/models/GetAllAccountingTurnover200Response.d.ts +2 -2
- package/dist/models/GetAllAccountingTurnover200Response.js +2 -6
- package/dist/models/GetAllAccounts200Response.d.ts +2 -2
- package/dist/models/GetAllAccounts200Response.js +2 -6
- package/dist/models/GetAllActivities200Response.d.ts +2 -2
- package/dist/models/GetAllActivities200Response.js +2 -6
- package/dist/models/GetAllApprovalEntries200Response.d.ts +2 -2
- package/dist/models/GetAllApprovalEntries200Response.js +2 -6
- package/dist/models/GetAllApprovalTypes200Response.d.ts +2 -2
- package/dist/models/GetAllApprovalTypes200Response.js +2 -6
- package/dist/models/GetAllBankDetails200Response.d.ts +2 -2
- package/dist/models/GetAllBankDetails200Response.js +2 -6
- package/dist/models/GetAllCalendarEntries200Response.d.ts +2 -2
- package/dist/models/GetAllCalendarEntries200Response.js +2 -6
- package/dist/models/GetAllCalendarEntryTypes200Response.d.ts +2 -2
- package/dist/models/GetAllCalendarEntryTypes200Response.js +2 -6
- package/dist/models/GetAllComments200Response.d.ts +2 -2
- package/dist/models/GetAllComments200Response.js +2 -6
- package/dist/models/GetAllConfigurations200Response.d.ts +2 -2
- package/dist/models/GetAllConfigurations200Response.js +2 -6
- package/dist/models/GetAllContractStatus200Response.d.ts +2 -2
- package/dist/models/GetAllContractStatus200Response.js +2 -6
- package/dist/models/GetAllContractTypes200Response.d.ts +2 -2
- package/dist/models/GetAllContractTypes200Response.js +2 -6
- package/dist/models/GetAllContracts200Response.d.ts +2 -2
- package/dist/models/GetAllContracts200Response.js +2 -6
- package/dist/models/GetAllCustomers200Response.d.ts +2 -2
- package/dist/models/GetAllCustomers200Response.js +2 -6
- package/dist/models/GetAllDeliveryNotes200Response.d.ts +2 -2
- package/dist/models/GetAllDeliveryNotes200Response.js +2 -6
- package/dist/models/GetAllDesignTemplates200Response.d.ts +2 -2
- package/dist/models/GetAllDesignTemplates200Response.js +2 -6
- package/dist/models/GetAllDocumentTemplates200Response.d.ts +2 -2
- package/dist/models/GetAllDocumentTemplates200Response.js +2 -6
- package/dist/models/GetAllDunningLetters200Response.d.ts +2 -2
- package/dist/models/GetAllDunningLetters200Response.js +2 -6
- package/dist/models/GetAllEditorTypes200Response.d.ts +50 -0
- package/dist/models/GetAllEditorTypes200Response.js +59 -0
- package/dist/models/GetAllEntitiesForTag200Response.d.ts +2 -2
- package/dist/models/GetAllEntitiesForTag200Response.js +2 -6
- package/dist/models/GetAllFileTags200Response.d.ts +2 -2
- package/dist/models/GetAllFileTags200Response.js +2 -6
- package/dist/models/GetAllHolidays200Response.d.ts +2 -2
- package/dist/models/GetAllHolidays200Response.js +2 -6
- package/dist/models/GetAllHospitalityReceipts200Response.d.ts +2 -2
- package/dist/models/GetAllHospitalityReceipts200Response.js +2 -6
- package/dist/models/GetAllInboxEmails200Response.d.ts +2 -2
- package/dist/models/GetAllInboxEmails200Response.js +2 -6
- package/dist/models/GetAllInvoices200Response.d.ts +2 -2
- package/dist/models/GetAllInvoices200Response.js +2 -6
- package/dist/models/GetAllJobs200Response.d.ts +2 -2
- package/dist/models/GetAllJobs200Response.js +2 -6
- package/dist/models/GetAllKanbanBoards200Response.d.ts +2 -2
- package/dist/models/GetAllKanbanBoards200Response.js +2 -6
- package/dist/models/GetAllKanbanCards200Response.d.ts +2 -2
- package/dist/models/GetAllKanbanCards200Response.js +2 -6
- package/dist/models/GetAllKanbanColumns200Response.d.ts +2 -2
- package/dist/models/GetAllKanbanColumns200Response.js +2 -6
- package/dist/models/GetAllMentions200Response.d.ts +2 -2
- package/dist/models/GetAllMentions200Response.js +2 -6
- package/dist/models/GetAllNotifications200Response.d.ts +2 -2
- package/dist/models/GetAllNotifications200Response.js +2 -6
- package/dist/models/GetAllObjectives200Response.d.ts +2 -2
- package/dist/models/GetAllObjectives200Response.js +2 -6
- package/dist/models/GetAllOffers200Response.d.ts +2 -2
- package/dist/models/GetAllOffers200Response.js +2 -6
- package/dist/models/GetAllPages200Response.d.ts +2 -2
- package/dist/models/GetAllPages200Response.js +2 -6
- package/dist/models/GetAllPayments200Response.d.ts +2 -2
- package/dist/models/GetAllPayments200Response.js +2 -6
- package/dist/models/GetAllPresenceEntries200Response.d.ts +2 -2
- package/dist/models/GetAllPresenceEntries200Response.js +2 -6
- package/dist/models/GetAllPresenceTypes200Response.d.ts +2 -2
- package/dist/models/GetAllPresenceTypes200Response.js +2 -6
- package/dist/models/GetAllReferences200Response.d.ts +2 -2
- package/dist/models/GetAllReferences200Response.js +2 -6
- package/dist/models/GetAllRegistrations200Response.d.ts +2 -2
- package/dist/models/GetAllRegistrations200Response.js +2 -6
- package/dist/models/GetAllResults200Response.d.ts +2 -2
- package/dist/models/GetAllResults200Response.js +2 -6
- package/dist/models/GetAllRoles200Response.d.ts +2 -2
- package/dist/models/GetAllRoles200Response.js +2 -6
- package/dist/models/GetAllShares200Response.d.ts +2 -2
- package/dist/models/GetAllShares200Response.js +2 -6
- package/dist/models/GetAllTags200Response.d.ts +2 -2
- package/dist/models/GetAllTags200Response.js +2 -6
- package/dist/models/GetAllTextModules200Response.d.ts +2 -2
- package/dist/models/GetAllTextModules200Response.js +2 -6
- package/dist/models/GetAllUnits200Response.d.ts +2 -2
- package/dist/models/GetAllUnits200Response.js +2 -6
- package/dist/models/GetAllUsers200Response.d.ts +2 -2
- package/dist/models/GetAllUsers200Response.js +2 -6
- package/dist/models/GetAllWikis200Response.d.ts +2 -2
- package/dist/models/GetAllWikis200Response.js +2 -6
- package/dist/models/GetAllWorkHours200Response.d.ts +2 -2
- package/dist/models/GetAllWorkHours200Response.js +2 -6
- package/dist/models/GetAllWorkflowProcessLogs200Response.d.ts +2 -2
- package/dist/models/GetAllWorkflowProcessLogs200Response.js +2 -6
- package/dist/models/GetAllWorkflowProcesses200Response.d.ts +2 -2
- package/dist/models/GetAllWorkflowProcesses200Response.js +2 -6
- package/dist/models/GetAllWorkflows200Response.d.ts +2 -2
- package/dist/models/GetAllWorkflows200Response.js +2 -6
- package/dist/models/GetAllWritings200Response.d.ts +2 -2
- package/dist/models/GetAllWritings200Response.js +2 -6
- package/dist/models/GetSubscribedProducts200Response.d.ts +2 -2
- package/dist/models/GetSubscribedProducts200Response.js +2 -6
- package/dist/models/HospitalityReceiptDto.d.ts +2 -2
- package/dist/models/InvoiceDto.d.ts +31 -25
- package/dist/models/InvoiceDto.js +8 -21
- package/dist/models/InvoiceItemDto.d.ts +29 -5
- package/dist/models/InvoiceItemDto.js +6 -1
- package/dist/models/InvoiceTaxItemDto.d.ts +1 -1
- package/dist/models/InvoiceType.d.ts +4 -4
- package/dist/models/InvoiceType.js +4 -4
- package/dist/models/JobDto.js +2 -2
- package/dist/models/KanbanCardDto.d.ts +23 -5
- package/dist/models/KanbanCardDto.js +14 -6
- package/dist/models/LedgerStatementDto.js +2 -2
- package/dist/models/ListAllTenants200Response.d.ts +2 -2
- package/dist/models/ListAllTenants200Response.js +2 -6
- package/dist/models/ListDataTableRows200Response.d.ts +2 -2
- package/dist/models/ListDataTableRows200Response.js +2 -6
- package/dist/models/ListDataTables200Response.d.ts +2 -2
- package/dist/models/ListDataTables200Response.js +2 -6
- package/dist/models/ListDirectories200Response.d.ts +2 -2
- package/dist/models/ListDirectories200Response.js +2 -6
- package/dist/models/ListFiles200Response.d.ts +2 -2
- package/dist/models/ListFiles200Response.js +2 -6
- package/dist/models/MacroConfig.d.ts +2 -0
- package/dist/models/MacroConfig.js +3 -1
- package/dist/models/NotificationDto.js +1 -1
- package/dist/models/OfferDto.d.ts +6 -0
- package/dist/models/OfferDto.js +2 -0
- package/dist/models/PageResponse.d.ts +2 -2
- package/dist/models/PageResponse.js +2 -6
- package/dist/models/ParticipantRole.d.ts +26 -0
- package/dist/models/ParticipantRole.js +52 -0
- package/dist/models/ParticipantStatus.d.ts +27 -0
- package/dist/models/ParticipantStatus.js +53 -0
- package/dist/models/PublicShareDirectorDto.d.ts +44 -0
- package/dist/models/PublicShareDirectorDto.js +55 -0
- package/dist/models/PublicShareDto.js +3 -3
- package/dist/models/PublicShareFileDto.d.ts +55 -0
- package/dist/models/PublicShareFileDto.js +66 -0
- package/dist/models/PublicShareListingDto.d.ts +44 -0
- package/dist/models/PublicShareListingDto.js +59 -0
- package/dist/models/SubscriptionChangeDto.js +1 -1
- package/dist/models/SubscriptionDto.js +10 -10
- package/dist/models/TenantConfigurationDto.d.ts +7 -0
- package/dist/models/TenantConfigurationDto.js +3 -0
- package/dist/models/TenantDto.d.ts +3 -3
- package/dist/models/TenantDto.js +0 -2
- package/dist/models/TimeSpanDto.d.ts +2 -2
- package/dist/models/TimesDto.js +1 -1
- package/dist/models/UiConfigurationDto.d.ts +32 -0
- package/dist/models/UiConfigurationDto.js +49 -0
- package/dist/models/UiLandingWelcomeConfigDto.d.ts +31 -0
- package/dist/models/UiLandingWelcomeConfigDto.js +50 -0
- package/dist/models/UiModule.d.ts +46 -0
- package/dist/models/UiModule.js +72 -0
- package/dist/models/UnitDto.d.ts +3 -3
- package/dist/models/UnitDto.js +0 -2
- package/dist/models/UserAgentInformation.d.ts +61 -0
- package/dist/models/UserAgentInformation.js +58 -0
- package/dist/models/UserApprovalDto.js +1 -1
- package/dist/models/UserDto.d.ts +1 -1
- package/dist/models/UserDto.js +2 -2
- package/dist/models/WorkflowDto.d.ts +2 -2
- package/dist/models/WorkflowProcessDto.d.ts +12 -0
- package/dist/models/WorkflowProcessDto.js +4 -0
- package/dist/models/WorkflowProcessLogDto.js +1 -1
- package/dist/models/WorkflowProcessStatus.d.ts +1 -0
- package/dist/models/WorkflowProcessStatus.js +1 -0
- package/dist/models/index.d.ts +16 -1
- package/dist/models/index.js +16 -1
- package/dist/sin-deno.d.ts +4 -0
- package/dist/sin-deno.js +22 -0
- package/dist/src/comm.js +2 -1
- package/dist/src/events.d.ts +9 -0
- package/dist/src/events.js +2 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/package.json +1 -1
- package/sin-deno.ts +6 -0
- package/src/comm.ts +1 -1
- package/src/events.ts +9 -0
- package/src/index.ts +1 -0
- package/dist/models/AccessShareDto.d.ts +0 -37
|
@@ -9,22 +9,34 @@
|
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
11
|
import * as runtime from '../runtime';
|
|
12
|
-
import type {
|
|
12
|
+
import type { ColamdaPageable, FileShareDto, GetAllShares200Response, PublicShareDto, PublicShareListingDto } from '../models/index';
|
|
13
13
|
export interface AddShareRequest {
|
|
14
|
-
fileShareDto: FileShareDto
|
|
14
|
+
fileShareDto: Omit<FileShareDto, 'key'>;
|
|
15
15
|
}
|
|
16
16
|
export interface DeleteShareRequest {
|
|
17
17
|
id: string;
|
|
18
18
|
}
|
|
19
19
|
export interface DownloadShareRequest {
|
|
20
|
-
|
|
20
|
+
key: string;
|
|
21
|
+
accessToken: string;
|
|
22
|
+
expires: number;
|
|
23
|
+
}
|
|
24
|
+
export interface DownloadShareFileRequest {
|
|
25
|
+
key: string;
|
|
26
|
+
fileId: string;
|
|
27
|
+
accessToken: string;
|
|
28
|
+
expires: number;
|
|
21
29
|
}
|
|
22
30
|
export interface GetAllSharesRequest {
|
|
23
31
|
pageable: ColamdaPageable;
|
|
24
32
|
filter?: Array<string>;
|
|
25
33
|
}
|
|
26
34
|
export interface GetDownloadShareInfoRequest {
|
|
27
|
-
key
|
|
35
|
+
key: string;
|
|
36
|
+
}
|
|
37
|
+
export interface GetDownloadShareListingRequest {
|
|
38
|
+
key: string;
|
|
39
|
+
password?: string;
|
|
28
40
|
}
|
|
29
41
|
export interface GetShareRequest {
|
|
30
42
|
id: string;
|
|
@@ -34,7 +46,7 @@ export interface ResetShareCountersRequest {
|
|
|
34
46
|
}
|
|
35
47
|
export interface UpdateShareRequest {
|
|
36
48
|
id: string;
|
|
37
|
-
fileShareDto: FileShareDto
|
|
49
|
+
fileShareDto: Omit<FileShareDto, 'key'>;
|
|
38
50
|
force?: boolean;
|
|
39
51
|
}
|
|
40
52
|
/**
|
|
@@ -65,6 +77,14 @@ export declare class FileDirectorySharesApi extends runtime.BaseAPI {
|
|
|
65
77
|
* download a share
|
|
66
78
|
*/
|
|
67
79
|
downloadShare(requestParameters: DownloadShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
80
|
+
/**
|
|
81
|
+
* download a single file
|
|
82
|
+
*/
|
|
83
|
+
downloadShareFileRaw(requestParameters: DownloadShareFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
84
|
+
/**
|
|
85
|
+
* download a single file
|
|
86
|
+
*/
|
|
87
|
+
downloadShareFile(requestParameters: DownloadShareFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
68
88
|
/**
|
|
69
89
|
* get all directory shares
|
|
70
90
|
*/
|
|
@@ -80,7 +100,15 @@ export declare class FileDirectorySharesApi extends runtime.BaseAPI {
|
|
|
80
100
|
/**
|
|
81
101
|
* get download share info
|
|
82
102
|
*/
|
|
83
|
-
getDownloadShareInfo(requestParameters
|
|
103
|
+
getDownloadShareInfo(requestParameters: GetDownloadShareInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicShareDto>;
|
|
104
|
+
/**
|
|
105
|
+
* get download share file listing
|
|
106
|
+
*/
|
|
107
|
+
getDownloadShareListingRaw(requestParameters: GetDownloadShareListingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicShareListingDto>>;
|
|
108
|
+
/**
|
|
109
|
+
* get download share file listing
|
|
110
|
+
*/
|
|
111
|
+
getDownloadShareListing(requestParameters: GetDownloadShareListingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicShareListingDto>;
|
|
84
112
|
/**
|
|
85
113
|
* read one result
|
|
86
114
|
*/
|
|
@@ -89,7 +89,7 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
89
89
|
queryParameters = {};
|
|
90
90
|
headerParameters = {};
|
|
91
91
|
headerParameters['Content-Type'] = 'application/json';
|
|
92
|
-
urlPath = "/ui/files/v1/
|
|
92
|
+
urlPath = "/ui/files/v1/shares";
|
|
93
93
|
return [4 /*yield*/, this.request({
|
|
94
94
|
path: urlPath,
|
|
95
95
|
method: 'POST',
|
|
@@ -135,7 +135,7 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
135
135
|
}
|
|
136
136
|
queryParameters = {};
|
|
137
137
|
headerParameters = {};
|
|
138
|
-
urlPath = "/ui/files/v1/
|
|
138
|
+
urlPath = "/ui/files/v1/shares/{id}";
|
|
139
139
|
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
140
140
|
return [4 /*yield*/, this.request({
|
|
141
141
|
path: urlPath,
|
|
@@ -174,19 +174,30 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
176
176
|
case 0:
|
|
177
|
-
if (requestParameters['
|
|
178
|
-
throw new runtime.RequiredError('
|
|
177
|
+
if (requestParameters['key'] == null) {
|
|
178
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling downloadShare().');
|
|
179
|
+
}
|
|
180
|
+
if (requestParameters['accessToken'] == null) {
|
|
181
|
+
throw new runtime.RequiredError('accessToken', 'Required parameter "accessToken" was null or undefined when calling downloadShare().');
|
|
182
|
+
}
|
|
183
|
+
if (requestParameters['expires'] == null) {
|
|
184
|
+
throw new runtime.RequiredError('expires', 'Required parameter "expires" was null or undefined when calling downloadShare().');
|
|
179
185
|
}
|
|
180
186
|
queryParameters = {};
|
|
187
|
+
if (requestParameters['accessToken'] != null) {
|
|
188
|
+
queryParameters['accessToken'] = requestParameters['accessToken'];
|
|
189
|
+
}
|
|
190
|
+
if (requestParameters['expires'] != null) {
|
|
191
|
+
queryParameters['expires'] = requestParameters['expires'];
|
|
192
|
+
}
|
|
181
193
|
headerParameters = {};
|
|
182
|
-
|
|
183
|
-
urlPath = "
|
|
194
|
+
urlPath = "/ui/file-shares/v1/shares/{key}/archives";
|
|
195
|
+
urlPath = urlPath.replace("{".concat("key", "}"), encodeURIComponent(String(requestParameters['key'])));
|
|
184
196
|
return [4 /*yield*/, this.request({
|
|
185
197
|
path: urlPath,
|
|
186
|
-
method: '
|
|
198
|
+
method: 'GET',
|
|
187
199
|
headers: headerParameters,
|
|
188
200
|
query: queryParameters,
|
|
189
|
-
body: (0, index_1.AccessShareDtoToJSON)(requestParameters['accessShareDto']),
|
|
190
201
|
}, initOverrides)];
|
|
191
202
|
case 1:
|
|
192
203
|
response = _a.sent();
|
|
@@ -212,6 +223,68 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
212
223
|
});
|
|
213
224
|
});
|
|
214
225
|
};
|
|
226
|
+
/**
|
|
227
|
+
* download a single file
|
|
228
|
+
*/
|
|
229
|
+
FileDirectorySharesApi.prototype.downloadShareFileRaw = function (requestParameters, initOverrides) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
231
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
232
|
+
return __generator(this, function (_a) {
|
|
233
|
+
switch (_a.label) {
|
|
234
|
+
case 0:
|
|
235
|
+
if (requestParameters['key'] == null) {
|
|
236
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling downloadShareFile().');
|
|
237
|
+
}
|
|
238
|
+
if (requestParameters['fileId'] == null) {
|
|
239
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling downloadShareFile().');
|
|
240
|
+
}
|
|
241
|
+
if (requestParameters['accessToken'] == null) {
|
|
242
|
+
throw new runtime.RequiredError('accessToken', 'Required parameter "accessToken" was null or undefined when calling downloadShareFile().');
|
|
243
|
+
}
|
|
244
|
+
if (requestParameters['expires'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('expires', 'Required parameter "expires" was null or undefined when calling downloadShareFile().');
|
|
246
|
+
}
|
|
247
|
+
queryParameters = {};
|
|
248
|
+
if (requestParameters['accessToken'] != null) {
|
|
249
|
+
queryParameters['accessToken'] = requestParameters['accessToken'];
|
|
250
|
+
}
|
|
251
|
+
if (requestParameters['expires'] != null) {
|
|
252
|
+
queryParameters['expires'] = requestParameters['expires'];
|
|
253
|
+
}
|
|
254
|
+
headerParameters = {};
|
|
255
|
+
urlPath = "/ui/file-shares/v1/shares/{key}/files/{fileId}";
|
|
256
|
+
urlPath = urlPath.replace("{".concat("key", "}"), encodeURIComponent(String(requestParameters['key'])));
|
|
257
|
+
urlPath = urlPath.replace("{".concat("fileId", "}"), encodeURIComponent(String(requestParameters['fileId'])));
|
|
258
|
+
return [4 /*yield*/, this.request({
|
|
259
|
+
path: urlPath,
|
|
260
|
+
method: 'GET',
|
|
261
|
+
headers: headerParameters,
|
|
262
|
+
query: queryParameters,
|
|
263
|
+
}, initOverrides)];
|
|
264
|
+
case 1:
|
|
265
|
+
response = _a.sent();
|
|
266
|
+
return [2 /*return*/, new runtime.BlobApiResponse(response)];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* download a single file
|
|
273
|
+
*/
|
|
274
|
+
FileDirectorySharesApi.prototype.downloadShareFile = function (requestParameters, initOverrides) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
276
|
+
var response;
|
|
277
|
+
return __generator(this, function (_a) {
|
|
278
|
+
switch (_a.label) {
|
|
279
|
+
case 0: return [4 /*yield*/, this.downloadShareFileRaw(requestParameters, initOverrides)];
|
|
280
|
+
case 1:
|
|
281
|
+
response = _a.sent();
|
|
282
|
+
return [4 /*yield*/, response.value()];
|
|
283
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
};
|
|
215
288
|
/**
|
|
216
289
|
* get all directory shares
|
|
217
290
|
*/
|
|
@@ -232,7 +305,7 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
232
305
|
queryParameters['filter'] = requestParameters['filter'];
|
|
233
306
|
}
|
|
234
307
|
headerParameters = {};
|
|
235
|
-
urlPath = "/ui/files/v1/
|
|
308
|
+
urlPath = "/ui/files/v1/shares";
|
|
236
309
|
return [4 /*yield*/, this.request({
|
|
237
310
|
path: urlPath,
|
|
238
311
|
method: 'GET',
|
|
@@ -272,12 +345,13 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
272
345
|
return __generator(this, function (_a) {
|
|
273
346
|
switch (_a.label) {
|
|
274
347
|
case 0:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
queryParameters['key'] = requestParameters['key'];
|
|
348
|
+
if (requestParameters['key'] == null) {
|
|
349
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling getDownloadShareInfo().');
|
|
278
350
|
}
|
|
351
|
+
queryParameters = {};
|
|
279
352
|
headerParameters = {};
|
|
280
|
-
urlPath = "/ui/
|
|
353
|
+
urlPath = "/ui/file-shares/v1/shares/{key}";
|
|
354
|
+
urlPath = urlPath.replace("{".concat("key", "}"), encodeURIComponent(String(requestParameters['key'])));
|
|
281
355
|
return [4 /*yield*/, this.request({
|
|
282
356
|
path: urlPath,
|
|
283
357
|
method: 'GET',
|
|
@@ -294,10 +368,9 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
294
368
|
/**
|
|
295
369
|
* get download share info
|
|
296
370
|
*/
|
|
297
|
-
FileDirectorySharesApi.prototype.getDownloadShareInfo = function () {
|
|
298
|
-
return __awaiter(this,
|
|
371
|
+
FileDirectorySharesApi.prototype.getDownloadShareInfo = function (requestParameters, initOverrides) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
299
373
|
var response;
|
|
300
|
-
if (requestParameters === void 0) { requestParameters = {}; }
|
|
301
374
|
return __generator(this, function (_a) {
|
|
302
375
|
switch (_a.label) {
|
|
303
376
|
case 0: return [4 /*yield*/, this.getDownloadShareInfoRaw(requestParameters, initOverrides)];
|
|
@@ -309,6 +382,55 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
309
382
|
});
|
|
310
383
|
});
|
|
311
384
|
};
|
|
385
|
+
/**
|
|
386
|
+
* get download share file listing
|
|
387
|
+
*/
|
|
388
|
+
FileDirectorySharesApi.prototype.getDownloadShareListingRaw = function (requestParameters, initOverrides) {
|
|
389
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
390
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
391
|
+
return __generator(this, function (_a) {
|
|
392
|
+
switch (_a.label) {
|
|
393
|
+
case 0:
|
|
394
|
+
if (requestParameters['key'] == null) {
|
|
395
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling getDownloadShareListing().');
|
|
396
|
+
}
|
|
397
|
+
queryParameters = {};
|
|
398
|
+
headerParameters = {};
|
|
399
|
+
if (requestParameters['password'] != null) {
|
|
400
|
+
headerParameters['password'] = String(requestParameters['password']);
|
|
401
|
+
}
|
|
402
|
+
urlPath = "/ui/file-shares/v1/shares/{key}/listings";
|
|
403
|
+
urlPath = urlPath.replace("{".concat("key", "}"), encodeURIComponent(String(requestParameters['key'])));
|
|
404
|
+
return [4 /*yield*/, this.request({
|
|
405
|
+
path: urlPath,
|
|
406
|
+
method: 'GET',
|
|
407
|
+
headers: headerParameters,
|
|
408
|
+
query: queryParameters,
|
|
409
|
+
}, initOverrides)];
|
|
410
|
+
case 1:
|
|
411
|
+
response = _a.sent();
|
|
412
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PublicShareListingDtoFromJSON)(jsonValue); })];
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* get download share file listing
|
|
419
|
+
*/
|
|
420
|
+
FileDirectorySharesApi.prototype.getDownloadShareListing = function (requestParameters, initOverrides) {
|
|
421
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
422
|
+
var response;
|
|
423
|
+
return __generator(this, function (_a) {
|
|
424
|
+
switch (_a.label) {
|
|
425
|
+
case 0: return [4 /*yield*/, this.getDownloadShareListingRaw(requestParameters, initOverrides)];
|
|
426
|
+
case 1:
|
|
427
|
+
response = _a.sent();
|
|
428
|
+
return [4 /*yield*/, response.value()];
|
|
429
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
};
|
|
312
434
|
/**
|
|
313
435
|
* read one result
|
|
314
436
|
*/
|
|
@@ -323,7 +445,7 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
323
445
|
}
|
|
324
446
|
queryParameters = {};
|
|
325
447
|
headerParameters = {};
|
|
326
|
-
urlPath = "/ui/files/v1/
|
|
448
|
+
urlPath = "/ui/files/v1/shares/{id}";
|
|
327
449
|
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
328
450
|
return [4 /*yield*/, this.request({
|
|
329
451
|
path: urlPath,
|
|
@@ -369,7 +491,7 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
369
491
|
}
|
|
370
492
|
queryParameters = {};
|
|
371
493
|
headerParameters = {};
|
|
372
|
-
urlPath = "/ui/files/v1/
|
|
494
|
+
urlPath = "/ui/files/v1/shares/{id}/reset";
|
|
373
495
|
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
374
496
|
return [4 /*yield*/, this.request({
|
|
375
497
|
path: urlPath,
|
|
@@ -422,7 +544,7 @@ var FileDirectorySharesApi = /** @class */ (function (_super) {
|
|
|
422
544
|
}
|
|
423
545
|
headerParameters = {};
|
|
424
546
|
headerParameters['Content-Type'] = 'application/json';
|
|
425
|
-
urlPath = "/ui/files/v1/
|
|
547
|
+
urlPath = "/ui/files/v1/shares/{id}";
|
|
426
548
|
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
427
549
|
return [4 /*yield*/, this.request({
|
|
428
550
|
path: urlPath,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kommerz API Specification
|
|
3
|
+
* API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
|
|
4
|
+
*
|
|
5
|
+
* Contact: info@kommerz.app
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
import * as runtime from '../runtime';
|
|
12
|
+
import type { FileDetailsDto, FileUploadDto, FileUploadManifestDto, FileUploadPartDto } from '../models/index';
|
|
13
|
+
export interface CreateFileFromUploadRequest {
|
|
14
|
+
id: string;
|
|
15
|
+
fileUploadManifestDto: FileUploadManifestDto;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateFileUploadRequest {
|
|
18
|
+
fileUploadDto: FileUploadDto;
|
|
19
|
+
}
|
|
20
|
+
export interface UploadFilePartRequest {
|
|
21
|
+
id: string;
|
|
22
|
+
partNumber: number;
|
|
23
|
+
file: Blob;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare class FileUploadsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* uses the manifest to create the final file
|
|
31
|
+
* create file from manifest
|
|
32
|
+
*/
|
|
33
|
+
createFileFromUploadRaw(requestParameters: CreateFileFromUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileDetailsDto>>;
|
|
34
|
+
/**
|
|
35
|
+
* uses the manifest to create the final file
|
|
36
|
+
* create file from manifest
|
|
37
|
+
*/
|
|
38
|
+
createFileFromUpload(requestParameters: CreateFileFromUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileDetailsDto>;
|
|
39
|
+
/**
|
|
40
|
+
* create new file upload for large files (>= 5MiB). For smaller files use \"uploadFile\" method directly.
|
|
41
|
+
*/
|
|
42
|
+
createFileUploadRaw(requestParameters: CreateFileUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileUploadDto>>;
|
|
43
|
+
/**
|
|
44
|
+
* create new file upload for large files (>= 5MiB). For smaller files use \"uploadFile\" method directly.
|
|
45
|
+
*/
|
|
46
|
+
createFileUpload(requestParameters: CreateFileUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileUploadDto>;
|
|
47
|
+
/**
|
|
48
|
+
* upload part of file
|
|
49
|
+
*/
|
|
50
|
+
uploadFilePartRaw(requestParameters: UploadFilePartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileUploadPartDto>>;
|
|
51
|
+
/**
|
|
52
|
+
* upload part of file
|
|
53
|
+
*/
|
|
54
|
+
uploadFilePart(requestParameters: UploadFilePartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileUploadPartDto>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Kommerz API Specification
|
|
6
|
+
* API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
|
|
7
|
+
*
|
|
8
|
+
* Contact: info@kommerz.app
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __extends = (this && this.__extends) || (function () {
|
|
15
|
+
var extendStatics = function (d, b) {
|
|
16
|
+
extendStatics = Object.setPrototypeOf ||
|
|
17
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
18
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
19
|
+
return extendStatics(d, b);
|
|
20
|
+
};
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
if (typeof b !== "function" && b !== null)
|
|
23
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
24
|
+
extendStatics(d, b);
|
|
25
|
+
function __() { this.constructor = d; }
|
|
26
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
30
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
31
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
32
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
33
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
34
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
35
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
39
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
40
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
41
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
42
|
+
function step(op) {
|
|
43
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
44
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
45
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
46
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
47
|
+
switch (op[0]) {
|
|
48
|
+
case 0: case 1: t = op; break;
|
|
49
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
50
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
51
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
52
|
+
default:
|
|
53
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
54
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
55
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
56
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
57
|
+
if (t[2]) _.ops.pop();
|
|
58
|
+
_.trys.pop(); continue;
|
|
59
|
+
}
|
|
60
|
+
op = body.call(thisArg, _);
|
|
61
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
62
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
+
exports.FileUploadsApi = void 0;
|
|
67
|
+
var runtime = require("../runtime");
|
|
68
|
+
var index_1 = require("../models/index");
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
var FileUploadsApi = /** @class */ (function (_super) {
|
|
73
|
+
__extends(FileUploadsApi, _super);
|
|
74
|
+
function FileUploadsApi() {
|
|
75
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* uses the manifest to create the final file
|
|
79
|
+
* create file from manifest
|
|
80
|
+
*/
|
|
81
|
+
FileUploadsApi.prototype.createFileFromUploadRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['id'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createFileFromUpload().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['fileUploadManifestDto'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('fileUploadManifestDto', 'Required parameter "fileUploadManifestDto" was null or undefined when calling createFileFromUpload().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
|
+
urlPath = "/ui/files/v1/uploads/{id}/manifest";
|
|
97
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
98
|
+
return [4 /*yield*/, this.request({
|
|
99
|
+
path: urlPath,
|
|
100
|
+
method: 'POST',
|
|
101
|
+
headers: headerParameters,
|
|
102
|
+
query: queryParameters,
|
|
103
|
+
body: (0, index_1.FileUploadManifestDtoToJSON)(requestParameters['fileUploadManifestDto']),
|
|
104
|
+
}, initOverrides)];
|
|
105
|
+
case 1:
|
|
106
|
+
response = _a.sent();
|
|
107
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.FileDetailsDtoFromJSON)(jsonValue); })];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* uses the manifest to create the final file
|
|
114
|
+
* create file from manifest
|
|
115
|
+
*/
|
|
116
|
+
FileUploadsApi.prototype.createFileFromUpload = function (requestParameters, initOverrides) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
118
|
+
var response;
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
switch (_a.label) {
|
|
121
|
+
case 0: return [4 /*yield*/, this.createFileFromUploadRaw(requestParameters, initOverrides)];
|
|
122
|
+
case 1:
|
|
123
|
+
response = _a.sent();
|
|
124
|
+
return [4 /*yield*/, response.value()];
|
|
125
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* create new file upload for large files (>= 5MiB). For smaller files use \"uploadFile\" method directly.
|
|
132
|
+
*/
|
|
133
|
+
FileUploadsApi.prototype.createFileUploadRaw = function (requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
136
|
+
return __generator(this, function (_a) {
|
|
137
|
+
switch (_a.label) {
|
|
138
|
+
case 0:
|
|
139
|
+
if (requestParameters['fileUploadDto'] == null) {
|
|
140
|
+
throw new runtime.RequiredError('fileUploadDto', 'Required parameter "fileUploadDto" was null or undefined when calling createFileUpload().');
|
|
141
|
+
}
|
|
142
|
+
queryParameters = {};
|
|
143
|
+
headerParameters = {};
|
|
144
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
145
|
+
urlPath = "/ui/files/v1/uploads";
|
|
146
|
+
return [4 /*yield*/, this.request({
|
|
147
|
+
path: urlPath,
|
|
148
|
+
method: 'POST',
|
|
149
|
+
headers: headerParameters,
|
|
150
|
+
query: queryParameters,
|
|
151
|
+
body: (0, index_1.FileUploadDtoToJSON)(requestParameters['fileUploadDto']),
|
|
152
|
+
}, initOverrides)];
|
|
153
|
+
case 1:
|
|
154
|
+
response = _a.sent();
|
|
155
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.FileUploadDtoFromJSON)(jsonValue); })];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* create new file upload for large files (>= 5MiB). For smaller files use \"uploadFile\" method directly.
|
|
162
|
+
*/
|
|
163
|
+
FileUploadsApi.prototype.createFileUpload = function (requestParameters, initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
165
|
+
var response;
|
|
166
|
+
return __generator(this, function (_a) {
|
|
167
|
+
switch (_a.label) {
|
|
168
|
+
case 0: return [4 /*yield*/, this.createFileUploadRaw(requestParameters, initOverrides)];
|
|
169
|
+
case 1:
|
|
170
|
+
response = _a.sent();
|
|
171
|
+
return [4 /*yield*/, response.value()];
|
|
172
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* upload part of file
|
|
179
|
+
*/
|
|
180
|
+
FileUploadsApi.prototype.uploadFilePartRaw = function (requestParameters, initOverrides) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
182
|
+
var queryParameters, headerParameters, consumes, canConsumeForm, formParams, useForm, urlPath, response;
|
|
183
|
+
return __generator(this, function (_a) {
|
|
184
|
+
switch (_a.label) {
|
|
185
|
+
case 0:
|
|
186
|
+
if (requestParameters['id'] == null) {
|
|
187
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling uploadFilePart().');
|
|
188
|
+
}
|
|
189
|
+
if (requestParameters['partNumber'] == null) {
|
|
190
|
+
throw new runtime.RequiredError('partNumber', 'Required parameter "partNumber" was null or undefined when calling uploadFilePart().');
|
|
191
|
+
}
|
|
192
|
+
if (requestParameters['file'] == null) {
|
|
193
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling uploadFilePart().');
|
|
194
|
+
}
|
|
195
|
+
queryParameters = {};
|
|
196
|
+
headerParameters = {};
|
|
197
|
+
consumes = [
|
|
198
|
+
{ contentType: 'multipart/form-data' },
|
|
199
|
+
];
|
|
200
|
+
canConsumeForm = runtime.canConsumeForm(consumes);
|
|
201
|
+
useForm = false;
|
|
202
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
203
|
+
useForm = canConsumeForm;
|
|
204
|
+
if (useForm) {
|
|
205
|
+
formParams = new FormData();
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
formParams = new URLSearchParams();
|
|
209
|
+
}
|
|
210
|
+
if (requestParameters['partNumber'] != null) {
|
|
211
|
+
formParams.append('partNumber', requestParameters['partNumber']);
|
|
212
|
+
}
|
|
213
|
+
if (requestParameters['file'] != null) {
|
|
214
|
+
formParams.append('file', requestParameters['file']);
|
|
215
|
+
}
|
|
216
|
+
urlPath = "/ui/files/v1/uploads/{id}/parts";
|
|
217
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
218
|
+
return [4 /*yield*/, this.request({
|
|
219
|
+
path: urlPath,
|
|
220
|
+
method: 'POST',
|
|
221
|
+
headers: headerParameters,
|
|
222
|
+
query: queryParameters,
|
|
223
|
+
body: formParams,
|
|
224
|
+
}, initOverrides)];
|
|
225
|
+
case 1:
|
|
226
|
+
response = _a.sent();
|
|
227
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.FileUploadPartDtoFromJSON)(jsonValue); })];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* upload part of file
|
|
234
|
+
*/
|
|
235
|
+
FileUploadsApi.prototype.uploadFilePart = function (requestParameters, initOverrides) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
237
|
+
var response;
|
|
238
|
+
return __generator(this, function (_a) {
|
|
239
|
+
switch (_a.label) {
|
|
240
|
+
case 0: return [4 /*yield*/, this.uploadFilePartRaw(requestParameters, initOverrides)];
|
|
241
|
+
case 1:
|
|
242
|
+
response = _a.sent();
|
|
243
|
+
return [4 /*yield*/, response.value()];
|
|
244
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
return FileUploadsApi;
|
|
250
|
+
}(runtime.BaseAPI));
|
|
251
|
+
exports.FileUploadsApi = FileUploadsApi;
|