@halix/action-sdk 1.0.15 → 1.0.16

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/lib/cjs/index.js CHANGED
@@ -33,6 +33,14 @@ exports.getValueFromObject = getValueFromObject;
33
33
  exports.prepareSuccessResponse = prepareSuccessResponse;
34
34
  exports.prepareErrorResponse = prepareErrorResponse;
35
35
  exports.initialize = initialize;
36
+ exports.getOrCreateResource = getOrCreateResource;
37
+ exports.getOrCreateResourceAsObservable = getOrCreateResourceAsObservable;
38
+ exports.saveResource = saveResource;
39
+ exports.saveResourceAsObservable = saveResourceAsObservable;
40
+ exports.sendFileContents = sendFileContents;
41
+ exports.sendFileContentsAsObservable = sendFileContentsAsObservable;
42
+ exports.createOrUpdateResource = createOrUpdateResource;
43
+ exports.createOrUpdateResourceAsObservable = createOrUpdateResourceAsObservable;
36
44
  /**
37
45
  * @module @halix/action-sdk
38
46
  * @description Halix Platform action SDK for developing NodeJS Lambda-based actions on the Halix
@@ -367,3 +375,215 @@ function initialize(event) {
367
375
  }
368
376
  }
369
377
  }
378
+ /**
379
+ * getOrCreateResource retrieves an existing content resource by its key, or creates a new one
380
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
381
+ * resource from the server. If no key is provided, it creates a new resource with the specified
382
+ * properties.
383
+ *
384
+ * @param resourceKey - Optional key of the existing resource to retrieve
385
+ * @param fileToUpload - Optional file or blob to upload
386
+ * @param publicFlag - Whether the resource should be public
387
+ * @param resourceType - The type of resource
388
+ * @param tags - Array of tags for the resource
389
+ *
390
+ * @returns Promise resolving to a ContentResource
391
+ */
392
+ function getOrCreateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ if (!exports.userContext) {
395
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
396
+ }
397
+ if (resourceKey) {
398
+ let url = `${exports.serviceAddress}/sandboxes/${exports.sandboxKey}/contentResource/${resourceKey}`;
399
+ let authToken = yield (0, rxjs_1.lastValueFrom)((0, exports.getAuthToken)());
400
+ console.log("Sending GET request to " + url + " with token " + authToken);
401
+ let response = yield axios_1.default.get(url, {
402
+ headers: { "Authorization": `Bearer ${authToken}` },
403
+ });
404
+ let resource = response.data;
405
+ if (fileToUpload) {
406
+ resource.contentType = fileToUpload.type;
407
+ // Null out the name and extension; the server will set these if they are blank
408
+ resource.name = null;
409
+ resource.extension = null;
410
+ }
411
+ return resource;
412
+ }
413
+ let newResource = {
414
+ isPublic: publicFlag,
415
+ resourceType: resourceType,
416
+ tags: tags,
417
+ organizationKey: exports.userContext.orgKey,
418
+ sandboxKey: exports.sandboxKey,
419
+ userKey: exports.userContext.user.objKey
420
+ };
421
+ if (fileToUpload) {
422
+ newResource.contentType = fileToUpload.type;
423
+ // Null out the name and extension; the server will set these if they are blank
424
+ newResource.name = null;
425
+ newResource.extension = null;
426
+ }
427
+ return newResource;
428
+ });
429
+ }
430
+ /**
431
+ * getOrCreateResourceAsObservable retrieves an existing content resource by its key, or creates a new one
432
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
433
+ * resource from the server. If no key is provided, it creates a new resource with the specified
434
+ * properties.
435
+ *
436
+ * @param resourceKey - Optional key of the existing resource to retrieve
437
+ * @param fileToUpload - Optional file or blob to upload
438
+ * @param publicFlag - Whether the resource should be public
439
+ * @param resourceType - The type of resource
440
+ * @param tags - Array of tags for the resource
441
+ *
442
+ * @returns Observable resolving to a ContentResource
443
+ */
444
+ function getOrCreateResourceAsObservable(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
445
+ return (0, rxjs_1.from)(getOrCreateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags));
446
+ }
447
+ /**
448
+ * saveResource saves a content resource to the server. The resource is saved with appropriate
449
+ * ownership parameters based on the current context (solution builder vs regular organization view).
450
+ *
451
+ * @param resource - The ContentResource to save
452
+ *
453
+ * @returns Promise resolving to the saved ContentResource
454
+ */
455
+ function saveResource(resource) {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ if (!exports.userContext) {
458
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
459
+ }
460
+ let params = {};
461
+ if (exports.userContext.orgProxy.objType === "Solution") {
462
+ // When in the solution builder view, content is owned by the solution. The solution key is the org proxy key in
463
+ // the builder view.
464
+ params.solutionKey = exports.userContext.orgProxyKey;
465
+ }
466
+ else {
467
+ params.organizationKey = exports.userContext.orgKey;
468
+ params.userKey = exports.userContext.user.objKey;
469
+ }
470
+ let url = `${exports.serviceAddress}/sandboxes/${exports.sandboxKey}/contentResource`;
471
+ let authToken = yield (0, rxjs_1.lastValueFrom)((0, exports.getAuthToken)());
472
+ console.log("Sending POST request to " + url + " with token " + authToken);
473
+ let response = yield axios_1.default.post(url, JSON.stringify(resource), {
474
+ headers: { "Authorization": `Bearer ${authToken}` },
475
+ params: params,
476
+ });
477
+ return response.data;
478
+ });
479
+ }
480
+ /**
481
+ * saveResourceAsObservable saves a content resource to the server. The resource is saved with appropriate
482
+ * ownership parameters based on the current context (solution builder vs regular organization view).
483
+ *
484
+ * @param resource - The ContentResource to save
485
+ *
486
+ * @returns Observable resolving to the saved ContentResource
487
+ */
488
+ function saveResourceAsObservable(resource) {
489
+ return (0, rxjs_1.from)(saveResource(resource));
490
+ }
491
+ /**
492
+ * sendFileContents uploads file contents to the server for a specific resource. The file is uploaded
493
+ * via FormData with the appropriate scope and public flag settings.
494
+ *
495
+ * @param resourceKey - The key of the resource to upload file contents for
496
+ * @param fileToUpload - The file or blob to upload
497
+ * @param publicFlag - Whether the file should be public
498
+ *
499
+ * @returns Promise resolving to true if upload was successful
500
+ */
501
+ function sendFileContents(resourceKey, fileToUpload, publicFlag) {
502
+ return __awaiter(this, void 0, void 0, function* () {
503
+ if (!exports.userContext) {
504
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
505
+ }
506
+ let url = `${exports.serviceAddress}/filecontent/${exports.sandboxKey}/${resourceKey}`;
507
+ let authToken = yield (0, rxjs_1.lastValueFrom)((0, exports.getAuthToken)());
508
+ console.log("Sending file upload request to " + url + " with token " + authToken);
509
+ let formData = new FormData();
510
+ formData.append("fileUpload", fileToUpload);
511
+ formData.append("scopeKeyPath", exports.userContext.orgProxyKey);
512
+ formData.append("public", String(publicFlag));
513
+ let response = yield axios_1.default.post(url, formData, {
514
+ headers: {
515
+ "Authorization": `Bearer ${authToken}`,
516
+ "Content-Type": "multipart/form-data"
517
+ },
518
+ });
519
+ return response.status === 204;
520
+ });
521
+ }
522
+ /**
523
+ * sendFileContentsAsObservable uploads file contents to the server for a specific resource. The file is uploaded
524
+ * via FormData with the appropriate scope and public flag settings.
525
+ *
526
+ * @param resourceKey - The key of the resource to upload file contents for
527
+ * @param fileToUpload - The file or blob to upload
528
+ * @param publicFlag - Whether the file should be public
529
+ *
530
+ * @returns Observable resolving to true if upload was successful
531
+ */
532
+ function sendFileContentsAsObservable(resourceKey, fileToUpload, publicFlag) {
533
+ return (0, rxjs_1.from)(sendFileContents(resourceKey, fileToUpload, publicFlag));
534
+ }
535
+ /**
536
+ * createOrUpdateResourceWithFile creates a new content resource or updates an existing one, then uploads
537
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
538
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
539
+ *
540
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
541
+ * @param fileToUpload - The file or blob to upload
542
+ * @param publicFlag - Whether the resource should be public
543
+ * @param resourceType - The type of resource
544
+ * @param tags - Array of tags for the resource
545
+ *
546
+ * @returns Promise resolving to the ContentResource with uploaded file
547
+ */
548
+ function createOrUpdateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
549
+ return __awaiter(this, void 0, void 0, function* () {
550
+ if (!exports.userContext) {
551
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
552
+ }
553
+ // Get or create the resource
554
+ let resource = yield getOrCreateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags);
555
+ // Save the resource to get the objKey if it's new
556
+ let savedResource = yield saveResource(resource);
557
+ // Upload the file contents
558
+ if (!savedResource.objKey) {
559
+ throw new Error("Resource was saved but no objKey was returned");
560
+ }
561
+ let uploadSuccess = yield sendFileContents(savedResource.objKey, fileToUpload, publicFlag);
562
+ if (!uploadSuccess) {
563
+ throw new Error("Failed to upload file contents");
564
+ }
565
+ // Get the updated resource with file metadata
566
+ let updatedResource = yield getOrCreateResource(savedResource.objKey, fileToUpload, publicFlag, resourceType, []);
567
+ // Set the name if it's not set and we have a File with a name
568
+ if (updatedResource && !updatedResource.name && fileToUpload instanceof File) {
569
+ updatedResource.name = fileToUpload.name;
570
+ }
571
+ return updatedResource;
572
+ });
573
+ }
574
+ /**
575
+ * createOrUpdateResourceWithFileAsObservable creates a new content resource or updates an existing one, then uploads
576
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
577
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
578
+ *
579
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
580
+ * @param fileToUpload - The file or blob to upload
581
+ * @param publicFlag - Whether the resource should be public
582
+ * @param resourceType - The type of resource
583
+ * @param tags - Array of tags for the resource
584
+ *
585
+ * @returns Observable resolving to the ContentResource with uploaded file
586
+ */
587
+ function createOrUpdateResourceAsObservable(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
588
+ return (0, rxjs_1.from)(createOrUpdateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags));
589
+ }
@@ -407,4 +407,121 @@ export interface UserContext {
407
407
  orgKey: string;
408
408
  userProxyKey: string;
409
409
  }
