@meshmakers/octo-services 3.4.170 → 3.4.190
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.
|
@@ -91,10 +91,10 @@ class OctoErrorLink extends ApolloLink {
|
|
|
91
91
|
request(operation, forward) {
|
|
92
92
|
return this.errorLink.request(operation, forward);
|
|
93
93
|
}
|
|
94
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
95
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: OctoErrorLink, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
95
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: OctoErrorLink });
|
|
96
96
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: OctoErrorLink, decorators: [{
|
|
98
98
|
type: Injectable
|
|
99
99
|
}], ctorParameters: () => [] });
|
|
100
100
|
|
|
@@ -3518,10 +3518,10 @@ class GetCkTypeAttributesDtoGQL extends i1.Query {
|
|
|
3518
3518
|
constructor(apollo) {
|
|
3519
3519
|
super(apollo);
|
|
3520
3520
|
}
|
|
3521
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3522
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3521
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeAttributesDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3522
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeAttributesDtoGQL, providedIn: 'root' });
|
|
3523
3523
|
}
|
|
3524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeAttributesDtoGQL, decorators: [{
|
|
3525
3525
|
type: Injectable,
|
|
3526
3526
|
args: [{
|
|
3527
3527
|
providedIn: 'root'
|
|
@@ -3553,10 +3553,10 @@ class GetCkRecordAttributesDtoGQL extends i1.Query {
|
|
|
3553
3553
|
constructor(apollo) {
|
|
3554
3554
|
super(apollo);
|
|
3555
3555
|
}
|
|
3556
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3557
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3556
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkRecordAttributesDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3557
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkRecordAttributesDtoGQL, providedIn: 'root' });
|
|
3558
3558
|
}
|
|
3559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkRecordAttributesDtoGQL, decorators: [{
|
|
3560
3560
|
type: Injectable,
|
|
3561
3561
|
args: [{
|
|
3562
3562
|
providedIn: 'root'
|
|
@@ -3606,10 +3606,10 @@ class GetCkTypeAvailableQueryColumnsDtoGQL extends i1.Query {
|
|
|
3606
3606
|
constructor(apollo) {
|
|
3607
3607
|
super(apollo);
|
|
3608
3608
|
}
|
|
3609
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3610
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3609
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeAvailableQueryColumnsDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3610
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeAvailableQueryColumnsDtoGQL, providedIn: 'root' });
|
|
3611
3611
|
}
|
|
3612
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeAvailableQueryColumnsDtoGQL, decorators: [{
|
|
3613
3613
|
type: Injectable,
|
|
3614
3614
|
args: [{
|
|
3615
3615
|
providedIn: 'root'
|
|
@@ -3654,10 +3654,10 @@ class GetCkTypesDtoGQL extends i1.Query {
|
|
|
3654
3654
|
constructor(apollo) {
|
|
3655
3655
|
super(apollo);
|
|
3656
3656
|
}
|
|
3657
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3658
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3657
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypesDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3658
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypesDtoGQL, providedIn: 'root' });
|
|
3659
3659
|
}
|
|
3660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypesDtoGQL, decorators: [{
|
|
3661
3661
|
type: Injectable,
|
|
3662
3662
|
args: [{
|
|
3663
3663
|
providedIn: 'root'
|
|
@@ -3702,10 +3702,10 @@ class GetDerivedCkTypesDtoGQL extends i1.Query {
|
|
|
3702
3702
|
constructor(apollo) {
|
|
3703
3703
|
super(apollo);
|
|
3704
3704
|
}
|
|
3705
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3706
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetDerivedCkTypesDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3706
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetDerivedCkTypesDtoGQL, providedIn: 'root' });
|
|
3707
3707
|
}
|
|
3708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetDerivedCkTypesDtoGQL, decorators: [{
|
|
3709
3709
|
type: Injectable,
|
|
3710
3710
|
args: [{
|
|
3711
3711
|
providedIn: 'root'
|
|
@@ -3737,10 +3737,10 @@ class GetCkModelByIdDtoGQL extends i1.Query {
|
|
|
3737
3737
|
constructor(apollo) {
|
|
3738
3738
|
super(apollo);
|
|
3739
3739
|
}
|
|
3740
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3741
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3740
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkModelByIdDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3741
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkModelByIdDtoGQL, providedIn: 'root' });
|
|
3742
3742
|
}
|
|
3743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkModelByIdDtoGQL, decorators: [{
|
|
3744
3744
|
type: Injectable,
|
|
3745
3745
|
args: [{
|
|
3746
3746
|
providedIn: 'root'
|
|
@@ -3795,10 +3795,10 @@ class AttributeSelectorService {
|
|
|
3795
3795
|
};
|
|
3796
3796
|
}));
|
|
3797
3797
|
}
|
|
3798
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3799
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3798
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AttributeSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3799
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AttributeSelectorService, providedIn: 'root' });
|
|
3800
3800
|
}
|
|
3801
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AttributeSelectorService, decorators: [{
|
|
3802
3802
|
type: Injectable,
|
|
3803
3803
|
args: [{
|
|
3804
3804
|
providedIn: 'root'
|
|
@@ -3866,10 +3866,10 @@ class CkTypeAttributeService {
|
|
|
3866
3866
|
return of([]);
|
|
3867
3867
|
}));
|
|
3868
3868
|
}
|
|
3869
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3870
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3869
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkTypeAttributeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3870
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkTypeAttributeService, providedIn: 'root' });
|
|
3871
3871
|
}
|
|
3872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkTypeAttributeService, decorators: [{
|
|
3873
3873
|
type: Injectable,
|
|
3874
3874
|
args: [{
|
|
3875
3875
|
providedIn: 'root'
|
|
@@ -3895,10 +3895,10 @@ class GetCkTypeByRtCkTypeIdDtoGQL extends i1.Query {
|
|
|
3895
3895
|
constructor(apollo) {
|
|
3896
3896
|
super(apollo);
|
|
3897
3897
|
}
|
|
3898
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3899
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3898
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeByRtCkTypeIdDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3899
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeByRtCkTypeIdDtoGQL, providedIn: 'root' });
|
|
3900
3900
|
}
|
|
3901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3901
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetCkTypeByRtCkTypeIdDtoGQL, decorators: [{
|
|
3902
3902
|
type: Injectable,
|
|
3903
3903
|
args: [{
|
|
3904
3904
|
providedIn: 'root'
|
|
@@ -4026,10 +4026,10 @@ class CkTypeSelectorService {
|
|
|
4026
4026
|
description: item.description ?? undefined
|
|
4027
4027
|
};
|
|
4028
4028
|
}
|
|
4029
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4030
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4029
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkTypeSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4030
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkTypeSelectorService, providedIn: 'root' });
|
|
4031
4031
|
}
|
|
4032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4032
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkTypeSelectorService, decorators: [{
|
|
4033
4033
|
type: Injectable,
|
|
4034
4034
|
args: [{
|
|
4035
4035
|
providedIn: 'root'
|
|
@@ -4134,10 +4134,10 @@ class CkModelService {
|
|
|
4134
4134
|
}
|
|
4135
4135
|
return a.patch - b.patch;
|
|
4136
4136
|
}
|
|
4137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4138
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkModelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4138
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkModelService, providedIn: 'root' });
|
|
4139
4139
|
}
|
|
4140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkModelService, decorators: [{
|
|
4141
4141
|
type: Injectable,
|
|
4142
4142
|
args: [{
|
|
4143
4143
|
providedIn: 'root'
|
|
@@ -4308,10 +4308,10 @@ class AssetRepoService {
|
|
|
4308
4308
|
}
|
|
4309
4309
|
return null;
|
|
4310
4310
|
}
|
|
4311
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4312
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4311
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AssetRepoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4312
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AssetRepoService, providedIn: 'root' });
|
|
4313
4313
|
}
|
|
4314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: AssetRepoService, decorators: [{
|
|
4315
4315
|
type: Injectable,
|
|
4316
4316
|
args: [{
|
|
4317
4317
|
providedIn: 'root'
|
|
@@ -4321,6 +4321,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4321
4321
|
class BotService {
|
|
4322
4322
|
httpClient = inject(HttpClient);
|
|
4323
4323
|
configurationService = inject(CONFIGURATION_SERVICE);
|
|
4324
|
+
authorizeService = inject(AuthorizeService);
|
|
4324
4325
|
async runFixupScripts(tenantId) {
|
|
4325
4326
|
const params = new HttpParams().set('tenantId', tenantId);
|
|
4326
4327
|
if (this.configurationService.config?.botServices) {
|
|
@@ -4332,8 +4333,20 @@ class BotService {
|
|
|
4332
4333
|
}
|
|
4333
4334
|
return null;
|
|
4334
4335
|
}
|
|
4335
|
-
|
|
4336
|
-
|
|
4336
|
+
/**
|
|
4337
|
+
* Starts a tenant repository dump (backup) job.
|
|
4338
|
+
*
|
|
4339
|
+
* When `includeArchiveData` is `true` the produced artifact additionally bundles the tenant's
|
|
4340
|
+
* CrateDB archive row data (AB#4231, concept §7). The default (`false`) keeps the historical,
|
|
4341
|
+
* fully backward-compatible behaviour (Mongo metadata/config only → single `.tar.gz`); with the
|
|
4342
|
+
* flag set the bot job emits a larger `.octobak.zip` container instead.
|
|
4343
|
+
*
|
|
4344
|
+
* Frozen bot contract: `POST system/v1/jobs/dump-repository?tenantId=&includeArchiveData=`.
|
|
4345
|
+
*/
|
|
4346
|
+
async dumpRepository(tenantId, includeArchiveData = false) {
|
|
4347
|
+
const params = new HttpParams()
|
|
4348
|
+
.set('tenantId', tenantId)
|
|
4349
|
+
.set('includeArchiveData', includeArchiveData);
|
|
4337
4350
|
if (this.configurationService.config?.botServices) {
|
|
4338
4351
|
const r = await firstValueFrom(this.httpClient.post(this.configurationService.config.botServices + 'system/v1/jobs/dump-repository', null, {
|
|
4339
4352
|
params,
|
|
@@ -4381,10 +4394,100 @@ class BotService {
|
|
|
4381
4394
|
}
|
|
4382
4395
|
return null;
|
|
4383
4396
|
}
|
|
4384
|
-
|
|
4385
|
-
|
|
4397
|
+
/**
|
|
4398
|
+
* Starts an asynchronous archive-data export job (AB#4230, concept §5.1 / §8.2). The bot job
|
|
4399
|
+
* orchestrates the CrateDB row stream into a downloadable ZIP (`metadata.json` + `data.ndjson`);
|
|
4400
|
+
* the produced artifact is fetched afterwards via {@link downloadJobResultBinary}.
|
|
4401
|
+
*
|
|
4402
|
+
* When `window` is omitted the whole archive is exported; when supplied only rows whose
|
|
4403
|
+
* timestamp / `window_start` fall in `[fromUtc, toUtc)` are included.
|
|
4404
|
+
*
|
|
4405
|
+
* Frozen bot contract:
|
|
4406
|
+
* `POST system/v1/jobs/export-archive-data?tenantId=&archiveRtId=&fromUtc=&toUtc=` → `{ jobId }`.
|
|
4407
|
+
*/
|
|
4408
|
+
async startExportArchiveData(tenantId, archiveRtId, window) {
|
|
4409
|
+
if (!this.configurationService.config?.botServices) {
|
|
4410
|
+
return null;
|
|
4411
|
+
}
|
|
4412
|
+
let params = new HttpParams()
|
|
4413
|
+
.set('tenantId', tenantId)
|
|
4414
|
+
.set('archiveRtId', archiveRtId);
|
|
4415
|
+
if (window) {
|
|
4416
|
+
params = params.set('fromUtc', window.fromUtc).set('toUtc', window.toUtc);
|
|
4417
|
+
}
|
|
4418
|
+
const r = await firstValueFrom(this.httpClient.post(this.configurationService.config.botServices + 'system/v1/jobs/export-archive-data', null, { params, observe: 'response' }));
|
|
4419
|
+
return r.body;
|
|
4420
|
+
}
|
|
4421
|
+
/**
|
|
4422
|
+
* Uploads an archive-data ZIP via TUS (resumable, large-file safe — same transport as tenant
|
|
4423
|
+
* restore) and starts the import job (AB#4230, concept §5.1 / §8.2). The job validates the
|
|
4424
|
+
* `metadata.json` schema against the live target archive (concept §6) before any write; on a
|
|
4425
|
+
* mismatch the job fails with a field-level message that surfaces through
|
|
4426
|
+
* `JobManagementService.waitForJob` → `MessageService.showErrorWithDetails`.
|
|
4427
|
+
*
|
|
4428
|
+
* Frozen bot contract:
|
|
4429
|
+
* 1. TUS upload to `system/v1/tus-upload` (metadata: `filename`, `filetype`, `tenantId`,
|
|
4430
|
+
* `archiveRtId`, `importMode`).
|
|
4431
|
+
* 2. `POST system/v1/jobs/import-archive-data-from-upload?tusFileId=&tenantId=&archiveRtId=&mode=`
|
|
4432
|
+
* → `{ jobId }`.
|
|
4433
|
+
*/
|
|
4434
|
+
async startImportArchiveDataWithUpload(tenantId, archiveRtId, file, mode, onProgress) {
|
|
4435
|
+
const botServicesUrl = this.configurationService.config?.botServices;
|
|
4436
|
+
if (!botServicesUrl) {
|
|
4437
|
+
return null;
|
|
4438
|
+
}
|
|
4439
|
+
const tusFileId = await this.uploadArchiveDataZip(botServicesUrl, tenantId, archiveRtId, mode, file, onProgress);
|
|
4440
|
+
const params = new HttpParams()
|
|
4441
|
+
.set('tusFileId', tusFileId)
|
|
4442
|
+
.set('tenantId', tenantId)
|
|
4443
|
+
.set('archiveRtId', archiveRtId)
|
|
4444
|
+
.set('mode', mode.toString());
|
|
4445
|
+
const r = await firstValueFrom(this.httpClient.post(botServicesUrl + 'system/v1/jobs/import-archive-data-from-upload', null, { params, observe: 'response' }));
|
|
4446
|
+
return r.body;
|
|
4447
|
+
}
|
|
4448
|
+
uploadArchiveDataZip(botServicesUrl, tenantId, archiveRtId, mode, file, onProgress) {
|
|
4449
|
+
return new Promise((resolve, reject) => {
|
|
4450
|
+
const metadata = {
|
|
4451
|
+
filename: file.name,
|
|
4452
|
+
filetype: file.type || 'application/zip',
|
|
4453
|
+
tenantId,
|
|
4454
|
+
archiveRtId,
|
|
4455
|
+
importMode: mode.toString()
|
|
4456
|
+
};
|
|
4457
|
+
const upload = new Upload(file, {
|
|
4458
|
+
endpoint: botServicesUrl + 'system/v1/tus-upload',
|
|
4459
|
+
retryDelays: [0, 1000, 3000, 5000, 10000],
|
|
4460
|
+
chunkSize: 50 * 1024 * 1024,
|
|
4461
|
+
metadata,
|
|
4462
|
+
onBeforeRequest: (req) => {
|
|
4463
|
+
const token = this.authorizeService.getAccessTokenSync();
|
|
4464
|
+
if (token) {
|
|
4465
|
+
req.setHeader('Authorization', `Bearer ${token}`);
|
|
4466
|
+
}
|
|
4467
|
+
},
|
|
4468
|
+
onProgress: (bytesUploaded, bytesTotal) => {
|
|
4469
|
+
onProgress?.(bytesUploaded, bytesTotal);
|
|
4470
|
+
},
|
|
4471
|
+
onSuccess: () => {
|
|
4472
|
+
const uploadUrl = upload.url;
|
|
4473
|
+
if (!uploadUrl) {
|
|
4474
|
+
reject(new Error('Upload succeeded but no URL returned'));
|
|
4475
|
+
return;
|
|
4476
|
+
}
|
|
4477
|
+
const tusFileId = uploadUrl.substring(uploadUrl.lastIndexOf('/') + 1);
|
|
4478
|
+
resolve(tusFileId);
|
|
4479
|
+
},
|
|
4480
|
+
onError: (error) => {
|
|
4481
|
+
reject(new Error(`Upload failed: ${error.message}`));
|
|
4482
|
+
}
|
|
4483
|
+
});
|
|
4484
|
+
upload.start();
|
|
4485
|
+
});
|
|
4486
|
+
}
|
|
4487
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BotService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4488
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BotService, providedIn: 'root' });
|
|
4386
4489
|
}
|
|
4387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BotService, decorators: [{
|
|
4388
4491
|
type: Injectable,
|
|
4389
4492
|
args: [{
|
|
4390
4493
|
providedIn: 'root'
|
|
@@ -4428,10 +4531,10 @@ class HealthService {
|
|
|
4428
4531
|
async getMeshAdapterAsync() {
|
|
4429
4532
|
return this.getStatusAsync(this.configurationService.config.meshAdapterUrl);
|
|
4430
4533
|
}
|
|
4431
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4432
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4534
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: HealthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4535
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: HealthService, providedIn: 'root' });
|
|
4433
4536
|
}
|
|
4434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: HealthService, decorators: [{
|
|
4435
4538
|
type: Injectable,
|
|
4436
4539
|
args: [{
|
|
4437
4540
|
providedIn: 'root'
|
|
@@ -5005,10 +5108,10 @@ class IdentityService {
|
|
|
5005
5108
|
}));
|
|
5006
5109
|
}
|
|
5007
5110
|
}
|
|
5008
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5009
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: IdentityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5112
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: IdentityService, providedIn: 'root' });
|
|
5010
5113
|
}
|
|
5011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: IdentityService, decorators: [{
|
|
5012
5115
|
type: Injectable,
|
|
5013
5116
|
args: [{
|
|
5014
5117
|
providedIn: 'root'
|
|
@@ -5067,10 +5170,10 @@ class JobManagementService {
|
|
|
5067
5170
|
}
|
|
5068
5171
|
return false;
|
|
5069
5172
|
}
|
|
5070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5071
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5173
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: JobManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5174
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: JobManagementService, providedIn: 'root' });
|
|
5072
5175
|
}
|
|
5073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: JobManagementService, decorators: [{
|
|
5074
5177
|
type: Injectable,
|
|
5075
5178
|
args: [{
|
|
5076
5179
|
providedIn: 'root'
|
|
@@ -5509,10 +5612,10 @@ class CommunicationService {
|
|
|
5509
5612
|
}
|
|
5510
5613
|
return null;
|
|
5511
5614
|
}
|
|
5512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5513
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CommunicationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5616
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CommunicationService, providedIn: 'root' });
|
|
5514
5617
|
}
|
|
5515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CommunicationService, decorators: [{
|
|
5516
5619
|
type: Injectable,
|
|
5517
5620
|
args: [{
|
|
5518
5621
|
providedIn: 'root'
|
|
@@ -5580,17 +5683,18 @@ class TusUploadService {
|
|
|
5580
5683
|
let params = new HttpParams()
|
|
5581
5684
|
.set('tusFileId', tusFileId)
|
|
5582
5685
|
.set('tenantId', options.tenantId)
|
|
5583
|
-
.set('databaseName', options.databaseName)
|
|
5686
|
+
.set('databaseName', options.databaseName)
|
|
5687
|
+
.set('restoreArchiveData', options.restoreArchiveData ?? false);
|
|
5584
5688
|
if (options.oldDatabaseName) {
|
|
5585
5689
|
params = params.set('oldDatabaseName', options.oldDatabaseName);
|
|
5586
5690
|
}
|
|
5587
5691
|
const r = await firstValueFrom(this.httpClient.post(botServicesUrl + 'system/v1/jobs/restore-from-upload', null, { params, observe: 'response' }));
|
|
5588
5692
|
return r.body;
|
|
5589
5693
|
}
|
|
5590
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5591
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TusUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5695
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TusUploadService, providedIn: 'root' });
|
|
5592
5696
|
}
|
|
5593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: TusUploadService, decorators: [{
|
|
5594
5698
|
type: Injectable,
|
|
5595
5699
|
args: [{
|
|
5596
5700
|
providedIn: 'root'
|
|
@@ -5700,10 +5804,10 @@ class CkModelCatalogService {
|
|
|
5700
5804
|
const r = await firstValueFrom(this.httpClient.get(url, { observe: 'response' }));
|
|
5701
5805
|
return r.body;
|
|
5702
5806
|
}
|
|
5703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5704
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5807
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkModelCatalogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5808
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkModelCatalogService, providedIn: 'root' });
|
|
5705
5809
|
}
|
|
5706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CkModelCatalogService, decorators: [{
|
|
5707
5811
|
type: Injectable,
|
|
5708
5812
|
args: [{
|
|
5709
5813
|
providedIn: 'root'
|
|
@@ -5745,10 +5849,10 @@ class GetEntitiesByCkTypeDtoGQL extends i1.Query {
|
|
|
5745
5849
|
constructor(apollo) {
|
|
5746
5850
|
super(apollo);
|
|
5747
5851
|
}
|
|
5748
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5749
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5852
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetEntitiesByCkTypeDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5853
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetEntitiesByCkTypeDtoGQL, providedIn: 'root' });
|
|
5750
5854
|
}
|
|
5751
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: GetEntitiesByCkTypeDtoGQL, decorators: [{
|
|
5752
5856
|
type: Injectable,
|
|
5753
5857
|
args: [{
|
|
5754
5858
|
providedIn: 'root'
|
|
@@ -5870,11 +5974,11 @@ class OctoServicesModule {
|
|
|
5870
5974
|
]
|
|
5871
5975
|
};
|
|
5872
5976
|
}
|
|
5873
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5874
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
5875
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
5977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: OctoServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5978
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: OctoServicesModule });
|
|
5979
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: OctoServicesModule });
|
|
5876
5980
|
}
|
|
5877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: OctoServicesModule, decorators: [{
|
|
5878
5982
|
type: NgModule,
|
|
5879
5983
|
args: [{
|
|
5880
5984
|
declarations: [],
|