@q9labsai/chalk-client 4.1.15 → 4.1.17

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 (149) hide show
  1. package/README.md +100 -5
  2. package/dist/access/grant.d.ts.map +1 -1
  3. package/dist/access/manager.d.ts.map +1 -1
  4. package/dist/{chunk-PQNSA7ZN.js → chunk-2DZUHV6I.js} +782 -122
  5. package/dist/{chunk-6ONSFCIY.js → chunk-A7BVZEFM.js} +7 -3
  6. package/dist/{chunk-LQSXEWLL.js → chunk-AUQTQOLR.js} +2685 -511
  7. package/dist/{chunk-PWUU6T3R.js → chunk-CZUJNAUI.js} +1196 -874
  8. package/dist/{chunk-NKOKY2AE.js → chunk-EWTITNJ3.js} +15 -101
  9. package/dist/chunk-HW5TTZL2.js +99 -0
  10. package/dist/chunk-RCDXIDCN.js +33 -0
  11. package/dist/{chunk-LSDDADCN.js → chunk-ZRMGKMX4.js} +1728 -517
  12. package/dist/client.d.ts +1452 -465
  13. package/dist/client.d.ts.map +1 -1
  14. package/dist/connection/dependencies.d.ts +11 -0
  15. package/dist/connection/dependencies.d.ts.map +1 -1
  16. package/dist/connection/diagnostics.d.ts +1 -1
  17. package/dist/connection/diagnostics.d.ts.map +1 -1
  18. package/dist/connection/index.d.ts +3 -0
  19. package/dist/connection/index.d.ts.map +1 -1
  20. package/dist/connection/lifecycle.d.ts +4 -1
  21. package/dist/connection/lifecycle.d.ts.map +1 -1
  22. package/dist/connection/media-devices.d.ts.map +1 -1
  23. package/dist/connection/production.d.ts +4 -1
  24. package/dist/connection/production.d.ts.map +1 -1
  25. package/dist/connection/types.d.ts +2 -2
  26. package/dist/connection/types.d.ts.map +1 -1
  27. package/dist/effect.js +355 -130
  28. package/dist/feedback/collector.d.ts +14 -0
  29. package/dist/feedback/collector.d.ts.map +1 -0
  30. package/dist/feedback/context.d.ts +38 -0
  31. package/dist/feedback/context.d.ts.map +1 -0
  32. package/dist/feedback/controller.d.ts +4 -0
  33. package/dist/feedback/controller.d.ts.map +1 -0
  34. package/dist/feedback/index.d.ts +7 -0
  35. package/dist/feedback/index.d.ts.map +1 -0
  36. package/dist/feedback/transport.d.ts +29 -0
  37. package/dist/feedback/transport.d.ts.map +1 -0
  38. package/dist/feedback/types.d.ts +202 -0
  39. package/dist/feedback/types.d.ts.map +1 -0
  40. package/dist/feedback/validation.d.ts +30 -0
  41. package/dist/feedback/validation.d.ts.map +1 -0
  42. package/dist/foreground-deadline.d.ts +9 -0
  43. package/dist/foreground-deadline.d.ts.map +1 -0
  44. package/dist/generated/http-api.d.ts +1438 -461
  45. package/dist/generated/http-api.d.ts.map +1 -1
  46. package/dist/generated/schemas.d.ts +2667 -842
  47. package/dist/generated/schemas.d.ts.map +1 -1
  48. package/dist/index.d.ts +1 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +136 -21
  51. package/dist/media/camera-uplink.d.ts +13 -0
  52. package/dist/media/camera-uplink.d.ts.map +1 -0
  53. package/dist/media/capture-error.d.ts +27 -0
  54. package/dist/media/capture-error.d.ts.map +1 -0
  55. package/dist/media/client.d.ts +4 -0
  56. package/dist/media/client.d.ts.map +1 -1
  57. package/dist/media/index.d.ts +1 -0
  58. package/dist/media/index.d.ts.map +1 -1
  59. package/dist/media/index.js +5 -1
  60. package/dist/media/plane.d.ts +4 -0
  61. package/dist/media/plane.d.ts.map +1 -1
  62. package/dist/media/remote-track-response.d.ts +6 -0
  63. package/dist/media/remote-track-response.d.ts.map +1 -0
  64. package/dist/media/rtk.d.ts.map +1 -1
  65. package/dist/media/transport.d.ts.map +1 -1
  66. package/dist/media/types.d.ts +20 -2
  67. package/dist/media/types.d.ts.map +1 -1
  68. package/dist/public-invites/client.d.ts.map +1 -1
  69. package/dist/public-invites/index.js +4 -3
  70. package/dist/public-invites/types.d.ts +4 -2
  71. package/dist/public-invites/types.d.ts.map +1 -1
  72. package/dist/server/access-refresh.d.cts +13 -0
  73. package/dist/server/access-refresh.d.ts +14 -0
  74. package/dist/server/access-refresh.d.ts.map +1 -0
  75. package/dist/server/client.d.ts.map +1 -1
  76. package/dist/server/index.cjs +189 -23
  77. package/dist/server/index.d.cts +2 -1
  78. package/dist/server/index.d.ts +2 -1
  79. package/dist/server/index.d.ts.map +1 -1
  80. package/dist/server/index.js +187 -22
  81. package/dist/server/types.d.cts +76 -1
  82. package/dist/server/types.d.ts +76 -1
  83. package/dist/server/types.d.ts.map +1 -1
  84. package/dist/space-client/chat-controller.d.ts +3 -0
  85. package/dist/space-client/chat-controller.d.ts.map +1 -1
  86. package/dist/space-client/controller-effects.d.ts +6 -0
  87. package/dist/space-client/controller-effects.d.ts.map +1 -1
  88. package/dist/space-client/core.d.ts +12 -1
  89. package/dist/space-client/core.d.ts.map +1 -1
  90. package/dist/space-client/core.test.helpers.d.ts +2 -1
  91. package/dist/space-client/core.test.helpers.d.ts.map +1 -1
  92. package/dist/space-client/effect.d.ts +5 -0
  93. package/dist/space-client/effect.d.ts.map +1 -1
  94. package/dist/space-client/episode-diagnostic-runtime.d.ts +3 -0
  95. package/dist/space-client/episode-diagnostic-runtime.d.ts.map +1 -1
  96. package/dist/space-client/errors.d.ts.map +1 -1
  97. package/dist/space-client/index.d.ts +4 -1
  98. package/dist/space-client/index.d.ts.map +1 -1
  99. package/dist/space-client/media-controller.d.ts.map +1 -1
  100. package/dist/space-client/offline-actions-storage.d.ts +66 -0
  101. package/dist/space-client/offline-actions-storage.d.ts.map +1 -0
  102. package/dist/space-client/offline-actions.d.ts +36 -0
  103. package/dist/space-client/offline-actions.d.ts.map +1 -0
  104. package/dist/space-client/participants-controller.d.ts +2 -1
  105. package/dist/space-client/participants-controller.d.ts.map +1 -1
  106. package/dist/space-client/recording-controller.d.ts +20 -0
  107. package/dist/space-client/recording-controller.d.ts.map +1 -0
  108. package/dist/space-client/reload-rejoin.d.ts +24 -0
  109. package/dist/space-client/reload-rejoin.d.ts.map +1 -0
  110. package/dist/space-client/space-client.d.ts.map +1 -1
  111. package/dist/space-client/store.d.ts +3 -1
  112. package/dist/space-client/store.d.ts.map +1 -1
  113. package/dist/space-client/terminal.test.helpers.d.ts +115 -0
  114. package/dist/space-client/terminal.test.helpers.d.ts.map +1 -0
  115. package/dist/space-client/types.d.ts +42 -4
  116. package/dist/space-client/types.d.ts.map +1 -1
  117. package/dist/sync/index.js +2 -1
  118. package/dist/sync/v1-client.d.ts +2 -5
  119. package/dist/sync/v1-client.d.ts.map +1 -1
  120. package/dist/sync/v1-collaboration-state.d.ts +65 -0
  121. package/dist/sync/v1-collaboration-state.d.ts.map +1 -0
  122. package/dist/sync/v1-command-scheduler.d.ts +54 -0
  123. package/dist/sync/v1-command-scheduler.d.ts.map +1 -0
  124. package/dist/sync/v1-deferred.d.ts +8 -0
  125. package/dist/sync/v1-deferred.d.ts.map +1 -0
  126. package/dist/sync/v1-error.d.ts +5 -0
  127. package/dist/sync/v1-error.d.ts.map +1 -0
  128. package/dist/sync/v1-frame-signature.d.ts +2 -0
  129. package/dist/sync/v1-frame-signature.d.ts.map +1 -0
  130. package/dist/sync/v1-live-target-coordinator.d.ts +32 -0
  131. package/dist/sync/v1-live-target-coordinator.d.ts.map +1 -0
  132. package/dist/sync/v1-types.d.ts +3 -0
  133. package/dist/sync/v1-types.d.ts.map +1 -1
  134. package/dist/telemetry/index.js +9 -7
  135. package/dist/telemetry/reconnect.d.ts +7 -0
  136. package/dist/telemetry/reconnect.d.ts.map +1 -0
  137. package/dist/telemetry/trace.d.ts +1 -1
  138. package/dist/telemetry/trace.d.ts.map +1 -1
  139. package/dist/webhooks/generated/event-v1.d.cts +10 -2
  140. package/dist/webhooks/generated/event-v1.d.ts +10 -2
  141. package/dist/webhooks/generated/event-v1.d.ts.map +1 -1
  142. package/dist/webhooks/generated/fixtures-v1.d.cts +2 -2
  143. package/dist/webhooks/generated/fixtures-v1.d.ts +2 -2
  144. package/dist/webhooks/index.cjs +10 -2
  145. package/dist/webhooks/index.js +10 -2
  146. package/dist/webhooks/test.cjs +2 -2
  147. package/dist/webhooks/test.js +2 -2
  148. package/dist/whiteboard/v1-client.d.ts.map +1 -1
  149. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import type { AccessContext } from "../space-client/types.js";