410
+ /**
411
+ * ContentResource is an interface defining the properties of a content resource.
412
+ */
413
+ export interface ContentResource {
414
+ objKey?: string;
415
+ isPublic: boolean;
416
+ resourceType: string;
417
+ tags: string[];
418
+ organizationKey: string;
419
+ sandboxKey: string;
420
+ userKey: string;
421
+ fileName?: string;
422
+ fileSize?: number;
423
+ mimeType?: string;
424
+ contentType?: string;
425
+ name?: string | null;
426
+ extension?: string | null;
427
+ deserialize?: (data: any) => ContentResource;
428
+ }
429
+ /**
430
+ * getOrCreateResource retrieves an existing content resource by its key, or creates a new one
431
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
432
+ * resource from the server. If no key is provided, it creates a new resource with the specified
433
+ * properties.
434
+ *
435
+ * @param resourceKey - Optional key of the existing resource to retrieve
436
+ * @param fileToUpload - Optional file or blob to upload
437
+ * @param publicFlag - Whether the resource should be public
438
+ * @param resourceType - The type of resource
439
+ * @param tags - Array of tags for the resource
440
+ *
441
+ * @returns Promise resolving to a ContentResource
442
+ */
443
+ export declare function getOrCreateResource(resourceKey: string | null, fileToUpload: File | Blob | null, publicFlag: boolean, resourceType: string, tags: string[]): Promise<ContentResource>;
444
+ /**
445
+ * getOrCreateResourceAsObservable retrieves an existing content resource by its key, or creates a new one
446
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
447
+ * resource from the server. If no key is provided, it creates a new resource with the specified
448
+ * properties.
449
+ *
450
+ * @param resourceKey - Optional key of the existing resource to retrieve
451
+ * @param fileToUpload - Optional file or blob to upload
452
+ * @param publicFlag - Whether the resource should be public
453
+ * @param resourceType - The type of resource
454
+ * @param tags - Array of tags for the resource
455
+ *
456
+ * @returns Observable resolving to a ContentResource
457
+ */
458
+ export declare function getOrCreateResourceAsObservable(resourceKey: string | null, fileToUpload: File | Blob | null, publicFlag: boolean, resourceType: string, tags: string[]): Observable<ContentResource>;
459
+ /**
460
+ * saveResource saves a content resource to the server. The resource is saved with appropriate
461
+ * ownership parameters based on the current context (solution builder vs regular organization view).
462
+ *
463
+ * @param resource - The ContentResource to save
464
+ *
465
+ * @returns Promise resolving to the saved ContentResource
466
+ */
467
+ export declare function saveResource(resource: ContentResource): Promise<ContentResource>;
468
+ /**
469
+ * saveResourceAsObservable saves a content resource to the server. The resource is saved with appropriate
470
+ * ownership parameters based on the current context (solution builder vs regular organization view).
471
+ *
472
+ * @param resource - The ContentResource to save
473
+ *
474
+ * @returns Observable resolving to the saved ContentResource
475
+ */
476
+ export declare function saveResourceAsObservable(resource: ContentResource): Observable<ContentResource>;
477
+ /**
478
+ * sendFileContents uploads file contents to the server for a specific resource. The file is uploaded
479
+ * via FormData with the appropriate scope and public flag settings.
480
+ *
481
+ * @param resourceKey - The key of the resource to upload file contents for
482
+ * @param fileToUpload - The file or blob to upload
483
+ * @param publicFlag - Whether the file should be public
484
+ *
485
+ * @returns Promise resolving to true if upload was successful
486
+ */
487
+ export declare function sendFileContents(resourceKey: string, fileToUpload: File | Blob, publicFlag: boolean): Promise<boolean>;
488
+ /**
489
+ * sendFileContentsAsObservable uploads file contents to the server for a specific resource. The file is uploaded
490
+ * via FormData with the appropriate scope and public flag settings.
491
+ *
492
+ * @param resourceKey - The key of the resource to upload file contents for
493
+ * @param fileToUpload - The file or blob to upload
494
+ * @param publicFlag - Whether the file should be public
495
+ *
496
+ * @returns Observable resolving to true if upload was successful
497
+ */
498
+ export declare function sendFileContentsAsObservable(resourceKey: string, fileToUpload: File | Blob, publicFlag: boolean): Observable<boolean>;
499
+ /**
500
+ * createOrUpdateResourceWithFile creates a new content resource or updates an existing one, then uploads
501
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
502
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
503
+ *
504
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
505
+ * @param fileToUpload - The file or blob to upload
506
+ * @param publicFlag - Whether the resource should be public
507
+ * @param resourceType - The type of resource
508
+ * @param tags - Array of tags for the resource
509
+ *
510
+ * @returns Promise resolving to the ContentResource with uploaded file
511
+ */
512
+ export declare function createOrUpdateResource(resourceKey: string | null, fileToUpload: File | Blob, publicFlag: boolean, resourceType: string, tags: string[]): Promise<ContentResource>;
513
+ /**
514
+ * createOrUpdateResourceWithFileAsObservable creates a new content resource or updates an existing one, then uploads
515
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
516
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
517
+ *
518
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
519
+ * @param fileToUpload - The file or blob to upload
520
+ * @param publicFlag - Whether the resource should be public
521
+ * @param resourceType - The type of resource
522
+ * @param tags - Array of tags for the resource
523
+ *
524
+ * @returns Observable resolving to the ContentResource with uploaded file
525
+ */
526
+ export declare function createOrUpdateResourceAsObservable(resourceKey: string | null, fileToUpload: File | Blob, publicFlag: boolean, resourceType: string, tags: string[]): Observable<ContentResource>;
410
527
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAQ,UAAU,EAAsC,MAAM,MAAM,CAAC;AAE5E;;;;GAIG;AACH,eAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,IAAI,UAAU,EAAE,MAAM,CAAC;AAE9B;;;GAGG;AACH,eAAO,IAAI,cAAc,EAAE,MAAM,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC;AAE9B;;;GAGG;AACH,eAAO,IAAI,WAAW,EAAE,WAAW,CAAC;AAEpC;;;;GAIG;AACH,eAAO,IAAI,MAAM,EAAE,MAAM,CAAC;AAE1B;;;;;GAKG;AACH,eAAO,IAAI,OAAO,EAAE,OAAO,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CA2BvK;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,M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E,YAAyB,EAAE,UAAmB,EAAE,YAAoB,EAAE,IAAc;IAC/J,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;AACnG,CAAC"}
package/lib/esm/index.mjs CHANGED
@@ -382,4 +382,208 @@ export function initialize(event) {
382
382
  }
