@casual-simulation/aux-records 3.4.6-alpha.14601027727 → 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.
Files changed (211) hide show
  1. package/AIController.js +835 -890
  2. package/AIController.js.map +1 -1
  3. package/AIHumeInterface.js +43 -54
  4. package/AIHumeInterface.js.map +1 -1
  5. package/AIOpenAIRealtimeInterface.js +60 -71
  6. package/AIOpenAIRealtimeInterface.js.map +1 -1
  7. package/AnthropicAIChatInterface.js +96 -142
  8. package/AnthropicAIChatInterface.js.map +1 -1
  9. package/AuthController.d.ts +3 -2
  10. package/AuthController.js +1907 -1933
  11. package/AuthController.js.map +1 -1
  12. package/AuthStore.d.ts +1 -10
  13. package/BlockadeLabsGenerateSkyboxInterface.js +57 -72
  14. package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
  15. package/CachingConfigStore.js +30 -45
  16. package/CachingConfigStore.js.map +1 -1
  17. package/CachingPolicyStore.d.ts +8 -2
  18. package/CachingPolicyStore.js +108 -135
  19. package/CachingPolicyStore.js.map +1 -1
  20. package/ComIdConfig.d.ts +18 -18
  21. package/ComIdConfig.js.map +1 -1
  22. package/ConsoleAuthMessenger.js +7 -20
  23. package/ConsoleAuthMessenger.js.map +1 -1
  24. package/DataRecordsController.d.ts +2 -2
  25. package/DataRecordsController.js +369 -377
  26. package/DataRecordsController.js.map +1 -1
  27. package/DataRecordsStore.d.ts +1 -1
  28. package/DataRecordsStore.js +1 -1
  29. package/DataRecordsStore.js.map +1 -1
  30. package/EventRecordsController.js +226 -240
  31. package/EventRecordsController.js.map +1 -1
  32. package/FileRecordsController.d.ts +13 -2
  33. package/FileRecordsController.js +458 -450
  34. package/FileRecordsController.js.map +1 -1
  35. package/GoogleAIChatInterface.js +133 -179
  36. package/GoogleAIChatInterface.js.map +1 -1
  37. package/LivekitController.js +43 -54
  38. package/LivekitController.js.map +1 -1
  39. package/LoomController.js +64 -75
  40. package/LoomController.js.map +1 -1
  41. package/MemoryAuthMessenger.js +10 -23
  42. package/MemoryAuthMessenger.js.map +1 -1
  43. package/MemoryCache.js +18 -35
  44. package/MemoryCache.js.map +1 -1
  45. package/MemoryFileRecordsLookup.js +105 -125
  46. package/MemoryFileRecordsLookup.js.map +1 -1
  47. package/MemoryModerationJobProvider.js +17 -30
  48. package/MemoryModerationJobProvider.js.map +1 -1
  49. package/MemoryRateLimiter.js +12 -27
  50. package/MemoryRateLimiter.js.map +1 -1
  51. package/MemoryStore.d.ts +18 -6
  52. package/MemoryStore.js +1879 -1997
  53. package/MemoryStore.js.map +1 -1
  54. package/MetricsStore.d.ts +2 -2
  55. package/ModerationController.js +186 -200
  56. package/ModerationController.js.map +1 -1
  57. package/OpenAIChatInterface.js +105 -135
  58. package/OpenAIChatInterface.js.map +1 -1
  59. package/OpenAIImageInterface.js +57 -51
  60. package/OpenAIImageInterface.js.map +1 -1
  61. package/PolicyController.d.ts +150 -10
  62. package/PolicyController.js +1546 -1299
  63. package/PolicyController.js.map +1 -1
  64. package/PolicyStore.d.ts +110 -2
  65. package/PolicyStore.js +36 -1
  66. package/PolicyStore.js.map +1 -1
  67. package/PrivoClient.js +398 -435
  68. package/PrivoClient.js.map +1 -1
  69. package/RateLimitController.js +25 -36
  70. package/RateLimitController.js.map +1 -1
  71. package/RecordsClient.js +51 -74
  72. package/RecordsClient.js.map +1 -1
  73. package/RecordsController.d.ts +2 -42
  74. package/RecordsController.js +1026 -1182
  75. package/RecordsController.js.map +1 -1
  76. package/RecordsServer.d.ts +196 -27
  77. package/RecordsServer.js +1701 -1343
  78. package/RecordsServer.js.map +1 -1
  79. package/RecordsStore.d.ts +1 -10
  80. package/RecordsStore.js.map +1 -1
  81. package/ServerConfig.d.ts +339 -195
  82. package/ServerConfig.js +13 -0
  83. package/ServerConfig.js.map +1 -1
  84. package/SloydInterface.js +62 -75
  85. package/SloydInterface.js.map +1 -1
  86. package/StabilityAIImageInterface.js +150 -167
  87. package/StabilityAIImageInterface.js.map +1 -1
  88. package/SubscriptionConfigBuilder.d.ts +6 -1
  89. package/SubscriptionConfigBuilder.js +22 -0
  90. package/SubscriptionConfigBuilder.js.map +1 -1
  91. package/SubscriptionConfiguration.d.ts +266 -169
  92. package/SubscriptionConfiguration.js +101 -79
  93. package/SubscriptionConfiguration.js.map +1 -1
  94. package/SubscriptionController.d.ts +2 -1
  95. package/SubscriptionController.js +643 -650
  96. package/SubscriptionController.js.map +1 -1
  97. package/SystemNotificationMessenger.d.ts +21 -4
  98. package/SystemNotificationMessenger.js +36 -30
  99. package/SystemNotificationMessenger.js.map +1 -1
  100. package/TestUtils.d.ts +9 -1
  101. package/TestUtils.js +105 -129
  102. package/TestUtils.js.map +1 -1
  103. package/Utils.d.ts +2 -16
  104. package/Utils.js +21 -22
  105. package/Utils.js.map +1 -1
  106. package/crud/CrudHelpers.js +17 -26
  107. package/crud/CrudHelpers.js.map +1 -1
  108. package/crud/CrudRecordsController.d.ts +1 -1
  109. package/crud/CrudRecordsController.js +259 -267
  110. package/crud/CrudRecordsController.js.map +1 -1
  111. package/crud/CrudRecordsControllerTests.js +174 -185
  112. package/crud/CrudRecordsControllerTests.js.map +1 -1
  113. package/crud/CrudRecordsStore.d.ts +7 -3
  114. package/crud/MemoryCrudRecordsStore.d.ts +4 -4
  115. package/crud/MemoryCrudRecordsStore.js +98 -118
  116. package/crud/MemoryCrudRecordsStore.js.map +1 -1
  117. package/crud/sub/MemorySubCrudRecordsStore.d.ts +24 -0
  118. package/crud/sub/MemorySubCrudRecordsStore.js +146 -0
  119. package/crud/sub/MemorySubCrudRecordsStore.js.map +1 -0
  120. package/crud/sub/SubCrudRecordsController.d.ts +182 -0
  121. package/crud/sub/SubCrudRecordsController.js +360 -0
  122. package/crud/sub/SubCrudRecordsController.js.map +1 -0
  123. package/crud/sub/SubCrudRecordsControllerTests.d.ts +39 -0
  124. package/crud/sub/SubCrudRecordsControllerTests.js +821 -0
  125. package/crud/sub/SubCrudRecordsControllerTests.js.map +1 -0
  126. package/crud/sub/SubCrudRecordsStore.d.ts +95 -0
  127. package/{forms/index.js → crud/sub/SubCrudRecordsStore.js} +2 -2
  128. package/crud/sub/SubCrudRecordsStore.js.map +1 -0
  129. package/crud/sub/index.d.ts +3 -0
  130. package/crud/sub/index.js +20 -0
  131. package/{forms → crud/sub}/index.js.map +1 -1
  132. package/index.d.ts +1 -1
  133. package/index.js +1 -1
  134. package/index.js.map +1 -1
  135. package/notifications/MemoryNotificationRecordsStore.js +189 -198
  136. package/notifications/MemoryNotificationRecordsStore.js.map +1 -1
  137. package/notifications/NotificationRecordsController.js +438 -460
  138. package/notifications/NotificationRecordsController.js.map +1 -1
  139. package/notifications/NotificationRecordsStore.d.ts +2 -1
  140. package/notifications/WebPushInterface.d.ts +0 -1
  141. package/notifications/WebPushInterface.js +0 -1
  142. package/notifications/WebPushInterface.js.map +1 -1
  143. package/package.json +6 -6
  144. package/packages/MemoryPackageRecordsStore.d.ts +10 -0
  145. package/packages/MemoryPackageRecordsStore.js +38 -0
  146. package/packages/MemoryPackageRecordsStore.js.map +1 -0
  147. package/packages/PackageRecordsController.d.ts +26 -0
  148. package/packages/PackageRecordsController.js +49 -0
  149. package/packages/PackageRecordsController.js.map +1 -0
  150. package/packages/PackageRecordsStore.d.ts +32 -0
  151. package/packages/PackageRecordsStore.js +19 -0
  152. package/packages/PackageRecordsStore.js.map +1 -0
  153. package/packages/index.d.ts +4 -0
  154. package/packages/index.js +21 -0
  155. package/packages/index.js.map +1 -0
  156. package/packages/version/MemoryPackageVersionRecordsStore.d.ts +21 -0
  157. package/packages/version/MemoryPackageVersionRecordsStore.js +177 -0
  158. package/packages/version/MemoryPackageVersionRecordsStore.js.map +1 -0
  159. package/packages/version/PackageVersionRecordsController.d.ts +144 -0
  160. package/packages/version/PackageVersionRecordsController.js +656 -0
  161. package/packages/version/PackageVersionRecordsController.js.map +1 -0
  162. package/packages/version/PackageVersionRecordsStore.d.ts +342 -0
  163. package/packages/version/PackageVersionRecordsStore.js +126 -0
  164. package/packages/version/PackageVersionRecordsStore.js.map +1 -0
  165. package/packages/version/index.d.ts +4 -0
  166. package/packages/version/index.js +21 -0
  167. package/packages/version/index.js.map +1 -0
  168. package/tracing/TracingDecorators.js +31 -40
  169. package/tracing/TracingDecorators.js.map +1 -1
  170. package/webhooks/MemoryWebhookRecordsStore.js +56 -72
  171. package/webhooks/MemoryWebhookRecordsStore.js.map +1 -1
  172. package/webhooks/WebhookEnvironment.d.ts +3 -3
  173. package/webhooks/WebhookRecordsController.d.ts +2 -1
  174. package/webhooks/WebhookRecordsController.js +389 -382
  175. package/webhooks/WebhookRecordsController.js.map +1 -1
  176. package/webhooks/WebhookRecordsStore.d.ts +2 -1
  177. package/websockets/InstRecordsStore.d.ts +50 -0
  178. package/websockets/InstRecordsStore.js +17 -0
  179. package/websockets/InstRecordsStore.js.map +1 -1
  180. package/websockets/MemoryTempInstRecordsStore.d.ts +5 -0
  181. package/websockets/MemoryTempInstRecordsStore.js +168 -179
  182. package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
  183. package/websockets/MemoryWebsocketConnectionStore.js +98 -135
  184. package/websockets/MemoryWebsocketConnectionStore.js.map +1 -1
  185. package/websockets/MemoryWebsocketMessenger.js +29 -48
  186. package/websockets/MemoryWebsocketMessenger.js.map +1 -1
  187. package/websockets/SplitInstRecordsStore.d.ts +4 -1
  188. package/websockets/SplitInstRecordsStore.js +167 -185
  189. package/websockets/SplitInstRecordsStore.js.map +1 -1
  190. package/websockets/TemporaryInstRecordsStore.d.ts +19 -1
  191. package/websockets/TemporaryInstRecordsStore.js +17 -0
  192. package/websockets/TemporaryInstRecordsStore.js.map +1 -1
  193. package/websockets/WebsocketController.d.ts +147 -3
  194. package/websockets/WebsocketController.js +1735 -1391
  195. package/websockets/WebsocketController.js.map +1 -1
  196. package/websockets/index.d.ts +0 -1
  197. package/websockets/index.js +0 -1
  198. package/websockets/index.js.map +1 -1
  199. package/AAGUID.d.ts +0 -11
  200. package/AAGUID.js +0 -116
  201. package/AAGUID.js.map +0 -1
  202. package/AuthUtils.d.ts +0 -162
  203. package/AuthUtils.js +0 -327
  204. package/AuthUtils.js.map +0 -1
  205. package/forms/FormError.d.ts +0 -43
  206. package/forms/FormError.js +0 -56
  207. package/forms/FormError.js.map +0 -1
  208. package/forms/index.d.ts +0 -2
  209. package/websockets/Utils.d.ts +0 -33
  210. package/websockets/Utils.js +0 -82
  211. package/websockets/Utils.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubCrudRecordsControllerTests.js","sourceRoot":"","sources":["SubCrudRecordsControllerTests.ts"],"names":[],"mappings":"AAyBA,OAAO,EACH,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,GACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACH,cAAc,EACd,kBAAkB,GACrB,MAAM,+BAA+B,CAAC;AA0CvC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAYlC,kBAA+D,EAC/D,YAGW,EACX,iBAGgB;IAEhB,MAAM,QAAQ,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAC7B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACnC,MAAM,UAAU,GAAG,YAAY,CAAC;IAChC,MAAM,OAAO,GAAG,iBAAiB,CAC7B;QACI,QAAQ;QACR,KAAK,EAAE,UAAU;QACjB,eAAe,EAAE,gBAAgB;QACjC,MAAM,EAAE,KAAK;KAChB,EACD,QAAQ,CACX,CAAC;IAEF,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B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SAAS;wBACrB,YAAY,EAAE,YAAY;wBAC1B,SAAS,EAAE,WAAW;wBACtB,WAAW,EAAE,MAAM;wBACnB,IAAI,EAAE,oBAAoB;qBAC7B;iBACJ,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Defines an interface for a store that can be used to create, read, update, and delete sub-items in a record.