2
+ import type { IssueAccessGrantInput } from "./types.js";
3
+ import { type AccessGrant, type ParticipantMediaCredential } from "../access/grant.js";
4
+ /** Forward the browser request unchanged; only Chalk decides whether media needs replacing. */
5
+ export type AccessRefreshRequest = Pick<AccessContext, "replaceMediaConnection">;
6
+ /** Keep this on your backend, scoped to the authenticated Participant. Never send it to a browser or log it. */
7
+ export type AccessRefreshState = {
8
+ readonly participantGeneration: number;
9
+ readonly currentMediaToken: ParticipantMediaCredential;
10
+ };
11
+ /** Retain after admission and every issueAccess response; pass directly to participants.issueAccess for refresh. */
12
+ export declare function getAccessRefreshState(access: AccessGrant): AccessRefreshState;
13
+ export declare function accessRefreshInput(state: IssueAccessGrantInput, request?: AccessRefreshRequest): IssueAccessGrantInput;
14
+ //# sourceMappingURL=access-refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-refresh.d.ts","sourceRoot":"","sources":["../../src/server/access-refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAA0B,KAAK,WAAW,EAAE,KAAK,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAE/G,+FAA+F;AAC/F,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,wBAAwB,CAAC,CAAC;AAEjF,gHAAgH;AAChH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;CACxD,CAAC;AAEF,oHAAoH;AACpH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,kBAAkB,CAM7E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,qBAAqB,CAGtH"}
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/server/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAKV,iBAAiB,EACjB,wBAAwB,EAmBzB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,iBAAiB,CAuE5F"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/server/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAKV,iBAAiB,EACjB,wBAAwB,EAyBzB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,iBAAiB,CAoO5F"}
@@ -22,7 +22,8 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ChalkAPIError: () => ChalkAPIError,
24
24
  ChalkServerOnlyError: () => ChalkServerOnlyError,
