@ptkl/sdk 0.3.1 → 0.4.0
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/dist/index.cjs.js +26 -18
- package/dist/index.esm.js +26 -18
- package/dist/index.umd.js +26 -18
- package/dist/package.json +1 -1
- package/dist/types/api/forge.d.ts +2 -0
- package/dist/types/api/integrations.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -17858,7 +17858,7 @@ class PlatformBaseClient extends BaseClient {
|
|
|
17858
17858
|
// @ts-ignore
|
|
17859
17859
|
const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
|
|
17860
17860
|
host = (_b = __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.API_HOST) !== null && _b !== undefined ? _b : host;
|
|
17861
|
-
|
|
17861
|
+
// @ts-ignore
|
|
17862
17862
|
token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
|
|
17863
17863
|
}
|
|
17864
17864
|
if (token) {
|
|
@@ -18306,7 +18306,7 @@ class Workflow extends PlatformBaseClient {
|
|
|
18306
18306
|
|
|
18307
18307
|
class Forge extends PlatformBaseClient {
|
|
18308
18308
|
async bundleUpload(buffer) {
|
|
18309
|
-
return await this.client.post(`/
|
|
18309
|
+
return await this.client.post(`/luma/appservice/v1/forge/upload`, buffer, {
|
|
18310
18310
|
headers: {
|
|
18311
18311
|
'Content-Type': 'application/octet-stream',
|
|
18312
18312
|
'Content-Length': buffer.length
|
|
@@ -18314,7 +18314,13 @@ class Forge extends PlatformBaseClient {
|
|
|
18314
18314
|
});
|
|
18315
18315
|
}
|
|
18316
18316
|
async getWorkspaceApps() {
|
|
18317
|
-
return await this.client.get(`/
|
|
18317
|
+
return await this.client.get(`/luma/appservice/v1/forge/workspace`);
|
|
18318
|
+
}
|
|
18319
|
+
async removeVersion(ref, version) {
|
|
18320
|
+
return await this.client.delete(`/luma/appservice/v1/forge/${ref}/version/${version}`);
|
|
18321
|
+
}
|
|
18322
|
+
async list() {
|
|
18323
|
+
return await this.client.get(`/luma/appservice/v1/forge`);
|
|
18318
18324
|
}
|
|
18319
18325
|
}
|
|
18320
18326
|
|
|
@@ -18409,6 +18415,8 @@ class IntegrationsBaseClient extends BaseClient {
|
|
|
18409
18415
|
// @ts-ignore
|
|
18410
18416
|
const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
|
|
18411
18417
|
host = (_b = __global_env__.INTEGRATION_API) !== null && _b !== undefined ? _b : host;
|
|
18418
|
+
// @ts-ignore
|
|
18419
|
+
token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
|
|
18412
18420
|
}
|
|
18413
18421
|
if (token) {
|
|
18414
18422
|
headers['Authorization'] = `Bearer ${token}`;
|
|
@@ -18430,10 +18438,10 @@ class IntegrationsBaseClient extends BaseClient {
|
|
|
18430
18438
|
|
|
18431
18439
|
class Media extends IntegrationsBaseClient {
|
|
18432
18440
|
async list(data) {
|
|
18433
|
-
return this.request('POST', 'list', { data });
|
|
18441
|
+
return this.request('POST', 'media/list', { data });
|
|
18434
18442
|
}
|
|
18435
18443
|
async libraries() {
|
|
18436
|
-
return await this.requestv1("GET", "library/list");
|
|
18444
|
+
return await this.requestv1("GET", "media/library/list");
|
|
18437
18445
|
}
|
|
18438
18446
|
async upload(payload) {
|
|
18439
18447
|
let files = payload.files;
|
|
@@ -18456,7 +18464,7 @@ class Media extends IntegrationsBaseClient {
|
|
|
18456
18464
|
formData.append('expiresAt', new Date(payload.expiresAt).toISOString());
|
|
18457
18465
|
if (Object.keys(payload.metadata).length > 0)
|
|
18458
18466
|
formData.append('metadata', JSON.stringify(payload.metadata));
|
|
18459
|
-
return await this.request("POST", "", {
|
|
18467
|
+
return await this.request("POST", "media/upload", {
|
|
18460
18468
|
data: formData,
|
|
18461
18469
|
headers: {
|
|
18462
18470
|
'Content-Type': 'multipart/form-data'
|
|
@@ -18465,10 +18473,10 @@ class Media extends IntegrationsBaseClient {
|
|
|
18465
18473
|
}
|
|
18466
18474
|
}
|
|
18467
18475
|
async delete(data) {
|
|
18468
|
-
return this.request('POST', 'delete', data);
|
|
18476
|
+
return this.request('POST', 'media/delete', data);
|
|
18469
18477
|
}
|
|
18470
18478
|
async uploadBase64(data) {
|
|
18471
|
-
return this.request('POST',
|
|
18479
|
+
return this.request('POST', `media/upload`, {
|
|
18472
18480
|
data,
|
|
18473
18481
|
headers: {
|
|
18474
18482
|
'Content-Type': 'application/json'
|
|
@@ -18476,7 +18484,7 @@ class Media extends IntegrationsBaseClient {
|
|
|
18476
18484
|
});
|
|
18477
18485
|
}
|
|
18478
18486
|
async getMedia(lib, key, encoding) {
|
|
18479
|
-
return this.request('GET', `library/${lib}/get/${key}`, {
|
|
18487
|
+
return this.request('GET', `media/library/${lib}/get/${key}`, {
|
|
18480
18488
|
params: {
|
|
18481
18489
|
encoding
|
|
18482
18490
|
},
|
|
@@ -18484,7 +18492,7 @@ class Media extends IntegrationsBaseClient {
|
|
|
18484
18492
|
});
|
|
18485
18493
|
}
|
|
18486
18494
|
async download(lib, key) {
|
|
18487
|
-
return this.request('POST', `library/${lib}/download`, {
|
|
18495
|
+
return this.request('POST', `media/library/${lib}/download`, {
|
|
18488
18496
|
data: {
|
|
18489
18497
|
key
|
|
18490
18498
|
},
|
|
@@ -18492,13 +18500,13 @@ class Media extends IntegrationsBaseClient {
|
|
|
18492
18500
|
});
|
|
18493
18501
|
}
|
|
18494
18502
|
async getExifData(lib, key) {
|
|
18495
|
-
return this.request('GET', `library/${lib}/exif/${key}`);
|
|
18503
|
+
return this.request('GET', `media/library/${lib}/exif/${key}`);
|
|
18496
18504
|
}
|
|
18497
18505
|
async html2pdf(lib, data) {
|
|
18498
18506
|
const { output_pdf = false, input_path, input_html, output_path, output_file_name, data: templateData } = data;
|
|
18499
18507
|
const type = output_pdf ? 'arraybuffer' : 'json';
|
|
18500
18508
|
const contentType = output_pdf ? 'application/pdf' : 'application/json';
|
|
18501
|
-
return this.request('POST', `library/${lib}/html2pdf`, {
|
|
18509
|
+
return this.request('POST', `media/library/${lib}/html2pdf`, {
|
|
18502
18510
|
data: {
|
|
18503
18511
|
output_pdf,
|
|
18504
18512
|
input_path,
|
|
@@ -18514,25 +18522,25 @@ class Media extends IntegrationsBaseClient {
|
|
|
18514
18522
|
});
|
|
18515
18523
|
}
|
|
18516
18524
|
async createDir(lib, path) {
|
|
18517
|
-
return this.request('POST', `library/${lib}/dir`, { data: { path } });
|
|
18525
|
+
return this.request('POST', `media/library/${lib}/dir`, { data: { path } });
|
|
18518
18526
|
}
|
|
18519
18527
|
async deleteDir(lib, path) {
|
|
18520
|
-
return this.request('POST', `library/${lib}/delete/dir`, { data: { path } });
|
|
18528
|
+
return this.request('POST', `media/library/${lib}/delete/dir`, { data: { path } });
|
|
18521
18529
|
}
|
|
18522
18530
|
async dirs(lib, data) {
|
|
18523
|
-
return await this.request("POST", `library/${lib}/dirs`, { data });
|
|
18531
|
+
return await this.request("POST", `media/library/${lib}/dirs`, { data });
|
|
18524
18532
|
}
|
|
18525
18533
|
async request(method, endpoint, params) {
|
|
18526
18534
|
return await this.client.request({
|
|
18527
18535
|
method: method,
|
|
18528
|
-
url: `/v2/
|
|
18536
|
+
url: `/v2/dms/${endpoint}`,
|
|
18529
18537
|
...params
|
|
18530
18538
|
});
|
|
18531
18539
|
}
|
|
18532
18540
|
async requestv1(method, endpoint, params) {
|
|
18533
18541
|
return await this.client.request({
|
|
18534
18542
|
method: method,
|
|
18535
|
-
url: `/v1/
|
|
18543
|
+
url: `/v1/dms/${endpoint}`,
|
|
18536
18544
|
...params
|
|
18537
18545
|
});
|
|
18538
18546
|
}
|
|
@@ -18589,7 +18597,7 @@ class Integrations extends IntegrationsBaseClient {
|
|
|
18589
18597
|
getSerbiaUtilities() {
|
|
18590
18598
|
return this.getInterfaceOf('serbia-utilities');
|
|
18591
18599
|
}
|
|
18592
|
-
|
|
18600
|
+
getDMS() {
|
|
18593
18601
|
return this.getInterfaceOf('protokol-media');
|
|
18594
18602
|
}
|
|
18595
18603
|
getVPFR() {
|
package/dist/index.esm.js
CHANGED
|
@@ -48,7 +48,7 @@ class PlatformBaseClient extends BaseClient {
|
|
|
48
48
|
// @ts-ignore
|
|
49
49
|
const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
|
|
50
50
|
host = (_b = __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.API_HOST) !== null && _b !== undefined ? _b : host;
|
|
51
|
-
|
|
51
|
+
// @ts-ignore
|
|
52
52
|
token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
|
|
53
53
|
}
|
|
54
54
|
if (token) {
|
|
@@ -496,7 +496,7 @@ class Workflow extends PlatformBaseClient {
|
|
|
496
496
|
|
|
497
497
|
class Forge extends PlatformBaseClient {
|
|
498
498
|
async bundleUpload(buffer) {
|
|
499
|
-
return await this.client.post(`/
|
|
499
|
+
return await this.client.post(`/luma/appservice/v1/forge/upload`, buffer, {
|
|
500
500
|
headers: {
|
|
501
501
|
'Content-Type': 'application/octet-stream',
|
|
502
502
|
'Content-Length': buffer.length
|
|
@@ -504,7 +504,13 @@ class Forge extends PlatformBaseClient {
|
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
async getWorkspaceApps() {
|
|
507
|
-
return await this.client.get(`/
|
|
507
|
+
return await this.client.get(`/luma/appservice/v1/forge/workspace`);
|
|
508
|
+
}
|
|
509
|
+
async removeVersion(ref, version) {
|
|
510
|
+
return await this.client.delete(`/luma/appservice/v1/forge/${ref}/version/${version}`);
|
|
511
|
+
}
|
|
512
|
+
async list() {
|
|
513
|
+
return await this.client.get(`/luma/appservice/v1/forge`);
|
|
508
514
|
}
|
|
509
515
|
}
|
|
510
516
|
|
|
@@ -599,6 +605,8 @@ class IntegrationsBaseClient extends BaseClient {
|
|
|
599
605
|
// @ts-ignore
|
|
600
606
|
const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
|
|
601
607
|
host = (_b = __global_env__.INTEGRATION_API) !== null && _b !== undefined ? _b : host;
|
|
608
|
+
// @ts-ignore
|
|
609
|
+
token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
|
|
602
610
|
}
|
|
603
611
|
if (token) {
|
|
604
612
|
headers['Authorization'] = `Bearer ${token}`;
|
|
@@ -620,10 +628,10 @@ class IntegrationsBaseClient extends BaseClient {
|
|
|
620
628
|
|
|
621
629
|
class Media extends IntegrationsBaseClient {
|
|
622
630
|
async list(data) {
|
|
623
|
-
return this.request('POST', 'list', { data });
|
|
631
|
+
return this.request('POST', 'media/list', { data });
|
|
624
632
|
}
|
|
625
633
|
async libraries() {
|
|
626
|
-
return await this.requestv1("GET", "library/list");
|
|
634
|
+
return await this.requestv1("GET", "media/library/list");
|
|
627
635
|
}
|
|
628
636
|
async upload(payload) {
|
|
629
637
|
let files = payload.files;
|
|
@@ -646,7 +654,7 @@ class Media extends IntegrationsBaseClient {
|
|
|
646
654
|
formData.append('expiresAt', new Date(payload.expiresAt).toISOString());
|
|
647
655
|
if (Object.keys(payload.metadata).length > 0)
|
|
648
656
|
formData.append('metadata', JSON.stringify(payload.metadata));
|
|
649
|
-
return await this.request("POST", "", {
|
|
657
|
+
return await this.request("POST", "media/upload", {
|
|
650
658
|
data: formData,
|
|
651
659
|
headers: {
|
|
652
660
|
'Content-Type': 'multipart/form-data'
|
|
@@ -655,10 +663,10 @@ class Media extends IntegrationsBaseClient {
|
|
|
655
663
|
}
|
|
656
664
|
}
|
|
657
665
|
async delete(data) {
|
|
658
|
-
return this.request('POST', 'delete', data);
|
|
666
|
+
return this.request('POST', 'media/delete', data);
|
|
659
667
|
}
|
|
660
668
|
async uploadBase64(data) {
|
|
661
|
-
return this.request('POST',
|
|
669
|
+
return this.request('POST', `media/upload`, {
|
|
662
670
|
data,
|
|
663
671
|
headers: {
|
|
664
672
|
'Content-Type': 'application/json'
|
|
@@ -666,7 +674,7 @@ class Media extends IntegrationsBaseClient {
|
|
|
666
674
|
});
|
|
667
675
|
}
|
|
668
676
|
async getMedia(lib, key, encoding) {
|
|
669
|
-
return this.request('GET', `library/${lib}/get/${key}`, {
|
|
677
|
+
return this.request('GET', `media/library/${lib}/get/${key}`, {
|
|
670
678
|
params: {
|
|
671
679
|
encoding
|
|
672
680
|
},
|
|
@@ -674,7 +682,7 @@ class Media extends IntegrationsBaseClient {
|
|
|
674
682
|
});
|
|
675
683
|
}
|
|
676
684
|
async download(lib, key) {
|
|
677
|
-
return this.request('POST', `library/${lib}/download`, {
|
|
685
|
+
return this.request('POST', `media/library/${lib}/download`, {
|
|
678
686
|
data: {
|
|
679
687
|
key
|
|
680
688
|
},
|
|
@@ -682,13 +690,13 @@ class Media extends IntegrationsBaseClient {
|
|
|
682
690
|
});
|
|
683
691
|
}
|
|
684
692
|
async getExifData(lib, key) {
|
|
685
|
-
return this.request('GET', `library/${lib}/exif/${key}`);
|
|
693
|
+
return this.request('GET', `media/library/${lib}/exif/${key}`);
|
|
686
694
|
}
|
|
687
695
|
async html2pdf(lib, data) {
|
|
688
696
|
const { output_pdf = false, input_path, input_html, output_path, output_file_name, data: templateData } = data;
|
|
689
697
|
const type = output_pdf ? 'arraybuffer' : 'json';
|
|
690
698
|
const contentType = output_pdf ? 'application/pdf' : 'application/json';
|
|
691
|
-
return this.request('POST', `library/${lib}/html2pdf`, {
|
|
699
|
+
return this.request('POST', `media/library/${lib}/html2pdf`, {
|
|
692
700
|
data: {
|
|
693
701
|
output_pdf,
|
|
694
702
|
input_path,
|
|
@@ -704,25 +712,25 @@ class Media extends IntegrationsBaseClient {
|
|
|
704
712
|
});
|
|
705
713
|
}
|
|
706
714
|
async createDir(lib, path) {
|
|
707
|
-
return this.request('POST', `library/${lib}/dir`, { data: { path } });
|
|
715
|
+
return this.request('POST', `media/library/${lib}/dir`, { data: { path } });
|
|
708
716
|
}
|
|
709
717
|
async deleteDir(lib, path) {
|
|
710
|
-
return this.request('POST', `library/${lib}/delete/dir`, { data: { path } });
|
|
718
|
+
return this.request('POST', `media/library/${lib}/delete/dir`, { data: { path } });
|
|
711
719
|
}
|
|
712
720
|
async dirs(lib, data) {
|
|
713
|
-
return await this.request("POST", `library/${lib}/dirs`, { data });
|
|
721
|
+
return await this.request("POST", `media/library/${lib}/dirs`, { data });
|
|
714
722
|
}
|
|
715
723
|
async request(method, endpoint, params) {
|
|
716
724
|
return await this.client.request({
|
|
717
725
|
method: method,
|
|
718
|
-
url: `/v2/
|
|
726
|
+
url: `/v2/dms/${endpoint}`,
|
|
719
727
|
...params
|
|
720
728
|
});
|
|
721
729
|
}
|
|
722
730
|
async requestv1(method, endpoint, params) {
|
|
723
731
|
return await this.client.request({
|
|
724
732
|
method: method,
|
|
725
|
-
url: `/v1/
|
|
733
|
+
url: `/v1/dms/${endpoint}`,
|
|
726
734
|
...params
|
|
727
735
|
});
|
|
728
736
|
}
|
|
@@ -779,7 +787,7 @@ class Integrations extends IntegrationsBaseClient {
|
|
|
779
787
|
getSerbiaUtilities() {
|
|
780
788
|
return this.getInterfaceOf('serbia-utilities');
|
|
781
789
|
}
|
|
782
|
-
|
|
790
|
+
getDMS() {
|
|
783
791
|
return this.getInterfaceOf('protokol-media');
|
|
784
792
|
}
|
|
785
793
|
getVPFR() {
|
package/dist/index.umd.js
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
// @ts-ignore
|
|
53
53
|
const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
|
|
54
54
|
host = (_b = __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.API_HOST) !== null && _b !== undefined ? _b : host;
|
|
55
|
-
|
|
55
|
+
// @ts-ignore
|
|
56
56
|
token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
|
|
57
57
|
}
|
|
58
58
|
if (token) {
|
|
@@ -500,7 +500,7 @@
|
|
|
500
500
|
|
|
501
501
|
class Forge extends PlatformBaseClient {
|
|
502
502
|
async bundleUpload(buffer) {
|
|
503
|
-
return await this.client.post(`/
|
|
503
|
+
return await this.client.post(`/luma/appservice/v1/forge/upload`, buffer, {
|
|
504
504
|
headers: {
|
|
505
505
|
'Content-Type': 'application/octet-stream',
|
|
506
506
|
'Content-Length': buffer.length
|
|
@@ -508,7 +508,13 @@
|
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
510
|
async getWorkspaceApps() {
|
|
511
|
-
return await this.client.get(`/
|
|
511
|
+
return await this.client.get(`/luma/appservice/v1/forge/workspace`);
|
|
512
|
+
}
|
|
513
|
+
async removeVersion(ref, version) {
|
|
514
|
+
return await this.client.delete(`/luma/appservice/v1/forge/${ref}/version/${version}`);
|
|
515
|
+
}
|
|
516
|
+
async list() {
|
|
517
|
+
return await this.client.get(`/luma/appservice/v1/forge`);
|
|
512
518
|
}
|
|
513
519
|
}
|
|
514
520
|
|
|
@@ -603,6 +609,8 @@
|
|
|
603
609
|
// @ts-ignore
|
|
604
610
|
const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
|
|
605
611
|
host = (_b = __global_env__.INTEGRATION_API) !== null && _b !== undefined ? _b : host;
|
|
612
|
+
// @ts-ignore
|
|
613
|
+
token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
|
|
606
614
|
}
|
|
607
615
|
if (token) {
|
|
608
616
|
headers['Authorization'] = `Bearer ${token}`;
|
|
@@ -624,10 +632,10 @@
|
|
|
624
632
|
|
|
625
633
|
class Media extends IntegrationsBaseClient {
|
|
626
634
|
async list(data) {
|
|
627
|
-
return this.request('POST', 'list', { data });
|
|
635
|
+
return this.request('POST', 'media/list', { data });
|
|
628
636
|
}
|
|
629
637
|
async libraries() {
|
|
630
|
-
return await this.requestv1("GET", "library/list");
|
|
638
|
+
return await this.requestv1("GET", "media/library/list");
|
|
631
639
|
}
|
|
632
640
|
async upload(payload) {
|
|
633
641
|
let files = payload.files;
|
|
@@ -650,7 +658,7 @@
|
|
|
650
658
|
formData.append('expiresAt', new Date(payload.expiresAt).toISOString());
|
|
651
659
|
if (Object.keys(payload.metadata).length > 0)
|
|
652
660
|
formData.append('metadata', JSON.stringify(payload.metadata));
|
|
653
|
-
return await this.request("POST", "", {
|
|
661
|
+
return await this.request("POST", "media/upload", {
|
|
654
662
|
data: formData,
|
|
655
663
|
headers: {
|
|
656
664
|
'Content-Type': 'multipart/form-data'
|
|
@@ -659,10 +667,10 @@
|
|
|
659
667
|
}
|
|
660
668
|
}
|
|
661
669
|
async delete(data) {
|
|
662
|
-
return this.request('POST', 'delete', data);
|
|
670
|
+
return this.request('POST', 'media/delete', data);
|
|
663
671
|
}
|
|
664
672
|
async uploadBase64(data) {
|
|
665
|
-
return this.request('POST',
|
|
673
|
+
return this.request('POST', `media/upload`, {
|
|
666
674
|
data,
|
|
667
675
|
headers: {
|
|
668
676
|
'Content-Type': 'application/json'
|
|
@@ -670,7 +678,7 @@
|
|
|
670
678
|
});
|
|
671
679
|
}
|
|
672
680
|
async getMedia(lib, key, encoding) {
|
|
673
|
-
return this.request('GET', `library/${lib}/get/${key}`, {
|
|
681
|
+
return this.request('GET', `media/library/${lib}/get/${key}`, {
|
|
674
682
|
params: {
|
|
675
683
|
encoding
|
|
676
684
|
},
|
|
@@ -678,7 +686,7 @@
|
|
|
678
686
|
});
|
|
679
687
|
}
|
|
680
688
|
async download(lib, key) {
|
|
681
|
-
return this.request('POST', `library/${lib}/download`, {
|
|
689
|
+
return this.request('POST', `media/library/${lib}/download`, {
|
|
682
690
|
data: {
|
|
683
691
|
key
|
|
684
692
|
},
|
|
@@ -686,13 +694,13 @@
|
|
|
686
694
|
});
|
|
687
695
|
}
|
|
688
696
|
async getExifData(lib, key) {
|
|
689
|
-
return this.request('GET', `library/${lib}/exif/${key}`);
|
|
697
|
+
return this.request('GET', `media/library/${lib}/exif/${key}`);
|
|
690
698
|
}
|
|
691
699
|
async html2pdf(lib, data) {
|
|
692
700
|
const { output_pdf = false, input_path, input_html, output_path, output_file_name, data: templateData } = data;
|
|
693
701
|
const type = output_pdf ? 'arraybuffer' : 'json';
|
|
694
702
|
const contentType = output_pdf ? 'application/pdf' : 'application/json';
|
|
695
|
-
return this.request('POST', `library/${lib}/html2pdf`, {
|
|
703
|
+
return this.request('POST', `media/library/${lib}/html2pdf`, {
|
|
696
704
|
data: {
|
|
697
705
|
output_pdf,
|
|
698
706
|
input_path,
|
|
@@ -708,25 +716,25 @@
|
|
|
708
716
|
});
|
|
709
717
|
}
|
|
710
718
|
async createDir(lib, path) {
|
|
711
|
-
return this.request('POST', `library/${lib}/dir`, { data: { path } });
|
|
719
|
+
return this.request('POST', `media/library/${lib}/dir`, { data: { path } });
|
|
712
720
|
}
|
|
713
721
|
async deleteDir(lib, path) {
|
|
714
|
-
return this.request('POST', `library/${lib}/delete/dir`, { data: { path } });
|
|
722
|
+
return this.request('POST', `media/library/${lib}/delete/dir`, { data: { path } });
|
|
715
723
|
}
|
|
716
724
|
async dirs(lib, data) {
|
|
717
|
-
return await this.request("POST", `library/${lib}/dirs`, { data });
|
|
725
|
+
return await this.request("POST", `media/library/${lib}/dirs`, { data });
|
|
718
726
|
}
|
|
719
727
|
async request(method, endpoint, params) {
|
|
720
728
|
return await this.client.request({
|
|
721
729
|
method: method,
|
|
722
|
-
url: `/v2/
|
|
730
|
+
url: `/v2/dms/${endpoint}`,
|
|
723
731
|
...params
|
|
724
732
|
});
|
|
725
733
|
}
|
|
726
734
|
async requestv1(method, endpoint, params) {
|
|
727
735
|
return await this.client.request({
|
|
728
736
|
method: method,
|
|
729
|
-
url: `/v1/
|
|
737
|
+
url: `/v1/dms/${endpoint}`,
|
|
730
738
|
...params
|
|
731
739
|
});
|
|
732
740
|
}
|
|
@@ -783,7 +791,7 @@
|
|
|
783
791
|
getSerbiaUtilities() {
|
|
784
792
|
return this.getInterfaceOf('serbia-utilities');
|
|
785
793
|
}
|
|
786
|
-
|
|
794
|
+
getDMS() {
|
|
787
795
|
return this.getInterfaceOf('protokol-media');
|
|
788
796
|
}
|
|
789
797
|
getVPFR() {
|
package/dist/package.json
CHANGED
|
@@ -2,4 +2,6 @@ import PlatformBaseClient from "./platformBaseClient";
|
|
|
2
2
|
export default class Forge extends PlatformBaseClient {
|
|
3
3
|
bundleUpload(buffer: Buffer): Promise<any>;
|
|
4
4
|
getWorkspaceApps(): Promise<any>;
|
|
5
|
+
removeVersion(ref: string, version: string): Promise<any>;
|
|
6
|
+
list(): Promise<any>;
|
|
5
7
|
}
|