@fuzdev/fuz_app 0.41.1 → 0.43.0
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/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +14 -7
- package/dist/auth/CLAUDE.md +96 -9
- package/dist/auth/account_action_specs.d.ts +8 -8
- package/dist/auth/account_action_specs.js +4 -4
- package/dist/auth/admin_action_specs.d.ts +8 -8
- package/dist/auth/admin_action_specs.js +4 -4
- package/dist/auth/migrations.d.ts +9 -7
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +9 -7
- package/dist/db/migrate.d.ts +124 -39
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +244 -75
- package/dist/db/status.d.ts +13 -7
- package/dist/db/status.d.ts.map +1 -1
- package/dist/db/status.js +56 -20
- package/dist/http/schema_helpers.d.ts +9 -0
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +9 -0
- package/dist/server/app_backend.d.ts +3 -2
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/testing/CLAUDE.md +13 -13
- package/dist/testing/admin_integration.js +9 -9
- package/dist/testing/audit_completeness.js +3 -3
- package/dist/testing/db.d.ts +1 -1
- package/dist/testing/db.js +2 -2
- package/dist/testing/integration.js +36 -36
- package/dist/testing/rpc_helpers.d.ts +14 -6
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +8 -5
- package/dist/ui/admin_rpc_adapters.js +4 -4
- package/package.json +1 -1
|
@@ -225,7 +225,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
225
225
|
app: test_app.app,
|
|
226
226
|
path: rpc_path,
|
|
227
227
|
spec: account_verify_action_spec,
|
|
228
|
-
params:
|
|
228
|
+
params: undefined,
|
|
229
229
|
headers: create_headers(),
|
|
230
230
|
});
|
|
231
231
|
assert.strictEqual(verify_res.status, 200);
|
|
@@ -243,7 +243,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
243
243
|
app: test_app.app,
|
|
244
244
|
path: rpc_path,
|
|
245
245
|
spec: account_verify_action_spec,
|
|
246
|
-
params:
|
|
246
|
+
params: undefined,
|
|
247
247
|
headers: create_headers(),
|
|
248
248
|
});
|
|
249
249
|
assert.strictEqual(verify_after.status, 401);
|
|
@@ -315,7 +315,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
315
315
|
app: test_app.app,
|
|
316
316
|
path: rpc_path,
|
|
317
317
|
spec: account_verify_action_spec,
|
|
318
|
-
params:
|
|
318
|
+
params: undefined,
|
|
319
319
|
headers: { host: 'localhost' },
|
|
320
320
|
});
|
|
321
321
|
assert.strictEqual(res.status, 401);
|
|
@@ -326,7 +326,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
326
326
|
app: test_app.app,
|
|
327
327
|
path: rpc_path,
|
|
328
328
|
spec: account_verify_action_spec,
|
|
329
|
-
params:
|
|
329
|
+
params: undefined,
|
|
330
330
|
headers: { cookie: `${cookie_name}=random_garbage_value` },
|
|
331
331
|
});
|
|
332
332
|
assert.strictEqual(res.status, 401);
|
|
@@ -338,7 +338,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
338
338
|
app: test_app.app,
|
|
339
339
|
path: rpc_path,
|
|
340
340
|
spec: account_verify_action_spec,
|
|
341
|
-
params:
|
|
341
|
+
params: undefined,
|
|
342
342
|
headers: { cookie: `${cookie_name}=${expired_cookie}` },
|
|
343
343
|
});
|
|
344
344
|
assert.strictEqual(res.status, 401);
|
|
@@ -354,7 +354,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
354
354
|
app: test_app.app,
|
|
355
355
|
path: rpc_path,
|
|
356
356
|
spec: account_session_list_action_spec,
|
|
357
|
-
params:
|
|
357
|
+
params: undefined,
|
|
358
358
|
headers,
|
|
359
359
|
});
|
|
360
360
|
assert.ok(list_res.ok, 'account_session_list should succeed');
|
|
@@ -376,7 +376,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
376
376
|
app: test_app.app,
|
|
377
377
|
path: rpc_path,
|
|
378
378
|
spec: account_verify_action_spec,
|
|
379
|
-
params:
|
|
379
|
+
params: undefined,
|
|
380
380
|
headers,
|
|
381
381
|
});
|
|
382
382
|
assert.strictEqual(after.status, 401);
|
|
@@ -389,7 +389,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
389
389
|
app: test_app.app,
|
|
390
390
|
path: rpc_path,
|
|
391
391
|
spec: account_verify_action_spec,
|
|
392
|
-
params:
|
|
392
|
+
params: undefined,
|
|
393
393
|
headers,
|
|
394
394
|
});
|
|
395
395
|
assert.strictEqual(before.status, 200);
|
|
@@ -398,7 +398,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
398
398
|
app: test_app.app,
|
|
399
399
|
path: rpc_path,
|
|
400
400
|
spec: account_session_revoke_all_action_spec,
|
|
401
|
-
params:
|
|
401
|
+
params: undefined,
|
|
402
402
|
headers,
|
|
403
403
|
});
|
|
404
404
|
assert.ok(revoke_res.ok, 'account_session_revoke_all should succeed');
|
|
@@ -407,7 +407,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
407
407
|
app: test_app.app,
|
|
408
408
|
path: rpc_path,
|
|
409
409
|
spec: account_verify_action_spec,
|
|
410
|
-
params:
|
|
410
|
+
params: undefined,
|
|
411
411
|
headers,
|
|
412
412
|
});
|
|
413
413
|
assert.strictEqual(after.status, 401);
|
|
@@ -443,7 +443,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
443
443
|
app: test_app.app,
|
|
444
444
|
path: rpc_path,
|
|
445
445
|
spec: account_verify_action_spec,
|
|
446
|
-
params:
|
|
446
|
+
params: undefined,
|
|
447
447
|
headers: test_app.create_session_headers(),
|
|
448
448
|
});
|
|
449
449
|
assert.strictEqual(verify_after.status, 401);
|
|
@@ -485,7 +485,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
485
485
|
app: test_app.app,
|
|
486
486
|
path: rpc_path,
|
|
487
487
|
spec: account_verify_action_spec,
|
|
488
|
-
params:
|
|
488
|
+
params: undefined,
|
|
489
489
|
headers: test_app.create_session_headers(),
|
|
490
490
|
});
|
|
491
491
|
assert.strictEqual(verify_res.status, 200);
|
|
@@ -521,7 +521,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
521
521
|
app: test_app.app,
|
|
522
522
|
path: rpc_path,
|
|
523
523
|
spec: account_verify_action_spec,
|
|
524
|
-
params:
|
|
524
|
+
params: undefined,
|
|
525
525
|
headers: test_app.create_session_headers(),
|
|
526
526
|
});
|
|
527
527
|
assert.strictEqual(res.status, 200);
|
|
@@ -534,7 +534,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
534
534
|
app: test_app.app,
|
|
535
535
|
path: rpc_path,
|
|
536
536
|
spec: account_verify_action_spec,
|
|
537
|
-
params:
|
|
537
|
+
params: undefined,
|
|
538
538
|
headers: { cookie: `${cookie_name}=${test_app.backend.session_cookie}` },
|
|
539
539
|
suppress_default_origin: true,
|
|
540
540
|
});
|
|
@@ -549,7 +549,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
549
549
|
app: test_app.app,
|
|
550
550
|
path: rpc_path,
|
|
551
551
|
spec: account_verify_action_spec,
|
|
552
|
-
params:
|
|
552
|
+
params: undefined,
|
|
553
553
|
headers: test_app.create_bearer_headers(),
|
|
554
554
|
suppress_default_origin: true,
|
|
555
555
|
});
|
|
@@ -561,7 +561,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
561
561
|
app: test_app.app,
|
|
562
562
|
path: rpc_path,
|
|
563
563
|
spec: account_verify_action_spec,
|
|
564
|
-
params:
|
|
564
|
+
params: undefined,
|
|
565
565
|
headers: { authorization: 'Bearer secret_fuz_token_invalid' },
|
|
566
566
|
suppress_default_origin: true,
|
|
567
567
|
});
|
|
@@ -575,7 +575,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
575
575
|
app: test_app.app,
|
|
576
576
|
path: rpc_path,
|
|
577
577
|
spec: account_verify_action_spec,
|
|
578
|
-
params:
|
|
578
|
+
params: undefined,
|
|
579
579
|
headers: bearer_headers,
|
|
580
580
|
suppress_default_origin: true,
|
|
581
581
|
});
|
|
@@ -585,7 +585,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
585
585
|
app: test_app.app,
|
|
586
586
|
path: rpc_path,
|
|
587
587
|
spec: account_verify_action_spec,
|
|
588
|
-
params:
|
|
588
|
+
params: undefined,
|
|
589
589
|
headers: { ...bearer_headers, origin: 'http://localhost:5173' },
|
|
590
590
|
});
|
|
591
591
|
assert.strictEqual(res.status, 401);
|
|
@@ -610,7 +610,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
610
610
|
app: test_app.app,
|
|
611
611
|
path: rpc_path,
|
|
612
612
|
spec: account_verify_action_spec,
|
|
613
|
-
params:
|
|
613
|
+
params: undefined,
|
|
614
614
|
headers: { authorization: `Bearer ${token}` },
|
|
615
615
|
suppress_default_origin: true,
|
|
616
616
|
});
|
|
@@ -629,7 +629,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
629
629
|
app: test_app.app,
|
|
630
630
|
path: rpc_path,
|
|
631
631
|
spec: account_verify_action_spec,
|
|
632
|
-
params:
|
|
632
|
+
params: undefined,
|
|
633
633
|
headers: { authorization: `Bearer ${token}` },
|
|
634
634
|
suppress_default_origin: true,
|
|
635
635
|
});
|
|
@@ -662,7 +662,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
662
662
|
app: test_app.app,
|
|
663
663
|
path: rpc_path,
|
|
664
664
|
spec: account_session_revoke_all_action_spec,
|
|
665
|
-
params:
|
|
665
|
+
params: undefined,
|
|
666
666
|
headers: test_app.create_session_headers(),
|
|
667
667
|
});
|
|
668
668
|
assert.ok(revoke_res.ok, 'account_session_revoke_all should succeed');
|
|
@@ -671,7 +671,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
671
671
|
app: test_app.app,
|
|
672
672
|
path: rpc_path,
|
|
673
673
|
spec: account_verify_action_spec,
|
|
674
|
-
params:
|
|
674
|
+
params: undefined,
|
|
675
675
|
headers: { cookie: `${cookie_name}=${user_b.session_cookie}` },
|
|
676
676
|
});
|
|
677
677
|
assert.strictEqual(verify_b.status, 200);
|
|
@@ -685,7 +685,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
685
685
|
app: test_app.app,
|
|
686
686
|
path: rpc_path,
|
|
687
687
|
spec: account_session_list_action_spec,
|
|
688
|
-
params:
|
|
688
|
+
params: undefined,
|
|
689
689
|
headers: user_b_headers,
|
|
690
690
|
});
|
|
691
691
|
assert.ok(list_res.ok, 'account_session_list should succeed');
|
|
@@ -706,7 +706,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
706
706
|
app: test_app.app,
|
|
707
707
|
path: rpc_path,
|
|
708
708
|
spec: account_verify_action_spec,
|
|
709
|
-
params:
|
|
709
|
+
params: undefined,
|
|
710
710
|
headers: user_b_headers,
|
|
711
711
|
});
|
|
712
712
|
assert.strictEqual(verify_b.status, 200);
|
|
@@ -720,7 +720,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
720
720
|
app: test_app.app,
|
|
721
721
|
path: rpc_path,
|
|
722
722
|
spec: account_token_list_action_spec,
|
|
723
|
-
params:
|
|
723
|
+
params: undefined,
|
|
724
724
|
headers: user_b_headers,
|
|
725
725
|
});
|
|
726
726
|
assert.ok(list_res.ok, 'account_token_list should succeed');
|
|
@@ -741,7 +741,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
741
741
|
app: test_app.app,
|
|
742
742
|
path: rpc_path,
|
|
743
743
|
spec: account_verify_action_spec,
|
|
744
|
-
params:
|
|
744
|
+
params: undefined,
|
|
745
745
|
headers: { authorization: `Bearer ${user_b.api_token}` },
|
|
746
746
|
suppress_default_origin: true,
|
|
747
747
|
});
|
|
@@ -755,7 +755,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
755
755
|
app: test_app.app,
|
|
756
756
|
path: rpc_path,
|
|
757
757
|
spec: account_session_list_action_spec,
|
|
758
|
-
params:
|
|
758
|
+
params: undefined,
|
|
759
759
|
headers: test_app.create_session_headers(),
|
|
760
760
|
});
|
|
761
761
|
assert.ok(res.ok, 'account_session_list should succeed');
|
|
@@ -772,7 +772,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
772
772
|
app: test_app.app,
|
|
773
773
|
path: rpc_path,
|
|
774
774
|
spec: account_token_list_action_spec,
|
|
775
|
-
params:
|
|
775
|
+
params: undefined,
|
|
776
776
|
headers: test_app.create_session_headers(),
|
|
777
777
|
});
|
|
778
778
|
assert.ok(res.ok, 'account_token_list should succeed');
|
|
@@ -898,7 +898,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
898
898
|
app: test_app.app,
|
|
899
899
|
path: rpc_path,
|
|
900
900
|
spec: account_session_list_action_spec,
|
|
901
|
-
params:
|
|
901
|
+
params: undefined,
|
|
902
902
|
headers: { host: 'localhost' },
|
|
903
903
|
});
|
|
904
904
|
assert.strictEqual(session_list.status, 401);
|
|
@@ -907,7 +907,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
907
907
|
app: test_app.app,
|
|
908
908
|
path: rpc_path,
|
|
909
909
|
spec: account_session_revoke_all_action_spec,
|
|
910
|
-
params:
|
|
910
|
+
params: undefined,
|
|
911
911
|
headers: { host: 'localhost' },
|
|
912
912
|
});
|
|
913
913
|
assert.strictEqual(session_revoke_all.status, 401);
|
|
@@ -916,7 +916,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
916
916
|
app: test_app.app,
|
|
917
917
|
path: rpc_path,
|
|
918
918
|
spec: account_token_list_action_spec,
|
|
919
|
-
params:
|
|
919
|
+
params: undefined,
|
|
920
920
|
headers: { host: 'localhost' },
|
|
921
921
|
});
|
|
922
922
|
assert.strictEqual(token_list.status, 401);
|
|
@@ -934,7 +934,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
934
934
|
app: test_app.app,
|
|
935
935
|
path: rpc_path,
|
|
936
936
|
spec: account_verify_action_spec,
|
|
937
|
-
params:
|
|
937
|
+
params: undefined,
|
|
938
938
|
headers: { host: 'localhost' },
|
|
939
939
|
});
|
|
940
940
|
assert.strictEqual(verify.status, 401);
|
|
@@ -960,7 +960,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
960
960
|
app: test_app.app,
|
|
961
961
|
path: rpc_path,
|
|
962
962
|
spec: account_verify_action_spec,
|
|
963
|
-
params:
|
|
963
|
+
params: undefined,
|
|
964
964
|
headers: { host: 'localhost' },
|
|
965
965
|
});
|
|
966
966
|
assert.strictEqual(res.status, 401);
|
|
@@ -980,7 +980,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
980
980
|
app: test_app.app,
|
|
981
981
|
path: rpc_path,
|
|
982
982
|
spec: account_verify_action_spec,
|
|
983
|
-
params:
|
|
983
|
+
params: undefined,
|
|
984
984
|
headers: { cookie: `${cookie_name}=${expired_cookie}` },
|
|
985
985
|
});
|
|
986
986
|
assert.strictEqual(res.status, 401, 'Expired session cookie should be rejected');
|
|
@@ -1054,7 +1054,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1054
1054
|
app: test_app.app,
|
|
1055
1055
|
path: rpc_path,
|
|
1056
1056
|
spec: account_verify_action_spec,
|
|
1057
|
-
params:
|
|
1057
|
+
params: undefined,
|
|
1058
1058
|
headers: { authorization: `Bearer ${raw_token}` },
|
|
1059
1059
|
suppress_default_origin: true,
|
|
1060
1060
|
});
|
|
@@ -1077,7 +1077,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1077
1077
|
app: test_app.app,
|
|
1078
1078
|
path: rpc_path,
|
|
1079
1079
|
spec: account_verify_action_spec,
|
|
1080
|
-
params:
|
|
1080
|
+
params: undefined,
|
|
1081
1081
|
headers: { authorization: `Bearer ${raw_token}` },
|
|
1082
1082
|
suppress_default_origin: true,
|
|
1083
1083
|
});
|
|
@@ -40,10 +40,13 @@ export declare const resolve_rpc_endpoints_for_setup: (rpc_endpoints: RpcEndpoin
|
|
|
40
40
|
* Create a `RequestInit` for a JSON-RPC POST request.
|
|
41
41
|
*
|
|
42
42
|
* @param method - JSON-RPC method name
|
|
43
|
-
* @param params - params
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* @param params - params (omit for parameterless methods; `null` is also
|
|
44
|
+
* stripped for ergonomic call sites — JSON-RPC 2.0 §4.2
|
|
45
|
+
* forbids `"params": null` on the wire, and `create_rpc_endpoint`
|
|
46
|
+
* rejects `z.null()` action input schemas at registration).
|
|
47
|
+
* Tests that need to construct a literal `"params": null`
|
|
48
|
+
* envelope (e.g. asserting envelope-level rejection) should
|
|
49
|
+
* build the body inline rather than route through this helper.
|
|
47
50
|
* @param id - request id (default `'test'`)
|
|
48
51
|
* @returns a `RequestInit` with the JSON-RPC envelope as body
|
|
49
52
|
*/
|
|
@@ -53,7 +56,7 @@ export declare const create_rpc_post_init: (method: string, params?: unknown, id
|
|
|
53
56
|
*
|
|
54
57
|
* @param endpoint_path - the RPC endpoint path (e.g., `/api/rpc`)
|
|
55
58
|
* @param method - JSON-RPC method name
|
|
56
|
-
* @param params - params
|
|
59
|
+
* @param params - params (omit for parameterless methods)
|
|
57
60
|
* @param id - request id (default `'test'`)
|
|
58
61
|
* @returns the full URL with query string
|
|
59
62
|
*/
|
|
@@ -113,7 +116,12 @@ export interface RpcCallArgs {
|
|
|
113
116
|
path: string;
|
|
114
117
|
/** JSON-RPC method name. */
|
|
115
118
|
method: string;
|
|
116
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Params for the call. Omit (or pass `undefined`) for parameterless
|
|
121
|
+
* (`z.void()`) methods — the helper drops `params` from the envelope
|
|
122
|
+
* either way. See `create_rpc_post_init` for the null-stripping
|
|
123
|
+
* affordance and JSON-RPC 2.0 §4.2's prohibition on `params: null`.
|
|
124
|
+
*/
|
|
117
125
|
params?: unknown;
|
|
118
126
|
/** Extra request headers (session cookie, bearer, etc.). Overrides defaults. */
|
|
119
127
|
headers?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAa7B,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAIN,KAAK,gBAAgB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAC,qBAAqB,EAAE,mBAAmB,EAAE,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACpG,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAG9D;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAChC,KAAK,CAAC,eAAe,CAAC,GACtB,CAAC,CAAC,GAAG,EAAE,gBAAgB,KAAK,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,+BAA+B,GAC3C,eAAe,uBAAuB,EACtC,iBAAiB,cAAc,CAAC,MAAM,CAAC,KACrC,KAAK,CAAC,eAAe,CAuBvB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"rpc_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAa7B,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAIN,KAAK,gBAAgB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAA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AC7C,QAAQ,MAAM,KACZ;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAC,GAAG,SAOtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC3B,eAAe,aAAa,CAAC,qBAAqB,CAAC,EACnD,QAAQ,MAAM,KACZ;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,mBAAmB,CAAA;CAAC,GAAG,SAOrD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACrC,eAAe,aAAa,CAAC,eAAe,CAAC,KAC3C,MAYF,CAAC"}
|
|
@@ -55,10 +55,13 @@ export const resolve_rpc_endpoints_for_setup = (rpc_endpoints, session_options)
|
|
|
55
55
|
* Create a `RequestInit` for a JSON-RPC POST request.
|
|
56
56
|
*
|
|
57
57
|
* @param method - JSON-RPC method name
|
|
58
|
-
* @param params - params
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
58
|
+
* @param params - params (omit for parameterless methods; `null` is also
|
|
59
|
+
* stripped for ergonomic call sites — JSON-RPC 2.0 §4.2
|
|
60
|
+
* forbids `"params": null` on the wire, and `create_rpc_endpoint`
|
|
61
|
+
* rejects `z.null()` action input schemas at registration).
|
|
62
|
+
* Tests that need to construct a literal `"params": null`
|
|
63
|
+
* envelope (e.g. asserting envelope-level rejection) should
|
|
64
|
+
* build the body inline rather than route through this helper.
|
|
62
65
|
* @param id - request id (default `'test'`)
|
|
63
66
|
* @returns a `RequestInit` with the JSON-RPC envelope as body
|
|
64
67
|
*/
|
|
@@ -77,7 +80,7 @@ export const create_rpc_post_init = (method, params, id = 'test') => {
|
|
|
77
80
|
*
|
|
78
81
|
* @param endpoint_path - the RPC endpoint path (e.g., `/api/rpc`)
|
|
79
82
|
* @param method - JSON-RPC method name
|
|
80
|
-
* @param params - params
|
|
83
|
+
* @param params - params (omit for parameterless methods)
|
|
81
84
|
* @param id - request id (default `'test'`)
|
|
82
85
|
* @returns the full URL with query string
|
|
83
86
|
*/
|
|
@@ -68,8 +68,8 @@ import { format_scope_context } from './format_scope.js';
|
|
|
68
68
|
*/
|
|
69
69
|
export const create_admin_rpc_adapters = (rpc_call) => ({
|
|
70
70
|
admin_accounts: {
|
|
71
|
-
list_accounts: () => rpc_call('admin_account_list'
|
|
72
|
-
list_sessions: () => rpc_call('admin_session_list'
|
|
71
|
+
list_accounts: () => rpc_call('admin_account_list'),
|
|
72
|
+
list_sessions: () => rpc_call('admin_session_list'),
|
|
73
73
|
grant_permit: (params) => rpc_call('permit_offer_create', params),
|
|
74
74
|
revoke_permit: (params) => rpc_call('permit_revoke', params),
|
|
75
75
|
retract_offer: (offer_id) => rpc_call('permit_offer_retract', { offer_id }),
|
|
@@ -77,7 +77,7 @@ export const create_admin_rpc_adapters = (rpc_call) => ({
|
|
|
77
77
|
token_revoke_all: (params) => rpc_call('admin_token_revoke_all', params),
|
|
78
78
|
},
|
|
79
79
|
admin_invites: {
|
|
80
|
-
list: () => rpc_call('invite_list'
|
|
80
|
+
list: () => rpc_call('invite_list'),
|
|
81
81
|
create: (params) => rpc_call('invite_create', params),
|
|
82
82
|
delete: (params) => rpc_call('invite_delete', params),
|
|
83
83
|
},
|
|
@@ -86,7 +86,7 @@ export const create_admin_rpc_adapters = (rpc_call) => ({
|
|
|
86
86
|
permit_history: (params) => rpc_call('audit_log_permit_history', params ?? {}),
|
|
87
87
|
},
|
|
88
88
|
app_settings: {
|
|
89
|
-
get: () => rpc_call('app_settings_get'
|
|
89
|
+
get: () => rpc_call('app_settings_get'),
|
|
90
90
|
update: (params) => rpc_call('app_settings_update', params),
|
|
91
91
|
},
|
|
92
92
|
});
|