25
- createChalkServerClient: () => createChalkServerClient
25
+ createChalkServerClient: () => createChalkServerClient,
26
+ getAccessRefreshState: () => getAccessRefreshState
26
27
  });
27
28
  module.exports = __toCommonJS(index_exports);
28
29
 
@@ -241,6 +242,19 @@ function isRecord2(value) {
241
242
  return typeof value === "object" && value !== null && !Array.isArray(value);
242
243
  }
243
244
 
245
+ // src/server/access-refresh.ts
246
+ function getAccessRefreshState(access) {
247
+ const grant = parseParsedAccessGrant(access);
248
+ return Object.freeze({
249
+ participantGeneration: grant.subject.participantGeneration,
250
+ currentMediaToken: grant.media.token
251
+ });
252
+ }
253
+ function accessRefreshInput(state, request) {
254
+ if (request?.replaceMediaConnection === true) return { participantGeneration: state.participantGeneration, replaceMediaConnection: true };
255
+ return state;
256
+ }
257
+
244
258
  // src/server/errors.ts
245
259
  var safeCodePattern = /^[a-z][a-z0-9_.-]{0,63}$/u;
246
260
  var safeRequestIdPattern = /^[A-Za-z0-9._:-]{1,128}$/u;
@@ -424,15 +438,62 @@ function createChalkServerClient(options) {
424
438
  const request = createServerRequester(options, apiKey, apiBaseURL, fetchImplementation);
425
439
  return {
426
440
  spaces: {
427
- archive: (spaceId) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/archive`, expectedStatus: 200, retry: "always" }),
428
- create: (input, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces`, body: createSpaceRequest(input), expectedStatus: 201, idempotency, retry: "caller_idempotency" }),
429
- get: (spaceId) => request({ method: "GET", path: `${tenantPath}/spaces/${segment(spaceId)}`, expectedStatus: 200, retry: "always" }),
430
- list: (input) => request({ method: "GET", path: `${tenantPath}/spaces${spaceQuery(input)}`, expectedStatus: 200, retry: "always" }),
431
- restore: (spaceId) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/restore`, expectedStatus: 200, retry: "always" })
441
+ archive: (spaceId) => request({
442
+ method: "POST",
443
+ path: `${tenantPath}/spaces/${segment(spaceId)}/archive`,
444
+ expectedStatus: 200,
445
+ retry: "always"
446
+ }),
447
+ create: (input, idempotency) => request({
448
+ method: "POST",
449
+ path: `${tenantPath}/spaces`,
450
+ body: createSpaceRequest(input),
451
+ expectedStatus: 201,
452
+ idempotency,
453
+ retry: "caller_idempotency"
454
+ }),
455
+ get: (spaceId) => request({
456
+ method: "GET",
457
+ path: `${tenantPath}/spaces/${segment(spaceId)}`,
458
+ expectedStatus: 200,
459
+ retry: "always"
460
+ }),
461
+ list: (input) => request({
462
+ method: "GET",
463
+ path: `${tenantPath}/spaces${spaceQuery(input)}`,
464
+ expectedStatus: 200,
465
+ retry: "always"
466
+ }),
467
+ restore: (spaceId) => request({
468
+ method: "POST",
469
+ path: `${tenantPath}/spaces/${segment(spaceId)}/restore`,
470
+ expectedStatus: 200,
471
+ retry: "always"
472
+ }),
473
+ update: (spaceId, input) => request({
474
+ method: "PATCH",
475
+ path: `${tenantPath}/spaces/${segment(spaceId)}`,
476
+ body: spaceUpdateRequest(input),
477
+ expectedStatus: 200,
478
+ retry: "always"
479
+ })
432
480
  },
433
481
  episodes: {
434
- create: (spaceId, input, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/episodes`, body: createEpisodeRequest(input), expectedStatus: 201, idempotency, retry: "caller_idempotency" }),
435
- end: (spaceId, episodeId, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/episodes/${segment(episodeId)}/end`, expectedStatus: 202, idempotency, retry: "caller_idempotency" })
482
+ create: (spaceId, input, idempotency) => request({
483
+ method: "POST",
484
+ path: `${tenantPath}/spaces/${segment(spaceId)}/episodes`,
485
+ body: createEpisodeRequest(input),
486
+ expectedStatus: 201,
487
+ idempotency,
488
+ retry: "caller_idempotency"
489
+ }),
490
+ end: (spaceId, episodeId, idempotency) => request({
491
+ method: "POST",
492
+ path: `${tenantPath}/spaces/${segment(spaceId)}/episodes/${segment(episodeId)}/end`,
493
+ expectedStatus: 202,
494
+ idempotency,
495
+ retry: "caller_idempotency"
496
+ })
436
497
  },
437
498
  participants: {
438
499
  admit: async (spaceId, episodeId, input, idempotency) => {
@@ -446,13 +507,14 @@ function createChalkServerClient(options) {
446
507
  });
447
508
  return participantLifecycle(lifecycle);
448
509
  },
449
- issueAccess: async (spaceId, episodeId, participantId, input) => {
510
+ issueAccess: async (spaceId, episodeId, participantId, input, refreshRequest) => {
511
+ const resolvedInput = accessRefreshInput(input, refreshRequest);
450
512
  const access = await request({
451
513
  method: "POST",
452
514
  path: `${tenantPath}/spaces/${segment(spaceId)}/episodes/${segment(episodeId)}/participants/${segment(participantId)}/access-grant`,
453
- body: accessGrantRequest(input),
515
+ body: accessGrantRequest(resolvedInput),
454
516
  expectedStatus: 201,
455
- retry: input.replaceMediaConnection === true ? "never" : "always"
517
+ retry: resolvedInput.replaceMediaConnection === true ? "never" : "always"
456
518
  });
457
519
  return accessGrant(access);
458
520
  },
@@ -466,20 +528,107 @@ function createChalkServerClient(options) {
466
528
  })
467
529
  },
468
530
  apiKeys: {
469
- create: (input) => request({ method: "POST", path: `${tenantPath}/api-keys`, body: apiKeyCreateRequest(input), expectedStatus: 201, retry: "never" }),
470
- list: (input) => request({ method: "GET", path: `${tenantPath}/api-keys${apiKeyQuery(input)}`, expectedStatus: 200, retry: "always" }),
471
- rotate: (apiKeyId, input) => request({ method: "POST", path: `${tenantPath}/api-keys/${segment(apiKeyId)}/rotate`, body: { expires_at: input?.expiresAt }, expectedStatus: 200, retry: "never" }),
472
- revoke: (apiKeyId) => request({ method: "DELETE", path: `${tenantPath}/api-keys/${segment(apiKeyId)}`, expectedStatus: 204, retry: "always" })
531
+ create: (input) => request({
532
+ method: "POST",
533
+ path: `${tenantPath}/api-keys`,
534
+ body: apiKeyCreateRequest(input),
535
+ expectedStatus: 201,
536
+ retry: "caller_idempotency"
537
+ }),
538
+ list: (input) => request({
539
+ method: "GET",
540
+ path: `${tenantPath}/api-keys${apiKeyQuery(input)}`,
541
+ expectedStatus: 200,
542
+ retry: "always"
543
+ }),
544
+ rotate: (apiKeyId, input) => request({
545
+ method: "POST",
546
+ path: `${tenantPath}/api-keys/${segment(apiKeyId)}/rotate`,
547
+ body: { expires_at: input?.expiresAt },
548
+ expectedStatus: 200,
549
+ retry: "caller_idempotency"
550
+ }),
551
+ revoke: (apiKeyId) => request({
552
+ method: "DELETE",
553
+ path: `${tenantPath}/api-keys/${segment(apiKeyId)}`,
554
+ expectedStatus: 204,
555
+ retry: "always"
556
+ })
557
+ },
558
+ recordings: {
559
+ list: (input) => request({
560
+ method: "GET",
561
+ path: `${tenantPath}/recordings${recordingQuery(input)}`,
562
+ expectedStatus: 200,
563
+ retry: "always"
564
+ }),
565
+ get: (recordingId) => request({
566
+ method: "GET",
567
+ path: `${tenantPath}/recordings/${segment(recordingId)}`,
568
+ expectedStatus: 200,
569
+ retry: "always"
570
+ }),
571
+ requestExport: (recordingId) => request({
572
+ method: "POST",
573
+ path: `${tenantPath}/recordings/${segment(recordingId)}/export`,
574
+ body: {},
575
+ expectedStatus: 202,
576
+ retry: "always"
577
+ }),
578
+ createDownloadURL: (recordingId, input) => request({
579
+ method: "POST",
580
+ path: `${tenantPath}/recordings/${segment(recordingId)}/download-url`,
581
+ body: {
582
+ expires_in_seconds: input.expiresInSeconds,
583
+ ...input.download === void 0 ? {} : { download: input.download }
584
+ },
585
+ expectedStatus: 200,
586
+ retry: "always"
587
+ })
473
588
  },
474
589
  publicInvites: {
475
- get: (spaceId) => request({ method: "GET", path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`, expectedStatus: 200, retry: "always" }),
476
- update: (spaceId, input) => request({ method: "PATCH", path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`, body: publicInviteUpdateRequest(input), expectedStatus: 200, retry: "always" }),
477
- rotate: (spaceId, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite/rotations`, expectedStatus: 201, idempotency, retry: "caller_idempotency" })
590
+ get: (spaceId) => request({
591
+ method: "GET",
592
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`,
593
+ expectedStatus: 200,
594
+ retry: "always"
595
+ }),
596
+ update: (spaceId, input) => request({
597
+ method: "PATCH",
598
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`,
599
+ body: publicInviteUpdateRequest(input),
600
+ expectedStatus: 200,
601
+ retry: "always"
602
+ }),
603
+ rotate: (spaceId, idempotency) => request({
604
+ method: "POST",
605
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite/rotations`,
606
+ expectedStatus: 201,
607
+ idempotency,
608
+ retry: "caller_idempotency"
609
+ })
478
610
  },
479
611
  publicAdmissionRequests: {
480
- list: (spaceId, input) => request({ method: "GET", path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests${publicAdmissionRequestQuery(input)}`, expectedStatus: 200, retry: "always" }),
481
- approve: (spaceId, requestHandle, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/approval`, expectedStatus: 200, idempotency, retry: "caller_idempotency" }),
482
- deny: (spaceId, requestHandle, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/denial`, expectedStatus: 200, idempotency, retry: "caller_idempotency" })
612
+ list: (spaceId, input) => request({
613
+ method: "GET",
614
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests${publicAdmissionRequestQuery(input)}`,
615
+ expectedStatus: 200,
616
+ retry: "always"
617
+ }),
618
+ approve: (spaceId, requestHandle, idempotency) => request({
619
+ method: "POST",
620
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/approval`,
621
+ expectedStatus: 200,
622
+ idempotency,
623
+ retry: "caller_idempotency"
624
+ }),
625
+ deny: (spaceId, requestHandle, idempotency) => request({
626
+ method: "POST",
627
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/denial`,
628
+ expectedStatus: 200,
629
+ idempotency,
630
+ retry: "caller_idempotency"
631
+ })
483
632
  }
484
633
  };
485
634
  }
@@ -493,7 +642,15 @@ function createSpaceRequest(input) {
493
642
  slug: input.slug,
494
643
  ...input.admissionPolicy === void 0 ? {} : { admission_policy: input.admissionPolicy },
495
644
  ...input.metadata === void 0 ? {} : { metadata: input.metadata },
496
- ...input.recurringPolicy === void 0 ? {} : { recurring_policy: input.recurringPolicy }
645
+ ...input.recordingPolicy === void 0 ? {} : { recording_policy: input.recordingPolicy },
646
+ ...input.recurringPolicy === void 0 ? {} : { recurring_policy: input.recurringPolicy },
647
+ ...input.transcriptionPolicy === void 0 ? {} : { transcription_policy: input.transcriptionPolicy }
648
+ };
649
+ }
650
+ function spaceUpdateRequest(input) {
651
+ return {
652
+ ...input.recordingPolicy === void 0 ? {} : { recording_policy: input.recordingPolicy },
653
+ ...input.transcriptionPolicy === void 0 ? {} : { transcription_policy: input.transcriptionPolicy }
497
654
  };
498
655
  }
499
656
  function createEpisodeRequest(input) {
@@ -540,6 +697,14 @@ function apiKeyQuery(input) {
540
697
  setQueryValue(query, "page_size", input?.pageSize);
541
698
  return prefixedQuery(query.toString());
542
699
  }
700
+ function recordingQuery(input) {
701
+ const query = new URLSearchParams();
702
+ setQueryValue(query, "cursor", input?.cursor);
703
+ setQueryValue(query, "episode_id", input?.episodeId);
704
+ setQueryValue(query, "page_size", input?.pageSize);
705
+ setQueryValue(query, "space_id", input?.spaceId);
706
+ return prefixedQuery(query.toString());
707
+ }
543
708
  function publicAdmissionRequestQuery(input) {
544
709
  const query = new URLSearchParams();
545
710
  setQueryValue(query, "state", input?.state);
@@ -620,5 +785,6 @@ function invalidResponse(status) {
620
785
  0 && (module.exports = {
621
786
  ChalkAPIError,
622
787
  ChalkServerOnlyError,
623
- createChalkServerClient
788
+ createChalkServerClient,
789
+ getAccessRefreshState
624
790
  });
@@ -1,3 +1,4 @@
1
+ export { getAccessRefreshState, type AccessRefreshRequest, type AccessRefreshState } from "./access-refresh.cjs";
1
2
  export { createChalkServerClient } from "./client.cjs";
2
3
  export { ChalkAPIError, ChalkServerOnlyError } from "./errors.cjs";
3
- export type { APIKey, APIKeyList, APIKeyWithSecret, AdmitParticipantInput, ChalkIdempotencyOptions, ChalkServerClient, ChalkServerClientOptions, ChalkServerHeaders, ChalkServerTelemetry, CreateAPIKeyInput, CreateEpisodeInput, CreateSpaceInput, Episode, EpisodeEnd, IssueAccessGrantInput, ListPublicAdmissionRequestsInput, ListAPIKeysInput, ListSpacesInput, AccessGrant, ParticipantLifecycle, ParticipantRemoval, PublicAdmissionRequest, PublicAdmissionRequestPage, RemoveParticipantInput, RotateAPIKeyInput, Space, SpacePublicInvite, SpaceList, UpdateSpacePublicInviteInput, } from "./types.cjs";
4
+ export type { APIKey, APIKeyList, APIKeyWithSecret, AdmitParticipantInput, ChalkIdempotencyOptions, ChalkServerClient, ChalkServerClientOptions, ChalkServerHeaders, ChalkServerTelemetry, CreateAPIKeyInput, CreateEpisodeInput, CreateRecordingDownloadURLInput, CreateSpaceInput, Episode, EpisodeEnd, IssueAccessGrantInput, ListPublicAdmissionRequestsInput, ListRecordingsInput, ListAPIKeysInput, ListSpacesInput, AccessGrant, ParticipantLifecycle, ParticipantRemoval, PublicAdmissionRequest, PublicAdmissionRequestPage, Recording, RecordingDownloadURL, RecordingExport, RecordingExportRequestAcceptedResponse, RecordingExportStatus, RecordingList, RecordingSource, RecordingSourceStatus, RecordingPolicy, RemoveParticipantInput, RotateAPIKeyInput, Space, SpacePublicInvite, SpaceList, TranscriptionPolicy, UpdateSpaceInput, UpdateSpacePublicInviteInput, } from "./types.cjs";
@@ -1,4 +1,5 @@
1
+ export { getAccessRefreshState, type AccessRefreshRequest, type AccessRefreshState } from "./access-refresh.js";
1
2
  export { createChalkServerClient } from "./client.js";
2
3
  export { ChalkAPIError, ChalkServerOnlyError } from "./errors.js";
3
- export type { APIKey, APIKeyList, APIKeyWithSecret, AdmitParticipantInput, ChalkIdempotencyOptions, ChalkServerClient, ChalkServerClientOptions, ChalkServerHeaders, ChalkServerTelemetry, CreateAPIKeyInput, CreateEpisodeInput, CreateSpaceInput, Episode, EpisodeEnd, IssueAccessGrantInput, ListPublicAdmissionRequestsInput, ListAPIKeysInput, ListSpacesInput, AccessGrant, ParticipantLifecycle, ParticipantRemoval, PublicAdmissionRequest, PublicAdmissionRequestPage, RemoveParticipantInput, RotateAPIKeyInput, Space, SpacePublicInvite, SpaceList, UpdateSpacePublicInviteInput, } from "./types.js";
4
+ export type { APIKey, APIKeyList, APIKeyWithSecret, AdmitParticipantInput, ChalkIdempotencyOptions, ChalkServerClient, ChalkServerClientOptions, ChalkServerHeaders, ChalkServerTelemetry, CreateAPIKeyInput, CreateEpisodeInput, CreateRecordingDownloadURLInput, CreateSpaceInput, Episode, EpisodeEnd, IssueAccessGrantInput, ListPublicAdmissionRequestsInput, ListRecordingsInput, ListAPIKeysInput, ListSpacesInput, AccessGrant, ParticipantLifecycle, ParticipantRemoval, PublicAdmissionRequest, PublicAdmissionRequestPage, Recording, RecordingDownloadURL, RecordingExport, RecordingExportRequestAcceptedResponse, RecordingExportStatus, RecordingList, RecordingSource, RecordingSourceStatus, RecordingPolicy, RemoveParticipantInput, RotateAPIKeyInput, Space, SpacePublicInvite, SpaceList, TranscriptionPolicy, UpdateSpaceInput, UpdateSpacePublicInviteInput, } from "./types.js";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClE,YAAY,EACV,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,qBAAqB,EACrB,gCAAgC,EAChC,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClE,YAAY,EACV,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,+BAA+B,EAC/B,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,qBAAqB,EACrB,gCAAgC,EAChC,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,sCAAsC,EACtC,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
@@ -220,6 +220,19 @@ function isRecord2(value) {
220
220
  return typeof value === "object" && value !== null && !Array.isArray(value);
221
221
  }
222
222
 
223
+ // src/server/access-refresh.ts
224
+ function getAccessRefreshState(access) {
225
+ const grant = parseParsedAccessGrant(access);
226
+ return Object.freeze({
227
+ participantGeneration: grant.subject.participantGeneration,
228
+ currentMediaToken: grant.media.token
229
+ });
230
+ }
231
+ function accessRefreshInput(state, request) {
232
+ if (request?.replaceMediaConnection === true) return { participantGeneration: state.participantGeneration, replaceMediaConnection: true };
233
+ return state;
234
+ }
235
+
223
236
  // src/server/transport.ts
224
237
  var retryableStatuses = /* @__PURE__ */ new Set([429, 502, 503, 504]);
225
238
  var maxRetries = 2;
@@ -348,15 +361,62 @@ function createChalkServerClient(options) {
348
361
  const request = createServerRequester(options, apiKey, apiBaseURL, fetchImplementation);
349
362
  return {
350
363
  spaces: {
351
- archive: (spaceId) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/archive`, expectedStatus: 200, retry: "always" }),
352
- create: (input, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces`, body: createSpaceRequest(input), expectedStatus: 201, idempotency, retry: "caller_idempotency" }),
353
- get: (spaceId) => request({ method: "GET", path: `${tenantPath}/spaces/${segment(spaceId)}`, expectedStatus: 200, retry: "always" }),
354
- list: (input) => request({ method: "GET", path: `${tenantPath}/spaces${spaceQuery(input)}`, expectedStatus: 200, retry: "always" }),
355
- restore: (spaceId) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/restore`, expectedStatus: 200, retry: "always" })
364
+ archive: (spaceId) => request({
365
+ method: "POST",
366
+ path: `${tenantPath}/spaces/${segment(spaceId)}/archive`,
367
+ expectedStatus: 200,
368
+ retry: "always"
369
+ }),
370
+ create: (input, idempotency) => request({
371
+ method: "POST",
372
+ path: `${tenantPath}/spaces`,
373
+ body: createSpaceRequest(input),
374
+ expectedStatus: 201,
375
+ idempotency,
376
+ retry: "caller_idempotency"
377
+ }),
378
+ get: (spaceId) => request({
379
+ method: "GET",
380
+ path: `${tenantPath}/spaces/${segment(spaceId)}`,
381
+ expectedStatus: 200,
382
+ retry: "always"
383
+ }),
384
+ list: (input) => request({
385
+ method: "GET",
386
+ path: `${tenantPath}/spaces${spaceQuery(input)}`,
387
+ expectedStatus: 200,
388
+ retry: "always"
389
+ }),
390
+ restore: (spaceId) => request({
391
+ method: "POST",
392
+ path: `${tenantPath}/spaces/${segment(spaceId)}/restore`,
393
+ expectedStatus: 200,
394
+ retry: "always"
395
+ }),
396
+ update: (spaceId, input) => request({
397
+ method: "PATCH",
398
+ path: `${tenantPath}/spaces/${segment(spaceId)}`,
399
+ body: spaceUpdateRequest(input),
400
+ expectedStatus: 200,
401
+ retry: "always"
402
+ })
356
403
  },