383
383
  }
384
384
  }
385
+ /**
386
+ * getOrCreateResource retrieves an existing content resource by its key, or creates a new one
387
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
388
+ * resource from the server. If no key is provided, it creates a new resource with the specified
389
+ * properties.
390
+ *
391
+ * @param resourceKey - Optional key of the existing resource to retrieve
392
+ * @param fileToUpload - Optional file or blob to upload
393
+ * @param publicFlag - Whether the resource should be public
394
+ * @param resourceType - The type of resource
395
+ * @param tags - Array of tags for the resource
396
+ *
397
+ * @returns Promise resolving to a ContentResource
398
+ */
399
+ export async function getOrCreateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
400
+ if (!userContext) {
401
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
402
+ }
403
+ if (resourceKey) {
404
+ let url = `${serviceAddress}/sandboxes/${sandboxKey}/contentResource/${resourceKey}`;
405
+ let authToken = await lastValueFrom(getAuthToken());
406
+ console.log("Sending GET request to " + url + " with token " + authToken);
407
+ let response = await axios.get(url, {
408
+ headers: { "Authorization": `Bearer ${authToken}` },
409
+ });
410
+ let resource = response.data;
411
+ if (fileToUpload) {
412
+ resource.contentType = fileToUpload.type;
413
+ // Null out the name and extension; the server will set these if they are blank
414
+ resource.name = null;
415
+ resource.extension = null;
416
+ }
417
+ return resource;
418
+ }
419
+ let newResource = {
420
+ isPublic: publicFlag,
421
+ resourceType: resourceType,
422
+ tags: tags,
423
+ organizationKey: userContext.orgKey,
424
+ sandboxKey: sandboxKey,
425
+ userKey: userContext.user.objKey
426
+ };
427
+ if (fileToUpload) {
428
+ newResource.contentType = fileToUpload.type;
429
+ // Null out the name and extension; the server will set these if they are blank
430
+ newResource.name = null;
431
+ newResource.extension = null;
432
+ }
433
+ return newResource;
434
+ }
435
+ /**
436
+ * getOrCreateResourceAsObservable retrieves an existing content resource by its key, or creates a new one
437
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
438
+ * resource from the server. If no key is provided, it creates a new resource with the specified
439
+ * properties.
440
+ *
441
+ * @param resourceKey - Optional key of the existing resource to retrieve
442
+ * @param fileToUpload - Optional file or blob to upload
443
+ * @param publicFlag - Whether the resource should be public
444
+ * @param resourceType - The type of resource
445
+ * @param tags - Array of tags for the resource
446
+ *
447
+ * @returns Observable resolving to a ContentResource
448
+ */
449
+ export function getOrCreateResourceAsObservable(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
450
+ return from(getOrCreateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags));
451
+ }
452
+ /**
453
+ * saveResource saves a content resource to the server. The resource is saved with appropriate
454
+ * ownership parameters based on the current context (solution builder vs regular organization view).
455
+ *
456
+ * @param resource - The ContentResource to save
457
+ *
458
+ * @returns Promise resolving to the saved ContentResource
459
+ */
460
+ export async function saveResource(resource) {
461
+ if (!userContext) {
462
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
463
+ }
464
+ let params = {};
465
+ if (userContext.orgProxy.objType === "Solution") {
466
+ // When in the solution builder view, content is owned by the solution. The solution key is the org proxy key in
467
+ // the builder view.
468
+ params.solutionKey = userContext.orgProxyKey;
469
+ }
470
+ else {
471
+ params.organizationKey = userContext.orgKey;
472
+ params.userKey = userContext.user.objKey;
473
+ }
474
+ let url = `${serviceAddress}/sandboxes/${sandboxKey}/contentResource`;
475
+ let authToken = await lastValueFrom(getAuthToken());
476
+ console.log("Sending POST request to " + url + " with token " + authToken);
477
+ let response = await axios.post(url, JSON.stringify(resource), {
478
+ headers: { "Authorization": `Bearer ${authToken}` },
479
+ params: params,
480
+ });
481
+ return response.data;
482
+ }
483
+ /**
484
+ * saveResourceAsObservable saves a content resource to the server. The resource is saved with appropriate
485
+ * ownership parameters based on the current context (solution builder vs regular organization view).
486
+ *
487
+ * @param resource - The ContentResource to save
488
+ *
489
+ * @returns Observable resolving to the saved ContentResource
490
+ */
491
+ export function saveResourceAsObservable(resource) {
492
+ return from(saveResource(resource));
493
+ }
494
+ /**
495
+ * sendFileContents uploads file contents to the server for a specific resource. The file is uploaded
496
+ * via FormData with the appropriate scope and public flag settings.
497
+ *
498
+ * @param resourceKey - The key of the resource to upload file contents for
499
+ * @param fileToUpload - The file or blob to upload
500
+ * @param publicFlag - Whether the file should be public
501
+ *
502
+ * @returns Promise resolving to true if upload was successful
503
+ */
504
+ export async function sendFileContents(resourceKey, fileToUpload, publicFlag) {
505
+ if (!userContext) {
506
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
507
+ }
508
+ let url = `${serviceAddress}/filecontent/${sandboxKey}/${resourceKey}`;
509
+ let authToken = await lastValueFrom(getAuthToken());
510
+ console.log("Sending file upload request to " + url + " with token " + authToken);
511
+ let formData = new FormData();
512
+ formData.append("fileUpload", fileToUpload);
513
+ formData.append("scopeKeyPath", userContext.orgProxyKey);
514
+ formData.append("public", String(publicFlag));
515
+ let response = await axios.post(url, formData, {
516
+ headers: {
517
+ "Authorization": `Bearer ${authToken}`,
518
+ "Content-Type": "multipart/form-data"
519
+ },
520
+ });
521
+ return response.status === 204;
522
+ }
523
+ /**
524
+ * sendFileContentsAsObservable uploads file contents to the server for a specific resource. The file is uploaded
525
+ * via FormData with the appropriate scope and public flag settings.
526
+ *
527
+ * @param resourceKey - The key of the resource to upload file contents for
528
+ * @param fileToUpload - The file or blob to upload
529
+ * @param publicFlag - Whether the file should be public
530
+ *
531
+ * @returns Observable resolving to true if upload was successful
532
+ */
533
+ export function sendFileContentsAsObservable(resourceKey, fileToUpload, publicFlag) {
534
+ return from(sendFileContents(resourceKey, fileToUpload, publicFlag));
535
+ }
536
+ /**
537
+ * createOrUpdateResourceWithFile creates a new content resource or updates an existing one, then uploads
538
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
539
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
540
+ *
541
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
542
+ * @param fileToUpload - The file or blob to upload
543
+ * @param publicFlag - Whether the resource should be public
544
+ * @param resourceType - The type of resource
545
+ * @param tags - Array of tags for the resource
546
+ *
547
+ * @returns Promise resolving to the ContentResource with uploaded file
548
+ */
549
+ export async function createOrUpdateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
550
+ if (!userContext) {
551
+ throw new Error("userContext is required but not available; check that the initialize function has been called");
552
+ }
553
+ // Get or create the resource
554
+ let resource = await getOrCreateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags);
555
+ // Save the resource to get the objKey if it's new
556
+ let savedResource = await saveResource(resource);
557
+ // Upload the file contents
558
+ if (!savedResource.objKey) {
559
+ throw new Error("Resource was saved but no objKey was returned");
560
+ }
561
+ let uploadSuccess = await sendFileContents(savedResource.objKey, fileToUpload, publicFlag);
562
+ if (!uploadSuccess) {
563
+ throw new Error("Failed to upload file contents");
564
+ }
565
+ // Get the updated resource with file metadata
566
+ let updatedResource = await getOrCreateResource(savedResource.objKey, fileToUpload, publicFlag, resourceType, []);
567
+ // Set the name if it's not set and we have a File with a name
568
+ if (updatedResource && !updatedResource.name && fileToUpload instanceof File) {
569
+ updatedResource.name = fileToUpload.name;
570
+ }
571
+ return updatedResource;
572
+ }
573
+ /**
574
+ * createOrUpdateResourceWithFileAsObservable creates a new content resource or updates an existing one, then uploads
575
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
576
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
577
+ *
578
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
579
+ * @param fileToUpload - The file or blob to upload
580
+ * @param publicFlag - Whether the resource should be public
581
+ * @param resourceType - The type of resource
582
+ * @param tags - Array of tags for the resource
583
+ *
584
+ * @returns Observable resolving to the ContentResource with uploaded file
585
+ */
586
+ export function createOrUpdateResourceAsObservable(resourceKey, fileToUpload, publicFlag, resourceType, tags) {
587
+ return from(createOrUpdateResource(resourceKey, fileToUpload, publicFlag, resourceType, tags));
588
+ }
385
589
  //# sourceMappingURL=index.js.map
