@casual-simulation/aux-records 3.4.6-alpha.14668890889 → 3.5.0-alpha.15117651144
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/AIController.js +835 -890
- package/AIController.js.map +1 -1
- package/AIHumeInterface.js +43 -54
- package/AIHumeInterface.js.map +1 -1
- package/AIOpenAIRealtimeInterface.js +60 -71
- package/AIOpenAIRealtimeInterface.js.map +1 -1
- package/AnthropicAIChatInterface.js +96 -142
- package/AnthropicAIChatInterface.js.map +1 -1
- package/AuthController.d.ts +3 -2
- package/AuthController.js +1907 -1933
- package/AuthController.js.map +1 -1
- package/AuthStore.d.ts +1 -10
- package/BlockadeLabsGenerateSkyboxInterface.js +57 -72
- package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
- package/CachingConfigStore.js +30 -45
- package/CachingConfigStore.js.map +1 -1
- package/CachingPolicyStore.d.ts +8 -2
- package/CachingPolicyStore.js +108 -135
- package/CachingPolicyStore.js.map +1 -1
- package/ComIdConfig.d.ts +18 -18
- package/ComIdConfig.js.map +1 -1
- package/ConsoleAuthMessenger.js +7 -20
- package/ConsoleAuthMessenger.js.map +1 -1
- package/DataRecordsController.d.ts +2 -2
- package/DataRecordsController.js +369 -377
- package/DataRecordsController.js.map +1 -1
- package/DataRecordsStore.d.ts +1 -1
- package/DataRecordsStore.js +1 -1
- package/DataRecordsStore.js.map +1 -1
- package/EventRecordsController.js +226 -240
- package/EventRecordsController.js.map +1 -1
- package/FileRecordsController.d.ts +13 -2
- package/FileRecordsController.js +458 -450
- package/FileRecordsController.js.map +1 -1
- package/GoogleAIChatInterface.js +133 -179
- package/GoogleAIChatInterface.js.map +1 -1
- package/LivekitController.js +43 -54
- package/LivekitController.js.map +1 -1
- package/LoomController.js +64 -75
- package/LoomController.js.map +1 -1
- package/MemoryAuthMessenger.js +10 -23
- package/MemoryAuthMessenger.js.map +1 -1
- package/MemoryCache.js +18 -35
- package/MemoryCache.js.map +1 -1
- package/MemoryFileRecordsLookup.js +105 -125
- package/MemoryFileRecordsLookup.js.map +1 -1
- package/MemoryModerationJobProvider.js +17 -30
- package/MemoryModerationJobProvider.js.map +1 -1
- package/MemoryRateLimiter.js +12 -27
- package/MemoryRateLimiter.js.map +1 -1
- package/MemoryStore.d.ts +18 -6
- package/MemoryStore.js +1879 -1997
- package/MemoryStore.js.map +1 -1
- package/MetricsStore.d.ts +2 -2
- package/ModerationController.js +186 -200
- package/ModerationController.js.map +1 -1
- package/OpenAIChatInterface.js +105 -135
- package/OpenAIChatInterface.js.map +1 -1
- package/OpenAIImageInterface.js +57 -51
- package/OpenAIImageInterface.js.map +1 -1
- package/PolicyController.d.ts +150 -10
- package/PolicyController.js +1546 -1299
- package/PolicyController.js.map +1 -1
- package/PolicyStore.d.ts +110 -2
- package/PolicyStore.js +36 -1
- package/PolicyStore.js.map +1 -1
- package/PrivoClient.js +398 -435
- package/PrivoClient.js.map +1 -1
- package/RateLimitController.js +25 -36
- package/RateLimitController.js.map +1 -1
- package/RecordsClient.js +51 -74
- package/RecordsClient.js.map +1 -1
- package/RecordsController.d.ts +2 -42
- package/RecordsController.js +1026 -1182
- package/RecordsController.js.map +1 -1
- package/RecordsServer.d.ts +196 -27
- package/RecordsServer.js +1701 -1343
- package/RecordsServer.js.map +1 -1
- package/RecordsStore.d.ts +1 -10
- package/RecordsStore.js.map +1 -1
- package/ServerConfig.d.ts +339 -195
- package/ServerConfig.js +13 -0
- package/ServerConfig.js.map +1 -1
- package/SloydInterface.js +62 -75
- package/SloydInterface.js.map +1 -1
- package/StabilityAIImageInterface.js +150 -167
- package/StabilityAIImageInterface.js.map +1 -1
- package/SubscriptionConfigBuilder.d.ts +6 -1
- package/SubscriptionConfigBuilder.js +22 -0
- package/SubscriptionConfigBuilder.js.map +1 -1
- package/SubscriptionConfiguration.d.ts +266 -169
- package/SubscriptionConfiguration.js +101 -79
- package/SubscriptionConfiguration.js.map +1 -1
- package/SubscriptionController.d.ts +2 -1
- package/SubscriptionController.js +643 -650
- package/SubscriptionController.js.map +1 -1
- package/SystemNotificationMessenger.d.ts +21 -4
- package/SystemNotificationMessenger.js +36 -30
- package/SystemNotificationMessenger.js.map +1 -1
- package/TestUtils.d.ts +9 -1
- package/TestUtils.js +105 -129
- package/TestUtils.js.map +1 -1
- package/Utils.d.ts +2 -16
- package/Utils.js +21 -22
- package/Utils.js.map +1 -1
- package/crud/CrudHelpers.js +17 -26
- package/crud/CrudHelpers.js.map +1 -1
- package/crud/CrudRecordsController.d.ts +1 -1
- package/crud/CrudRecordsController.js +259 -267
- package/crud/CrudRecordsController.js.map +1 -1
- package/crud/CrudRecordsControllerTests.js +174 -185
- package/crud/CrudRecordsControllerTests.js.map +1 -1
- package/crud/CrudRecordsStore.d.ts +7 -3
- package/crud/MemoryCrudRecordsStore.d.ts +4 -4
- package/crud/MemoryCrudRecordsStore.js +98 -118
- package/crud/MemoryCrudRecordsStore.js.map +1 -1
- package/crud/sub/MemorySubCrudRecordsStore.d.ts +24 -0
- package/crud/sub/MemorySubCrudRecordsStore.js +146 -0
- package/crud/sub/MemorySubCrudRecordsStore.js.map +1 -0
- package/crud/sub/SubCrudRecordsController.d.ts +182 -0
- package/crud/sub/SubCrudRecordsController.js +360 -0
- package/crud/sub/SubCrudRecordsController.js.map +1 -0
- package/crud/sub/SubCrudRecordsControllerTests.d.ts +39 -0
- package/crud/sub/SubCrudRecordsControllerTests.js +821 -0
- package/crud/sub/SubCrudRecordsControllerTests.js.map +1 -0
- package/crud/sub/SubCrudRecordsStore.d.ts +95 -0
- package/{forms/index.js → crud/sub/SubCrudRecordsStore.js} +2 -2
- package/crud/sub/SubCrudRecordsStore.js.map +1 -0
- package/crud/sub/index.d.ts +3 -0
- package/crud/sub/index.js +20 -0
- package/{forms → crud/sub}/index.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications/MemoryNotificationRecordsStore.js +189 -198
- package/notifications/MemoryNotificationRecordsStore.js.map +1 -1
- package/notifications/NotificationRecordsController.js +438 -460
- package/notifications/NotificationRecordsController.js.map +1 -1
- package/notifications/NotificationRecordsStore.d.ts +2 -1
- package/notifications/WebPushInterface.d.ts +0 -1
- package/notifications/WebPushInterface.js +0 -1
- package/notifications/WebPushInterface.js.map +1 -1
- package/package.json +6 -6
- package/packages/MemoryPackageRecordsStore.d.ts +10 -0
- package/packages/MemoryPackageRecordsStore.js +38 -0
- package/packages/MemoryPackageRecordsStore.js.map +1 -0
- package/packages/PackageRecordsController.d.ts +26 -0
- package/packages/PackageRecordsController.js +49 -0
- package/packages/PackageRecordsController.js.map +1 -0
- package/packages/PackageRecordsStore.d.ts +32 -0
- package/packages/PackageRecordsStore.js +19 -0
- package/packages/PackageRecordsStore.js.map +1 -0
- package/packages/index.d.ts +4 -0
- package/packages/index.js +21 -0
- package/packages/index.js.map +1 -0
- package/packages/version/MemoryPackageVersionRecordsStore.d.ts +21 -0
- package/packages/version/MemoryPackageVersionRecordsStore.js +177 -0
- package/packages/version/MemoryPackageVersionRecordsStore.js.map +1 -0
- package/packages/version/PackageVersionRecordsController.d.ts +144 -0
- package/packages/version/PackageVersionRecordsController.js +656 -0
- package/packages/version/PackageVersionRecordsController.js.map +1 -0
- package/packages/version/PackageVersionRecordsStore.d.ts +342 -0
- package/packages/version/PackageVersionRecordsStore.js +126 -0
- package/packages/version/PackageVersionRecordsStore.js.map +1 -0
- package/packages/version/index.d.ts +4 -0
- package/packages/version/index.js +21 -0
- package/packages/version/index.js.map +1 -0
- package/tracing/TracingDecorators.js +31 -40
- package/tracing/TracingDecorators.js.map +1 -1
- package/webhooks/MemoryWebhookRecordsStore.js +56 -72
- package/webhooks/MemoryWebhookRecordsStore.js.map +1 -1
- package/webhooks/WebhookEnvironment.d.ts +3 -3
- package/webhooks/WebhookRecordsController.d.ts +2 -1
- package/webhooks/WebhookRecordsController.js +389 -382
- package/webhooks/WebhookRecordsController.js.map +1 -1
- package/webhooks/WebhookRecordsStore.d.ts +2 -1
- package/websockets/InstRecordsStore.d.ts +50 -0
- package/websockets/InstRecordsStore.js +17 -0
- package/websockets/InstRecordsStore.js.map +1 -1
- package/websockets/MemoryTempInstRecordsStore.d.ts +5 -0
- package/websockets/MemoryTempInstRecordsStore.js +168 -179
- package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
- package/websockets/MemoryWebsocketConnectionStore.js +98 -135
- package/websockets/MemoryWebsocketConnectionStore.js.map +1 -1
- package/websockets/MemoryWebsocketMessenger.js +29 -48
- package/websockets/MemoryWebsocketMessenger.js.map +1 -1
- package/websockets/SplitInstRecordsStore.d.ts +4 -1
- package/websockets/SplitInstRecordsStore.js +167 -185
- package/websockets/SplitInstRecordsStore.js.map +1 -1
- package/websockets/TemporaryInstRecordsStore.d.ts +19 -1
- package/websockets/TemporaryInstRecordsStore.js +17 -0
- package/websockets/TemporaryInstRecordsStore.js.map +1 -1
- package/websockets/WebsocketController.d.ts +147 -3
- package/websockets/WebsocketController.js +1735 -1391
- package/websockets/WebsocketController.js.map +1 -1
- package/websockets/index.d.ts +0 -1
- package/websockets/index.js +0 -1
- package/websockets/index.js.map +1 -1
- package/AAGUID.d.ts +0 -11
- package/AAGUID.js +0 -116
- package/AAGUID.js.map +0 -1
- package/AuthUtils.d.ts +0 -162
- package/AuthUtils.js +0 -327
- package/AuthUtils.js.map +0 -1
- package/forms/FormError.d.ts +0 -43
- package/forms/FormError.js +0 -56
- package/forms/FormError.js.map +0 -1
- package/forms/index.d.ts +0 -2
- package/websockets/Utils.d.ts +0 -33
- package/websockets/Utils.js +0 -82
- package/websockets/Utils.js.map +0 -1
package/CachingPolicyStore.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ActionKinds, PermissionOptions, PrivacyFeatures, ResourceKinds, SubjectType } from '@casual-simulation/aux-common';
|
|
2
|
-
import type { AssignPermissionToSubjectAndMarkerResult, AssignPermissionToSubjectAndResourceResult, AssignedRole, DeletePermissionAssignmentResult, GetMarkerPermissionResult, GetResourcePermissionResult, ListPermissionsInRecordResult, ListedRoleAssignments, MarkerPermissionAssignment, PolicyStore, ResourcePermissionAssignment, UpdateUserRolesResult, UserPrivacyFeatures } from './PolicyStore';
|
|
1
|
+
import type { ActionKinds, Entitlement, EntitlementFeature, GrantedEntitlementScope, PermissionOptions, PrivacyFeatures, ResourceKinds, SubjectType } from '@casual-simulation/aux-common';
|
|
2
|
+
import type { AssignPermissionToSubjectAndMarkerResult, AssignPermissionToSubjectAndResourceResult, AssignedRole, DeletePermissionAssignmentResult, GetMarkerPermissionResult, GetResourcePermissionResult, GrantedPackageEntitlement, ListPermissionsInRecordResult, ListedRoleAssignments, MarkerPermissionAssignment, PolicyStore, ResourcePermissionAssignment, UpdateUserRolesResult, UserPrivacyFeatures } from './PolicyStore';
|
|
3
3
|
import type { Cache } from './Cache';
|
|
4
4
|
/**
|
|
5
5
|
* Defines a policy store that uses a cache.
|
|
@@ -15,6 +15,12 @@ export declare class CachingPolicyStore implements PolicyStore {
|
|
|
15
15
|
* @param cacheSeconds The number of seconds that cache entries should be stored.
|
|
16
16
|
*/
|
|
17
17
|
constructor(store: PolicyStore, cache: Cache, cacheSeconds: number);
|
|
18
|
+
listGrantedEntitlementsByFeatureAndUserId(packageIds: string[], feature: Entitlement['feature'], userId: string, recordName: string, nowMs: number): Promise<GrantedPackageEntitlement[]>;
|
|
19
|
+
saveGrantedPackageEntitlement(grantedEntitlement: GrantedPackageEntitlement): Promise<void>;
|
|
20
|
+
findGrantedPackageEntitlementByUserIdPackageIdFeatureAndScope(userId: string, packageId: string, feature: EntitlementFeature, scope: GrantedEntitlementScope, recordName: string): Promise<GrantedPackageEntitlement | null>;
|
|
21
|
+
findGrantedPackageEntitlementById(id: string): Promise<GrantedPackageEntitlement | null>;
|
|
22
|
+
listGrantedEntitlementsForUser(userId: string, nowMs: number): Promise<GrantedPackageEntitlement[]>;
|
|
23
|
+
listGrantedEntitlementsForUserAndPackage(userId: string, packageId: string, nowMs: number): Promise<GrantedPackageEntitlement[]>;
|
|
18
24
|
getUserPrivacyFeatures(userId: string): Promise<UserPrivacyFeatures>;
|
|
19
25
|
getRecordOwnerPrivacyFeatures(recordName: string): Promise<PrivacyFeatures>;
|
|
20
26
|
getPermissionForSubjectAndResource(subjectType: SubjectType, subjectId: string, recordName: string, resourceKind: ResourceKinds, resourceId: string, action: ActionKinds, currentTimeMs: number): Promise<GetResourcePermissionResult>;
|
package/CachingPolicyStore.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { getExpireTime } from './PolicyStore';
|
|
11
2
|
/**
|
|
12
3
|
* Defines a policy store that uses a cache.
|
|
@@ -23,104 +14,90 @@ export class CachingPolicyStore {
|
|
|
23
14
|
this._cache = cache;
|
|
24
15
|
this._cacheSeconds = cacheSeconds;
|
|
25
16
|
}
|
|
17
|
+
listGrantedEntitlementsByFeatureAndUserId(packageIds, feature, userId, recordName, nowMs) {
|
|
18
|
+
return this._store.listGrantedEntitlementsByFeatureAndUserId(packageIds, feature, userId, recordName, nowMs);
|
|
19
|
+
}
|
|
20
|
+
saveGrantedPackageEntitlement(grantedEntitlement) {
|
|
21
|
+
return this._store.saveGrantedPackageEntitlement(grantedEntitlement);
|
|
22
|
+
}
|
|
23
|
+
findGrantedPackageEntitlementByUserIdPackageIdFeatureAndScope(userId, packageId, feature, scope, recordName) {
|
|
24
|
+
return this._store.findGrantedPackageEntitlementByUserIdPackageIdFeatureAndScope(userId, packageId, feature, scope, recordName);
|
|
25
|
+
}
|
|
26
|
+
findGrantedPackageEntitlementById(id) {
|
|
27
|
+
return this._store.findGrantedPackageEntitlementById(id);
|
|
28
|
+
}
|
|
29
|
+
listGrantedEntitlementsForUser(userId, nowMs) {
|
|
30
|
+
return this._store.listGrantedEntitlementsForUser(userId, nowMs);
|
|
31
|
+
}
|
|
32
|
+
listGrantedEntitlementsForUserAndPackage(userId, packageId, nowMs) {
|
|
33
|
+
return this._store.listGrantedEntitlementsForUserAndPackage(userId, packageId, nowMs);
|
|
34
|
+
}
|
|
26
35
|
// TODO: Add caching for these methods when needed.
|
|
27
|
-
getUserPrivacyFeatures(userId) {
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
getResourcePermissionAssignmentById(id) {
|
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
return yield this._store.getResourcePermissionAssignmentById(id);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
listRolesForUser(recordName, userId) {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
const cacheResult = yield this._cache.retrieve(`userRoles/${recordName}/${userId}`);
|
|
100
|
-
if (cacheResult) {
|
|
101
|
-
const now = Date.now();
|
|
102
|
-
return cacheResult.filter((r) => getExpireTime(r.expireTimeMs) > now);
|
|
103
|
-
}
|
|
104
|
-
const roles = yield this._store.listRolesForUser(recordName, userId);
|
|
105
|
-
if (roles) {
|
|
106
|
-
yield this._cache.store(`userRoles/${recordName}/${userId}`, roles, this._cacheSeconds);
|
|
107
|
-
}
|
|
108
|
-
return roles;
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
listRolesForInst(recordName, inst) {
|
|
112
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
const cacheResult = yield this._cache.retrieve(`instRoles/${recordName}/${inst}`);
|
|
114
|
-
if (cacheResult) {
|
|
115
|
-
const now = Date.now();
|
|
116
|
-
return cacheResult.filter((r) => getExpireTime(r.expireTimeMs) > now);
|
|
117
|
-
}
|
|
118
|
-
const roles = yield this._store.listRolesForInst(recordName, inst);
|
|
119
|
-
if (roles) {
|
|
120
|
-
yield this._cache.store(`instRoles/${recordName}/${inst}`, roles, this._cacheSeconds);
|
|
121
|
-
}
|
|
122
|
-
return roles;
|
|
123
|
-
});
|
|
36
|
+
async getUserPrivacyFeatures(userId) {
|
|
37
|
+
return await this._store.getUserPrivacyFeatures(userId);
|
|
38
|
+
}
|
|
39
|
+
async getRecordOwnerPrivacyFeatures(recordName) {
|
|
40
|
+
return await this._store.getRecordOwnerPrivacyFeatures(recordName);
|
|
41
|
+
}
|
|
42
|
+
async getPermissionForSubjectAndResource(subjectType, subjectId, recordName, resourceKind, resourceId, action, currentTimeMs) {
|
|
43
|
+
return await this._store.getPermissionForSubjectAndResource(subjectType, subjectId, recordName, resourceKind, resourceId, action, currentTimeMs);
|
|
44
|
+
}
|
|
45
|
+
async getPermissionForSubjectAndMarkers(subjectType, subjectId, recordName, resourceKind, markers, action, currentTimeMs) {
|
|
46
|
+
return await this._store.getPermissionForSubjectAndMarkers(subjectType, subjectId, recordName, resourceKind, markers, action, currentTimeMs);
|
|
47
|
+
}
|
|
48
|
+
async assignPermissionToSubjectAndResource(recordName, subjectType, subjectId, resourceKind, resourceId, action, options, expireTimeMs) {
|
|
49
|
+
return await this._store.assignPermissionToSubjectAndResource(recordName, subjectType, subjectId, resourceKind, resourceId, action, options, expireTimeMs);
|
|
50
|
+
}
|
|
51
|
+
async assignPermissionToSubjectAndMarker(recordName, subjectType, subjectId, resourceKind, marker, action, options, expireTimeMs) {
|
|
52
|
+
return await this._store.assignPermissionToSubjectAndMarker(recordName, subjectType, subjectId, resourceKind, marker, action, options, expireTimeMs);
|
|
53
|
+
}
|
|
54
|
+
async deleteResourcePermissionAssignmentById(id) {
|
|
55
|
+
return await this._store.deleteResourcePermissionAssignmentById(id);
|
|
56
|
+
}
|
|
57
|
+
async deleteMarkerPermissionAssignmentById(id) {
|
|
58
|
+
return await this._store.deleteMarkerPermissionAssignmentById(id);
|
|
59
|
+
}
|
|
60
|
+
async listPermissionsInRecord(recordName) {
|
|
61
|
+
return await this._store.listPermissionsInRecord(recordName);
|
|
62
|
+
}
|
|
63
|
+
async listPermissionsForResource(recordName, resourceKind, resourceId) {
|
|
64
|
+
return await this._store.listPermissionsForResource(recordName, resourceKind, resourceId);
|
|
65
|
+
}
|
|
66
|
+
async listPermissionsForMarker(recordName, marker) {
|
|
67
|
+
return await this._store.listPermissionsForMarker(recordName, marker);
|
|
68
|
+
}
|
|
69
|
+
async listPermissionsForSubject(recordName, subjectType, subjectId) {
|
|
70
|
+
return await this._store.listPermissionsForSubject(recordName, subjectType, subjectId);
|
|
71
|
+
}
|
|
72
|
+
async getMarkerPermissionAssignmentById(id) {
|
|
73
|
+
return await this._store.getMarkerPermissionAssignmentById(id);
|
|
74
|
+
}
|
|
75
|
+
async getResourcePermissionAssignmentById(id) {
|
|
76
|
+
return await this._store.getResourcePermissionAssignmentById(id);
|
|
77
|
+
}
|
|
78
|
+
async listRolesForUser(recordName, userId) {
|
|
79
|
+
const cacheResult = await this._cache.retrieve(`userRoles/${recordName}/${userId}`);
|
|
80
|
+
if (cacheResult) {
|
|
81
|
+
const now = Date.now();
|
|
82
|
+
return cacheResult.filter((r) => getExpireTime(r.expireTimeMs) > now);
|
|
83
|
+
}
|
|
84
|
+
const roles = await this._store.listRolesForUser(recordName, userId);
|
|
85
|
+
if (roles) {
|
|
86
|
+
await this._cache.store(`userRoles/${recordName}/${userId}`, roles, this._cacheSeconds);
|
|
87
|
+
}
|
|
88
|
+
return roles;
|
|
89
|
+
}
|
|
90
|
+
async listRolesForInst(recordName, inst) {
|
|
91
|
+
const cacheResult = await this._cache.retrieve(`instRoles/${recordName}/${inst}`);
|
|
92
|
+
if (cacheResult) {
|
|
93
|
+
const now = Date.now();
|
|
94
|
+
return cacheResult.filter((r) => getExpireTime(r.expireTimeMs) > now);
|
|
95
|
+
}
|
|
96
|
+
const roles = await this._store.listRolesForInst(recordName, inst);
|
|
97
|
+
if (roles) {
|
|
98
|
+
await this._cache.store(`instRoles/${recordName}/${inst}`, roles, this._cacheSeconds);
|
|
99
|
+
}
|
|
100
|
+
return roles;
|
|
124
101
|
}
|
|
125
102
|
listAssignmentsForRole(recordName, role) {
|
|
126
103
|
return this._store.listAssignmentsForRole(recordName, role);
|
|
@@ -128,37 +105,33 @@ export class CachingPolicyStore {
|
|
|
128
105
|
listAssignments(recordName, startingRole) {
|
|
129
106
|
return this._store.listAssignments(recordName, startingRole);
|
|
130
107
|
}
|
|
131
|
-
assignSubjectRole(recordName, subjectId, type, role) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (result.success === false) {
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
// Update the cache.
|
|
138
|
-
if (type === 'user') {
|
|
139
|
-
yield this._cache.remove(`userRoles/${recordName}/${subjectId}`);
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
yield this._cache.remove(`instRoles/${recordName}/${subjectId}`);
|
|
143
|
-
}
|
|
108
|
+
async assignSubjectRole(recordName, subjectId, type, role) {
|
|
109
|
+
const result = await this._store.assignSubjectRole(recordName, subjectId, type, role);
|
|
110
|
+
if (result.success === false) {
|
|
144
111
|
return result;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
yield this._cache.remove(`instRoles/${recordName}/${subjectId}`);
|
|
159
|
-
}
|
|
112
|
+
}
|
|
113
|
+
// Update the cache.
|
|
114
|
+
if (type === 'user') {
|
|
115
|
+
await this._cache.remove(`userRoles/${recordName}/${subjectId}`);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
await this._cache.remove(`instRoles/${recordName}/${subjectId}`);
|
|
119
|
+
}
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
async revokeSubjectRole(recordName, subjectId, type, role) {
|
|
123
|
+
const result = await this._store.revokeSubjectRole(recordName, subjectId, type, role);
|
|
124
|
+
if (result.success === false) {
|
|
160
125
|
return result;
|
|
161
|
-
}
|
|
126
|
+
}
|
|
127
|
+
// Update the cache.
|
|
128
|
+
if (type === 'user') {
|
|
129
|
+
await this._cache.remove(`userRoles/${recordName}/${subjectId}`);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
await this._cache.remove(`instRoles/${recordName}/${subjectId}`);
|
|
133
|
+
}
|
|
134
|
+
return result;
|
|
162
135
|
}
|
|
163
136
|
}
|
|
164
137
|
//# sourceMappingURL=CachingPolicyStore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachingPolicyStore.js","sourceRoot":"","sources":["CachingPolicyStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CachingPolicyStore.js","sourceRoot":"","sources":["CachingPolicyStore.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAK3B;;;;;OAKG;IACH,YAAY,KAAkB,EAAE,KAAY,EAAE,YAAoB;QAC9D,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACtC,CAAC;IAED,yCAAyC,CACrC,UAAoB,EACpB,OAA+B,EAC/B,MAAc,EACd,UAAkB,EAClB,KAAa;QAEb,OAAO,IAAI,CAAC,MAAM,CAAC,yCAAyC,CACxD,UAAU,EACV,OAAO,EACP,MAAM,EACN,UAAU,EACV,KAAK,CACR,CAAC;IACN,CAAC;IAED,6BAA6B,CACzB,kBAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,6BAA6B,CAAC,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,6DAA6D,CACzD,MAAc,EACd,SAAiB,EACjB,OAA2B,EAC3B,KAA8B,EAC9B,UAAkB;QAElB,OAAO,IAAI,CAAC,MAAM,CAAC,6DAA6D,CAC5E,MAAM,EACN,SAAS,EACT,OAAO,EACP,KAAK,EACL,UAAU,CACb,CAAC;IACN,CAAC;IACD,iCAAiC,CAC7B,EAAU;QAEV,OAAO,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,8BAA8B,CAC1B,MAAc,EACd,KAAa;QAEb,OAAO,IAAI,CAAC,MAAM,CAA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,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,iBAAiB,CACnB,UAAkB,EAClB,SAAiB,EACjB,IAAqB,EACrB,IAAY;QAEZ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAC9C,UAAU,EACV,SAAS,EACT,IAAI,EACJ,IAAI,CACP,CAAC;QAEF,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;YAC3B,OAAO,MAAM,CAAC;QAClB,CAAC;QAED,oBAAoB;QACpB,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAClB,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC;QACrE,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
|
package/ComIdConfig.d.ts
CHANGED
|
@@ -22,17 +22,17 @@ export declare const COM_ID_PLAYER_CONFIG: z.ZodObject<{
|
|
|
22
22
|
arcGisApiKey?: string;
|
|
23
23
|
jitsiAppName?: string;
|
|
24
24
|
what3WordsApiKey?: string;
|
|
25
|
-
allowedBiosOptions?: ("enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
26
|
-
defaultBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
27
|
-
automaticBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
25
|
+
allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
|
|
26
|
+
defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
27
|
+
automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
28
28
|
}, {
|
|
29
29
|
ab1BootstrapURL?: string;
|
|
30
30
|
arcGisApiKey?: string;
|
|
31
31
|
jitsiAppName?: string;
|
|
32
32
|
what3WordsApiKey?: string;
|
|
33
|
-
allowedBiosOptions?: ("enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
34
|
-
defaultBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
35
|
-
automaticBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
33
|
+
allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
|
|
34
|
+
defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
35
|
+
automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
36
36
|
}>;
|
|
37
37
|
export type ComIdPlayerConfig = z.infer<typeof COM_ID_PLAYER_CONFIG>;
|
|
38
38
|
export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
@@ -49,17 +49,17 @@ export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
49
49
|
arcGisApiKey?: string;
|
|
50
50
|
jitsiAppName?: string;
|
|
51
51
|
what3WordsApiKey?: string;
|
|
52
|
-
allowedBiosOptions?: ("enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
53
|
-
defaultBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
54
|
-
automaticBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
52
|
+
allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
|
|
53
|
+
defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
54
|
+
automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
55
55
|
}, {
|
|
56
56
|
ab1BootstrapURL?: string;
|
|
57
57
|
arcGisApiKey?: string;
|
|
58
58
|
jitsiAppName?: string;
|
|
59
59
|
what3WordsApiKey?: string;
|
|
60
|
-
allowedBiosOptions?: ("enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
61
|
-
defaultBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
62
|
-
automaticBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
60
|
+
allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
|
|
61
|
+
defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
62
|
+
automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
63
63
|
}>;
|
|
64
64
|
name: z.ZodString;
|
|
65
65
|
logoUrl: z.ZodNullable<z.ZodString>;
|
|
@@ -69,9 +69,9 @@ export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
69
69
|
arcGisApiKey?: string;
|
|
70
70
|
jitsiAppName?: string;
|
|
71
71
|
what3WordsApiKey?: string;
|
|
72
|
-
allowedBiosOptions?: ("enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
73
|
-
defaultBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
74
|
-
automaticBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
72
|
+
allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
|
|
73
|
+
defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
74
|
+
automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
75
75
|
};
|
|
76
76
|
name?: string;
|
|
77
77
|
logoUrl?: string;
|
|
@@ -81,9 +81,9 @@ export declare const COM_ID_WEB_CONFIG_SCHEMA: z.ZodObject<{
|
|
|
81
81
|
arcGisApiKey?: string;
|
|
82
82
|
jitsiAppName?: string;
|
|
83
83
|
what3WordsApiKey?: string;
|
|
84
|
-
allowedBiosOptions?: ("enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
85
|
-
defaultBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
86
|
-
automaticBiosOption?: "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "
|
|
84
|
+
allowedBiosOptions?: ("studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst")[];
|
|
85
|
+
defaultBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
86
|
+
automaticBiosOption?: "studio" | "enter join code" | "join inst" | "static inst" | "local inst" | "local" | "public inst" | "private inst" | "free inst" | "free" | "studio inst" | "sign in" | "sign up" | "sign out" | "delete inst";
|
|
87
87
|
};
|
|
88
88
|
name?: string;
|
|
89
89
|
logoUrl?: string;
|
package/ComIdConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComIdConfig.js","sourceRoot":"","sources":["ComIdConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ComIdConfig.js","sourceRoot":"","sources":["ComIdConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC;IAC3C,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnB,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;CAC5B,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,qBAAqB,EAAE,8BAA8B,CAAC,QAAQ,CAC1D,iDAAiD,CACpD;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,IAAI,CAAC;IACvD,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,IAAI;IACxB,YAAY,EAAE,IAAI;IAClB,mBAAmB,EAAE,IAAI;IACzB,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,IAAI;CACzB,CAAC;KACG,QAAQ,CACL,6FAA6F,CAChG;KACA,OAAO,EAAE,CAAC;AAIf,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,oBAAoB;IAClC,IAAI,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,CAAC,oDAAoD,CAAC;IACnE,OAAO,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CACL,+FAA+F,CAClG;SACA,QAAQ,EAAE;CAClB,CAAC,CAAC"}
|
package/ConsoleAuthMessenger.js
CHANGED
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
/**
|
|
11
2
|
* Defines a class that defines a auth messenger which sends login request codes via console.log().
|
|
12
3
|
*/
|
|
13
4
|
export class ConsoleAuthMessenger {
|
|
14
|
-
supportsAddressType(addressType) {
|
|
15
|
-
return
|
|
16
|
-
return true;
|
|
17
|
-
});
|
|
5
|
+
async supportsAddressType(addressType) {
|
|
6
|
+
return true;
|
|
18
7
|
}
|
|
19
|
-
sendCode(address, addressType, code) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
});
|
|
8
|
+
async sendCode(address, addressType, code) {
|
|
9
|
+
console.log(`[ConsoleAuthMessenger] Code is (${addressType} -> ${address}): ${code}`);
|
|
10
|
+
return {
|
|
11
|
+
success: true,
|
|
12
|
+
};
|
|
26
13
|
}
|
|
27
14
|
}
|
|
28
15
|
//# sourceMappingURL=ConsoleAuthMessenger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleAuthMessenger.js","sourceRoot":"","sources":["ConsoleAuthMessenger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConsoleAuthMessenger.js","sourceRoot":"","sources":["ConsoleAuthMessenger.ts"],"names":[],"mappings":"AAoBA;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAC7B,KAAK,CAAC,mBAAmB,CAAC,WAAwB;QAC9C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,QAAQ,CACV,OAAe,EACf,WAAwB,EACxB,IAAY;QAEZ,OAAO,CAAC,GAAG,CACP,mCAAmC,WAAW,OAAO,OAAO,MAAM,IAAI,EAAE,CAC3E,CAAC;QACF,OAAO;YACH,OAAO,EAAE,IAAI;SAChB,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -45,7 +45,7 @@ export declare class DataRecordsController {
|
|
|
45
45
|
* @param userId The ID of the user who is retrieving the data. If null, then it is assumed that the user is not logged in.
|
|
46
46
|
* @param instances The list of instances that are loaded.
|
|
47
47
|
*/
|
|
48
|
-
getData(recordName: string, address: string, userId?: string, instances?: string[]): Promise<GetDataResult>;
|
|
48
|
+
getData(recordName: string, address: string, userId?: string | null, instances?: string[]): Promise<GetDataResult>;
|
|
49
49
|
/**
|
|
50
50
|
* Lists some data from the given record, starting after the given address.
|
|
51
51
|
* @param recordName The name (or record key) of the record.
|
|
@@ -67,7 +67,7 @@ export declare class DataRecordsController {
|
|
|
67
67
|
* @param subjectId The ID of the user that this request came from.
|
|
68
68
|
* @param instances The instances that are loaded.
|
|
69
69
|
*/
|
|
70
|
-
eraseData(recordKeyOrName: string, address: string, subjectId: string, instances?: string[]): Promise<EraseDataResult>;
|
|
70
|
+
eraseData(recordKeyOrName: string, address: string, subjectId: string | null, instances?: string[]): Promise<EraseDataResult>;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* The possible results of a record data request.
|