357
404
  episodes: {
358
- create: (spaceId, input, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/episodes`, body: createEpisodeRequest(input), expectedStatus: 201, idempotency, retry: "caller_idempotency" }),
359
- end: (spaceId, episodeId, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/episodes/${segment(episodeId)}/end`, expectedStatus: 202, idempotency, retry: "caller_idempotency" })
405
+ create: (spaceId, input, idempotency) => request({
406
+ method: "POST",
407
+ path: `${tenantPath}/spaces/${segment(spaceId)}/episodes`,
408
+ body: createEpisodeRequest(input),
409
+ expectedStatus: 201,
410
+ idempotency,
411
+ retry: "caller_idempotency"
412
+ }),
413
+ end: (spaceId, episodeId, idempotency) => request({
414
+ method: "POST",
415
+ path: `${tenantPath}/spaces/${segment(spaceId)}/episodes/${segment(episodeId)}/end`,
416
+ expectedStatus: 202,
417
+ idempotency,
418
+ retry: "caller_idempotency"
419
+ })
360
420
  },
361
421
  participants: {
362
422
  admit: async (spaceId, episodeId, input, idempotency) => {
@@ -370,13 +430,14 @@ function createChalkServerClient(options) {
370
430
  });
371
431
  return participantLifecycle(lifecycle);
372
432
  },
