@casual-simulation/aux-records 3.7.0 → 3.7.1-alpha.17585632798
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/MemoryStore.d.ts +2 -1
- package/MemoryStore.js +30 -0
- package/MemoryStore.js.map +1 -1
- package/PolicyController.d.ts +27 -0
- package/PolicyController.js +2 -1
- package/PolicyController.js.map +1 -1
- package/PolicyStore.d.ts +13 -0
- package/PolicyStore.js +16 -0
- package/PolicyStore.js.map +1 -1
- package/RecordsController.d.ts +0 -5
- package/RecordsServer.d.ts +61 -5
- package/RecordsServer.js +61 -3
- package/RecordsServer.js.map +1 -1
- package/ServerConfig.d.ts +413 -0
- package/ServerConfig.js +32 -0
- package/ServerConfig.js.map +1 -1
- package/SubscriptionConfigBuilder.d.ts +4 -1
- package/SubscriptionConfigBuilder.js +14 -0
- package/SubscriptionConfigBuilder.js.map +1 -1
- package/SubscriptionConfiguration.d.ts +287 -0
- package/SubscriptionConfiguration.js +41 -0
- package/SubscriptionConfiguration.js.map +1 -1
- package/crud/CrudRecordsController.d.ts +19 -2
- package/crud/CrudRecordsController.js +13 -6
- package/crud/CrudRecordsController.js.map +1 -1
- package/crud/CrudRecordsControllerTests.d.ts +3 -3
- package/crud/CrudRecordsControllerTests.js +15 -4
- package/crud/CrudRecordsControllerTests.js.map +1 -1
- package/database/DatabaseInterface.d.ts +103 -0
- package/database/DatabaseInterface.js +19 -0
- package/database/DatabaseInterface.js.map +1 -0
- package/database/DatabaseRecordsController.d.ts +92 -0
- package/database/DatabaseRecordsController.js +167 -0
- package/database/DatabaseRecordsController.js.map +1 -0
- package/database/DatabaseRecordsStore.d.ts +40 -0
- package/database/DatabaseRecordsStore.js +2 -0
- package/database/DatabaseRecordsStore.js.map +1 -0
- package/database/DatabaseUtils.d.ts +12 -0
- package/database/DatabaseUtils.js +33 -0
- package/database/DatabaseUtils.js.map +1 -0
- package/database/MemoryDatabaseInterface.d.ts +14 -0
- package/database/MemoryDatabaseInterface.js +119 -0
- package/database/MemoryDatabaseInterface.js.map +1 -0
- package/database/MemoryDatabaseRecordsStore.d.ts +10 -0
- package/database/MemoryDatabaseRecordsStore.js +38 -0
- package/database/MemoryDatabaseRecordsStore.js.map +1 -0
- package/database/SqliteDatabaseInterface.d.ts +16 -0
- package/database/SqliteDatabaseInterface.js +135 -0
- package/database/SqliteDatabaseInterface.js.map +1 -0
- package/database/TursoDatabaseInterface.d.ts +31 -0
- package/database/TursoDatabaseInterface.js +221 -0
- package/database/TursoDatabaseInterface.js.map +1 -0
- package/database/index.d.ts +7 -0
- package/database/index.js +24 -0
- package/database/index.js.map +1 -0
- package/package.json +6 -4
- package/packages/PackageRecordsController.d.ts +3 -2
- package/packages/PackageRecordsController.js +30 -1
- package/packages/PackageRecordsController.js.map +1 -1
- package/search/SearchRecordsController.d.ts +6 -6
- package/search/SearchRecordsController.js.map +1 -1
- package/webhooks/WebhookRecordsController.d.ts +3 -1
- package/webhooks/WebhookRecordsController.js +21 -19
- package/webhooks/WebhookRecordsController.js.map +1 -1
- package/websockets/InstRecordsStore.d.ts +7 -0
- package/websockets/SplitInstRecordsStore.d.ts +1 -0
- package/websockets/SplitInstRecordsStore.js +3 -0
- package/websockets/SplitInstRecordsStore.js.map +1 -1
- package/websockets/WebsocketController.d.ts +1 -1
- package/websockets/WebsocketController.js +45 -29
- package/websockets/WebsocketController.js.map +1 -1
|
@@ -353,6 +353,19 @@ export declare const subscriptionFeaturesSchema: z.ZodObject<{
|
|
|
353
353
|
allowed?: boolean;
|
|
354
354
|
maxItems?: number;
|
|
355
355
|
}>>>;
|
|
356
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
357
|
+
allowed: z.ZodBoolean;
|
|
358
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
allowed?: boolean;
|
|
362
|
+
maxItems?: number;
|
|
363
|
+
maxBytesPerDatabase?: number;
|
|
364
|
+
}, {
|
|
365
|
+
allowed?: boolean;
|
|
366
|
+
maxItems?: number;
|
|
367
|
+
maxBytesPerDatabase?: number;
|
|
368
|
+
}>>>;
|
|
356
369
|
}, "strip", z.ZodTypeAny, {
|
|
357
370
|
records?: {
|
|
358
371
|
allowed?: boolean;
|
|
@@ -452,6 +465,11 @@ export declare const subscriptionFeaturesSchema: z.ZodObject<{
|
|
|
452
465
|
allowed?: boolean;
|
|
453
466
|
maxItems?: number;
|
|
454
467
|
};
|
|
468
|
+
databases?: {
|
|
469
|
+
allowed?: boolean;
|
|
470
|
+
maxItems?: number;
|
|
471
|
+
maxBytesPerDatabase?: number;
|
|
472
|
+
};
|
|
455
473
|
}, {
|
|
456
474
|
records?: {
|
|
457
475
|
allowed?: boolean;
|
|
@@ -551,6 +569,11 @@ export declare const subscriptionFeaturesSchema: z.ZodObject<{
|
|
|
551
569
|
allowed?: boolean;
|
|
552
570
|
maxItems?: number;
|
|
553
571
|
};
|
|
572
|
+
databases?: {
|
|
573
|
+
allowed?: boolean;
|
|
574
|
+
maxItems?: number;
|
|
575
|
+
maxBytesPerDatabase?: number;
|
|
576
|
+
};
|
|
554
577
|
}>;
|
|
555
578
|
export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
556
579
|
webhookSecret: z.ZodString;
|
|
@@ -920,6 +943,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
920
943
|
allowed?: boolean;
|
|
921
944
|
maxItems?: number;
|
|
922
945
|
}>>>;
|
|
946
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
947
|
+
allowed: z.ZodBoolean;
|
|
948
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
949
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
950
|
+
}, "strip", z.ZodTypeAny, {
|
|
951
|
+
allowed?: boolean;
|
|
952
|
+
maxItems?: number;
|
|
953
|
+
maxBytesPerDatabase?: number;
|
|
954
|
+
}, {
|
|
955
|
+
allowed?: boolean;
|
|
956
|
+
maxItems?: number;
|
|
957
|
+
maxBytesPerDatabase?: number;
|
|
958
|
+
}>>>;
|
|
923
959
|
}, "strip", z.ZodTypeAny, {
|
|
924
960
|
records?: {
|
|
925
961
|
allowed?: boolean;
|
|
@@ -1019,6 +1055,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1019
1055
|
allowed?: boolean;
|
|
1020
1056
|
maxItems?: number;
|
|
1021
1057
|
};
|
|
1058
|
+
databases?: {
|
|
1059
|
+
allowed?: boolean;
|
|
1060
|
+
maxItems?: number;
|
|
1061
|
+
maxBytesPerDatabase?: number;
|
|
1062
|
+
};
|
|
1022
1063
|
}, {
|
|
1023
1064
|
records?: {
|
|
1024
1065
|
allowed?: boolean;
|
|
@@ -1118,6 +1159,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1118
1159
|
allowed?: boolean;
|
|
1119
1160
|
maxItems?: number;
|
|
1120
1161
|
};
|
|
1162
|
+
databases?: {
|
|
1163
|
+
allowed?: boolean;
|
|
1164
|
+
maxItems?: number;
|
|
1165
|
+
maxBytesPerDatabase?: number;
|
|
1166
|
+
};
|
|
1121
1167
|
}>>;
|
|
1122
1168
|
}, "strip", z.ZodTypeAny, {
|
|
1123
1169
|
features?: {
|
|
@@ -1219,6 +1265,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1219
1265
|
allowed?: boolean;
|
|
1220
1266
|
maxItems?: number;
|
|
1221
1267
|
};
|
|
1268
|
+
databases?: {
|
|
1269
|
+
allowed?: boolean;
|
|
1270
|
+
maxItems?: number;
|
|
1271
|
+
maxBytesPerDatabase?: number;
|
|
1272
|
+
};
|
|
1222
1273
|
};
|
|
1223
1274
|
}, {
|
|
1224
1275
|
features?: {
|
|
@@ -1320,6 +1371,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1320
1371
|
allowed?: boolean;
|
|
1321
1372
|
maxItems?: number;
|
|
1322
1373
|
};
|
|
1374
|
+
databases?: {
|
|
1375
|
+
allowed?: boolean;
|
|
1376
|
+
maxItems?: number;
|
|
1377
|
+
maxBytesPerDatabase?: number;
|
|
1378
|
+
};
|
|
1323
1379
|
};
|
|
1324
1380
|
}>, z.objectOutputType<{}, z.ZodObject<{
|
|
1325
1381
|
features: z.ZodOptional<z.ZodObject<{
|
|
@@ -1645,6 +1701,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1645
1701
|
allowed?: boolean;
|
|
1646
1702
|
maxItems?: number;
|
|
1647
1703
|
}>>>;
|
|
1704
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
1705
|
+
allowed: z.ZodBoolean;
|
|
1706
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1707
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
1708
|
+
}, "strip", z.ZodTypeAny, {
|
|
1709
|
+
allowed?: boolean;
|
|
1710
|
+
maxItems?: number;
|
|
1711
|
+
maxBytesPerDatabase?: number;
|
|
1712
|
+
}, {
|
|
1713
|
+
allowed?: boolean;
|
|
1714
|
+
maxItems?: number;
|
|
1715
|
+
maxBytesPerDatabase?: number;
|
|
1716
|
+
}>>>;
|
|
1648
1717
|
}, "strip", z.ZodTypeAny, {
|
|
1649
1718
|
records?: {
|
|
1650
1719
|
allowed?: boolean;
|
|
@@ -1744,6 +1813,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1744
1813
|
allowed?: boolean;
|
|
1745
1814
|
maxItems?: number;
|
|
1746
1815
|
};
|
|
1816
|
+
databases?: {
|
|
1817
|
+
allowed?: boolean;
|
|
1818
|
+
maxItems?: number;
|
|
1819
|
+
maxBytesPerDatabase?: number;
|
|
1820
|
+
};
|
|
1747
1821
|
}, {
|
|
1748
1822
|
records?: {
|
|
1749
1823
|
allowed?: boolean;
|
|
@@ -1843,6 +1917,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1843
1917
|
allowed?: boolean;
|
|
1844
1918
|
maxItems?: number;
|
|
1845
1919
|
};
|
|
1920
|
+
databases?: {
|
|
1921
|
+
allowed?: boolean;
|
|
1922
|
+
maxItems?: number;
|
|
1923
|
+
maxBytesPerDatabase?: number;
|
|
1924
|
+
};
|
|
1846
1925
|
}>>;
|
|
1847
1926
|
}, "strip", z.ZodTypeAny, {
|
|
1848
1927
|
features?: {
|
|
@@ -1944,6 +2023,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
1944
2023
|
allowed?: boolean;
|
|
1945
2024
|
maxItems?: number;
|
|
1946
2025
|
};
|
|
2026
|
+
databases?: {
|
|
2027
|
+
allowed?: boolean;
|
|
2028
|
+
maxItems?: number;
|
|
2029
|
+
maxBytesPerDatabase?: number;
|
|
2030
|
+
};
|
|
1947
2031
|
};
|
|
1948
2032
|
}, {
|
|
1949
2033
|
features?: {
|
|
@@ -2045,6 +2129,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
2045
2129
|
allowed?: boolean;
|
|
2046
2130
|
maxItems?: number;
|
|
2047
2131
|
};
|
|
2132
|
+
databases?: {
|
|
2133
|
+
allowed?: boolean;
|
|
2134
|
+
maxItems?: number;
|
|
2135
|
+
maxBytesPerDatabase?: number;
|
|
2136
|
+
};
|
|
2048
2137
|
};
|
|
2049
2138
|
}>, "strip">, z.objectInputType<{}, z.ZodObject<{
|
|
2050
2139
|
features: z.ZodOptional<z.ZodObject<{
|
|
@@ -2370,6 +2459,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
2370
2459
|
allowed?: boolean;
|
|
2371
2460
|
maxItems?: number;
|
|
2372
2461
|
}>>>;
|
|
2462
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
2463
|
+
allowed: z.ZodBoolean;
|
|
2464
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2465
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
2466
|
+
}, "strip", z.ZodTypeAny, {
|
|
2467
|
+
allowed?: boolean;
|
|
2468
|
+
maxItems?: number;
|
|
2469
|
+
maxBytesPerDatabase?: number;
|
|
2470
|
+
}, {
|
|
2471
|
+
allowed?: boolean;
|
|
2472
|
+
maxItems?: number;
|
|
2473
|
+
maxBytesPerDatabase?: number;
|
|
2474
|
+
}>>>;
|
|
2373
2475
|
}, "strip", z.ZodTypeAny, {
|
|
2374
2476
|
records?: {
|
|
2375
2477
|
allowed?: boolean;
|
|
@@ -2469,6 +2571,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
2469
2571
|
allowed?: boolean;
|
|
2470
2572
|
maxItems?: number;
|
|
2471
2573
|
};
|
|
2574
|
+
databases?: {
|
|
2575
|
+
allowed?: boolean;
|
|
2576
|
+
maxItems?: number;
|
|
2577
|
+
maxBytesPerDatabase?: number;
|
|
2578
|
+
};
|
|
2472
2579
|
}, {
|
|
2473
2580
|
records?: {
|
|
2474
2581
|
allowed?: boolean;
|
|
@@ -2568,6 +2675,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
2568
2675
|
allowed?: boolean;
|
|
2569
2676
|
maxItems?: number;
|
|
2570
2677
|
};
|
|
2678
|
+
databases?: {
|
|
2679
|
+
allowed?: boolean;
|
|
2680
|
+
maxItems?: number;
|
|
2681
|
+
maxBytesPerDatabase?: number;
|
|
2682
|
+
};
|
|
2571
2683
|
}>>;
|
|
2572
2684
|
}, "strip", z.ZodTypeAny, {
|
|
2573
2685
|
features?: {
|
|
@@ -2669,6 +2781,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
2669
2781
|
allowed?: boolean;
|
|
2670
2782
|
maxItems?: number;
|
|
2671
2783
|
};
|
|
2784
|
+
databases?: {
|
|
2785
|
+
allowed?: boolean;
|
|
2786
|
+
maxItems?: number;
|
|
2787
|
+
maxBytesPerDatabase?: number;
|
|
2788
|
+
};
|
|
2672
2789
|
};
|
|
2673
2790
|
}, {
|
|
2674
2791
|
features?: {
|
|
@@ -2770,6 +2887,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
2770
2887
|
allowed?: boolean;
|
|
2771
2888
|
maxItems?: number;
|
|
2772
2889
|
};
|
|
2890
|
+
databases?: {
|
|
2891
|
+
allowed?: boolean;
|
|
2892
|
+
maxItems?: number;
|
|
2893
|
+
maxBytesPerDatabase?: number;
|
|
2894
|
+
};
|
|
2773
2895
|
};
|
|
2774
2896
|
}>, "strip">>>;
|
|
2775
2897
|
defaultFeatures: z.ZodOptional<z.ZodObject<{
|
|
@@ -3096,6 +3218,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3096
3218
|
allowed?: boolean;
|
|
3097
3219
|
maxItems?: number;
|
|
3098
3220
|
}>>>;
|
|
3221
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
3222
|
+
allowed: z.ZodBoolean;
|
|
3223
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
3224
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
3225
|
+
}, "strip", z.ZodTypeAny, {
|
|
3226
|
+
allowed?: boolean;
|
|
3227
|
+
maxItems?: number;
|
|
3228
|
+
maxBytesPerDatabase?: number;
|
|
3229
|
+
}, {
|
|
3230
|
+
allowed?: boolean;
|
|
3231
|
+
maxItems?: number;
|
|
3232
|
+
maxBytesPerDatabase?: number;
|
|
3233
|
+
}>>>;
|
|
3099
3234
|
}, "strip", z.ZodTypeAny, {
|
|
3100
3235
|
records?: {
|
|
3101
3236
|
allowed?: boolean;
|
|
@@ -3195,6 +3330,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3195
3330
|
allowed?: boolean;
|
|
3196
3331
|
maxItems?: number;
|
|
3197
3332
|
};
|
|
3333
|
+
databases?: {
|
|
3334
|
+
allowed?: boolean;
|
|
3335
|
+
maxItems?: number;
|
|
3336
|
+
maxBytesPerDatabase?: number;
|
|
3337
|
+
};
|
|
3198
3338
|
}, {
|
|
3199
3339
|
records?: {
|
|
3200
3340
|
allowed?: boolean;
|
|
@@ -3294,6 +3434,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3294
3434
|
allowed?: boolean;
|
|
3295
3435
|
maxItems?: number;
|
|
3296
3436
|
};
|
|
3437
|
+
databases?: {
|
|
3438
|
+
allowed?: boolean;
|
|
3439
|
+
maxItems?: number;
|
|
3440
|
+
maxBytesPerDatabase?: number;
|
|
3441
|
+
};
|
|
3297
3442
|
}>>;
|
|
3298
3443
|
studio: z.ZodOptional<z.ZodObject<{
|
|
3299
3444
|
records: z.ZodOptional<z.ZodObject<{
|
|
@@ -3618,6 +3763,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3618
3763
|
allowed?: boolean;
|
|
3619
3764
|
maxItems?: number;
|
|
3620
3765
|
}>>>;
|
|
3766
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
3767
|
+
allowed: z.ZodBoolean;
|
|
3768
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
3769
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
3770
|
+
}, "strip", z.ZodTypeAny, {
|
|
3771
|
+
allowed?: boolean;
|
|
3772
|
+
maxItems?: number;
|
|
3773
|
+
maxBytesPerDatabase?: number;
|
|
3774
|
+
}, {
|
|
3775
|
+
allowed?: boolean;
|
|
3776
|
+
maxItems?: number;
|
|
3777
|
+
maxBytesPerDatabase?: number;
|
|
3778
|
+
}>>>;
|
|
3621
3779
|
}, "strip", z.ZodTypeAny, {
|
|
3622
3780
|
records?: {
|
|
3623
3781
|
allowed?: boolean;
|
|
@@ -3717,6 +3875,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3717
3875
|
allowed?: boolean;
|
|
3718
3876
|
maxItems?: number;
|
|
3719
3877
|
};
|
|
3878
|
+
databases?: {
|
|
3879
|
+
allowed?: boolean;
|
|
3880
|
+
maxItems?: number;
|
|
3881
|
+
maxBytesPerDatabase?: number;
|
|
3882
|
+
};
|
|
3720
3883
|
}, {
|
|
3721
3884
|
records?: {
|
|
3722
3885
|
allowed?: boolean;
|
|
@@ -3816,6 +3979,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3816
3979
|
allowed?: boolean;
|
|
3817
3980
|
maxItems?: number;
|
|
3818
3981
|
};
|
|
3982
|
+
databases?: {
|
|
3983
|
+
allowed?: boolean;
|
|
3984
|
+
maxItems?: number;
|
|
3985
|
+
maxBytesPerDatabase?: number;
|
|
3986
|
+
};
|
|
3819
3987
|
}>>;
|
|
3820
3988
|
defaultPeriodLength: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
3821
3989
|
days: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3940,6 +4108,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
3940
4108
|
allowed?: boolean;
|
|
3941
4109
|
maxItems?: number;
|
|
3942
4110
|
};
|
|
4111
|
+
databases?: {
|
|
4112
|
+
allowed?: boolean;
|
|
4113
|
+
maxItems?: number;
|
|
4114
|
+
maxBytesPerDatabase?: number;
|
|
4115
|
+
};
|
|
3943
4116
|
};
|
|
3944
4117
|
studio?: {
|
|
3945
4118
|
records?: {
|
|
@@ -4040,6 +4213,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4040
4213
|
allowed?: boolean;
|
|
4041
4214
|
maxItems?: number;
|
|
4042
4215
|
};
|
|
4216
|
+
databases?: {
|
|
4217
|
+
allowed?: boolean;
|
|
4218
|
+
maxItems?: number;
|
|
4219
|
+
maxBytesPerDatabase?: number;
|
|
4220
|
+
};
|
|
4043
4221
|
};
|
|
4044
4222
|
defaultPeriodLength?: {
|
|
4045
4223
|
days?: number;
|
|
@@ -4150,6 +4328,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4150
4328
|
allowed?: boolean;
|
|
4151
4329
|
maxItems?: number;
|
|
4152
4330
|
};
|
|
4331
|
+
databases?: {
|
|
4332
|
+
allowed?: boolean;
|
|
4333
|
+
maxItems?: number;
|
|
4334
|
+
maxBytesPerDatabase?: number;
|
|
4335
|
+
};
|
|
4153
4336
|
};
|
|
4154
4337
|
studio?: {
|
|
4155
4338
|
records?: {
|
|
@@ -4250,6 +4433,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4250
4433
|
allowed?: boolean;
|
|
4251
4434
|
maxItems?: number;
|
|
4252
4435
|
};
|
|
4436
|
+
databases?: {
|
|
4437
|
+
allowed?: boolean;
|
|
4438
|
+
maxItems?: number;
|
|
4439
|
+
maxBytesPerDatabase?: number;
|
|
4440
|
+
};
|
|
4253
4441
|
};
|
|
4254
4442
|
defaultPeriodLength?: {
|
|
4255
4443
|
days?: number;
|
|
@@ -4605,6 +4793,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4605
4793
|
allowed?: boolean;
|
|
4606
4794
|
maxItems?: number;
|
|
4607
4795
|
}>>>;
|
|
4796
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
4797
|
+
allowed: z.ZodBoolean;
|
|
4798
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
4799
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
4800
|
+
}, "strip", z.ZodTypeAny, {
|
|
4801
|
+
allowed?: boolean;
|
|
4802
|
+
maxItems?: number;
|
|
4803
|
+
maxBytesPerDatabase?: number;
|
|
4804
|
+
}, {
|
|
4805
|
+
allowed?: boolean;
|
|
4806
|
+
maxItems?: number;
|
|
4807
|
+
maxBytesPerDatabase?: number;
|
|
4808
|
+
}>>>;
|
|
4608
4809
|
}, "strip", z.ZodTypeAny, {
|
|
4609
4810
|
records?: {
|
|
4610
4811
|
allowed?: boolean;
|
|
@@ -4704,6 +4905,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4704
4905
|
allowed?: boolean;
|
|
4705
4906
|
maxItems?: number;
|
|
4706
4907
|
};
|
|
4908
|
+
databases?: {
|
|
4909
|
+
allowed?: boolean;
|
|
4910
|
+
maxItems?: number;
|
|
4911
|
+
maxBytesPerDatabase?: number;
|
|
4912
|
+
};
|
|
4707
4913
|
}, {
|
|
4708
4914
|
records?: {
|
|
4709
4915
|
allowed?: boolean;
|
|
@@ -4803,6 +5009,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4803
5009
|
allowed?: boolean;
|
|
4804
5010
|
maxItems?: number;
|
|
4805
5011
|
};
|
|
5012
|
+
databases?: {
|
|
5013
|
+
allowed?: boolean;
|
|
5014
|
+
maxItems?: number;
|
|
5015
|
+
maxBytesPerDatabase?: number;
|
|
5016
|
+
};
|
|
4806
5017
|
}>>;
|
|
4807
5018
|
}, "strip", z.ZodTypeAny, {
|
|
4808
5019
|
features?: {
|
|
@@ -4904,6 +5115,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
4904
5115
|
allowed?: boolean;
|
|
4905
5116
|
maxItems?: number;
|
|
4906
5117
|
};
|
|
5118
|
+
databases?: {
|
|
5119
|
+
allowed?: boolean;
|
|
5120
|
+
maxItems?: number;
|
|
5121
|
+
maxBytesPerDatabase?: number;
|
|
5122
|
+
};
|
|
4907
5123
|
};
|
|
4908
5124
|
}, {
|
|
4909
5125
|
features?: {
|
|
@@ -5005,6 +5221,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5005
5221
|
allowed?: boolean;
|
|
5006
5222
|
maxItems?: number;
|
|
5007
5223
|
};
|
|
5224
|
+
databases?: {
|
|
5225
|
+
allowed?: boolean;
|
|
5226
|
+
maxItems?: number;
|
|
5227
|
+
maxBytesPerDatabase?: number;
|
|
5228
|
+
};
|
|
5008
5229
|
};
|
|
5009
5230
|
}>, "strip">;
|
|
5010
5231
|
defaultFeatures?: {
|
|
@@ -5107,6 +5328,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5107
5328
|
allowed?: boolean;
|
|
5108
5329
|
maxItems?: number;
|
|
5109
5330
|
};
|
|
5331
|
+
databases?: {
|
|
5332
|
+
allowed?: boolean;
|
|
5333
|
+
maxItems?: number;
|
|
5334
|
+
maxBytesPerDatabase?: number;
|
|
5335
|
+
};
|
|
5110
5336
|
};
|
|
5111
5337
|
studio?: {
|
|
5112
5338
|
records?: {
|
|
@@ -5207,6 +5433,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5207
5433
|
allowed?: boolean;
|
|
5208
5434
|
maxItems?: number;
|
|
5209
5435
|
};
|
|
5436
|
+
databases?: {
|
|
5437
|
+
allowed?: boolean;
|
|
5438
|
+
maxItems?: number;
|
|
5439
|
+
maxBytesPerDatabase?: number;
|
|
5440
|
+
};
|
|
5210
5441
|
};
|
|
5211
5442
|
defaultPeriodLength?: {
|
|
5212
5443
|
days?: number;
|
|
@@ -5562,6 +5793,19 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5562
5793
|
allowed?: boolean;
|
|
5563
5794
|
maxItems?: number;
|
|
5564
5795
|
}>>>;
|
|
5796
|
+
databases: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
5797
|
+
allowed: z.ZodBoolean;
|
|
5798
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
5799
|
+
maxBytesPerDatabase: z.ZodOptional<z.ZodNumber>;
|
|
5800
|
+
}, "strip", z.ZodTypeAny, {
|
|
5801
|
+
allowed?: boolean;
|
|
5802
|
+
maxItems?: number;
|
|
5803
|
+
maxBytesPerDatabase?: number;
|
|
5804
|
+
}, {
|
|
5805
|
+
allowed?: boolean;
|
|
5806
|
+
maxItems?: number;
|
|
5807
|
+
maxBytesPerDatabase?: number;
|
|
5808
|
+
}>>>;
|
|
5565
5809
|
}, "strip", z.ZodTypeAny, {
|
|
5566
5810
|
records?: {
|
|
5567
5811
|
allowed?: boolean;
|
|
@@ -5661,6 +5905,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5661
5905
|
allowed?: boolean;
|
|
5662
5906
|
maxItems?: number;
|
|
5663
5907
|
};
|
|
5908
|
+
databases?: {
|
|
5909
|
+
allowed?: boolean;
|
|
5910
|
+
maxItems?: number;
|
|
5911
|
+
maxBytesPerDatabase?: number;
|
|
5912
|
+
};
|
|
5664
5913
|
}, {
|
|
5665
5914
|
records?: {
|
|
5666
5915
|
allowed?: boolean;
|
|
@@ -5760,6 +6009,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5760
6009
|
allowed?: boolean;
|
|
5761
6010
|
maxItems?: number;
|
|
5762
6011
|
};
|
|
6012
|
+
databases?: {
|
|
6013
|
+
allowed?: boolean;
|
|
6014
|
+
maxItems?: number;
|
|
6015
|
+
maxBytesPerDatabase?: number;
|
|
6016
|
+
};
|
|
5763
6017
|
}>>;
|
|
5764
6018
|
}, "strip", z.ZodTypeAny, {
|
|
5765
6019
|
features?: {
|
|
@@ -5861,6 +6115,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5861
6115
|
allowed?: boolean;
|
|
5862
6116
|
maxItems?: number;
|
|
5863
6117
|
};
|
|
6118
|
+
databases?: {
|
|
6119
|
+
allowed?: boolean;
|
|
6120
|
+
maxItems?: number;
|
|
6121
|
+
maxBytesPerDatabase?: number;
|
|
6122
|
+
};
|
|
5864
6123
|
};
|
|
5865
6124
|
}, {
|
|
5866
6125
|
features?: {
|
|
@@ -5962,6 +6221,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
5962
6221
|
allowed?: boolean;
|
|
5963
6222
|
maxItems?: number;
|
|
5964
6223
|
};
|
|
6224
|
+
databases?: {
|
|
6225
|
+
allowed?: boolean;
|
|
6226
|
+
maxItems?: number;
|
|
6227
|
+
maxBytesPerDatabase?: number;
|
|
6228
|
+
};
|
|
5965
6229
|
};
|
|
5966
6230
|
}>, "strip">;
|
|
5967
6231
|
defaultFeatures?: {
|
|
@@ -6064,6 +6328,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
6064
6328
|
allowed?: boolean;
|
|
6065
6329
|
maxItems?: number;
|
|
6066
6330
|
};
|
|
6331
|
+
databases?: {
|
|
6332
|
+
allowed?: boolean;
|
|
6333
|
+
maxItems?: number;
|
|
6334
|
+
maxBytesPerDatabase?: number;
|
|
6335
|
+
};
|
|
6067
6336
|
};
|
|
6068
6337
|
studio?: {
|
|
6069
6338
|
records?: {
|
|
@@ -6164,6 +6433,11 @@ export declare const subscriptionConfigSchema: z.ZodObject<{
|
|
|
6164
6433
|
allowed?: boolean;
|
|
6165
6434
|
maxItems?: number;
|
|
6166
6435
|
};
|
|
6436
|
+
databases?: {
|
|
6437
|
+
allowed?: boolean;
|
|
6438
|
+
maxItems?: number;
|
|
6439
|
+
maxBytesPerDatabase?: number;
|
|
6440
|
+
};
|
|
6167
6441
|
};
|
|
6168
6442
|
defaultPeriodLength?: {
|
|
6169
6443
|
days?: number;
|
|
@@ -6372,6 +6646,10 @@ export interface FeaturesConfiguration {
|
|
|
6372
6646
|
* The configuration for search features.
|
|
6373
6647
|
*/
|
|
6374
6648
|
search?: SearchFeaturesConfiguration;
|
|
6649
|
+
/**
|
|
6650
|
+
* The configuration for database features.
|
|
6651
|
+
*/
|
|
6652
|
+
databases?: DatabasesFeaturesConfiguration;
|
|
6375
6653
|
}
|
|
6376
6654
|
export interface RecordFeaturesConfiguration {
|
|
6377
6655
|
/**
|
|
@@ -6568,8 +6846,17 @@ export type WebhooksFeaturesConfiguration = z.infer<typeof subscriptionFeaturesS
|
|
|
6568
6846
|
export type NotificationFeaturesConfiguration = z.infer<typeof subscriptionFeaturesSchema>['notifications'];
|
|
6569
6847
|
export type PackageFeaturesConfiguration = z.infer<typeof subscriptionFeaturesSchema>['packages'];
|
|
6570
6848
|
export type SearchFeaturesConfiguration = z.infer<typeof subscriptionFeaturesSchema>['search'];
|
|
6849
|
+
export type DatabasesFeaturesConfiguration = z.infer<typeof subscriptionFeaturesSchema>['databases'];
|
|
6571
6850
|
export declare function allowAllFeatures(): FeaturesConfiguration;
|
|
6572
6851
|
export declare function denyAllFeatures(): FeaturesConfiguration;
|
|
6852
|
+
/**
|
|
6853
|
+
* Gets the database features that are available for the given subscription.
|
|
6854
|
+
* @param config The configuration. If null, then all default features are allowed.
|
|
6855
|
+
* @param subscriptionStatus The status of the subscription.
|
|
6856
|
+
* @param subscriptionId The ID of the subscription.
|
|
6857
|
+
* @param type The type of the user.
|
|
6858
|
+
*/
|
|
6859
|
+
export declare function getDatabaseFeatures(config: SubscriptionConfiguration | null, subscriptionStatus: string, subscriptionId: string, type: 'user' | 'studio', periodStartMs?: number | null, periodEndMs?: number | null, nowMs?: number): DatabasesFeaturesConfiguration;
|
|
6573
6860
|
/**
|
|
6574
6861
|
* Gets the search features that are available for the given subscription.
|
|
6575
6862
|
* @param config The configuration. If null, then all default features are allowed.
|
|
@@ -427,6 +427,29 @@ export const subscriptionFeaturesSchema = z.object({
|
|
|
427
427
|
.default({
|
|
428
428
|
allowed: true,
|
|
429
429
|
}),
|
|
430
|
+
databases: z
|
|
431
|
+
.object({
|
|
432
|
+
allowed: z
|
|
433
|
+
.boolean()
|
|
434
|
+
.describe('Whether database records are allowed for the subscription.'),
|
|
435
|
+
maxItems: z
|
|
436
|
+
.number()
|
|
437
|
+
.describe('The maximum number of database records that can be created for the subscription. If not specified, then there is no limit.')
|
|
438
|
+
.int()
|
|
439
|
+
.positive()
|
|
440
|
+
.optional(),
|
|
441
|
+
maxBytesPerDatabase: z
|
|
442
|
+
.number()
|
|
443
|
+
.describe('The maximum size of the database in bytes. If not specified, then there is no limit.')
|
|
444
|
+
.int()
|
|
445
|
+
.positive()
|
|
446
|
+
.optional(),
|
|
447
|
+
})
|
|
448
|
+
.describe('The configuration for database records features. Defaults to allowed.')
|
|
449
|
+
.optional()
|
|
450
|
+
.default({
|
|
451
|
+
allowed: true,
|
|
452
|
+
}),
|
|
430
453
|
});
|
|
431
454
|
export const subscriptionConfigSchema = z.object({
|
|
432
455
|
webhookSecret: z
|
|
@@ -619,6 +642,9 @@ export function allowAllFeatures() {
|
|
|
619
642
|
search: {
|
|
620
643
|
allowed: true,
|
|
621
644
|
},
|
|
645
|
+
databases: {
|
|
646
|
+
allowed: true,
|
|
647
|
+
},
|
|
622
648
|
};
|
|
623
649
|
}
|
|
624
650
|
export function denyAllFeatures() {
|
|
@@ -669,8 +695,23 @@ export function denyAllFeatures() {
|
|
|
669
695
|
search: {
|
|
670
696
|
allowed: false,
|
|
671
697
|
},
|
|
698
|
+
databases: {
|
|
699
|
+
allowed: false,
|
|
700
|
+
},
|
|
672
701
|
};
|
|
673
702
|
}
|
|
703
|
+
/**
|
|
704
|
+
* Gets the database features that are available for the given subscription.
|
|
705
|
+
* @param config The configuration. If null, then all default features are allowed.
|
|
706
|
+
* @param subscriptionStatus The status of the subscription.
|
|
707
|
+
* @param subscriptionId The ID of the subscription.
|
|
708
|
+
* @param type The type of the user.
|
|
709
|
+
*/
|
|
710
|
+
export function getDatabaseFeatures(config, subscriptionStatus, subscriptionId, type, periodStartMs, periodEndMs, nowMs = Date.now()) {
|
|
711
|
+
var _a;
|
|
712
|
+
const features = getSubscriptionFeatures(config, subscriptionStatus, subscriptionId, type, periodStartMs, periodEndMs, nowMs);
|
|
713
|
+
return (_a = features.databases) !== null && _a !== void 0 ? _a : { allowed: true };
|
|
714
|
+
}
|
|
674
715
|
/**
|
|
675
716
|
* Gets the search features that are available for the given subscription.
|
|
676
717
|
* @param config The configuration. If null, then all default features are allowed.
|