@dendotdev/grunt 1.0.2 → 1.0.4
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.d.mts +31 -22
- package/dist/index.d.ts +31 -22
- package/dist/index.js +23 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -429,6 +429,13 @@ interface RequestOptions {
|
|
|
429
429
|
* @default true
|
|
430
430
|
*/
|
|
431
431
|
enforceSuccess?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Return raw bytes instead of deserializing the response.
|
|
434
|
+
* Use this for binary data like images, blobs, and film chunks.
|
|
435
|
+
*
|
|
436
|
+
* @default false
|
|
437
|
+
*/
|
|
438
|
+
returnRaw?: boolean;
|
|
432
439
|
}
|
|
433
440
|
|
|
434
441
|
/**
|
|
@@ -578,6 +585,7 @@ declare abstract class ModuleBase {
|
|
|
578
585
|
useClearance?: boolean;
|
|
579
586
|
useSpartanToken?: boolean;
|
|
580
587
|
customHeaders?: Record<string, string>;
|
|
588
|
+
returnRaw?: boolean;
|
|
581
589
|
}): Promise<HaloApiResult<T>>;
|
|
582
590
|
/**
|
|
583
591
|
* Execute a GET request to an absolute URL.
|
|
@@ -595,6 +603,7 @@ declare abstract class ModuleBase {
|
|
|
595
603
|
useSpartanToken?: boolean;
|
|
596
604
|
customHeaders?: Record<string, string>;
|
|
597
605
|
enforceSuccess?: boolean;
|
|
606
|
+
returnRaw?: boolean;
|
|
598
607
|
}): Promise<HaloApiResult<T>>;
|
|
599
608
|
/**
|
|
600
609
|
* Execute a POST request to this module's service.
|
|
@@ -3810,7 +3819,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3810
3819
|
* @param assetId - Asset GUID
|
|
3811
3820
|
* @returns Asset details
|
|
3812
3821
|
*/
|
|
3813
|
-
getAsset(title: string, assetType:
|
|
3822
|
+
getAsset(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAsset>>;
|
|
3814
3823
|
/**
|
|
3815
3824
|
* Get the latest version of an asset.
|
|
3816
3825
|
*
|
|
@@ -3819,7 +3828,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3819
3828
|
* @param assetId - Asset GUID
|
|
3820
3829
|
* @returns Latest asset version
|
|
3821
3830
|
*/
|
|
3822
|
-
getLatestAssetVersion(title: string, assetType:
|
|
3831
|
+
getLatestAssetVersion(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
3823
3832
|
/**
|
|
3824
3833
|
* Get a specific version of an asset.
|
|
3825
3834
|
*
|
|
@@ -3829,7 +3838,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3829
3838
|
* @param versionId - Version GUID
|
|
3830
3839
|
* @returns Asset version
|
|
3831
3840
|
*/
|
|
3832
|
-
getSpecificAssetVersion(title: string, assetType:
|
|
3841
|
+
getSpecificAssetVersion(title: string, assetType: string, assetId: string, versionId: string): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
3833
3842
|
/**
|
|
3834
3843
|
* Get the published version of an asset.
|
|
3835
3844
|
*
|
|
@@ -3838,7 +3847,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3838
3847
|
* @param assetId - Asset GUID
|
|
3839
3848
|
* @returns Published asset version
|
|
3840
3849
|
*/
|
|
3841
|
-
getPublishedVersion(title: string, assetType:
|
|
3850
|
+
getPublishedVersion(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
3842
3851
|
/**
|
|
3843
3852
|
* List all versions of an asset.
|
|
3844
3853
|
*
|
|
@@ -3847,7 +3856,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3847
3856
|
* @param assetId - Asset GUID
|
|
3848
3857
|
* @returns All asset versions
|
|
3849
3858
|
*/
|
|
3850
|
-
listAllVersions(title: string, assetType:
|
|
3859
|
+
listAllVersions(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetVersionContainer>>;
|
|
3851
3860
|
/**
|
|
3852
3861
|
* List assets created by a player.
|
|
3853
3862
|
*
|
|
@@ -3858,7 +3867,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3858
3867
|
* @param count - Number of results
|
|
3859
3868
|
* @returns Player's assets
|
|
3860
3869
|
*/
|
|
3861
|
-
listPlayerAssets(title: string, player: string, assetType:
|
|
3870
|
+
listPlayerAssets(title: string, player: string, assetType: string, start?: number, count?: number): Promise<HaloApiResult<AuthoringAssetContainer>>;
|
|
3862
3871
|
/**
|
|
3863
3872
|
* Favorite an asset.
|
|
3864
3873
|
*
|
|
@@ -3867,7 +3876,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3867
3876
|
* @param assetId - Asset GUID
|
|
3868
3877
|
* @returns Favorite result
|
|
3869
3878
|
*/
|
|
3870
|
-
favoriteAnAsset(player: string, assetType:
|
|
3879
|
+
favoriteAnAsset(player: string, assetType: string, assetId: string): Promise<HaloApiResult<FavoriteAsset>>;
|
|
3871
3880
|
/**
|
|
3872
3881
|
* Check if a player has bookmarked an asset.
|
|
3873
3882
|
*
|
|
@@ -3877,7 +3886,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3877
3886
|
* @param assetId - Asset GUID
|
|
3878
3887
|
* @returns Favorite status
|
|
3879
3888
|
*/
|
|
3880
|
-
checkAssetPlayerBookmark(title: string, player: string, assetType:
|
|
3889
|
+
checkAssetPlayerBookmark(title: string, player: string, assetType: string, assetId: string): Promise<HaloApiResult<FavoriteAsset>>;
|
|
3881
3890
|
/**
|
|
3882
3891
|
* List player's favorite assets of a specific type.
|
|
3883
3892
|
*
|
|
@@ -3885,7 +3894,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3885
3894
|
* @param assetType - Type of asset
|
|
3886
3895
|
* @returns Favorites container
|
|
3887
3896
|
*/
|
|
3888
|
-
listPlayerFavorites(player: string, assetType:
|
|
3897
|
+
listPlayerFavorites(player: string, assetType: string): Promise<HaloApiResult<AuthoringFavoritesContainer>>;
|
|
3889
3898
|
/**
|
|
3890
3899
|
* List all of a player's favorite assets.
|
|
3891
3900
|
*
|
|
@@ -3901,7 +3910,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3901
3910
|
* @param assetId - Asset GUID
|
|
3902
3911
|
* @returns Rating info
|
|
3903
3912
|
*/
|
|
3904
|
-
getAssetRatings(player: string, assetType:
|
|
3913
|
+
getAssetRatings(player: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetRating>>;
|
|
3905
3914
|
/**
|
|
3906
3915
|
* Rate an asset.
|
|
3907
3916
|
*
|
|
@@ -3911,7 +3920,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3911
3920
|
* @param rating - Rating to submit
|
|
3912
3921
|
* @returns Updated rating
|
|
3913
3922
|
*/
|
|
3914
|
-
rateAnAsset(player: string, assetType:
|
|
3923
|
+
rateAnAsset(player: string, assetType: string, assetId: string, rating: AuthoringAssetRating): Promise<HaloApiResult<AuthoringAssetRating>>;
|
|
3915
3924
|
/**
|
|
3916
3925
|
* Report an asset for moderation.
|
|
3917
3926
|
*
|
|
@@ -3921,7 +3930,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3921
3930
|
* @param report - Report details
|
|
3922
3931
|
* @returns Report result
|
|
3923
3932
|
*/
|
|
3924
|
-
reportAnAsset(player: string, assetType:
|
|
3933
|
+
reportAnAsset(player: string, assetType: string, assetId: string, report: AssetReport): Promise<HaloApiResult<AssetReport>>;
|
|
3925
3934
|
/**
|
|
3926
3935
|
* Delete an asset and all its versions.
|
|
3927
3936
|
*
|
|
@@ -3930,7 +3939,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3930
3939
|
* @param assetId - Asset GUID
|
|
3931
3940
|
* @returns Success status
|
|
3932
3941
|
*/
|
|
3933
|
-
deleteAllVersions(title: string, assetType:
|
|
3942
|
+
deleteAllVersions(title: string, assetType: string, assetId: string): Promise<HaloApiResult<boolean>>;
|
|
3934
3943
|
/**
|
|
3935
3944
|
* Delete a specific version of an asset.
|
|
3936
3945
|
*
|
|
@@ -3940,7 +3949,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3940
3949
|
* @param versionId - Version GUID
|
|
3941
3950
|
* @returns Success status
|
|
3942
3951
|
*/
|
|
3943
|
-
deleteVersion(title: string, assetType:
|
|
3952
|
+
deleteVersion(title: string, assetType: string, assetId: string, versionId: string): Promise<HaloApiResult<boolean>>;
|
|
3944
3953
|
/**
|
|
3945
3954
|
* Publish an asset version.
|
|
3946
3955
|
*
|
|
@@ -3950,7 +3959,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3950
3959
|
* @param clearanceId - Clearance ID
|
|
3951
3960
|
* @returns Success status
|
|
3952
3961
|
*/
|
|
3953
|
-
publishAssetVersion(assetType:
|
|
3962
|
+
publishAssetVersion(assetType: string, assetId: string, versionId: string, clearanceId: string): Promise<HaloApiResult<boolean>>;
|
|
3954
3963
|
/**
|
|
3955
3964
|
* Unpublish an asset.
|
|
3956
3965
|
*
|
|
@@ -3958,7 +3967,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3958
3967
|
* @param assetId - Asset GUID
|
|
3959
3968
|
* @returns Success status
|
|
3960
3969
|
*/
|
|
3961
|
-
unpublishAsset(assetType:
|
|
3970
|
+
unpublishAsset(assetType: string, assetId: string): Promise<HaloApiResult<boolean>>;
|
|
3962
3971
|
/**
|
|
3963
3972
|
* Grant or revoke permissions for an asset.
|
|
3964
3973
|
*
|
|
@@ -3969,7 +3978,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3969
3978
|
* @param permission - Permission details
|
|
3970
3979
|
* @returns Updated permission
|
|
3971
3980
|
*/
|
|
3972
|
-
grantOrRevokePermissions(title: string, assetType:
|
|
3981
|
+
grantOrRevokePermissions(title: string, assetType: string, assetId: string, player: string, permission: Permission): Promise<HaloApiResult<Permission>>;
|
|
3973
3982
|
/**
|
|
3974
3983
|
* Start an authoring session for an asset.
|
|
3975
3984
|
*
|
|
@@ -3979,7 +3988,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3979
3988
|
* @param includeContainerSas - Include container SAS URL
|
|
3980
3989
|
* @returns Session details
|
|
3981
3990
|
*/
|
|
3982
|
-
startSession(title: string, assetType:
|
|
3991
|
+
startSession(title: string, assetType: string, assetId: string, includeContainerSas?: boolean): Promise<HaloApiResult<AssetAuthoringSession>>;
|
|
3983
3992
|
/**
|
|
3984
3993
|
* Extend an authoring session.
|
|
3985
3994
|
*
|
|
@@ -3989,7 +3998,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3989
3998
|
* @param includeContainerSas - Include container SAS URL
|
|
3990
3999
|
* @returns Extended session
|
|
3991
4000
|
*/
|
|
3992
|
-
extendSession(title: string, assetType:
|
|
4001
|
+
extendSession(title: string, assetType: string, assetId: string, includeContainerSas?: boolean): Promise<HaloApiResult<AssetAuthoringSession>>;
|
|
3993
4002
|
/**
|
|
3994
4003
|
* End an authoring session.
|
|
3995
4004
|
*
|
|
@@ -3998,7 +4007,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3998
4007
|
* @param assetId - Asset GUID
|
|
3999
4008
|
* @returns Success status
|
|
4000
4009
|
*/
|
|
4001
|
-
endSession(title: string, assetType:
|
|
4010
|
+
endSession(title: string, assetType: string, assetId: string): Promise<HaloApiResult<boolean>>;
|
|
4002
4011
|
/**
|
|
4003
4012
|
* Create a new asset version.
|
|
4004
4013
|
*
|
|
@@ -4008,7 +4017,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
4008
4017
|
* @param starter - Source asset to clone from
|
|
4009
4018
|
* @returns New asset version
|
|
4010
4019
|
*/
|
|
4011
|
-
createAssetVersion(title: string, assetType:
|
|
4020
|
+
createAssetVersion(title: string, assetType: string, assetId: string, starter: AuthoringSessionSourceStarter): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
4012
4021
|
/**
|
|
4013
4022
|
* Patch an asset version.
|
|
4014
4023
|
*
|
|
@@ -4019,7 +4028,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
4019
4028
|
* @param patchedAsset - Updated asset data
|
|
4020
4029
|
* @returns Updated asset version
|
|
4021
4030
|
*/
|
|
4022
|
-
patchAssetVersion(title: string, assetType:
|
|
4031
|
+
patchAssetVersion(title: string, assetType: string, assetId: string, versionId: string, patchedAsset: Partial<AuthoringAssetVersion>): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
4023
4032
|
/**
|
|
4024
4033
|
* Get a blob from UGC storage.
|
|
4025
4034
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -429,6 +429,13 @@ interface RequestOptions {
|
|
|
429
429
|
* @default true
|
|
430
430
|
*/
|
|
431
431
|
enforceSuccess?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Return raw bytes instead of deserializing the response.
|
|
434
|
+
* Use this for binary data like images, blobs, and film chunks.
|
|
435
|
+
*
|
|
436
|
+
* @default false
|
|
437
|
+
*/
|
|
438
|
+
returnRaw?: boolean;
|
|
432
439
|
}
|
|
433
440
|
|
|
434
441
|
/**
|
|
@@ -578,6 +585,7 @@ declare abstract class ModuleBase {
|
|
|
578
585
|
useClearance?: boolean;
|
|
579
586
|
useSpartanToken?: boolean;
|
|
580
587
|
customHeaders?: Record<string, string>;
|
|
588
|
+
returnRaw?: boolean;
|
|
581
589
|
}): Promise<HaloApiResult<T>>;
|
|
582
590
|
/**
|
|
583
591
|
* Execute a GET request to an absolute URL.
|
|
@@ -595,6 +603,7 @@ declare abstract class ModuleBase {
|
|
|
595
603
|
useSpartanToken?: boolean;
|
|
596
604
|
customHeaders?: Record<string, string>;
|
|
597
605
|
enforceSuccess?: boolean;
|
|
606
|
+
returnRaw?: boolean;
|
|
598
607
|
}): Promise<HaloApiResult<T>>;
|
|
599
608
|
/**
|
|
600
609
|
* Execute a POST request to this module's service.
|
|
@@ -3810,7 +3819,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3810
3819
|
* @param assetId - Asset GUID
|
|
3811
3820
|
* @returns Asset details
|
|
3812
3821
|
*/
|
|
3813
|
-
getAsset(title: string, assetType:
|
|
3822
|
+
getAsset(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAsset>>;
|
|
3814
3823
|
/**
|
|
3815
3824
|
* Get the latest version of an asset.
|
|
3816
3825
|
*
|
|
@@ -3819,7 +3828,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3819
3828
|
* @param assetId - Asset GUID
|
|
3820
3829
|
* @returns Latest asset version
|
|
3821
3830
|
*/
|
|
3822
|
-
getLatestAssetVersion(title: string, assetType:
|
|
3831
|
+
getLatestAssetVersion(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
3823
3832
|
/**
|
|
3824
3833
|
* Get a specific version of an asset.
|
|
3825
3834
|
*
|
|
@@ -3829,7 +3838,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3829
3838
|
* @param versionId - Version GUID
|
|
3830
3839
|
* @returns Asset version
|
|
3831
3840
|
*/
|
|
3832
|
-
getSpecificAssetVersion(title: string, assetType:
|
|
3841
|
+
getSpecificAssetVersion(title: string, assetType: string, assetId: string, versionId: string): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
3833
3842
|
/**
|
|
3834
3843
|
* Get the published version of an asset.
|
|
3835
3844
|
*
|
|
@@ -3838,7 +3847,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3838
3847
|
* @param assetId - Asset GUID
|
|
3839
3848
|
* @returns Published asset version
|
|
3840
3849
|
*/
|
|
3841
|
-
getPublishedVersion(title: string, assetType:
|
|
3850
|
+
getPublishedVersion(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
3842
3851
|
/**
|
|
3843
3852
|
* List all versions of an asset.
|
|
3844
3853
|
*
|
|
@@ -3847,7 +3856,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3847
3856
|
* @param assetId - Asset GUID
|
|
3848
3857
|
* @returns All asset versions
|
|
3849
3858
|
*/
|
|
3850
|
-
listAllVersions(title: string, assetType:
|
|
3859
|
+
listAllVersions(title: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetVersionContainer>>;
|
|
3851
3860
|
/**
|
|
3852
3861
|
* List assets created by a player.
|
|
3853
3862
|
*
|
|
@@ -3858,7 +3867,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3858
3867
|
* @param count - Number of results
|
|
3859
3868
|
* @returns Player's assets
|
|
3860
3869
|
*/
|
|
3861
|
-
listPlayerAssets(title: string, player: string, assetType:
|
|
3870
|
+
listPlayerAssets(title: string, player: string, assetType: string, start?: number, count?: number): Promise<HaloApiResult<AuthoringAssetContainer>>;
|
|
3862
3871
|
/**
|
|
3863
3872
|
* Favorite an asset.
|
|
3864
3873
|
*
|
|
@@ -3867,7 +3876,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3867
3876
|
* @param assetId - Asset GUID
|
|
3868
3877
|
* @returns Favorite result
|
|
3869
3878
|
*/
|
|
3870
|
-
favoriteAnAsset(player: string, assetType:
|
|
3879
|
+
favoriteAnAsset(player: string, assetType: string, assetId: string): Promise<HaloApiResult<FavoriteAsset>>;
|
|
3871
3880
|
/**
|
|
3872
3881
|
* Check if a player has bookmarked an asset.
|
|
3873
3882
|
*
|
|
@@ -3877,7 +3886,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3877
3886
|
* @param assetId - Asset GUID
|
|
3878
3887
|
* @returns Favorite status
|
|
3879
3888
|
*/
|
|
3880
|
-
checkAssetPlayerBookmark(title: string, player: string, assetType:
|
|
3889
|
+
checkAssetPlayerBookmark(title: string, player: string, assetType: string, assetId: string): Promise<HaloApiResult<FavoriteAsset>>;
|
|
3881
3890
|
/**
|
|
3882
3891
|
* List player's favorite assets of a specific type.
|
|
3883
3892
|
*
|
|
@@ -3885,7 +3894,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3885
3894
|
* @param assetType - Type of asset
|
|
3886
3895
|
* @returns Favorites container
|
|
3887
3896
|
*/
|
|
3888
|
-
listPlayerFavorites(player: string, assetType:
|
|
3897
|
+
listPlayerFavorites(player: string, assetType: string): Promise<HaloApiResult<AuthoringFavoritesContainer>>;
|
|
3889
3898
|
/**
|
|
3890
3899
|
* List all of a player's favorite assets.
|
|
3891
3900
|
*
|
|
@@ -3901,7 +3910,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3901
3910
|
* @param assetId - Asset GUID
|
|
3902
3911
|
* @returns Rating info
|
|
3903
3912
|
*/
|
|
3904
|
-
getAssetRatings(player: string, assetType:
|
|
3913
|
+
getAssetRatings(player: string, assetType: string, assetId: string): Promise<HaloApiResult<AuthoringAssetRating>>;
|
|
3905
3914
|
/**
|
|
3906
3915
|
* Rate an asset.
|
|
3907
3916
|
*
|
|
@@ -3911,7 +3920,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3911
3920
|
* @param rating - Rating to submit
|
|
3912
3921
|
* @returns Updated rating
|
|
3913
3922
|
*/
|
|
3914
|
-
rateAnAsset(player: string, assetType:
|
|
3923
|
+
rateAnAsset(player: string, assetType: string, assetId: string, rating: AuthoringAssetRating): Promise<HaloApiResult<AuthoringAssetRating>>;
|
|
3915
3924
|
/**
|
|
3916
3925
|
* Report an asset for moderation.
|
|
3917
3926
|
*
|
|
@@ -3921,7 +3930,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3921
3930
|
* @param report - Report details
|
|
3922
3931
|
* @returns Report result
|
|
3923
3932
|
*/
|
|
3924
|
-
reportAnAsset(player: string, assetType:
|
|
3933
|
+
reportAnAsset(player: string, assetType: string, assetId: string, report: AssetReport): Promise<HaloApiResult<AssetReport>>;
|
|
3925
3934
|
/**
|
|
3926
3935
|
* Delete an asset and all its versions.
|
|
3927
3936
|
*
|
|
@@ -3930,7 +3939,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3930
3939
|
* @param assetId - Asset GUID
|
|
3931
3940
|
* @returns Success status
|
|
3932
3941
|
*/
|
|
3933
|
-
deleteAllVersions(title: string, assetType:
|
|
3942
|
+
deleteAllVersions(title: string, assetType: string, assetId: string): Promise<HaloApiResult<boolean>>;
|
|
3934
3943
|
/**
|
|
3935
3944
|
* Delete a specific version of an asset.
|
|
3936
3945
|
*
|
|
@@ -3940,7 +3949,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3940
3949
|
* @param versionId - Version GUID
|
|
3941
3950
|
* @returns Success status
|
|
3942
3951
|
*/
|
|
3943
|
-
deleteVersion(title: string, assetType:
|
|
3952
|
+
deleteVersion(title: string, assetType: string, assetId: string, versionId: string): Promise<HaloApiResult<boolean>>;
|
|
3944
3953
|
/**
|
|
3945
3954
|
* Publish an asset version.
|
|
3946
3955
|
*
|
|
@@ -3950,7 +3959,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3950
3959
|
* @param clearanceId - Clearance ID
|
|
3951
3960
|
* @returns Success status
|
|
3952
3961
|
*/
|
|
3953
|
-
publishAssetVersion(assetType:
|
|
3962
|
+
publishAssetVersion(assetType: string, assetId: string, versionId: string, clearanceId: string): Promise<HaloApiResult<boolean>>;
|
|
3954
3963
|
/**
|
|
3955
3964
|
* Unpublish an asset.
|
|
3956
3965
|
*
|
|
@@ -3958,7 +3967,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3958
3967
|
* @param assetId - Asset GUID
|
|
3959
3968
|
* @returns Success status
|
|
3960
3969
|
*/
|
|
3961
|
-
unpublishAsset(assetType:
|
|
3970
|
+
unpublishAsset(assetType: string, assetId: string): Promise<HaloApiResult<boolean>>;
|
|
3962
3971
|
/**
|
|
3963
3972
|
* Grant or revoke permissions for an asset.
|
|
3964
3973
|
*
|
|
@@ -3969,7 +3978,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3969
3978
|
* @param permission - Permission details
|
|
3970
3979
|
* @returns Updated permission
|
|
3971
3980
|
*/
|
|
3972
|
-
grantOrRevokePermissions(title: string, assetType:
|
|
3981
|
+
grantOrRevokePermissions(title: string, assetType: string, assetId: string, player: string, permission: Permission): Promise<HaloApiResult<Permission>>;
|
|
3973
3982
|
/**
|
|
3974
3983
|
* Start an authoring session for an asset.
|
|
3975
3984
|
*
|
|
@@ -3979,7 +3988,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3979
3988
|
* @param includeContainerSas - Include container SAS URL
|
|
3980
3989
|
* @returns Session details
|
|
3981
3990
|
*/
|
|
3982
|
-
startSession(title: string, assetType:
|
|
3991
|
+
startSession(title: string, assetType: string, assetId: string, includeContainerSas?: boolean): Promise<HaloApiResult<AssetAuthoringSession>>;
|
|
3983
3992
|
/**
|
|
3984
3993
|
* Extend an authoring session.
|
|
3985
3994
|
*
|
|
@@ -3989,7 +3998,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3989
3998
|
* @param includeContainerSas - Include container SAS URL
|
|
3990
3999
|
* @returns Extended session
|
|
3991
4000
|
*/
|
|
3992
|
-
extendSession(title: string, assetType:
|
|
4001
|
+
extendSession(title: string, assetType: string, assetId: string, includeContainerSas?: boolean): Promise<HaloApiResult<AssetAuthoringSession>>;
|
|
3993
4002
|
/**
|
|
3994
4003
|
* End an authoring session.
|
|
3995
4004
|
*
|
|
@@ -3998,7 +4007,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
3998
4007
|
* @param assetId - Asset GUID
|
|
3999
4008
|
* @returns Success status
|
|
4000
4009
|
*/
|
|
4001
|
-
endSession(title: string, assetType:
|
|
4010
|
+
endSession(title: string, assetType: string, assetId: string): Promise<HaloApiResult<boolean>>;
|
|
4002
4011
|
/**
|
|
4003
4012
|
* Create a new asset version.
|
|
4004
4013
|
*
|
|
@@ -4008,7 +4017,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
4008
4017
|
* @param starter - Source asset to clone from
|
|
4009
4018
|
* @returns New asset version
|
|
4010
4019
|
*/
|
|
4011
|
-
createAssetVersion(title: string, assetType:
|
|
4020
|
+
createAssetVersion(title: string, assetType: string, assetId: string, starter: AuthoringSessionSourceStarter): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
4012
4021
|
/**
|
|
4013
4022
|
* Patch an asset version.
|
|
4014
4023
|
*
|
|
@@ -4019,7 +4028,7 @@ declare class UgcModule extends ModuleBase {
|
|
|
4019
4028
|
* @param patchedAsset - Updated asset data
|
|
4020
4029
|
* @returns Updated asset version
|
|
4021
4030
|
*/
|
|
4022
|
-
patchAssetVersion(title: string, assetType:
|
|
4031
|
+
patchAssetVersion(title: string, assetType: string, assetId: string, versionId: string, patchedAsset: Partial<AuthoringAssetVersion>): Promise<HaloApiResult<AuthoringAssetVersion>>;
|
|
4023
4032
|
/**
|
|
4024
4033
|
* Get a blob from UGC storage.
|
|
4025
4034
|
*
|
package/dist/index.js
CHANGED
|
@@ -336,8 +336,13 @@ var ClientBase = class {
|
|
|
336
336
|
);
|
|
337
337
|
}
|
|
338
338
|
if (response.status === 304 && cached) {
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
if (options.returnRaw) {
|
|
340
|
+
result.result = cached.content;
|
|
341
|
+
result.response.message = `304 Not Modified - cached binary: ${cached.content.length} bytes`;
|
|
342
|
+
} else {
|
|
343
|
+
result.result = this.deserializeResponse(cached.content);
|
|
344
|
+
result.response.message = "304 Not Modified - using cached response";
|
|
345
|
+
}
|
|
341
346
|
return result;
|
|
342
347
|
}
|
|
343
348
|
const bodyBuffer = await response.arrayBuffer();
|
|
@@ -346,10 +351,15 @@ var ClientBase = class {
|
|
|
346
351
|
const etag = response.headers.get(HEADERS.ETAG) ?? void 0;
|
|
347
352
|
this.cache.set(cacheKey, { etag, content: bodyBytes });
|
|
348
353
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
354
|
+
if (options.returnRaw) {
|
|
355
|
+
result.result = bodyBytes;
|
|
356
|
+
result.response.message = `Binary response: ${bodyBytes.length} bytes`;
|
|
357
|
+
} else {
|
|
358
|
+
const bodyText = new TextDecoder().decode(bodyBytes);
|
|
359
|
+
result.response.message = bodyText;
|
|
360
|
+
if (response.ok || options.enforceSuccess !== false) {
|
|
361
|
+
result.result = this.deserializeResponse(bodyBytes);
|
|
362
|
+
}
|
|
353
363
|
}
|
|
354
364
|
} catch (error) {
|
|
355
365
|
result.response.code = 0;
|
|
@@ -536,7 +546,8 @@ var ModuleBase = class {
|
|
|
536
546
|
return this.client.executeRequest(this.buildUrl(path), "GET", {
|
|
537
547
|
useSpartanToken: options.useSpartanToken ?? true,
|
|
538
548
|
useClearance: options.useClearance ?? false,
|
|
539
|
-
customHeaders: options.customHeaders
|
|
549
|
+
customHeaders: options.customHeaders,
|
|
550
|
+
returnRaw: options.returnRaw
|
|
540
551
|
});
|
|
541
552
|
}
|
|
542
553
|
/**
|
|
@@ -555,7 +566,8 @@ var ModuleBase = class {
|
|
|
555
566
|
useSpartanToken: options.useSpartanToken ?? true,
|
|
556
567
|
useClearance: options.useClearance ?? false,
|
|
557
568
|
customHeaders: options.customHeaders,
|
|
558
|
-
enforceSuccess: options.enforceSuccess ?? true
|
|
569
|
+
enforceSuccess: options.enforceSuccess ?? true,
|
|
570
|
+
returnRaw: options.returnRaw
|
|
559
571
|
});
|
|
560
572
|
}
|
|
561
573
|
/**
|
|
@@ -1304,7 +1316,7 @@ var GameCmsModule = class extends ModuleBase {
|
|
|
1304
1316
|
*/
|
|
1305
1317
|
getImage(filePath) {
|
|
1306
1318
|
this.assertNotEmpty(filePath, "filePath");
|
|
1307
|
-
return this.get(`/hi/images/file/${filePath}
|
|
1319
|
+
return this.get(`/hi/images/file/${filePath}`, { returnRaw: true });
|
|
1308
1320
|
}
|
|
1309
1321
|
/**
|
|
1310
1322
|
* Get a generic file from the CMS.
|
|
@@ -1314,7 +1326,7 @@ var GameCmsModule = class extends ModuleBase {
|
|
|
1314
1326
|
*/
|
|
1315
1327
|
getGenericFile(filePath) {
|
|
1316
1328
|
this.assertNotEmpty(filePath, "filePath");
|
|
1317
|
-
return this.get(`/hi/Progression/file/${filePath}
|
|
1329
|
+
return this.get(`/hi/Progression/file/${filePath}`, { returnRaw: true });
|
|
1318
1330
|
}
|
|
1319
1331
|
/**
|
|
1320
1332
|
* Get a raw progression file with custom type.
|
|
@@ -1975,7 +1987,7 @@ var UgcModule = class extends ModuleBase {
|
|
|
1975
1987
|
getBlob(blobPath) {
|
|
1976
1988
|
this.assertNotEmpty(blobPath, "blobPath");
|
|
1977
1989
|
const blobUrl = `https://${HALO_CORE_ENDPOINTS.BLOBS_ORIGIN}.${HALO_CORE_ENDPOINTS.SERVICE_DOMAIN}${blobPath}`;
|
|
1978
|
-
return this.getFullUrl(blobUrl, { useSpartanToken: false });
|
|
1990
|
+
return this.getFullUrl(blobUrl, { useSpartanToken: false, returnRaw: true });
|
|
1979
1991
|
}
|
|
1980
1992
|
};
|
|
1981
1993
|
|