373
- issueAccess: async (spaceId, episodeId, participantId, input) => {
433
+ issueAccess: async (spaceId, episodeId, participantId, input, refreshRequest) => {
434
+ const resolvedInput = accessRefreshInput(input, refreshRequest);
374
435
  const access = await request({
375
436
  method: "POST",
376
437
  path: `${tenantPath}/spaces/${segment(spaceId)}/episodes/${segment(episodeId)}/participants/${segment(participantId)}/access-grant`,
377
- body: accessGrantRequest(input),
438
+ body: accessGrantRequest(resolvedInput),
378
439
  expectedStatus: 201,
379
- retry: input.replaceMediaConnection === true ? "never" : "always"
440
+ retry: resolvedInput.replaceMediaConnection === true ? "never" : "always"
380
441
  });
381
442
  return accessGrant(access);
382
443
  },
@@ -390,20 +451,107 @@ function createChalkServerClient(options) {
390
451
  })
391
452
  },
392
453
  apiKeys: {
393
- create: (input) => request({ method: "POST", path: `${tenantPath}/api-keys`, body: apiKeyCreateRequest(input), expectedStatus: 201, retry: "never" }),
394
- list: (input) => request({ method: "GET", path: `${tenantPath}/api-keys${apiKeyQuery(input)}`, expectedStatus: 200, retry: "always" }),
395
- rotate: (apiKeyId, input) => request({ method: "POST", path: `${tenantPath}/api-keys/${segment(apiKeyId)}/rotate`, body: { expires_at: input?.expiresAt }, expectedStatus: 200, retry: "never" }),
396
- revoke: (apiKeyId) => request({ method: "DELETE", path: `${tenantPath}/api-keys/${segment(apiKeyId)}`, expectedStatus: 204, retry: "always" })
454
+ create: (input) => request({
455
+ method: "POST",
456
+ path: `${tenantPath}/api-keys`,
457
+ body: apiKeyCreateRequest(input),
458
+ expectedStatus: 201,
459
+ retry: "caller_idempotency"
460
+ }),
461
+ list: (input) => request({
462
+ method: "GET",
463
+ path: `${tenantPath}/api-keys${apiKeyQuery(input)}`,
464
+ expectedStatus: 200,
465
+ retry: "always"
466
+ }),
467
+ rotate: (apiKeyId, input) => request({
468
+ method: "POST",
469
+ path: `${tenantPath}/api-keys/${segment(apiKeyId)}/rotate`,
470
+ body: { expires_at: input?.expiresAt },
471
+ expectedStatus: 200,
472
+ retry: "caller_idempotency"
473
+ }),
474
+ revoke: (apiKeyId) => request({
475
+ method: "DELETE",
476
+ path: `${tenantPath}/api-keys/${segment(apiKeyId)}`,
477
+ expectedStatus: 204,
478
+ retry: "always"
479
+ })
480
+ },
481
+ recordings: {
482
+ list: (input) => request({
483
+ method: "GET",
484
+ path: `${tenantPath}/recordings${recordingQuery(input)}`,
485
+ expectedStatus: 200,
486
+ retry: "always"
487
+ }),
488
+ get: (recordingId) => request({
489
+ method: "GET",
490
+ path: `${tenantPath}/recordings/${segment(recordingId)}`,
491
+ expectedStatus: 200,
492
+ retry: "always"
493
+ }),
494
+ requestExport: (recordingId) => request({
495
+ method: "POST",
496
+ path: `${tenantPath}/recordings/${segment(recordingId)}/export`,
497
+ body: {},
498
+ expectedStatus: 202,
499
+ retry: "always"
500
+ }),
501
+ createDownloadURL: (recordingId, input) => request({
502
+ method: "POST",
503
+ path: `${tenantPath}/recordings/${segment(recordingId)}/download-url`,
504
+ body: {
505
+ expires_in_seconds: input.expiresInSeconds,
506
+ ...input.download === void 0 ? {} : { download: input.download }
507
+ },
508
+ expectedStatus: 200,
509
+ retry: "always"
510
+ })
397
511
  },
