@casual-simulation/aux-records 3.8.1 → 3.10.2
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/AIChatInterface.d.ts +7 -43
- package/AIChatInterface.js +8 -6
- package/AIChatInterface.js.map +1 -1
- package/AIController.js +44 -49
- package/AIController.js.map +1 -1
- package/AIOpenAIRealtimeInterface.d.ts +1 -1
- package/AnthropicAIChatInterface.js +4 -4
- package/AnthropicAIChatInterface.js.map +1 -1
- package/AuthController.d.ts +78 -10
- package/AuthController.js +230 -166
- package/AuthController.js.map +1 -1
- package/AuthStore.d.ts +317 -4
- package/BigIntPatch.d.ts +1 -0
- package/BigIntPatch.js +24 -0
- package/BigIntPatch.js.map +1 -0
- package/BlockadeLabsGenerateSkyboxInterface.js +4 -4
- package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
- package/CachingConfigStore.d.ts +8 -1
- package/CachingConfigStore.js +50 -0
- package/CachingConfigStore.js.map +1 -1
- package/ComIdConfig.d.ts +132 -86
- package/ComIdConfig.js +5 -5
- package/ComIdConfig.js.map +1 -1
- package/ConfigurationStore.d.ts +1393 -3
- package/ConfigurationStore.js +49 -0
- package/ConfigurationStore.js.map +1 -1
- package/DataRecordsController.js +28 -28
- package/DataRecordsController.js.map +1 -1
- package/EventRecordsController.js +9 -9
- package/EventRecordsController.js.map +1 -1
- package/FileRecordsController.js +18 -17
- package/FileRecordsController.js.map +1 -1
- package/GoogleAIChatInterface.js +4 -4
- package/GoogleAIChatInterface.js.map +1 -1
- package/HttpTestUtils.d.ts +48 -0
- package/HttpTestUtils.js +256 -0
- package/HttpTestUtils.js.map +1 -0
- package/LivekitController.js +2 -2
- package/LivekitController.js.map +1 -1
- package/LoomController.js +3 -4
- package/LoomController.js.map +1 -1
- package/MemoryStore.d.ts +60 -7
- package/MemoryStore.js +427 -59
- package/MemoryStore.js.map +1 -1
- package/MetricsStore.d.ts +11 -0
- package/ModerationConfiguration.d.ts +11 -85
- package/ModerationConfiguration.js +17 -17
- package/ModerationConfiguration.js.map +1 -1
- package/ModerationController.js +9 -11
- package/ModerationController.js.map +1 -1
- package/OpenAIChatInterface.js +8 -13
- package/OpenAIChatInterface.js.map +1 -1
- package/OpenAIImageInterface.js +4 -5
- package/OpenAIImageInterface.js.map +1 -1
- package/PolicyController.js +66 -73
- package/PolicyController.js.map +1 -1
- package/PolicyStore.d.ts +59 -33
- package/PolicyStore.js +35 -1
- package/PolicyStore.js.map +1 -1
- package/PrivoClient.d.ts +3 -1
- package/PrivoClient.js +2 -4
- package/PrivoClient.js.map +1 -1
- package/PrivoConfiguration.d.ts +6 -72
- package/PrivoConfiguration.js +30 -31
- package/PrivoConfiguration.js.map +1 -1
- package/README.md +276 -2
- package/RateLimitController.js +2 -2
- package/RateLimitController.js.map +1 -1
- package/RecordsClient.d.ts +3 -1
- package/RecordsClient.js +6 -6
- package/RecordsClient.js.map +1 -1
- package/RecordsController.d.ts +145 -3
- package/RecordsController.js +399 -61
- package/RecordsController.js.map +1 -1
- package/RecordsServer.d.ts +1932 -1109
- package/RecordsStore.d.ts +99 -14
- package/RecordsStore.js +8 -10
- package/RecordsStore.js.map +1 -1
- package/ServerConfig.d.ts +698 -9867
- package/ServerConfig.js +457 -377
- package/ServerConfig.js.map +1 -1
- package/SloydInterface.js +1 -1
- package/SloydInterface.js.map +1 -1
- package/StabilityAIImageInterface.js +6 -9
- package/StabilityAIImageInterface.js.map +1 -1
- package/StripeInterface.d.ts +431 -287
- package/StripeInterface.js +21 -1
- package/StripeInterface.js.map +1 -1
- package/SubscriptionConfigBuilder.d.ts +10 -1
- package/SubscriptionConfigBuilder.js +72 -41
- package/SubscriptionConfigBuilder.js.map +1 -1
- package/SubscriptionConfiguration.d.ts +606 -6334
- package/SubscriptionConfiguration.js +460 -277
- package/SubscriptionConfiguration.js.map +1 -1
- package/SubscriptionController.d.ts +677 -4
- package/SubscriptionController.js +2986 -186
- package/SubscriptionController.js.map +1 -1
- package/SystemNotificationMessenger.d.ts +14 -70
- package/SystemNotificationMessenger.js +17 -20
- package/SystemNotificationMessenger.js.map +1 -1
- package/TestUtils.d.ts +18 -3
- package/TestUtils.js +84 -8
- package/TestUtils.js.map +1 -1
- package/TypeUtils.d.ts +991 -0
- package/TypeUtils.js +2 -0
- package/TypeUtils.js.map +1 -0
- package/Utils.d.ts +59 -0
- package/Utils.js +507 -3
- package/Utils.js.map +1 -1
- package/Validations.d.ts +24 -108
- package/Validations.js +62 -45
- package/Validations.js.map +1 -1
- package/ViewTemplateRenderer.d.ts +39 -0
- package/ViewTemplateRenderer.js +19 -0
- package/ViewTemplateRenderer.js.map +1 -0
- package/contracts/ContractRecordsController.d.ts +58 -0
- package/contracts/ContractRecordsController.js +144 -0
- package/contracts/ContractRecordsController.js.map +1 -0
- package/contracts/ContractRecordsStore.d.ts +285 -0
- package/contracts/ContractRecordsStore.js +19 -0
- package/contracts/ContractRecordsStore.js.map +1 -0
- package/contracts/MemoryContractRecordsStore.d.ts +27 -0
- package/contracts/MemoryContractRecordsStore.js +124 -0
- package/contracts/MemoryContractRecordsStore.js.map +1 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +21 -0
- package/contracts/index.js.map +1 -0
- package/crud/CrudHelpers.d.ts +25 -26
- package/crud/CrudHelpers.js +1 -1
- package/crud/CrudHelpers.js.map +1 -1
- package/crud/CrudRecordsController.js +13 -16
- package/crud/CrudRecordsController.js.map +1 -1
- package/crud/CrudRecordsControllerTests.d.ts +2 -2
- package/crud/CrudRecordsControllerTests.js +605 -580
- package/crud/CrudRecordsControllerTests.js.map +1 -1
- package/crud/MemoryCrudRecordsStore.js +1 -2
- package/crud/MemoryCrudRecordsStore.js.map +1 -1
- package/crud/sub/MemorySubCrudRecordsStore.js +4 -6
- package/crud/sub/MemorySubCrudRecordsStore.js.map +1 -1
- package/crud/sub/SubCrudRecordsController.js +8 -8
- package/crud/sub/SubCrudRecordsController.js.map +1 -1
- package/database/DatabaseRecordsController.js +1 -2
- package/database/DatabaseRecordsController.js.map +1 -1
- package/database/SqliteDatabaseInterface.js +1 -2
- package/database/SqliteDatabaseInterface.js.map +1 -1
- package/dns/DNSDomainNameValidator.d.ts +11 -0
- package/dns/DNSDomainNameValidator.js +59 -0
- package/dns/DNSDomainNameValidator.js.map +1 -0
- package/dns/DomainNameValidator.d.ts +36 -0
- package/dns/DomainNameValidator.js +19 -0
- package/dns/DomainNameValidator.js.map +1 -0
- package/dns/index.d.ts +3 -0
- package/dns/index.js +20 -0
- package/dns/index.js.map +1 -0
- package/financial/FinancialController.d.ts +272 -0
- package/financial/FinancialController.js +762 -0
- package/financial/FinancialController.js.map +1 -0
- package/financial/FinancialInterface.d.ts +352 -0
- package/financial/FinancialInterface.js +642 -0
- package/financial/FinancialInterface.js.map +1 -0
- package/financial/FinancialStore.d.ts +186 -0
- package/financial/FinancialStore.js +19 -0
- package/financial/FinancialStore.js.map +1 -0
- package/financial/MemoryFinancialInterface.d.ts +23 -0
- package/financial/MemoryFinancialInterface.js +592 -0
- package/financial/MemoryFinancialInterface.js.map +1 -0
- package/financial/TigerBeetleFinancialInterface.d.ts +46 -0
- package/financial/TigerBeetleFinancialInterface.js +109 -0
- package/financial/TigerBeetleFinancialInterface.js.map +1 -0
- package/financial/TigerBeetleTestUtils.d.ts +40 -0
- package/financial/TigerBeetleTestUtils.js +185 -0
- package/financial/TigerBeetleTestUtils.js.map +1 -0
- package/financial/Types.d.ts +1 -0
- package/financial/Types.js +801 -0
- package/financial/Types.js.map +1 -0
- package/financial/index.d.ts +6 -0
- package/financial/index.js +24 -0
- package/financial/index.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/notifications/NotificationRecordsController.js +14 -14
- package/notifications/NotificationRecordsController.js.map +1 -1
- package/notifications/WebPushInterface.d.ts +24 -155
- package/notifications/WebPushInterface.js +2 -2
- package/notifications/WebPushInterface.js.map +1 -1
- package/package.json +72 -70
- package/packages/version/MemoryPackageVersionRecordsStore.js +12 -15
- package/packages/version/MemoryPackageVersionRecordsStore.js.map +1 -1
- package/packages/version/PackageVersionRecordsController.d.ts +19 -0
- package/packages/version/PackageVersionRecordsController.js +102 -22
- package/packages/version/PackageVersionRecordsController.js.map +1 -1
- package/packages/version/PackageVersionRecordsStore.js +6 -8
- package/packages/version/PackageVersionRecordsStore.js.map +1 -1
- package/purchasable-items/MemoryPurchasableItemRecordsStore.d.ts +7 -0
- package/purchasable-items/MemoryPurchasableItemRecordsStore.js +33 -0
- package/purchasable-items/MemoryPurchasableItemRecordsStore.js.map +1 -0
- package/purchasable-items/PurchasableItemRecordsController.d.ts +16 -0
- package/purchasable-items/PurchasableItemRecordsController.js +72 -0
- package/purchasable-items/PurchasableItemRecordsController.js.map +1 -0
- package/purchasable-items/PurchasableItemRecordsStore.d.ts +66 -0
- package/purchasable-items/PurchasableItemRecordsStore.js +2 -0
- package/purchasable-items/PurchasableItemRecordsStore.js.map +1 -0
- package/purchasable-items/index.d.ts +4 -0
- package/purchasable-items/index.js +21 -0
- package/purchasable-items/index.js.map +1 -0
- package/queue/MemoryQueue.js +1 -1
- package/queue/MemoryQueue.js.map +1 -1
- package/search/MemorySearchInterface.js +1 -2
- package/search/MemorySearchInterface.js.map +1 -1
- package/search/SearchRecordsController.d.ts +66 -244
- package/search/SearchRecordsController.js +35 -36
- package/search/SearchRecordsController.js.map +1 -1
- package/search/SearchSyncProcessor.d.ts +7 -83
- package/search/TypesenseSearchInterface.js +8 -11
- package/search/TypesenseSearchInterface.js.map +1 -1
- package/tracing/TracingDecorators.js +5 -8
- package/tracing/TracingDecorators.js.map +1 -1
- package/webhooks/WebhookEnvironment.d.ts +36 -560
- package/webhooks/WebhookEnvironment.js +1 -1
- package/webhooks/WebhookEnvironment.js.map +1 -1
- package/webhooks/WebhookRecordsController.js +14 -16
- package/webhooks/WebhookRecordsController.js.map +1 -1
- package/websockets/MemoryLockStore.d.ts +18 -0
- package/websockets/MemoryLockStore.js +2 -0
- package/websockets/MemoryLockStore.js.map +1 -0
- package/websockets/MemoryTempInstRecordsStore.js +15 -27
- package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
- package/websockets/MemoryWebsocketConnectionStore.js +6 -8
- package/websockets/MemoryWebsocketConnectionStore.js.map +1 -1
- package/websockets/MemoryWebsocketMessenger.js +1 -2
- package/websockets/MemoryWebsocketMessenger.js.map +1 -1
- package/websockets/SplitInstRecordsStore.js +2 -2
- package/websockets/SplitInstRecordsStore.js.map +1 -1
- package/websockets/WebsocketController.d.ts +5 -0
- package/websockets/WebsocketController.js +122 -83
- package/websockets/WebsocketController.js.map +1 -1
- package/RecordsServer.js +0 -6435
- package/RecordsServer.js.map +0 -1
package/AuthController.d.ts
CHANGED
|
@@ -2,12 +2,15 @@ import type { AddressType, AuthListedUserAuthenticator, AuthSession, AuthStore,
|
|
|
2
2
|
import type { NotAuthorizedError, NotLoggedInError, NotSupportedError, ServerError } from '@casual-simulation/aux-common/Errors';
|
|
3
3
|
import type { AuthMessenger } from './AuthMessenger';
|
|
4
4
|
import type { RegexRule } from './Utils';
|
|
5
|
+
import type { ContractFeaturesConfiguration } from './SubscriptionConfiguration';
|
|
5
6
|
import type { ConfigurationStore } from './ConfigurationStore';
|
|
6
7
|
import type { PrivacyFeatures, PublicUserInfo, UserRole } from '@casual-simulation/aux-common';
|
|
7
8
|
import type { PrivoClientInterface, PrivoFeatureStatus, PrivoPermission, ResendConsentRequestFailure } from './PrivoClient';
|
|
8
9
|
import type { PrivoConfiguration } from './PrivoConfiguration';
|
|
9
10
|
import type { ZodIssue } from 'zod';
|
|
10
11
|
import type { PublicKeyCredentialCreationOptionsJSON, RegistrationResponseJSON, PublicKeyCredentialRequestOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/types';
|
|
12
|
+
import type { StripeAccountStatus, StripeRequirementsStatus } from './StripeInterface';
|
|
13
|
+
import type { RecordsStore } from './RecordsStore';
|
|
11
14
|
/**
|
|
12
15
|
* The number of miliseconds that a login request should be valid for before expiration.
|
|
13
16
|
*/
|
|
@@ -91,6 +94,7 @@ export interface RelyingParty {
|
|
|
91
94
|
*/
|
|
92
95
|
export declare class AuthController {
|
|
93
96
|
private _store;
|
|
97
|
+
private _records;
|
|
94
98
|
private _messenger;
|
|
95
99
|
private _config;
|
|
96
100
|
private _privoClient;
|
|
@@ -98,7 +102,7 @@ export declare class AuthController {
|
|
|
98
102
|
private _privoEnabled;
|
|
99
103
|
get relyingParties(): RelyingParty[];
|
|
100
104
|
set relyingParties(value: RelyingParty[]);
|
|
101
|
-
constructor(authStore: AuthStore, messenger: AuthMessenger, configStore: ConfigurationStore, privoClient?: PrivoClientInterface, relyingParties?: RelyingParty[]);
|
|
105
|
+
constructor(authStore: AuthStore, messenger: AuthMessenger, configStore: ConfigurationStore, recordsStore: RecordsStore, privoClient?: PrivoClientInterface, relyingParties?: RelyingParty[]);
|
|
102
106
|
/**
|
|
103
107
|
* Gets whether Privo-features are enabled.
|
|
104
108
|
*/
|
|
@@ -155,12 +159,33 @@ export declare class AuthController {
|
|
|
155
159
|
* @param request The request.
|
|
156
160
|
*/
|
|
157
161
|
getUserInfo(request: GetUserInfoRequest): Promise<GetUserInfoResult>;
|
|
162
|
+
/**
|
|
163
|
+
* Gets the user info for the given auth user.
|
|
164
|
+
*
|
|
165
|
+
* Not for public use.
|
|
166
|
+
* @param user The user to get the info for.
|
|
167
|
+
* @returns
|
|
168
|
+
*/
|
|
169
|
+
getPrivateInfoForUser(user: AuthUser): Promise<GetUserInfoSuccess>;
|
|
170
|
+
private _getUserPrivoInfo;
|
|
158
171
|
/**
|
|
159
172
|
* Gets the public information for a specific user.
|
|
160
173
|
* @param userId The ID of the user whose information is being requested.
|
|
161
174
|
*/
|
|
162
175
|
getPublicUserInfo(userId: string): Promise<GetPublicUserInfoResult>;
|
|
163
176
|
private _getSubscriptionInfo;
|
|
177
|
+
/**
|
|
178
|
+
* Gets the subscription information for a user.
|
|
179
|
+
*
|
|
180
|
+
* Not for public use.
|
|
181
|
+
* @param user The user to get the subscription information for.
|
|
182
|
+
* @returns
|
|
183
|
+
*/
|
|
184
|
+
getUserSubscriptionInfo(user: AuthUser): Promise<{
|
|
185
|
+
hasActiveSubscription: boolean;
|
|
186
|
+
subscriptionId: string;
|
|
187
|
+
subscriptionTier: string;
|
|
188
|
+
}>;
|
|
164
189
|
/**
|
|
165
190
|
* Attempts to update a user's metadata.
|
|
166
191
|
* @param request The request for the operation.
|
|
@@ -440,6 +465,22 @@ export interface LoginRequest {
|
|
|
440
465
|
* The IP address that the login is from.
|
|
441
466
|
*/
|
|
442
467
|
ipAddress: string;
|
|
468
|
+
/**
|
|
469
|
+
* The ID of the studio that the login is for.
|
|
470
|
+
*
|
|
471
|
+
* If null, then the user is logging into CasualOS proper.
|
|
472
|
+
*/
|
|
473
|
+
loginStudioId?: string | null;
|
|
474
|
+
/**
|
|
475
|
+
* The ID of the comID that the login is for.
|
|
476
|
+
*/
|
|
477
|
+
comId?: string | null;
|
|
478
|
+
/**
|
|
479
|
+
* The custom domain (i.e. hostname) that the login is for.
|
|
480
|
+
*
|
|
481
|
+
* If specified, then the hostname will be used to determine the studio/comID that the login is for.
|
|
482
|
+
*/
|
|
483
|
+
customDomain?: string | null;
|
|
443
484
|
}
|
|
444
485
|
export type LoginRequestResult = LoginRequestSuccess | LoginRequestFailure;
|
|
445
486
|
export interface LoginRequestSuccess {
|
|
@@ -475,7 +516,7 @@ export interface LoginRequestFailure {
|
|
|
475
516
|
/**
|
|
476
517
|
* The error code for the failure.
|
|
477
518
|
*/
|
|
478
|
-
errorCode: 'unacceptable_address' | 'unacceptable_address_type' | 'unacceptable_ip_address' | 'address_type_not_supported' | 'user_is_banned' | ServerError;
|
|
519
|
+
errorCode: 'unacceptable_address' | 'unacceptable_address_type' | 'unacceptable_ip_address' | 'unacceptable_request' | 'address_type_not_supported' | 'user_is_banned' | 'not_found' | ServerError;
|
|
479
520
|
/**
|
|
480
521
|
* The error message for the failure.
|
|
481
522
|
*/
|
|
@@ -726,17 +767,20 @@ export interface ReplaceSessionFailure {
|
|
|
726
767
|
*/
|
|
727
768
|
export interface GetUserInfoRequest {
|
|
728
769
|
/**
|
|
729
|
-
* The
|
|
770
|
+
* The ID of the currently logged in user.
|
|
730
771
|
*/
|
|
731
|
-
|
|
772
|
+
userId: string;
|
|
732
773
|
/**
|
|
733
|
-
* The
|
|
774
|
+
* The role of the currently logged in user.
|
|
734
775
|
*/
|
|
735
|
-
|
|
776
|
+
userRole?: UserRole;
|
|
777
|
+
/**
|
|
778
|
+
* The ID of the user that should be retrieved.
|
|
779
|
+
* If omitted, then the logged in user info will be retrieved.
|
|
780
|
+
*/
|
|
781
|
+
requestedUserId?: string;
|
|
736
782
|
}
|
|
737
|
-
export
|
|
738
|
-
export interface GetUserInfoSuccess {
|
|
739
|
-
success: true;
|
|
783
|
+
export interface UserInfo {
|
|
740
784
|
/**
|
|
741
785
|
* The ID of the user that was retrieved.
|
|
742
786
|
*/
|
|
@@ -781,10 +825,34 @@ export interface GetUserInfoSuccess {
|
|
|
781
825
|
* The role that the user has in the system.
|
|
782
826
|
*/
|
|
783
827
|
role: UserRole;
|
|
828
|
+
/**
|
|
829
|
+
* The contracting features that the user has access to.
|
|
830
|
+
*/
|
|
831
|
+
contractFeatures?: ContractFeaturesConfiguration;
|
|
832
|
+
/**
|
|
833
|
+
* The rate at which the user is requesting payment (null if not yet specified)
|
|
834
|
+
*/
|
|
835
|
+
requestedRate: number | null;
|
|
836
|
+
/**
|
|
837
|
+
* The user's connected stripe account ID.
|
|
838
|
+
*/
|
|
839
|
+
stripeAccountId: string | null;
|
|
840
|
+
/**
|
|
841
|
+
* The user's connected stripe account requirements status.
|
|
842
|
+
*/
|
|
843
|
+
stripeAccountRequirementsStatus: StripeRequirementsStatus | null;
|
|
844
|
+
/**
|
|
845
|
+
* The user's connected stripe account status.
|
|
846
|
+
*/
|
|
847
|
+
stripeAccountStatus: StripeAccountStatus | null;
|
|
848
|
+
}
|
|
849
|
+
export type GetUserInfoResult = GetUserInfoSuccess | GetUserInfoFailure;
|
|
850
|
+
export interface GetUserInfoSuccess extends UserInfo {
|
|
851
|
+
success: true;
|
|
784
852
|
}
|
|
785
853
|
export interface GetUserInfoFailure {
|
|
786
854
|
success: false;
|
|
787
|
-
errorCode: '
|
|
855
|
+
errorCode: 'user_not_found' | NotAuthorizedError | ServerError;
|
|
788
856
|
errorMessage: string;
|
|
789
857
|
}
|
|
790
858
|
export type GetPublicUserInfoResult = GetPublicUserInfoSuccess | GetPublicUserInfoFailure;
|