3
+ * That is, items which are related to a parent resource kind. (subscription to notification, package version to package, etc.)
4
+ *
5
+ * @param TKey The type of the keys that the store uses to identify items.
6
+ * @param T The type of the records that the store can manage.
7
+ */
8
+ export interface SubCrudRecordsStore<TKey, T extends SubCrudRecord<TKey>> {
9
+ /**
10
+ * Creates a new item in the record.
11
+ * @param recordName The name of the record.
12
+ * @param item The item to create.
13
+ */
14
+ createItem(recordName: string, item: T): Promise<CrudResult>;
15
+ /**
16
+ * Reads the item with the given address. Always returns an object with the item and any markers that are related to the item.
17
+ * @param recordName The name of the record that the item lives in.
18
+ * @param address The address of the record item.
19
+ * @param key The key of the item to read.
20
+ */
21
+ getItemByKey(recordName: string, address: string, key: TKey): Promise<GetSubCrudItemResult<T>>;
22
+ /**
23
+ * Updates the record with the given ID.
24
+ * Keys that are not present in the record will not be updated.
25
+ * @param recordName The name of the record that the item lives in.
26
+ * @param record The record to update.
27
+ */
28
+ updateItem(recordName: string, item: Partial<T>): Promise<CrudResult>;
29
+ /**
30
+ * Creates or updates the record with the given ID.
31
+ * If updating a record, keys that are not present in the record will not be updated.
32
+ * @param recordName The name of the record that the item lives in.
33
+ * @param item The item to create or update.
34
+ */
35
+ putItem(recordName: string, item: Partial<T>): Promise<CrudResult>;
36
+ /**
37
+ * Deletes the item with the given key.
38
+ * @param recordName The name of the record that the item lives in.
39
+ * @param address The address of the record item that the item resides in.
40
+ * @param key The key of the item to delete.
41
+ */
42
+ deleteItem(recordName: string, address: string, key: TKey): Promise<CrudResult>;
43
+ /**
44
+ * Gets a list of the items for the given record and address.
45
+ * @param recordName The name of the record.
46
+ * @param address The address of the item to list.
47
+ */
48
+ listItems(recordName: string, address: string): Promise<ListSubCrudStoreSuccess<T>>;
49
+ }
50
+ /**
51
+ * Defines a base interface for an item that can be stored in a CrudStore.
52
+ */
53
+ export interface SubCrudRecord<TKey> {
54
+ /**
55
+ * The address that the item is stored under.
56
+ */
57
+ address: string;
58
+ /**
59
+ * The key of the item.
60
+ */
61
+ key: TKey;
62
+ }
63
+ export interface GetSubCrudItemResult<T> {
64
+ /**
65
+ * The item that was read.
66
+ * Null if the item does not exist.
67
+ */
68
+ item: T | null;
69
+ /**
70
+ * The markers that are related to the item's parent.
71
+ * Null if the parent record item doesn't exist.
72
+ */
73
+ parentMarkers: string[] | null;
74
+ }
75
+ export interface ListSubCrudStoreSuccess<T> {
76
+ success: true;
77
+ /**
78
+ * The items that were listed.
79
+ */
80
+ items: T[];
81
+ /**
82
+ * The total number of items in the record.
83
+ */
84
+ totalCount: number;
85
+ }
86
+ export type CrudResult = CrudSuccess | CrudFailure;
87
+ export interface CrudSuccess {
88
+ success: true;
89
+ }
90
+ export interface CrudFailure {
91
+ success: false;
92
+ errorCode: 'data_not_found' | 'parent_not_found';
93
+ errorMessage: string;
94
+ }
95
+ //# sourceMappingURL=SubCrudRecordsStore.d.ts.map
@@ -15,5 +15,5 @@
15
15
  * You should have received a copy of the GNU Affero General Public License