398
512
  publicInvites: {
399
- get: (spaceId) => request({ method: "GET", path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`, expectedStatus: 200, retry: "always" }),
400
- update: (spaceId, input) => request({ method: "PATCH", path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`, body: publicInviteUpdateRequest(input), expectedStatus: 200, retry: "always" }),
401
- rotate: (spaceId, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite/rotations`, expectedStatus: 201, idempotency, retry: "caller_idempotency" })
513
+ get: (spaceId) => request({
514
+ method: "GET",
515
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`,
516
+ expectedStatus: 200,
517
+ retry: "always"
518
+ }),
519
+ update: (spaceId, input) => request({
520
+ method: "PATCH",
521
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite`,
522
+ body: publicInviteUpdateRequest(input),
523
+ expectedStatus: 200,
524
+ retry: "always"
525
+ }),
526
+ rotate: (spaceId, idempotency) => request({
527
+ method: "POST",
528
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-invite/rotations`,
529
+ expectedStatus: 201,
530
+ idempotency,
531
+ retry: "caller_idempotency"
532
+ })
402
533
  },
403
534
  publicAdmissionRequests: {
404
- list: (spaceId, input) => request({ method: "GET", path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests${publicAdmissionRequestQuery(input)}`, expectedStatus: 200, retry: "always" }),
405
- approve: (spaceId, requestHandle, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/approval`, expectedStatus: 200, idempotency, retry: "caller_idempotency" }),
406
- deny: (spaceId, requestHandle, idempotency) => request({ method: "POST", path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/denial`, expectedStatus: 200, idempotency, retry: "caller_idempotency" })
535
+ list: (spaceId, input) => request({
536
+ method: "GET",
537
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests${publicAdmissionRequestQuery(input)}`,
538
+ expectedStatus: 200,
539
+ retry: "always"
540
+ }),
541
+ approve: (spaceId, requestHandle, idempotency) => request({
542
+ method: "POST",
543
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/approval`,
544
+ expectedStatus: 200,
545
+ idempotency,
546
+ retry: "caller_idempotency"
547
+ }),
548
+ deny: (spaceId, requestHandle, idempotency) => request({
549
+ method: "POST",
550
+ path: `${tenantPath}/spaces/${segment(spaceId)}/public-admission-requests/${segment(requestHandle)}/denial`,
551
+ expectedStatus: 200,
552
+ idempotency,
553
+ retry: "caller_idempotency"
554
+ })
407
555
  }
408
556
  };
409
557
  }
@@ -417,7 +565,15 @@ function createSpaceRequest(input) {
417
565
  slug: input.slug,
418
566
  ...input.admissionPolicy === void 0 ? {} : { admission_policy: input.admissionPolicy },
419
567
  ...input.metadata === void 0 ? {} : { metadata: input.metadata },
420
- ...input.recurringPolicy === void 0 ? {} : { recurring_policy: input.recurringPolicy }
568
+ ...input.recordingPolicy === void 0 ? {} : { recording_policy: input.recordingPolicy },
569
+ ...input.recurringPolicy === void 0 ? {} : { recurring_policy: input.recurringPolicy },
570
+ ...input.transcriptionPolicy === void 0 ? {} : { transcription_policy: input.transcriptionPolicy }
571
+ };
572
+ }
573
+ function spaceUpdateRequest(input) {
574
+ return {
575
+ ...input.recordingPolicy === void 0 ? {} : { recording_policy: input.recordingPolicy },
576
+ ...input.transcriptionPolicy === void 0 ? {} : { transcription_policy: input.transcriptionPolicy }
421
577
  };
422
578
  }
423
579
  function createEpisodeRequest(input) {
@@ -464,6 +620,14 @@ function apiKeyQuery(input) {
464
620
  setQueryValue(query, "page_size", input?.pageSize);
465
621
  return prefixedQuery(query.toString());
466
622
  }
623
+ function recordingQuery(input) {
624
+ const query = new URLSearchParams();
625
+ setQueryValue(query, "cursor", input?.cursor);
626
+ setQueryValue(query, "episode_id", input?.episodeId);
627
+ setQueryValue(query, "page_size", input?.pageSize);
628
+ setQueryValue(query, "space_id", input?.spaceId);
629
+ return prefixedQuery(query.toString());
630
+ }
467
631
  function publicAdmissionRequestQuery(input) {
468
632
  const query = new URLSearchParams();
469
633
  setQueryValue(query, "state", input?.state);
@@ -543,5 +707,6 @@ function invalidResponse(status) {
543
707
  export {
544
708
  ChalkAPIError,
545
709
  ChalkServerOnlyError,
546
- createChalkServerClient
710
+ createChalkServerClient,
711
+ getAccessRefreshState
547
712
  };