@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.
- package/README.md +100 -5
- package/dist/access/grant.d.ts.map +1 -1
- package/dist/access/manager.d.ts.map +1 -1
- package/dist/{chunk-PQNSA7ZN.js → chunk-2DZUHV6I.js} +782 -122
- package/dist/{chunk-6ONSFCIY.js → chunk-A7BVZEFM.js} +7 -3
- package/dist/{chunk-LQSXEWLL.js → chunk-AUQTQOLR.js} +2685 -511
- package/dist/{chunk-PWUU6T3R.js → chunk-CZUJNAUI.js} +1196 -874
- package/dist/{chunk-NKOKY2AE.js → chunk-EWTITNJ3.js} +15 -101
- package/dist/chunk-HW5TTZL2.js +99 -0
- package/dist/chunk-RCDXIDCN.js +33 -0
- package/dist/{chunk-LSDDADCN.js → chunk-ZRMGKMX4.js} +1728 -517
- package/dist/client.d.ts +1452 -465
- package/dist/client.d.ts.map +1 -1
- package/dist/connection/dependencies.d.ts +11 -0
- package/dist/connection/dependencies.d.ts.map +1 -1
- package/dist/connection/diagnostics.d.ts +1 -1
- package/dist/connection/diagnostics.d.ts.map +1 -1
- package/dist/connection/index.d.ts +3 -0
- package/dist/connection/index.d.ts.map +1 -1
- package/dist/connection/lifecycle.d.ts +4 -1
- package/dist/connection/lifecycle.d.ts.map +1 -1
- package/dist/connection/media-devices.d.ts.map +1 -1
- package/dist/connection/production.d.ts +4 -1
- package/dist/connection/production.d.ts.map +1 -1
- package/dist/connection/types.d.ts +2 -2
- package/dist/connection/types.d.ts.map +1 -1
- package/dist/effect.js +355 -130
- package/dist/feedback/collector.d.ts +14 -0
- package/dist/feedback/collector.d.ts.map +1 -0
- package/dist/feedback/context.d.ts +38 -0
- package/dist/feedback/context.d.ts.map +1 -0
- package/dist/feedback/controller.d.ts +4 -0
- package/dist/feedback/controller.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/transport.d.ts +29 -0
- package/dist/feedback/transport.d.ts.map +1 -0
- package/dist/feedback/types.d.ts +202 -0
- package/dist/feedback/types.d.ts.map +1 -0
- package/dist/feedback/validation.d.ts +30 -0
- package/dist/feedback/validation.d.ts.map +1 -0
- package/dist/foreground-deadline.d.ts +9 -0
- package/dist/foreground-deadline.d.ts.map +1 -0
- package/dist/generated/http-api.d.ts +1438 -461
- package/dist/generated/http-api.d.ts.map +1 -1
- package/dist/generated/schemas.d.ts +2667 -842
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +136 -21
- package/dist/media/camera-uplink.d.ts +13 -0
- package/dist/media/camera-uplink.d.ts.map +1 -0
- package/dist/media/capture-error.d.ts +27 -0
- package/dist/media/capture-error.d.ts.map +1 -0
- package/dist/media/client.d.ts +4 -0
- package/dist/media/client.d.ts.map +1 -1
- package/dist/media/index.d.ts +1 -0
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +5 -1
- package/dist/media/plane.d.ts +4 -0
- package/dist/media/plane.d.ts.map +1 -1
- package/dist/media/remote-track-response.d.ts +6 -0
- package/dist/media/remote-track-response.d.ts.map +1 -0
- package/dist/media/rtk.d.ts.map +1 -1
- package/dist/media/transport.d.ts.map +1 -1
- package/dist/media/types.d.ts +20 -2
- package/dist/media/types.d.ts.map +1 -1
- package/dist/public-invites/client.d.ts.map +1 -1
- package/dist/public-invites/index.js +4 -3
- package/dist/public-invites/types.d.ts +4 -2
- package/dist/public-invites/types.d.ts.map +1 -1
- package/dist/server/access-refresh.d.cts +13 -0
- package/dist/server/access-refresh.d.ts +14 -0
- package/dist/server/access-refresh.d.ts.map +1 -0
- package/dist/server/client.d.ts.map +1 -1
- package/dist/server/index.cjs +189 -23
- package/dist/server/index.d.cts +2 -1
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +187 -22
- package/dist/server/types.d.cts +76 -1
- package/dist/server/types.d.ts +76 -1
- package/dist/server/types.d.ts.map +1 -1
- package/dist/space-client/chat-controller.d.ts +3 -0
- package/dist/space-client/chat-controller.d.ts.map +1 -1
- package/dist/space-client/controller-effects.d.ts +6 -0
- package/dist/space-client/controller-effects.d.ts.map +1 -1
- package/dist/space-client/core.d.ts +12 -1
- package/dist/space-client/core.d.ts.map +1 -1
- package/dist/space-client/core.test.helpers.d.ts +2 -1
- package/dist/space-client/core.test.helpers.d.ts.map +1 -1
- package/dist/space-client/effect.d.ts +5 -0
- package/dist/space-client/effect.d.ts.map +1 -1
- package/dist/space-client/episode-diagnostic-runtime.d.ts +3 -0
- package/dist/space-client/episode-diagnostic-runtime.d.ts.map +1 -1
- package/dist/space-client/errors.d.ts.map +1 -1
- package/dist/space-client/index.d.ts +4 -1
- package/dist/space-client/index.d.ts.map +1 -1
- package/dist/space-client/media-controller.d.ts.map +1 -1
- package/dist/space-client/offline-actions-storage.d.ts +66 -0
- package/dist/space-client/offline-actions-storage.d.ts.map +1 -0
- package/dist/space-client/offline-actions.d.ts +36 -0
- package/dist/space-client/offline-actions.d.ts.map +1 -0
- package/dist/space-client/participants-controller.d.ts +2 -1
- package/dist/space-client/participants-controller.d.ts.map +1 -1
- package/dist/space-client/recording-controller.d.ts +20 -0
- package/dist/space-client/recording-controller.d.ts.map +1 -0
- package/dist/space-client/reload-rejoin.d.ts +24 -0
- package/dist/space-client/reload-rejoin.d.ts.map +1 -0
- package/dist/space-client/space-client.d.ts.map +1 -1
- package/dist/space-client/store.d.ts +3 -1
- package/dist/space-client/store.d.ts.map +1 -1
- package/dist/space-client/terminal.test.helpers.d.ts +115 -0
- package/dist/space-client/terminal.test.helpers.d.ts.map +1 -0
- package/dist/space-client/types.d.ts +42 -4
- package/dist/space-client/types.d.ts.map +1 -1
- package/dist/sync/index.js +2 -1
- package/dist/sync/v1-client.d.ts +2 -5
- package/dist/sync/v1-client.d.ts.map +1 -1
- package/dist/sync/v1-collaboration-state.d.ts +65 -0
- package/dist/sync/v1-collaboration-state.d.ts.map +1 -0
- package/dist/sync/v1-command-scheduler.d.ts +54 -0
- package/dist/sync/v1-command-scheduler.d.ts.map +1 -0
- package/dist/sync/v1-deferred.d.ts +8 -0
- package/dist/sync/v1-deferred.d.ts.map +1 -0
- package/dist/sync/v1-error.d.ts +5 -0
- package/dist/sync/v1-error.d.ts.map +1 -0
- package/dist/sync/v1-frame-signature.d.ts +2 -0
- package/dist/sync/v1-frame-signature.d.ts.map +1 -0
- package/dist/sync/v1-live-target-coordinator.d.ts +32 -0
- package/dist/sync/v1-live-target-coordinator.d.ts.map +1 -0
- package/dist/sync/v1-types.d.ts +3 -0
- package/dist/sync/v1-types.d.ts.map +1 -1
- package/dist/telemetry/index.js +9 -7
- package/dist/telemetry/reconnect.d.ts +7 -0
- package/dist/telemetry/reconnect.d.ts.map +1 -0
- package/dist/telemetry/trace.d.ts +1 -1
- package/dist/telemetry/trace.d.ts.map +1 -1
- package/dist/webhooks/generated/event-v1.d.cts +10 -2
- package/dist/webhooks/generated/event-v1.d.ts +10 -2
- package/dist/webhooks/generated/event-v1.d.ts.map +1 -1
- package/dist/webhooks/generated/fixtures-v1.d.cts +2 -2
- package/dist/webhooks/generated/fixtures-v1.d.ts +2 -2
- package/dist/webhooks/index.cjs +10 -2
- package/dist/webhooks/index.js +10 -2
- package/dist/webhooks/test.cjs +2 -2
- package/dist/webhooks/test.js +2 -2
- package/dist/whiteboard/v1-client.d.ts.map +1 -1
- 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":"
|
|
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"}
|
package/dist/server/index.cjs
CHANGED
|
@@ -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({
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
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({
|
|
435
|
-
|
|
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(
|
|
515
|
+
body: accessGrantRequest(resolvedInput),
|
|
454
516
|
expectedStatus: 201,
|
|
455
|
-
retry:
|
|
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({
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
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({
|
|
476
|
-
|
|
477
|
-
|
|
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({
|
|
481
|
-
|
|
482
|
-
|
|
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.
|
|
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
|
});
|
package/dist/server/index.d.cts
CHANGED
|
@@ -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";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -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"}
|
package/dist/server/index.js
CHANGED
|
@@ -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({
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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({
|
|
359
|
-
|
|
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(
|
|
438
|
+
body: accessGrantRequest(resolvedInput),
|
|
378
439
|
expectedStatus: 201,
|
|
379
|
-
retry:
|
|
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({
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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({
|
|
400
|
-
|
|
401
|
-
|
|
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({
|
|
405
|
-
|
|
406
|
-
|
|
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.
|
|
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
|
};
|