16
16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
  */
18
- export * from './FormError';
19
- //# sourceMappingURL=index.js.map
18
+ export {};
19
+ //# sourceMappingURL=SubCrudRecordsStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubCrudRecordsStore.js","sourceRoot":"","sources":["SubCrudRecordsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
@@ -0,0 +1,3 @@
1
+ export * from './SubCrudRecordsController';
2
+ export * from './SubCrudRecordsStore';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ /* CasualOS is a set of web-based tools designed to facilitate the creation of real-time, multi-user, context-aware interactive experiences.
2
+ *
3
+ * Copyright (c) 2019-2025 Casual Simulation, Inc.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as
7
+ * published by the Free Software Foundation, either version 3 of the
8
+ * License, or (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ export * from './SubCrudRecordsController';
19
+ export * from './SubCrudRecordsStore';
20
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
package/index.d.ts CHANGED
@@ -43,9 +43,9 @@ export * from './ModerationJobProvider';
43
43
  export * from './SystemNotificationMessenger';
44
44
  export * from './LoomController';
45
45
  export * from './websockets';
46
- export * from './forms';
47
46
  export * from './ComIdConfig';
48
47
  export * from './ServerConfig';
49
48
  export * from './webhooks';
50
49
  export * from './notifications';
50
+ export * from './packages';
51
51
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -59,9 +59,9 @@ export * from './ModerationJobProvider';
59
59
  export * from './SystemNotificationMessenger';
60
60
  export * from './LoomController';
61
61
  export * from './websockets';
62
- export * from './forms';
63
62
  export * from './ComIdConfig';
64
63
  export * from './ServerConfig';
65
64
  export * from './webhooks';
66
65
  export * from './notifications';
66
+ export * from './packages';
67
67
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAE5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAElC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAW9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AAEtD,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAE1C,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAA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AAC;AAC9B,cAAc,2BAA2B,CAAC;AAE1C,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAE9C,cAAc,kBAAkB,CAAC;AAEjC,cAAc,cAAc,CAAC;AAE7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
@@ -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
  /* CasualOS is a set of web-based tools designed to facilitate the creation of real-time, multi-user, context-aware interactive experiences.
11
2
  *
12
3
  * Copyright (c) 2019-2025 Casual Simulation, Inc.
@@ -53,207 +44,207 @@ export class MemoryNotificationRecordsStore extends MemoryCrudRecordsStore {
53
44
  get pushSubscriptionUsers() {
54
45
  return this._pushSubscriptionUsers;
55
46
  }
56
- savePushSubscription(pushSubscription) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- const index = this._pushSubscriptions.findIndex((s) => s.id === pushSubscription.id);
59
- if (index >= 0) {
60
- this._pushSubscriptions[index] = Object.assign({}, pushSubscription);
61
- }
62
- else {
63
- this._pushSubscriptions.push(Object.assign({}, pushSubscription));
64
- }
65
- });
66
- }
67
- savePushSubscriptionUser(pushSubscription) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- const index = this._pushSubscriptionUsers.findIndex((u) => u.pushSubscriptionId === pushSubscription.pushSubscriptionId &&
70
- u.userId === pushSubscription.userId);
47
+ async savePushSubscription(pushSubscription) {
48
+ const index = this._pushSubscriptions.findIndex((s) => s.id === pushSubscription.id);
49
+ if (index >= 0) {
50
+ this._pushSubscriptions[index] = {
51
+ ...pushSubscription,
52
+ };
53
+ }
54
+ else {
55
+ this._pushSubscriptions.push({
56
+ ...pushSubscription,
57
+ });
58
+ }
59
+ }
60
+ async savePushSubscriptionUser(pushSubscription) {
61
+ const index = this._pushSubscriptionUsers.findIndex((u) => u.pushSubscriptionId === pushSubscription.pushSubscriptionId &&
62
+ u.userId === pushSubscription.userId);
63
+ if (index >= 0) {
64
+ this._pushSubscriptionUsers[index] = {
65
+ ...pushSubscription,
66
+ };
67
+ }
68
+ else {
69
+ this._pushSubscriptionUsers.push({
70
+ ...pushSubscription,
71
+ });
72
+ }
73
+ }
74
+ async markPushSubscriptionsInactiveAndDeleteUserRelations(ids) {
75
+ for (let id of ids) {
76
+ const index = this._pushSubscriptions.findIndex((s) => s.id === id);
71
77
  if (index >= 0) {
72
- this._pushSubscriptionUsers[index] = Object.assign({}, pushSubscription);
73
- }
74
- else {
75
- this._pushSubscriptionUsers.push(Object.assign({}, pushSubscription));
76
- }
77
- });
78
- }
79
- markPushSubscriptionsInactiveAndDeleteUserRelations(ids) {
80
- return __awaiter(this, void 0, void 0, function* () {
81
- for (let id of ids) {
82
- const index = this._pushSubscriptions.findIndex((s) => s.id === id);
83
- if (index >= 0) {
84
- this._pushSubscriptions[index] = Object.assign(Object.assign({}, this._pushSubscriptions[index]), { active: false });
85
- }
86
- }
87
- this._pushSubscriptionUsers = this._pushSubscriptionUsers.filter((u) => ids.every((id) => id !== u.pushSubscriptionId));
88
- });
89
- }
90
- getSubscriptionByRecordAddressAndUserId(recordName, notificationAddress, userId) {
91
- return __awaiter(this, void 0, void 0, function* () {
92
- const subscription = this._subscriptions.find((s) => s.recordName === recordName &&
93
- s.notificationAddress === notificationAddress &&
94
- s.userId === userId);
95
- return subscription || null;
96
- });
97
- }
98
- getSubscriptionByRecordAddressAndPushSubscriptionId(recordName, notificationAddress, pushSubscriptionId) {
99
- return __awaiter(this, void 0, void 0, function* () {
100
- const subscription = this._subscriptions.find((s) => s.recordName === recordName &&
101
- s.notificationAddress === notificationAddress &&
102
- s.pushSubscriptionId === pushSubscriptionId);
103
- return subscription || null;
104
- });
105
- }
106
- createSentPushNotifications(notifications) {
107
- return __awaiter(this, void 0, void 0, function* () {
108
- for (let notification of notifications) {
109
- yield this.saveSentPushNotification(notification);
78
+ this._pushSubscriptions[index] = {
79
+ ...this._pushSubscriptions[index],
80
+ active: false,
81
+ };
110
82
  }
111
- });
112
- }
113
- listActivePushSubscriptionsForNotification(recordName, notificationAddress) {
114
- return __awaiter(this, void 0, void 0, function* () {
115
- const subscriptions = this._subscriptions.filter((s) => s.recordName === recordName &&
116
- s.notificationAddress === notificationAddress);
117
- const users = [];
118
- for (let subscription of subscriptions) {
119
- if (subscription.userId) {
120
- const subscribedUsers = this._pushSubscriptionUsers.filter((u) => u.userId === subscription.userId);
121
- for (let user of subscribedUsers) {
122
- const sub = this._pushSubscriptions.find((s) => s.active && s.id === user.pushSubscriptionId);
123
- if (sub) {
124
- users.push(Object.assign(Object.assign({}, sub), { userId: user.userId, subscriptionId: subscription.id }));
125
- }
126
- }
127
- }
128
- else if (subscription.pushSubscriptionId) {
129
- const sub = this._pushSubscriptions.find((s) => s.active && s.id === subscription.pushSubscriptionId);
83
+ }
84
+ this._pushSubscriptionUsers = this._pushSubscriptionUsers.filter((u) => ids.every((id) => id !== u.pushSubscriptionId));
85
+ }
86
+ async getSubscriptionByRecordAddressAndUserId(recordName, notificationAddress, userId) {
87
+ const subscription = this._subscriptions.find((s) => s.recordName === recordName &&
88
+ s.notificationAddress === notificationAddress &&
89
+ s.userId === userId);
90
+ return subscription || null;
91
+ }
92
+ async getSubscriptionByRecordAddressAndPushSubscriptionId(recordName, notificationAddress, pushSubscriptionId) {
93
+ const subscription = this._subscriptions.find((s) => s.recordName === recordName &&
94
+ s.notificationAddress === notificationAddress &&
95
+ s.pushSubscriptionId === pushSubscriptionId);
96
+ return subscription || null;
97
+ }
98
+ async createSentPushNotifications(notifications) {
99
+ for (let notification of notifications) {
100
+ await this.saveSentPushNotification(notification);
101
+ }
102
+ }
103
+ async listActivePushSubscriptionsForNotification(recordName, notificationAddress) {
104
+ const subscriptions = this._subscriptions.filter((s) => s.recordName === recordName &&
105
+ s.notificationAddress === notificationAddress);
106
+ const users = [];
107
+ for (let subscription of subscriptions) {
108
+ if (subscription.userId) {
109
+ const subscribedUsers = this._pushSubscriptionUsers.filter((u) => u.userId === subscription.userId);
110
+ for (let user of subscribedUsers) {
111
+ const sub = this._pushSubscriptions.find((s) => s.active && s.id === user.pushSubscriptionId);
130
112
  if (sub) {
131
- users.push(Object.assign(Object.assign({}, sub), { subscriptionId: subscription.id, userId: null }));
113
+ users.push({
114
+ ...sub,
115
+ userId: user.userId,
116
+ subscriptionId: subscription.id,
117
+ });
132
118
  }
133
119
  }
134
120
  }
135
- return uniqBy(users, (u) => u.id);
136
- });
137
- }
138
- getSubscriptionById(id) {
139
- return __awaiter(this, void 0, void 0, function* () {
140
- return this._subscriptions.find((s) => s.id === id) || null;
141
- });
142
- }
143
- countSubscriptionsForNotification(recordName, address) {
144
- return __awaiter(this, void 0, void 0, function* () {
145
- let count = 0;
146
- for (let s of this._subscriptions) {
147
- if (s.recordName === recordName &&
148
- s.notificationAddress === address) {
149
- count++;
121
+ else if (subscription.pushSubscriptionId) {
122
+ const sub = this._pushSubscriptions.find((s) => s.active && s.id === subscription.pushSubscriptionId);
123
+ if (sub) {
124
+ users.push({
125
+ ...sub,
126
+ subscriptionId: subscription.id,
127
+ userId: null,
128
+ });
150
129
  }
151
130
  }
152
- return count;
153
- });
154
- }
155
- saveSubscription(subscription) {
156
- return __awaiter(this, void 0, void 0, function* () {
157
- const exists = this._subscriptions.some((s) => s.recordName === subscription.recordName &&
158
- s.notificationAddress === subscription.notificationAddress &&
159
- ((s.userId && s.userId === subscription.userId) ||
160
- (s.pushSubscriptionId &&
161
- s.pushSubscriptionId ===
162
- subscription.pushSubscriptionId)));
163
- if (exists) {
164
- return {
165
- success: false,
166
- errorCode: 'subscription_already_exists',
167
- errorMessage: 'This user is already subscribed to this notification.',
168
- };
169
- }
170
- const index = this._subscriptions.findIndex((s) => s.id === subscription.id);
171
- if (index >= 0) {
172
- this._subscriptions[index] = Object.assign({}, subscription);
173
- }
174
- else {
175
- this._subscriptions.push(Object.assign({}, subscription));
176
- }
131
+ }
132
+ return uniqBy(users, (u) => u.id);
133
+ }
134
+ async getSubscriptionById(id) {
135
+ return this._subscriptions.find((s) => s.id === id) || null;
136
+ }
137
+ async countSubscriptionsForNotification(recordName, address) {
138
+ let count = 0;
139
+ for (let s of this._subscriptions) {
140
+ if (s.recordName === recordName &&
141
+ s.notificationAddress === address) {
142
+ count++;
143
+ }
144
+ }
145
+ return count;
146
+ }
147
+ async saveSubscription(subscription) {
148
+ const exists = this._subscriptions.some((s) => s.recordName === subscription.recordName &&
149
+ s.notificationAddress === subscription.notificationAddress &&
150
+ ((s.userId && s.userId === subscription.userId) ||
151
+ (s.pushSubscriptionId &&
152
+ s.pushSubscriptionId ===
153
+ subscription.pushSubscriptionId)));
154
+ if (exists) {
177
155
  return {
178
- success: true,
156
+ success: false,
157
+ errorCode: 'subscription_already_exists',
158
+ errorMessage: 'This user is already subscribed to this notification.',
179
159
  };
180
- });
181
- }
182
- deleteSubscription(id) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- const index = this._subscriptions.findIndex((s) => s.id === id);
185
- if (index >= 0) {
186
- this._subscriptions.splice(index, 1);
187
- }
188
- });
189
- }
190
- saveSentNotification(notification) {
191
- return __awaiter(this, void 0, void 0, function* () {
192
- const index = this._sentNotifications.findIndex((s) => s.id === notification.id);
193
- if (index >= 0) {
194
- this._sentNotifications[index] = Object.assign({}, notification);
195
- }
196
- else {
197
- this._sentNotifications.push(Object.assign({}, notification));
198
- }
199
- });
200
- }
201
- saveSentPushNotification(notification) {
202
- return __awaiter(this, void 0, void 0, function* () {
203
- const index = this._sentPushNotifications.findIndex((s) => s.id === notification.id);
204
- if (index >= 0) {
205
- this._sentPushNotifications[index] = Object.assign({}, notification);
206
- }
207
- else {
208
- this._sentPushNotifications.push(Object.assign({}, notification));
209
- }
210
- });
211
- }
212
- listSubscriptionsForNotification(recordName, notificationAddress) {
213
- return __awaiter(this, void 0, void 0, function* () {
214
- return this._subscriptions.filter((s) => s.recordName === recordName &&
215
- s.notificationAddress === notificationAddress);
216
- });
217
- }
218
- listSubscriptionsForUser(userId) {
219
- return __awaiter(this, void 0, void 0, function* () {
220
- return this._subscriptions.filter((s) => s.userId === userId);
221
- });
222
- }
223
- getSubscriptionMetrics(filter) {
224
- const _super = Object.create(null, {
225
- getSubscriptionMetrics: { get: () => super.getSubscriptionMetrics }
226
- });
227
- return __awaiter(this, void 0, void 0, function* () {
228
- const info = yield _super.getSubscriptionMetrics.call(this, filter);
229
- let totalItems = 0;
230
- let totalSentNotificationsInPeriod = 0;
231
- let totalSentPushNotificationsInPeriod = 0;
232
- const records = filter.ownerId
233
- ? yield this.store.listRecordsByOwnerId(filter.ownerId)
234
- : yield this.store.listRecordsByStudioId(filter.studioId);
235
- for (let record of records) {
236
- totalItems += this.getItemRecord(record.name).size;
237
- }
238
- for (let send of this._sentNotifications) {
239
- if (!records.some((r) => r.name === send.recordName)) {
240
- continue;
241
- }
242
- if (!info.currentPeriodStartMs ||
243
- send.sentTimeMs >= info.currentPeriodStartMs ||
244
- send.sentTimeMs <= info.currentPeriodEndMs) {
245
- totalSentNotificationsInPeriod++;
246
- }
247
- for (let u of this._sentPushNotifications) {
248
- if (u.sentNotificationId === send.id) {
249
- totalSentPushNotificationsInPeriod++;
250
- }
160
+ }
161
+ const index = this._subscriptions.findIndex((s) => s.id === subscription.id);
162
+ if (index >= 0) {
163
+ this._subscriptions[index] = {
164
+ ...subscription,
165
+ };
166
+ }
167
+ else {
168
+ this._subscriptions.push({
169
+ ...subscription,
170
+ });
171
+ }
172
+ return {
173
+ success: true,
174
+ };
175
+ }
176
+ async deleteSubscription(id) {
177
+ const index = this._subscriptions.findIndex((s) => s.id === id);
178
+ if (index >= 0) {
179
+ this._subscriptions.splice(index, 1);
180
+ }
181
+ }
182
+ async saveSentNotification(notification) {
183
+ const index = this._sentNotifications.findIndex((s) => s.id === notification.id);
184
+ if (index >= 0) {
185
+ this._sentNotifications[index] = {
186
+ ...notification,
187
+ };
188
+ }
189
+ else {
190
+ this._sentNotifications.push({
191
+ ...notification,
192
+ });
193
+ }
194
+ }
195
+ async saveSentPushNotification(notification) {
196
+ const index = this._sentPushNotifications.findIndex((s) => s.id === notification.id);
197
+ if (index >= 0) {
198
+ this._sentPushNotifications[index] = {
199
+ ...notification,
200
+ };
201
+ }
202
+ else {
203
+ this._sentPushNotifications.push({
204
+ ...notification,
205
+ });
206
+ }
207
+ }
208
+ async listSubscriptionsForNotification(recordName, notificationAddress) {
209
+ return this._subscriptions.filter((s) => s.recordName === recordName &&
210
+ s.notificationAddress === notificationAddress);
211
+ }
212
+ async listSubscriptionsForUser(userId) {
213
+ return this._subscriptions.filter((s) => s.userId === userId);
214
+ }
215
+ async getSubscriptionMetrics(filter) {
216
+ const info = await super.getSubscriptionMetrics(filter);
217
+ let totalItems = 0;
218
+ let totalSentNotificationsInPeriod = 0;
219
+ let totalSentPushNotificationsInPeriod = 0;
220
+ const records = filter.ownerId
221
+ ? await this.store.listRecordsByOwnerId(filter.ownerId)
222
+ : await this.store.listRecordsByStudioId(filter.studioId);
223
+ for (let record of records) {
224
+ totalItems += this.getItemRecord(record.name).size;
225
+ }
226
+ for (let send of this._sentNotifications) {
227
+ if (!records.some((r) => r.name === send.recordName)) {
228
+ continue;
229
+ }
230
+ if (!info.currentPeriodStartMs ||
231
+ !info.currentPeriodEndMs ||
232
+ send.sentTimeMs >= info.currentPeriodStartMs ||
233
+ send.sentTimeMs <= info.currentPeriodEndMs) {
234
+ totalSentNotificationsInPeriod++;
235
+ }
236
+ for (let u of this._sentPushNotifications) {
237
+ if (u.sentNotificationId === send.id) {
238
+ totalSentPushNotificationsInPeriod++;
251
239
  }
252
240
  }
253
- return Object.assign(Object.assign({}, info), { totalItems,
254
- totalSentNotificationsInPeriod,
255
- totalSentPushNotificationsInPeriod });
256
- });
241
+ }
242
+ return {
243
+ ...info,
244
+ totalItems,
245
+ totalSentNotificationsInPeriod,
246
+ totalSentPushNotificationsInPeriod,
247
+ };
257
248
  }
258
249
  }
259
250
  //# sourceMappingURL=MemoryNotificationRecordsStore.js.map