@casual-simulation/aux-runtime 3.4.6-alpha.14668890889 → 3.5.0-alpha.15119114602
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/package.json +8 -8
- package/runtime/AuxCompiler.d.ts +0 -1
- package/runtime/AuxCompiler.js.map +1 -1
- package/runtime/AuxGlobalContext.d.ts +1 -1
- package/runtime/AuxGlobalContext.js +3 -1
- package/runtime/AuxGlobalContext.js.map +1 -1
- package/runtime/AuxLibrary.d.ts +125 -65
- package/runtime/AuxLibrary.js +510 -167
- package/runtime/AuxLibrary.js.map +1 -1
- package/runtime/AuxLibraryDefinitions.def +782 -0
- package/runtime/AuxResults.js.map +1 -1
- package/runtime/AuxRuntime.js +545 -512
- package/runtime/AuxRuntime.js.map +1 -1
- package/runtime/AuxRuntimeDynamicImports.js +2 -13
- package/runtime/AuxRuntimeDynamicImports.js.map +1 -1
- package/runtime/CompiledBot.js +1 -1
- package/runtime/CompiledBot.js.map +1 -1
- package/runtime/RecordsEvents.d.ts +162 -3
- package/runtime/RecordsEvents.js +162 -3
- package/runtime/RecordsEvents.js.map +1 -1
- package/runtime/RuntimeBot.js +3 -1
- package/runtime/RuntimeBot.js.map +1 -1
- package/runtime/RuntimeStateVersion.js +3 -1
- package/runtime/RuntimeStateVersion.js.map +1 -1
- package/runtime/Transpiler.js +10 -1
- package/runtime/Transpiler.js.map +1 -1
- package/runtime/Utils.d.ts +1 -1
- package/runtime/Utils.js.map +1 -1
- package/runtime/test/TestScriptBotFactory.js.map +1 -1
|
@@ -1314,6 +1314,32 @@ declare interface DownloadAction extends Action {
|
|
|
1314
1314
|
mimeType: string;
|
|
1315
1315
|
}
|
|
1316
1316
|
|
|
1317
|
+
export type StoredAux = StoredAuxVersion1 | StoredAuxVersion2;
|
|
1318
|
+
|
|
1319
|
+
export interface StoredAuxVersion1 {
|
|
1320
|
+
version: 1;
|
|
1321
|
+
state: BotsState;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
export interface StoredAuxVersion2 {
|
|
1325
|
+
version: 2;
|
|
1326
|
+
updates: InstUpdate[];
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
export interface AuxFileOptions {
|
|
1330
|
+
/**
|
|
1331
|
+
* The version that should be used for the output file.
|
|
1332
|
+
*
|
|
1333
|
+
* Version 1 stores bots as pure JSON and is the original version of the file format.
|
|
1334
|
+
* Version 2 stores bots as updates and is the new version of the file format.
|
|
1335
|
+
*
|
|
1336
|
+
* If not specifed, then version 2 will be used.
|
|
1337
|
+
*/
|
|
1338
|
+
version?: 1 | 2;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
export type InstallAuxFileMode = 'default' | 'copy';
|
|
1342
|
+
|
|
1317
1343
|
/**
|
|
1318
1344
|
* Defines an interface for options that a show input event can use.
|
|
1319
1345
|
*/
|
|
@@ -11727,6 +11753,434 @@ export interface SharedTextDeleteOp {
|
|
|
11727
11753
|
|
|
11728
11754
|
export interface RelativePosition {}
|
|
11729
11755
|
|
|
11756
|
+
/**
|
|
11757
|
+
* Defines a record that represents a notification.
|
|
11758
|
+
* That is, a way for users to be notified of something.
|
|
11759
|
+
*
|
|
11760
|
+
* @dochash types/records/packages
|
|
11761
|
+
* @docName PackageRecord
|
|
11762
|
+
*/
|
|
11763
|
+
export interface PackageRecord {
|
|
11764
|
+
/**
|
|
11765
|
+
* The address of the package.
|
|
11766
|
+
*/
|
|
11767
|
+
address: string;
|
|
11768
|
+
|
|
11769
|
+
/**
|
|
11770
|
+
* The ID of the package.
|
|
11771
|
+
*/
|
|
11772
|
+
id: string;
|
|
11773
|
+
}
|
|
11774
|
+
|
|
11775
|
+
/**
|
|
11776
|
+
* The scopes that can be used for requested entitlements.
|
|
11777
|
+
* This can be used to limit the entitlement to requesting a category of resources.
|
|
11778
|
+
* For example, the "personal" scope would limit the entitlement to requesting access to the user's personal resources.
|
|
11779
|
+
*
|
|
11780
|
+
* - "personal" - The entitlement is for personal (user-specific) records. This would allow the package to request access to resources in the user's player record. Once granted, the package would have access to the user's personal record.
|
|
11781
|
+
* - "owned" - The entitlement is for user (user-owned) records. This would allow the package to request access to resources in a record that the user owns. Once granted, the package would have access to the user's owned records.
|
|
11782
|
+
* - "studio" - The entitlement is for studio records. This would allow the package to request access to resources in studios in which the user is an admin or member of.
|
|
11783
|
+
* - "shared" - The entitlement is for shared records. This would allow the package to request access to records that are either owned or granted to the user.
|
|
11784
|
+
* - "designated" - The entitlement is for specific records. This would allow the package to only request access to specific records.
|
|
11785
|
+
*/
|
|
11786
|
+
export type EntitlementScope =
|
|
11787
|
+
| 'personal'
|
|
11788
|
+
| 'owned'
|
|
11789
|
+
| 'studio'
|
|
11790
|
+
| 'shared'
|
|
11791
|
+
| 'designated';
|
|
11792
|
+
|
|
11793
|
+
/**
|
|
11794
|
+
* The feature categories that entitlements support.
|
|
11795
|
+
* Generally, features align with resource kinds, but don't have to.
|
|
11796
|
+
*/
|
|
11797
|
+
export type EntitlementFeature =
|
|
11798
|
+
| 'data'
|
|
11799
|
+
| 'file'
|
|
11800
|
+
| 'event'
|
|
11801
|
+
| 'inst'
|
|
11802
|
+
| 'notification'
|
|
11803
|
+
| 'package'
|
|
11804
|
+
| 'permissions'
|
|
11805
|
+
| 'webhook'
|
|
11806
|
+
| 'ai';
|
|
11807
|
+
|
|
11808
|
+
/**
|
|
11809
|
+
* Defines an interface that represents an entitlement.
|
|
11810
|
+
* That is, a feature that can be granted to a package but still requires user approval.
|
|
11811
|
+
*
|
|
11812
|
+
* In essence, this allows a package to ask the user for permission for a category of permissions.
|
|
11813
|
+
*/
|
|
11814
|
+
export interface Entitlement {
|
|
11815
|
+
/**
|
|
11816
|
+
* The feature category that the entitlement is for.
|
|
11817
|
+
* Generally, features align with resource kinds, but don't have to.
|
|
11818
|
+
*/
|
|
11819
|
+
feature: EntitlementFeature;
|
|
11820
|
+
|
|
11821
|
+
/**
|
|
11822
|
+
* The scope of the entitlement.
|
|
11823
|
+
* This can be used to limit the entitlement to a category of resources.
|
|
11824
|
+
* For example, the "personal" scope would limit the entitlement to requesting access to the user's personal resources.
|
|
11825
|
+
*
|
|
11826
|
+
*
|
|
11827
|
+
* - "personal" - The entitlement is for personal (user-specific) records. This would allow the package to request access to resources in the user's player record.
|
|
11828
|
+
* - "owned" - The entitlement is for user (user-owned) records. This would allow the package to request access to resources in a record that the user owns.
|
|
11829
|
+
* - "studio" - The entitlement is for studio records. This would allow the package to request access to resources in studios in which the user is an admin or member of.
|
|
11830
|
+
* - "shared" - The entitlement is for shared records. This would allow the package to request access to records that are either owned or granted to the user.
|
|
11831
|
+
* - "designated" - The entitlement is for specific records. This would allow the package to only request access to specific records.
|
|
11832
|
+
*/
|
|
11833
|
+
scope: EntitlementScope;
|
|
11834
|
+
|
|
11835
|
+
/**
|
|
11836
|
+
* The list of records that the entitlement is for.
|
|
11837
|
+
*/
|
|
11838
|
+
designatedRecords?: string[];
|
|
11839
|
+
}
|
|
11840
|
+
|
|
11841
|
+
|
|
11842
|
+
export interface PackageVersion {
|
|
11843
|
+
/**
|
|
11844
|
+
* The major version of the package.
|
|
11845
|
+
*/
|
|
11846
|
+
major: number;
|
|
11847
|
+
|
|
11848
|
+
/**
|
|
11849
|
+
* The minor version of the package.
|
|
11850
|
+
*/
|
|
11851
|
+
minor: number;
|
|
11852
|
+
|
|
11853
|
+
/**
|
|
11854
|
+
* The patch version of the package.
|
|
11855
|
+
*/
|
|
11856
|
+
patch: number;
|
|
11857
|
+
|
|
11858
|
+
/**
|
|
11859
|
+
* The pre-release version of the package.
|
|
11860
|
+
* If empty or null, then this is a stable release.
|
|
11861
|
+
*/
|
|
11862
|
+
tag: string | null;
|
|
11863
|
+
}
|
|
11864
|
+
|
|
11865
|
+
export interface PackageRecordVersion {
|
|
11866
|
+
/**
|
|
11867
|
+
* The address that the item is stored under.
|
|
11868
|
+
*/
|
|
11869
|
+
address: string;
|
|
11870
|
+
|
|
11871
|
+
/**
|
|
11872
|
+
* The key of the item.
|
|
11873
|
+
*/
|
|
11874
|
+
key: PackageVersion;
|
|
11875
|
+
|
|
11876
|
+
/**
|
|
11877
|
+
* The ID of the package version.
|
|
11878
|
+
*/
|
|
11879
|
+
id: string;
|
|
11880
|
+
|
|
11881
|
+
/**
|
|
11882
|
+
* The name of the aux file that is stored for this version.
|
|
11883
|
+
*/
|
|
11884
|
+
auxFileName: string;
|
|
11885
|
+
|
|
11886
|
+
/**
|
|
11887
|
+
* Whether the aux file was created for this version.
|
|
11888
|
+
*/
|
|
11889
|
+
createdFile: boolean;
|
|
11890
|
+
|
|
11891
|
+
/**
|
|
11892
|
+
* The SHA-256 hash of the package version.
|
|
11893
|
+
*/
|
|
11894
|
+
sha256: string;
|
|
11895
|
+
|
|
11896
|
+
/**
|
|
11897
|
+
* The SHA-256 hash of the aux.
|
|
11898
|
+
*/
|
|
11899
|
+
auxSha256: string;
|
|
11900
|
+
|
|
11901
|
+
/**
|
|
11902
|
+
* The list of entitlements that the package requires.
|
|
11903
|
+
*/
|
|
11904
|
+
entitlements: Entitlement[];
|
|
11905
|
+
|
|
11906
|
+
/**
|
|
11907
|
+
* Whether the package version requires review.
|
|
11908
|
+
* Packages that do not require review are automatically approved and cannot have entitlements that require review.
|
|
11909
|
+
*/
|
|
11910
|
+
requiresReview: boolean;
|
|
11911
|
+
|
|
11912
|
+
/**
|
|
11913
|
+
* The description of the package.
|
|
11914
|
+
*/
|
|
11915
|
+
description: string;
|
|
11916
|
+
|
|
11917
|
+
/**
|
|
11918
|
+
* The size of the package version in bytes.
|
|
11919
|
+
*/
|
|
11920
|
+
sizeInBytes: number;
|
|
11921
|
+
|
|
11922
|
+
/**
|
|
11923
|
+
* The unix time in miliseconds that this package version was created at.
|
|
11924
|
+
*/
|
|
11925
|
+
createdAtMs: number;
|
|
11926
|
+
|
|
11927
|
+
/**
|
|
11928
|
+
* The markers for the package version.
|
|
11929
|
+
*/
|
|
11930
|
+
markers: string[];
|
|
11931
|
+
}
|
|
11932
|
+
|
|
11933
|
+
export interface PackageRecordVersionWithMetadata extends PackageRecordVersion {
|
|
11934
|
+
/**
|
|
11935
|
+
* The ID of the package that the version is stored under.
|
|
11936
|
+
*/
|
|
11937
|
+
packageId: string;
|
|
11938
|
+
|
|
11939
|
+
/**
|
|
11940
|
+
* Whether the package version has been approved.
|
|
11941
|
+
* If true, then the package either has been manually approved or does not require approval.
|
|
11942
|
+
*/
|
|
11943
|
+
approved: boolean;
|
|
11944
|
+
|
|
11945
|
+
/**
|
|
11946
|
+
* The type of approval that was given to the package.
|
|
11947
|
+
*
|
|
11948
|
+
* - null means that the package has not been approved.
|
|
11949
|
+
* - "normal" means that the package was approved by the reviewer, but that individual permissions still need to be approved by the user.
|
|
11950
|
+
* - "super" means that the package was approved by the reviewer and that individual permissions will not need to be approved by the user.
|
|
11951
|
+
*/
|
|
11952
|
+
approvalType: null | 'normal' | 'super';
|
|
11953
|
+
}
|
|
11954
|
+
|
|
11955
|
+
/**
|
|
11956
|
+
* Defines an interface that represents a package version key specifier.
|
|
11957
|
+
* That is, a way to identify a package version by its key.
|
|
11958
|
+
*/
|
|
11959
|
+
export interface PackageRecordVersionKeySpecifier {
|
|
11960
|
+
/**
|
|
11961
|
+
* The major number of the version to load.
|
|
11962
|
+
* If omitted, then the latest major version will be loaded.
|
|
11963
|
+
*/
|
|
11964
|
+
major?: number;
|
|
11965
|
+
|
|
11966
|
+
/**
|
|
11967
|
+
* The minor number of the version to load.
|
|
11968
|
+
* If not specifed, then the latest minor version will be loaded.
|
|
11969
|
+
*/
|
|
11970
|
+
minor?: number;
|
|
11971
|
+
|
|
11972
|
+
/**
|
|
11973
|
+
* The patch number of the version to load.
|
|
11974
|
+
* If not specified, then the latest patch version will be loaded.
|
|
11975
|
+
*/
|
|
11976
|
+
patch?: number;
|
|
11977
|
+
|
|
11978
|
+
/**
|
|
11979
|
+
* The tag of the version to load.
|
|
11980
|
+
* If not specified, then the untagged version will be loaded.
|
|
11981
|
+
*/
|
|
11982
|
+
tag?: string | null;
|
|
11983
|
+
|
|
11984
|
+
/**
|
|
11985
|
+
* The SHA-256 hash of the version to load.
|
|
11986
|
+
* If not specified, then the SHA-256 will not be checked.
|
|
11987
|
+
* If specified, then the SHA-256 will be checked against the version that is loaded.
|
|
11988
|
+
*/
|
|
11989
|
+
sha256?: string | null;
|
|
11990
|
+
}
|
|
11991
|
+
|
|
11992
|
+
|
|
11993
|
+
export type InstallPackageResult =
|
|
11994
|
+
| InstallPackageSuccess
|
|
11995
|
+
| InstallPackageFailure;
|
|
11996
|
+
export interface InstallPackageSuccess {
|
|
11997
|
+
success: true;
|
|
11998
|
+
|
|
11999
|
+
/**
|
|
12000
|
+
* The ID of the record which records that the package was loaded into the inst.
|
|
12001
|
+
* Null if the inst is a local inst.
|
|
12002
|
+
*/
|
|
12003
|
+
packageLoadId: string | null;
|
|
12004
|
+
|
|
12005
|
+
/**
|
|
12006
|
+
* The package that was loaded.
|
|
12007
|
+
*/
|
|
12008
|
+
package: PackageRecordVersionWithMetadata;
|
|
12009
|
+
}
|
|
12010
|
+
|
|
12011
|
+
export interface InstallPackageFailure {
|
|
12012
|
+
success: false;
|
|
12013
|
+
errorCode: KnownErrorCodes;
|
|
12014
|
+
errorMessage: string;
|
|
12015
|
+
}
|
|
12016
|
+
|
|
12017
|
+
|
|
12018
|
+
export interface LoadedPackage {
|
|
12019
|
+
/**
|
|
12020
|
+
* The ID of the loaded package.
|
|
12021
|
+
*/
|
|
12022
|
+
id: string;
|
|
12023
|
+
|
|
12024
|
+
/**
|
|
12025
|
+
* The name of the record that the inst is stored in.
|
|
12026
|
+
* If null, then the inst is a public inst.
|
|
12027
|
+
*/
|
|
12028
|
+
recordName: string | null;
|
|
12029
|
+
|
|
12030
|
+
/**
|
|
12031
|
+
* The name of the inst that the package was loaded into.
|
|
12032
|
+
*/
|
|
12033
|
+
inst: string;
|
|
12034
|
+
|
|
12035
|
+
/**
|
|
12036
|
+
* The branch that the package was installed into.
|
|
12037
|
+
*/
|
|
12038
|
+
branch: string;
|
|
12039
|
+
|
|
12040
|
+
/**
|
|
12041
|
+
* The ID of the user that loaded the package.
|
|
12042
|
+
*/
|
|
12043
|
+
userId: string | null;
|
|
12044
|
+
|
|
12045
|
+
/**
|
|
12046
|
+
* The ID of the pacakge that was loaded.
|
|
12047
|
+
*/
|
|
12048
|
+
packageId: string;
|
|
12049
|
+
|
|
12050
|
+
/**
|
|
12051
|
+
* The ID of the package version that was loaded.
|
|
12052
|
+
*/
|
|
12053
|
+
packageVersionId: string;
|
|
12054
|
+
}
|
|
12055
|
+
|
|
12056
|
+
export type ListInstalledPackagesResult =
|
|
12057
|
+
| ListInstalledPackagesRequestSuccess
|
|
12058
|
+
| ListInstalledPackagesFailure;
|
|
12059
|
+
|
|
12060
|
+
export interface ListInstalledPackagesRequestSuccess {
|
|
12061
|
+
success: true;
|
|
12062
|
+
packages: LoadedPackage[];
|
|
12063
|
+
}
|
|
12064
|
+
|
|
12065
|
+
export interface ListInstalledPackagesFailure {
|
|
12066
|
+
success: false;
|
|
12067
|
+
errorCode: KnownErrorCodes;
|
|
12068
|
+
errorMessage: string;
|
|
12069
|
+
}
|
|
12070
|
+
|
|
12071
|
+
/**
|
|
12072
|
+
* The scopes that can be granted for entitlements.
|
|
12073
|
+
* Compared to the requested entitlement scopes, the granted entitlement scopes are more restrictive.
|
|
12074
|
+
*
|
|
12075
|
+
* This ultimately means that while a package can have the ability to request access to a bunch of different records,
|
|
12076
|
+
* they can only be granted access to a single record at once (for now).
|
|
12077
|
+
*
|
|
12078
|
+
* - "designated" - The entitlement is for specific records. This would allow the package to access specific records.
|
|
12079
|
+
*/
|
|
12080
|
+
export type GrantedEntitlementScope = 'designated';
|
|
12081
|
+
|
|
12082
|
+
/**
|
|
12083
|
+
* Defines a request that grants a package entitlements to access a record.
|
|
12084
|
+
*
|
|
12085
|
+
* @dochash types/records/packages
|
|
12086
|
+
* @docname GrantEntitlementsRequest
|
|
12087
|
+
*/
|
|
12088
|
+
export interface GrantEntitlementsRequest {
|
|
12089
|
+
/**
|
|
12090
|
+
* The ID of the package that should be granted entitlements.
|
|
12091
|
+
*/
|
|
12092
|
+
packageId: string;
|
|
12093
|
+
|
|
12094
|
+
/**
|
|
12095
|
+
* The scope that the entitlements should have.
|
|
12096
|
+
*/
|
|
12097
|
+
scope: GrantedEntitlementScope;
|
|
12098
|
+
|
|
12099
|
+
/**
|
|
12100
|
+
* The name of the record that the entitlements cover.
|
|
12101
|
+
*/
|
|
12102
|
+
recordName: string;
|
|
12103
|
+
|
|
12104
|
+
/**
|
|
12105
|
+
* The time that the entitlements should expire.
|
|
12106
|
+
*/
|
|
12107
|
+
expireTimeMs: number;
|
|
12108
|
+
|
|
12109
|
+
/**
|
|
12110
|
+
* The features that should be granted.
|
|
12111
|
+
*/
|
|
12112
|
+
features: EntitlementFeature[];
|
|
12113
|
+
}
|
|
12114
|
+
|
|
12115
|
+
export type GrantEntitlementsResult =
|
|
12116
|
+
| GrantEntitlementFailure
|
|
12117
|
+
| GrantEntitlementsSuccess;
|
|
12118
|
+
|
|
12119
|
+
export interface GrantEntitlementsSuccess {
|
|
12120
|
+
success: true;
|
|
12121
|
+
|
|
12122
|
+
grantedEntitlements: {
|
|
12123
|
+
grantId: string;
|
|
12124
|
+
feature: EntitlementFeature;
|
|
12125
|
+
}[];
|
|
12126
|
+
}
|
|
12127
|
+
|
|
12128
|
+
export interface GrantEntitlementFailure {
|
|
12129
|
+
success: false;
|
|
12130
|
+
errorCode: KnownErrorCodes;
|
|
12131
|
+
errorMessage: string;
|
|
12132
|
+
}
|
|
12133
|
+
|
|
12134
|
+
|
|
12135
|
+
export interface RecordPackageVersionApiRequest {
|
|
12136
|
+
/**
|
|
12137
|
+
* The name of the record that the package version should be recorded to.
|
|
12138
|
+
*/
|
|
12139
|
+
recordName: string;
|
|
12140
|
+
|
|
12141
|
+
/**
|
|
12142
|
+
* The address that the package version should be recorded to.
|
|
12143
|
+
*/
|
|
12144
|
+
address: string;
|
|
12145
|
+
|
|
12146
|
+
/**
|
|
12147
|
+
* The version of the package that should be recorded.
|
|
12148
|
+
*/
|
|
12149
|
+
key: PackageVersion;
|
|
12150
|
+
|
|
12151
|
+
/**
|
|
12152
|
+
* The description that should be included in the package version.
|
|
12153
|
+
*/
|
|
12154
|
+
description: string;
|
|
12155
|
+
|
|
12156
|
+
/**
|
|
12157
|
+
* The list of entitlements for the package version.
|
|
12158
|
+
* If omitted, then the package version will be recorded without any entitlements.
|
|
12159
|
+
*/
|
|
12160
|
+
entitlements?: Entitlement[];
|
|
12161
|
+
|
|
12162
|
+
/**
|
|
12163
|
+
* The bots that should be saved to the package.
|
|
12164
|
+
*/
|
|
12165
|
+
bots: Bot[];
|
|
12166
|
+
|
|
12167
|
+
/**
|
|
12168
|
+
* The markers that should be applied to the package version.
|
|
12169
|
+
*/
|
|
12170
|
+
markers?: string[];
|
|
12171
|
+
}
|
|
12172
|
+
|
|
12173
|
+
|
|
12174
|
+
export type RecordPackageVersionResult =
|
|
12175
|
+
| RecordPackageVersionSuccess
|
|
12176
|
+
| CrudRecordItemFailure;
|
|
12177
|
+
|
|
12178
|
+
export interface RecordPackageVersionSuccess extends CrudRecordItemSuccess {
|
|
12179
|
+
/**
|
|
12180
|
+
* The result of recording the aux file.
|
|
12181
|
+
*/
|
|
12182
|
+
auxFileResult: RecordFileResult;
|
|
12183
|
+
}
|
|
11730
12184
|
|
|
11731
12185
|
interface Ai {
|
|
11732
12186
|
/**
|
|
@@ -12967,6 +13421,55 @@ interface Os {
|
|
|
12967
13421
|
filename: string
|
|
12968
13422
|
): DownloadAction;
|
|
12969
13423
|
|
|
13424
|
+
/**
|
|
13425
|
+
* Gets the JSON representation of the given bots as an .aux file.
|
|
13426
|
+
*
|
|
13427
|
+
* This function is useful for getting the contents of an aux file without downloading it.
|
|
13428
|
+
*
|
|
13429
|
+
* @param bots The bots that should be converted to JSON.
|
|
13430
|
+
* @param options The options that should be used for the conversion.
|
|
13431
|
+
*
|
|
13432
|
+
* @example Get the current bot as an aux file.
|
|
13433
|
+
* const myAux = os.getAuxFileForBots([bot]);
|
|
13434
|
+
*
|
|
13435
|
+
* @example Download the current bot as an aux file.
|
|
13436
|
+
* const myAux = os.getAuxFileForBots([bot]);
|
|
13437
|
+
* os.download(myAux, "myAux.aux");
|
|
13438
|
+
*
|
|
13439
|
+
* @example Get the current bot as an aux file with version 1.
|
|
13440
|
+
* const myAux = os.getAuxFileForBots([bot], { version: 1 });
|
|
13441
|
+
*
|
|
13442
|
+
* @dochash actions/os/files
|
|
13443
|
+
* @docname os.getAuxFileForBots
|
|
13444
|
+
*/
|
|
13445
|
+
getAuxFileForBots(
|
|
13446
|
+
bots: Bot[],
|
|
13447
|
+
options?: AuxFileOptions
|
|
13448
|
+
): StoredAux;
|
|
13449
|
+
|
|
13450
|
+
/**
|
|
13451
|
+
* Installs the given aux file into the inst.
|
|
13452
|
+
*
|
|
13453
|
+
* Depending on the version of the aux file, this may overwrite existing bots.
|
|
13454
|
+
*
|
|
13455
|
+
* @param aux The aux file that should be installed.
|
|
13456
|
+
* @param mode The mode that should be used to install the bots in the AUX file.
|
|
13457
|
+
* - `"default"` indicates that the aux file will be installed as-is.
|
|
13458
|
+
* If the file was already installed, then it will either overwrite bots or do nothing depending on the version of the aux.
|
|
13459
|
+
* Version 1 auxes will overwrite existing bots, while version 2 auxes will do nothing.
|
|
13460
|
+
* - `"copy"` indicates that all the bots in the aux file should be given new IDs. This is useful if you want to be able to install an AUX multiple times in the same inst.
|
|
13461
|
+
*
|
|
13462
|
+
* @example Install an aux file.
|
|
13463
|
+
* await os.installAuxFile(myAux);
|
|
13464
|
+
*
|
|
13465
|
+
* @dochash actions/os/files
|
|
13466
|
+
* @docname os.installAuxFile
|
|
13467
|
+
*/
|
|
13468
|
+
installAuxFile(
|
|
13469
|
+
aux: StoredAux,
|
|
13470
|
+
mode?: InstallAuxFileMode
|
|
13471
|
+
): Promise<void>;
|
|
13472
|
+
|
|
12970
13473
|
/**
|
|
12971
13474
|
* Downloads all the shared bots in the inst.
|
|
12972
13475
|
*/
|
|
@@ -14161,6 +14664,285 @@ interface Os {
|
|
|
14161
14664
|
*/
|
|
14162
14665
|
countEvents(recordNameOrKey: string, eventName: string, endpoint?: string): Promise<GetCountResult>;
|
|
14163
14666
|
|
|
14667
|
+
/**
|
|
14668
|
+
* Grants the given entitlements to a package.
|
|
14669
|
+
*
|
|
14670
|
+
* @param request The request to grant entitlements.
|
|
14671
|
+
* @param options the options for the request.
|
|
14672
|
+
*
|
|
14673
|
+
* @dochash actions/os/records
|
|
14674
|
+
* @docgroup 01-packages
|
|
14675
|
+
* @docname os.grantEntitlements
|
|
14676
|
+
*/
|
|
14677
|
+
grantEntitlements(
|
|
14678
|
+
request: GrantEntitlementsRequest,
|
|
14679
|
+
options?: RecordActionOptions
|
|
14680
|
+
): Promise<GrantEntitlementsResult>;
|
|
14681
|
+
|
|
14682
|
+
/**
|
|
14683
|
+
* Parses the given version number into a version key.
|
|
14684
|
+
* @param version The version number to parse.
|
|
14685
|
+
*
|
|
14686
|
+
* @example Parse a version number
|
|
14687
|
+
* const key = os.parseVersionKey('1.0.0');
|
|
14688
|
+
* os.toast(key.major); // 1
|
|
14689
|
+
* os.toast(key.minor); // 0
|
|
14690
|
+
* os.toast(key.patch); // 0
|
|
14691
|
+
* os.toast(key.tag); // null
|
|
14692
|
+
*
|
|
14693
|
+
* @dochash actions/os/records
|
|
14694
|
+
* @docname os.parseVersionKey
|
|
14695
|
+
*/
|
|
14696
|
+
parseVersionKey(version: string): PackageVersion;
|
|
14697
|
+
|
|
14698
|
+
/**
|
|
14699
|
+
* Formats the given version key into a string.
|
|
14700
|
+
*
|
|
14701
|
+
* @example Print the version key
|
|
14702
|
+
* os.toast(os.formatVersionKey({ major: 1, minor: 0, patch: 0, tag: 'alpha' }));
|
|
14703
|
+
*
|
|
14704
|
+
* @param key The key to format.
|
|
14705
|
+
*
|
|
14706
|
+
* @dochash actions/os/records
|
|
14707
|
+
* @docname os.formatVersionKey
|
|
14708
|
+
*/
|
|
14709
|
+
formatVersionKey(key: PackageVersion): string;
|
|
14710
|
+
|
|
14711
|
+
/**
|
|
14712
|
+
* Records the given package version. Package versions are useful for storing multiple distinct versions of the same AUX.
|
|
14713
|
+
* Package versions live inside package containers (also known simply as packages) and are distinguished by `key`.
|
|
14714
|
+
*
|
|
14715
|
+
* If the package container does not exist, then it will be automatically created with the `private` marker.
|
|
14716
|
+
* If no markers are specified, then the markers from the package container are used.
|
|
14717
|
+
*
|
|
14718
|
+
* @example Record a v1.0.0 package version
|
|
14719
|
+
* const result = await os.recordPackageVersion({
|
|
14720
|
+
* recordName: 'myRecord',
|
|
14721
|
+
* address: 'myPackage',
|
|
14722
|
+
* key: os.parseVersionKey('1.0.0'),
|
|
14723
|
+
* description: 'description of the package',
|
|
14724
|
+
* bots: getBots('color', 'red'),
|
|
14725
|
+
* });
|
|
14726
|
+
*
|
|
14727
|
+
* @example Record a package version that can request access to the user's data
|
|
14728
|
+
* const result = await os.recordPackageVersion({
|
|
14729
|
+
* recordName: 'myRecord',
|
|
14730
|
+
* address: 'myPackage',
|
|
14731
|
+
* key: os.parseVersionKey('1.0.0'),
|
|
14732
|
+
* description: 'description of the package',
|
|
14733
|
+
* entitlements: [
|
|
14734
|
+
* {
|
|
14735
|
+
* feature: 'data',
|
|
14736
|
+
* scope: 'personal',
|
|
14737
|
+
* }
|
|
14738
|
+
* ],
|
|
14739
|
+
* bots: getBots('color', 'red),
|
|
14740
|
+
* });
|
|
14741
|
+
*
|
|
14742
|
+
* @param request the information about the package version that should be recorded.
|
|
14743
|
+
* @param options the options for the request.
|
|
14744
|
+
*
|
|
14745
|
+
* @dochash actions/os/records
|
|
14746
|
+
* @docgroup 01-packages
|
|
14747
|
+
* @docname os.recordPackageVersion
|
|
14748
|
+
*/
|
|
14749
|
+
recordPackageVersion(
|
|
14750
|
+
request: RecordPackageVersionApiRequest,
|
|
14751
|
+
options?: RecordActionOptions
|
|
14752
|
+
): Promise<RecordPackageVersionResult>;
|
|
14753
|
+
|
|
14754
|
+
/**
|
|
14755
|
+
* Gets the list of versions for the given package.
|
|
14756
|
+
* @param recordName The name of the record that the package is stored in.
|
|
14757
|
+
* @param address The address of the package.
|
|
14758
|
+
*
|
|
14759
|
+
* @example List all the versions of a package
|
|
14760
|
+
* const result = await os.listPackageVersions('myRecord', 'myPackage');
|
|
14761
|
+
*
|
|
14762
|
+
* @dochash actions/os/records
|
|
14763
|
+
* @docgroup 01-packages
|
|
14764
|
+
* @docname os.listPackageVersions
|
|
14765
|
+
*/
|
|
14766
|
+
listPackageVersions(
|
|
14767
|
+
recordName: string,
|
|
14768
|
+
address: string,
|
|
14769
|
+
options?: RecordActionOptions
|
|
14770
|
+
): Promise<CrudListItemsResult<PackageRecordVersion>>;
|
|
14771
|
+
|
|
14772
|
+
/**
|
|
14773
|
+
* Gets metadata about the given package version.
|
|
14774
|
+
* @param recordName The name of the record that the package version is stored in.
|
|
14775
|
+
* @param address The address of the package version.
|
|
14776
|
+
* @param key The key of the package version.
|
|
14777
|
+
* @param options The options for the package version.
|
|
14778
|
+
*
|
|
14779
|
+
* @example Get info about a package version
|
|
14780
|
+
* const result = await os.getPackageVersion('myRecord', 'myPackage', os.parseVersionKey('1.0.0'));
|
|
14781
|
+
*
|
|
14782
|
+
* @dochash actions/os/records
|
|
14783
|
+
* @docgroup 01-packages
|
|
14784
|
+
* @docname os.getPackageVersion
|
|
14785
|
+
*/
|
|
14786
|
+
getPackageVersion(
|
|
14787
|
+
recordName: string,
|
|
14788
|
+
address: string,
|
|
14789
|
+
key: string | PackageRecordVersionKeySpecifier,
|
|
14790
|
+
options?: RecordActionOptions
|
|
14791
|
+
): Promise<CrudGetItemResult<PackageRecordVersion>>;
|
|
14792
|
+
|
|
14793
|
+
/**
|
|
14794
|
+
* Erases the given package version.
|
|
14795
|
+
* @param recordName the name of the record that the package version should be erased from.
|
|
14796
|
+
* @param address the address of the package version that should be erased.
|
|
14797
|
+
* @param key the key of the package version that should be erased.
|
|
14798
|
+
*
|
|
14799
|
+
* @example Erase a package version
|
|
14800
|
+
* const result = await os.erasePackageVersion('myRecord', 'myPackage', os.parseVersionKey('1.0.0'));
|
|
14801
|
+
*
|
|
14802
|
+
* @dochash actions/os/records
|
|
14803
|
+
* @docgroup 01-packages
|
|
14804
|
+
* @docname os.erasePackageVersion
|
|
14805
|
+
*/
|
|
14806
|
+
erasePackageVersion(
|
|
14807
|
+
recordName: string,
|
|
14808
|
+
address: string,
|
|
14809
|
+
key: PackageVersion,
|
|
14810
|
+
options?: RecordActionOptions
|
|
14811
|
+
): Promise<CrudEraseItemResult>;
|
|
14812
|
+
|
|
14813
|
+
/**
|
|
14814
|
+
* Records the given package container.
|
|
14815
|
+
* Package containers (also known simply as packages) are ways to group multiple package versions together.
|
|
14816
|
+
*
|
|
14817
|
+
* Markers that are applied to the package container control whether all the package versions can be deleted and also will be used as the default markers for package versions if the version isn't created with a marker.
|
|
14818
|
+
*
|
|
14819
|
+
* @param recordName The name of the record that the package should be stored in.
|
|
14820
|
+
* @param address The address of the package.
|
|
14821
|
+
* @param markers The markers that should be applied to the package.
|
|
14822
|
+
* @param options The options.
|
|
14823
|
+
*
|
|
14824
|
+
* @dochash actions/os/records
|
|
14825
|
+
* @docgroup 01-packages
|
|
14826
|
+
* @docname os.recordPackageContainer
|
|
14827
|
+
*/
|
|
14828
|
+
recordPackageContainer(
|
|
14829
|
+
recordName: string,
|
|
14830
|
+
address: string,
|
|
14831
|
+
markers?: string | string[],
|
|
14832
|
+
options?: RecordActionOptions
|
|
14833
|
+
): Promise<CrudRecordItemResult>;
|
|
14834
|
+
|
|
14835
|
+
/**
|
|
14836
|
+
* Erases the given package container and any package versions that it contains.
|
|
14837
|
+
*
|
|
14838
|
+
* @param recordName the name of the record that the package container is in.
|
|
14839
|
+
* @param address the address of the package container.
|
|
14840
|
+
* @param options the options to use for the request.
|
|
14841
|
+
*/
|
|
14842
|
+
erasePackageContainer(
|
|
14843
|
+
recordName: string,
|
|
14844
|
+
address: string,
|
|
14845
|
+
options?: RecordActionOptions
|
|
14846
|
+
): Promise<CrudEraseItemResult>;
|
|
14847
|
+
|
|
14848
|
+
/**
|
|
14849
|
+
* Lists all the package containers that are in the given record.
|
|
14850
|
+
* You must have access to the `account` marker in order to list all package containers in a record.
|
|
14851
|
+
*
|
|
14852
|
+
* @param recordName the name of the record that the package containers should be listed from.
|
|
14853
|
+
* @param startingAddress the address that the listing should start after.
|
|
14854
|
+
* @param options the options for the request.
|
|
14855
|
+
*
|
|
14856
|
+
* @example List package containers in a record
|
|
14857
|
+
* const result = await os.listPackageContainers('myRecord');
|
|
14858
|
+
*
|
|
14859
|
+
* @dochash actions/os/records
|
|
14860
|
+
* @docgroup 01-packages
|
|
14861
|
+
* @docname os.listPackageContainers
|
|
14862
|
+
*/
|
|
14863
|
+
listPackageContainers(
|
|
14864
|
+
recordName: string,
|
|
14865
|
+
startingAddress?: string,
|
|
14866
|
+
options?: ListDataOptions
|
|
14867
|
+
): Promise<CrudListItemsResult<PackageRecord>>;
|
|
14868
|
+
|
|
14869
|
+
/**
|
|
14870
|
+
* Lists the package containers that have the given marker in the given record.
|
|
14871
|
+
* You must have access to the specified marker in order to list the package containers.
|
|
14872
|
+
*
|
|
14873
|
+
* @param recordName the name of the record that the package containers should be listed from.
|
|
14874
|
+
* @param marker the marker that the package containers should have.
|
|
14875
|
+
* @param startingAddress the address that the listing should start after.
|
|
14876
|
+
* @param options the options for the request.
|
|
14877
|
+
*
|
|
14878
|
+
* @example List public package containers in a record
|
|
14879
|
+
* const result = await os.listPackageContainersByMarker('myRecord', 'publicRead');
|
|
14880
|
+
*
|
|
14881
|
+
* @example List private package containers in a record
|
|
14882
|
+
* const result = await os.listPackageContainersByMarker('myRecord', 'private');
|
|
14883
|
+
*
|
|
14884
|
+
* @example List public package containers stored at "myNamespace"
|
|
14885
|
+
* const result = await os.listPackageContainersByMarker('myRecord', 'publicRead:myNamespace');
|
|
14886
|
+
*
|
|
14887
|
+
* @dochash actions/os/records
|
|
14888
|
+
* @docgroup 01-packages
|
|
14889
|
+
* @docname os.listPackageContainersByMarker
|
|
14890
|
+
*/
|
|
14891
|
+
listPackageContainersByMarker(
|
|
14892
|
+
recordName: string,
|
|
14893
|
+
marker: string,
|
|
14894
|
+
startingAddress?: string,
|
|
14895
|
+
options?: ListDataOptions
|
|
14896
|
+
): Promise<CrudListItemsResult<PackageRecord>>;
|
|
14897
|
+
|
|
14898
|
+
/**
|
|
14899
|
+
* Gets the package container in the given record at the given address.
|
|
14900
|
+
*
|
|
14901
|
+
* @param recordName the name of the record that the package container is in.
|
|
14902
|
+
* @param address the address that the package container is stored at.
|
|
14903
|
+
* @param options the options for the request.
|
|
14904
|
+
*
|
|
14905
|
+
* @dochash actions/os/records
|
|
14906
|
+
* @docgroup 01-packages
|
|
14907
|
+
* @docname os.getPackageContainer
|
|
14908
|
+
*/
|
|
14909
|
+
getPackageContainer(
|
|
14910
|
+
recordName: string,
|
|
14911
|
+
address: string,
|
|
14912
|
+
options?: RecordActionOptions
|
|
14913
|
+
): Promise<CrudGetItemResult<PackageRecord>>;
|
|
14914
|
+
|
|
14915
|
+
/**
|
|
14916
|
+
* Attempts to install the given package into the inst.
|
|
14917
|
+
*
|
|
14918
|
+
* @param recordName the name of the record that the package is in.
|
|
14919
|
+
* @param address the address of the package that should be loaded.
|
|
14920
|
+
* @param key the key that specifies the version of the package that should be loaded. If not specified, then the latest version will be loaded.
|
|
14921
|
+
* @param options the options for the request.
|
|
14922
|
+
*
|
|
14923
|
+
* @dochash actions/os/records
|
|
14924
|
+
* @docgroup 01-packages
|
|
14925
|
+
* @docname os.installPackage
|
|
14926
|
+
*/
|
|
14927
|
+
installPackage(
|
|
14928
|
+
recordName: string,
|
|
14929
|
+
address: string,
|
|
14930
|
+
key?: string | PackageRecordVersionKeySpecifier,
|
|
14931
|
+
): Promise<InstallPackageResult>;
|
|
14932
|
+
|
|
14933
|
+
/**
|
|
14934
|
+
* Gets the list of packages that are installed in the inst.
|
|
14935
|
+
* @param options the options for the request.
|
|
14936
|
+
*
|
|
14937
|
+
* @example List all installed packages
|
|
14938
|
+
* const result = await os.listInstalledPackages();
|
|
14939
|
+
*
|
|
14940
|
+
* @dochash actions/os/records
|
|
14941
|
+
* @docgroup 01-packages
|
|
14942
|
+
* @docname os.listInstalledPackages
|
|
14943
|
+
*/
|
|
14944
|
+
listInstalledPackages(options?: RecordActionOptions): Promise<ListInstalledPackagesResult>;
|
|
14945
|
+
|
|
14164
14946
|
/**
|
|
14165
14947
|
* Gets the list of studios that the currently logged in user has access to.
|
|
14166
14948
|
*
|