@@ -407,3 +407,120 @@ export interface UserContext {
407
407
  orgKey: string;
408
408
  userProxyKey: string;
409
409
  }
410
+ /**
411
+ * ContentResource is an interface defining the properties of a content resource.
412
+ */
413
+ export interface ContentResource {
414
+ objKey?: string;
415
+ isPublic: boolean;
416
+ resourceType: string;
417
+ tags: string[];
418
+ organizationKey: string;
419
+ sandboxKey: string;
420
+ userKey: string;
421
+ fileName?: string;
422
+ fileSize?: number;
423
+ mimeType?: string;
424
+ contentType?: string;
425
+ name?: string | null;
426
+ extension?: string | null;
427
+ deserialize?: (data: any) => ContentResource;
428
+ }
429
+ /**
430
+ * getOrCreateResource retrieves an existing content resource by its key, or creates a new one
431
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
432
+ * resource from the server. If no key is provided, it creates a new resource with the specified
433
+ * properties.
434
+ *
435
+ * @param resourceKey - Optional key of the existing resource to retrieve
436
+ * @param fileToUpload - Optional file or blob to upload
437
+ * @param publicFlag - Whether the resource should be public
438
+ * @param resourceType - The type of resource
439
+ * @param tags - Array of tags for the resource
440
+ *
441
+ * @returns Promise resolving to a ContentResource
442
+ */
443
+ export declare function getOrCreateResource(resourceKey: string | null, fileToUpload: File | Blob | null, publicFlag: boolean, resourceType: string, tags: string[]): Promise<ContentResource>;
444
+ /**
445
+ * getOrCreateResourceAsObservable retrieves an existing content resource by its key, or creates a new one
446
+ * if the key is not provided. If a resource key is provided, it attempts to fetch the existing
447
+ * resource from the server. If no key is provided, it creates a new resource with the specified
448
+ * properties.
449
+ *
450
+ * @param resourceKey - Optional key of the existing resource to retrieve
451
+ * @param fileToUpload - Optional file or blob to upload
452
+ * @param publicFlag - Whether the resource should be public
453
+ * @param resourceType - The type of resource
454
+ * @param tags - Array of tags for the resource
455
+ *
456
+ * @returns Observable resolving to a ContentResource
457
+ */
458
+ export declare function getOrCreateResourceAsObservable(resourceKey: string | null, fileToUpload: File | Blob | null, publicFlag: boolean, resourceType: string, tags: string[]): Observable<ContentResource>;
459
+ /**
460
+ * saveResource saves a content resource to the server. The resource is saved with appropriate
461
+ * ownership parameters based on the current context (solution builder vs regular organization view).
462
+ *
463
+ * @param resource - The ContentResource to save
464
+ *
465
+ * @returns Promise resolving to the saved ContentResource
466
+ */
467
+ export declare function saveResource(resource: ContentResource): Promise<ContentResource>;
468
+ /**
469
+ * saveResourceAsObservable saves a content resource to the server. The resource is saved with appropriate
470
+ * ownership parameters based on the current context (solution builder vs regular organization view).
471
+ *
472
+ * @param resource - The ContentResource to save
473
+ *
474
+ * @returns Observable resolving to the saved ContentResource
475
+ */
476
+ export declare function saveResourceAsObservable(resource: ContentResource): Observable<ContentResource>;
477
+ /**
478
+ * sendFileContents uploads file contents to the server for a specific resource. The file is uploaded
479
+ * via FormData with the appropriate scope and public flag settings.
480
+ *
481
+ * @param resourceKey - The key of the resource to upload file contents for
482
+ * @param fileToUpload - The file or blob to upload
483
+ * @param publicFlag - Whether the file should be public
484
+ *
485
+ * @returns Promise resolving to true if upload was successful
486
+ */
487
+ export declare function sendFileContents(resourceKey: string, fileToUpload: File | Blob, publicFlag: boolean): Promise<boolean>;
488
+ /**
489
+ * sendFileContentsAsObservable uploads file contents to the server for a specific resource. The file is uploaded
490
+ * via FormData with the appropriate scope and public flag settings.
491
+ *
492
+ * @param resourceKey - The key of the resource to upload file contents for
493
+ * @param fileToUpload - The file or blob to upload
494
+ * @param publicFlag - Whether the file should be public
495
+ *
496
+ * @returns Observable resolving to true if upload was successful
497
+ */
498
+ export declare function sendFileContentsAsObservable(resourceKey: string, fileToUpload: File | Blob, publicFlag: boolean): Observable<boolean>;
499
+ /**
500
+ * createOrUpdateResourceWithFile creates a new content resource or updates an existing one, then uploads
501
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
502
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
503
+ *
504
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
505
+ * @param fileToUpload - The file or blob to upload
506
+ * @param publicFlag - Whether the resource should be public
507
+ * @param resourceType - The type of resource
508
+ * @param tags - Array of tags for the resource
509
+ *
510
+ * @returns Promise resolving to the ContentResource with uploaded file
511
+ */
512
+ export declare function createOrUpdateResource(resourceKey: string | null, fileToUpload: File | Blob, publicFlag: boolean, resourceType: string, tags: string[]): Promise<ContentResource>;
513
+ /**
514
+ * createOrUpdateResourceWithFileAsObservable creates a new content resource or updates an existing one, then uploads
515
+ * the file contents to that resource. If a resourceKey is provided, it updates the existing resource;
516
+ * otherwise, it creates a new resource and uploads the file to the newly created resource.
517
+ *
518
+ * @param resourceKey - Optional key of the existing resource to update; if not provided, a new resource is created
519
+ * @param fileToUpload - The file or blob to upload
520
+ * @param publicFlag - Whether the resource should be public
521
+ * @param resourceType - The type of resource
522
+ * @param tags - Array of tags for the resource
523
+ *
524
+ * @returns Observable resolving to the ContentResource with uploaded file
525
+ */
526
+ export declare function createOrUpdateResourceAsObservable(resourceKey: string | null, fileToUpload: File | Blob, publicFlag: boolean, resourceType: string, tags: string[]): Observable<ContentResource>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halix/action-sdk",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Halix Platform action SDK",
5
5
  "types": "./lib/cjs/types/index.d.ts",
6
6
  "main": "./lib/cjs/index.js",