@q9labsai/chalk-client 5.3.0 → 5.3.1
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/access/grant.d.ts +2 -0
- package/dist/{chunk-DHUHTIU7.js → chunk-2CEMOTZF.js} +187 -39
- package/dist/{chunk-XSB2GDRW.js → chunk-FD7ZSDTM.js} +71 -18
- package/dist/{chunk-GOSWSXTH.js → chunk-MHJ4UPM3.js} +162 -5
- package/dist/chunk-N4IPKRS6.js +76 -0
- package/dist/{chunk-3TGVTP6Z.js → chunk-O5JB5XVX.js} +609 -25
- package/dist/{chunk-O26BHHMI.js → chunk-VAJ6XNAA.js} +1 -1
- package/dist/client.d.ts +180 -0
- package/dist/effect.js +29 -4
- package/dist/generated/http-api.d.ts +178 -0
- package/dist/generated/schemas.d.ts +287 -0
- package/dist/generated/sync.d.ts +15 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -15
- package/dist/media/call-stats.d.ts +27 -0
- package/dist/media/ice-servers.d.ts +3 -0
- package/dist/media/index.d.ts +2 -0
- package/dist/media/index.js +4 -1
- package/dist/media/receive-stall.d.ts +11 -2
- package/dist/media/types.d.ts +19 -0
- package/dist/media/video-render-size.d.ts +7 -0
- package/dist/media/viewer-layer.d.ts +48 -0
- package/dist/public-invites/index.js +3 -2
- package/dist/server/index.cjs +18 -4
- package/dist/server/index.js +18 -4
- package/dist/session/index.d.ts +18 -0
- package/dist/sync/index.js +2 -1
- package/dist/sync/v1-command-scheduler.d.ts +4 -0
- package/package.json +2 -1
|
@@ -99,6 +99,29 @@ export declare const AdmitEpisodeParticipantRequestSchema: Schema.Struct<{
|
|
|
99
99
|
export type AdmitEpisodeParticipantRequest = typeof AdmitEpisodeParticipantRequestSchema.Type;
|
|
100
100
|
export declare const AuditLogIdSchema: Schema.brand<Schema.String, "AuditLogId">;
|
|
101
101
|
export type AuditLogId = typeof AuditLogIdSchema.Type;
|
|
102
|
+
export declare const CallStatsRequestSchema: Schema.Struct<{
|
|
103
|
+
readonly samples: Schema.$Array<Schema.Struct<{
|
|
104
|
+
readonly connection_type: Schema.Literals<readonly ["udp", "tcp", "turn", "unknown"]>;
|
|
105
|
+
readonly elapsed_ms: Schema.Number;
|
|
106
|
+
readonly freeze_count: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
107
|
+
readonly freeze_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
108
|
+
readonly local_candidate_type: Schema.optional<Schema.Literals<readonly ["host", "srflx", "prflx", "relay"]>>;
|
|
109
|
+
readonly recv_bitrate_kbps: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
110
|
+
readonly recv_height: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
111
|
+
readonly recv_jitter_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
112
|
+
readonly recv_loss_pct: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
113
|
+
readonly relay_protocol: Schema.optional<Schema.Literals<readonly ["udp", "tcp", "tls"]>>;
|
|
114
|
+
readonly remote_candidate_type: Schema.optional<Schema.Literals<readonly ["host", "srflx", "prflx", "relay"]>>;
|
|
115
|
+
readonly rtt_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
116
|
+
readonly send_bitrate_kbps: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
117
|
+
readonly send_jitter_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
118
|
+
readonly send_layer: Schema.optional<Schema.Literals<readonly ["h", "m", "l"]>>;
|
|
119
|
+
readonly send_loss_pct: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
120
|
+
readonly window_ms: Schema.Number;
|
|
121
|
+
}>>;
|
|
122
|
+
readonly version: Schema.Literal<1>;
|
|
123
|
+
}>;
|
|
124
|
+
export type CallStatsRequest = typeof CallStatsRequestSchema.Type;
|
|
102
125
|
export declare const CancelRecordingPreparationRequestSchema: Schema.Struct<{
|
|
103
126
|
readonly expected_revision: Schema.Number;
|
|
104
127
|
}>;
|
|
@@ -140,6 +163,7 @@ export type CloudflareSFUCloseTracksAPIResponse = typeof CloudflareSFUCloseTrack
|
|
|
140
163
|
export declare const CloudflareSFUCloseTracksRequestSchema: Schema.Struct<{
|
|
141
164
|
readonly connection_id: Schema.String;
|
|
142
165
|
readonly force: Schema.Boolean;
|
|
166
|
+
readonly receive_only: Schema.optional<Schema.Boolean>;
|
|
143
167
|
readonly session_description: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
144
168
|
readonly sdp: Schema.String;
|
|
145
169
|
readonly type: Schema.String;
|
|
@@ -173,6 +197,32 @@ export declare const CloudflareSFURenegotiateResponseSchema: Schema.Struct<{
|
|
|
173
197
|
readonly accepted: Schema.Boolean;
|
|
174
198
|
}>;
|
|
175
199
|
export type CloudflareSFURenegotiateResponse = typeof CloudflareSFURenegotiateResponseSchema.Type;
|
|
200
|
+
export declare const CloudflareSFUUpdateTracksAPIResponseSchema: Schema.Struct<{
|
|
201
|
+
readonly requiresImmediateRenegotiation: Schema.optional<Schema.Boolean>;
|
|
202
|
+
readonly sessionDescription: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
203
|
+
readonly sdp: Schema.String;
|
|
204
|
+
readonly type: Schema.String;
|
|
205
|
+
}>>>;
|
|
206
|
+
readonly trackErrors: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
207
|
+
readonly code: Schema.String;
|
|
208
|
+
readonly connectionId: Schema.String;
|
|
209
|
+
readonly trackName: Schema.String;
|
|
210
|
+
}>>>;
|
|
211
|
+
readonly tracks: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
212
|
+
readonly location: Schema.String;
|
|
213
|
+
readonly mid: Schema.optional<Schema.String>;
|
|
214
|
+
readonly publication_id: Schema.optional<Schema.String>;
|
|
215
|
+
readonly sessionId: Schema.optional<Schema.String>;
|
|
216
|
+
readonly simulcast: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
217
|
+
readonly preferredRid: Schema.String;
|
|
218
|
+
readonly priorityOrdering: Schema.String;
|
|
219
|
+
readonly ridNotAvailable: Schema.String;
|
|
220
|
+
}>>>;
|
|
221
|
+
readonly source: Schema.optional<Schema.String>;
|
|
222
|
+
readonly trackName: Schema.String;
|
|
223
|
+
}>>>;
|
|
224
|
+
}>;
|
|
225
|
+
export type CloudflareSFUUpdateTracksAPIResponse = typeof CloudflareSFUUpdateTracksAPIResponseSchema.Type;
|
|
176
226
|
export declare const CloudflareSFUTracksAPIResponseSchema: Schema.Struct<{
|
|
177
227
|
readonly requiresImmediateRenegotiation: Schema.optional<Schema.Boolean>;
|
|
178
228
|
readonly sessionDescription: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
@@ -220,6 +270,23 @@ export declare const CloudflareSFUTracksRequestSchema: Schema.Struct<{
|
|
|
220
270
|
}>>;
|
|
221
271
|
}>;
|
|
222
272
|
export type CloudflareSFUTracksRequest = typeof CloudflareSFUTracksRequestSchema.Type;
|
|
273
|
+
export declare const CloudflareSFUUpdateTracksRequestSchema: Schema.Struct<{
|
|
274
|
+
readonly connection_id: Schema.String;
|
|
275
|
+
readonly tracks: Schema.$Array<Schema.Struct<{
|
|
276
|
+
readonly location: Schema.String;
|
|
277
|
+
readonly mid: Schema.optional<Schema.String>;
|
|
278
|
+
readonly publication_id: Schema.optional<Schema.String>;
|
|
279
|
+
readonly sessionId: Schema.optional<Schema.String>;
|
|
280
|
+
readonly simulcast: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
281
|
+
readonly preferredRid: Schema.String;
|
|
282
|
+
readonly priorityOrdering: Schema.String;
|
|
283
|
+
readonly ridNotAvailable: Schema.String;
|
|
284
|
+
}>>>;
|
|
285
|
+
readonly source: Schema.optional<Schema.String>;
|
|
286
|
+
readonly trackName: Schema.String;
|
|
287
|
+
}>>;
|
|
288
|
+
}>;
|
|
289
|
+
export type CloudflareSFUUpdateTracksRequest = typeof CloudflareSFUUpdateTracksRequestSchema.Type;
|
|
223
290
|
export declare const ConnectionReportRequestSchema: Schema.Struct<{
|
|
224
291
|
readonly events: Schema.$Array<Schema.Struct<{
|
|
225
292
|
readonly attempt: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
@@ -1662,6 +1729,7 @@ export type CloseCloudflareSFUTracksPathParams = typeof CloseCloudflareSFUTracks
|
|
|
1662
1729
|
export declare const CloseCloudflareSFUTracksRequestBodySchema: Schema.Struct<{
|
|
1663
1730
|
readonly connection_id: Schema.String;
|
|
1664
1731
|
readonly force: Schema.Boolean;
|
|
1732
|
+
readonly receive_only: Schema.optional<Schema.Boolean>;
|
|
1665
1733
|
readonly session_description: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
1666
1734
|
readonly sdp: Schema.String;
|
|
1667
1735
|
readonly type: Schema.String;
|
|
@@ -3686,6 +3754,62 @@ export declare const TestWebhookEndpoint429ResponseHeadersSchema: Schema.Struct<
|
|
|
3686
3754
|
readonly "X-RateLimit-Remaining": Schema.NumberFromString;
|
|
3687
3755
|
}>;
|
|
3688
3756
|
export type TestWebhookEndpoint429ResponseHeaders = typeof TestWebhookEndpoint429ResponseHeadersSchema.Type;
|
|
3757
|
+
export declare const UpdateCloudflareSFUTracksPathParamsSchema: Schema.Struct<{
|
|
3758
|
+
readonly episode_id: Schema.brand<Schema.String, "EpisodeId">;
|
|
3759
|
+
readonly participant_id: Schema.brand<Schema.String, "ParticipantId">;
|
|
3760
|
+
readonly space_id: Schema.brand<Schema.String, "SpaceId">;
|
|
3761
|
+
readonly tenant_id: Schema.brand<Schema.String, "TenantId">;
|
|
3762
|
+
}>;
|
|
3763
|
+
export type UpdateCloudflareSFUTracksPathParams = typeof UpdateCloudflareSFUTracksPathParamsSchema.Type;
|
|
3764
|
+
export declare const UpdateCloudflareSFUTracksRequestBodySchema: Schema.Struct<{
|
|
3765
|
+
readonly connection_id: Schema.String;
|
|
3766
|
+
readonly tracks: Schema.$Array<Schema.Struct<{
|
|
3767
|
+
readonly location: Schema.String;
|
|
3768
|
+
readonly mid: Schema.optional<Schema.String>;
|
|
3769
|
+
readonly publication_id: Schema.optional<Schema.String>;
|
|
3770
|
+
readonly sessionId: Schema.optional<Schema.String>;
|
|
3771
|
+
readonly simulcast: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
3772
|
+
readonly preferredRid: Schema.String;
|
|
3773
|
+
readonly priorityOrdering: Schema.String;
|
|
3774
|
+
readonly ridNotAvailable: Schema.String;
|
|
3775
|
+
}>>>;
|
|
3776
|
+
readonly source: Schema.optional<Schema.String>;
|
|
3777
|
+
readonly trackName: Schema.String;
|
|
3778
|
+
}>>;
|
|
3779
|
+
}>;
|
|
3780
|
+
export type UpdateCloudflareSFUTracksRequestBody = typeof UpdateCloudflareSFUTracksRequestBodySchema.Type;
|
|
3781
|
+
export declare const UpdateCloudflareSFUTracksResponseSchema: Schema.Struct<{
|
|
3782
|
+
readonly requiresImmediateRenegotiation: Schema.optional<Schema.Boolean>;
|
|
3783
|
+
readonly sessionDescription: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
3784
|
+
readonly sdp: Schema.String;
|
|
3785
|
+
readonly type: Schema.String;
|
|
3786
|
+
}>>>;
|
|
3787
|
+
readonly trackErrors: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
3788
|
+
readonly code: Schema.String;
|
|
3789
|
+
readonly connectionId: Schema.String;
|
|
3790
|
+
readonly trackName: Schema.String;
|
|
3791
|
+
}>>>;
|
|
3792
|
+
readonly tracks: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
3793
|
+
readonly location: Schema.String;
|
|
3794
|
+
readonly mid: Schema.optional<Schema.String>;
|
|
3795
|
+
readonly publication_id: Schema.optional<Schema.String>;
|
|
3796
|
+
readonly sessionId: Schema.optional<Schema.String>;
|
|
3797
|
+
readonly simulcast: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
3798
|
+
readonly preferredRid: Schema.String;
|
|
3799
|
+
readonly priorityOrdering: Schema.String;
|
|
3800
|
+
readonly ridNotAvailable: Schema.String;
|
|
3801
|
+
}>>>;
|
|
3802
|
+
readonly source: Schema.optional<Schema.String>;
|
|
3803
|
+
readonly trackName: Schema.String;
|
|
3804
|
+
}>>>;
|
|
3805
|
+
}>;
|
|
3806
|
+
export type UpdateCloudflareSFUTracksResponse = typeof UpdateCloudflareSFUTracksResponseSchema.Type;
|
|
3807
|
+
export declare const UpdateCloudflareSFUTracks429ResponseHeadersSchema: Schema.Struct<{
|
|
3808
|
+
readonly "Retry-After": Schema.NumberFromString;
|
|
3809
|
+
readonly "X-RateLimit-Limit": Schema.NumberFromString;
|
|
3810
|
+
readonly "X-RateLimit-Remaining": Schema.NumberFromString;
|
|
3811
|
+
}>;
|
|
3812
|
+
export type UpdateCloudflareSFUTracks429ResponseHeaders = typeof UpdateCloudflareSFUTracks429ResponseHeadersSchema.Type;
|
|
3689
3813
|
export declare const UpdateMembershipPathParamsSchema: Schema.Struct<{
|
|
3690
3814
|
readonly membership_id: Schema.brand<Schema.String, "MembershipId">;
|
|
3691
3815
|
readonly tenant_id: Schema.brand<Schema.String, "TenantId">;
|
|
@@ -3902,6 +4026,39 @@ export declare const UpdateWebhookEndpoint429ResponseHeadersSchema: Schema.Struc
|
|
|
3902
4026
|
readonly "X-RateLimit-Remaining": Schema.NumberFromString;
|
|
3903
4027
|
}>;
|
|
3904
4028
|
export type UpdateWebhookEndpoint429ResponseHeaders = typeof UpdateWebhookEndpoint429ResponseHeadersSchema.Type;
|
|
4029
|
+
export declare const UploadCallStatsPathParamsSchema: Schema.Struct<{
|
|
4030
|
+
readonly tenant_id: Schema.brand<Schema.String, "TenantId">;
|
|
4031
|
+
}>;
|
|
4032
|
+
export type UploadCallStatsPathParams = typeof UploadCallStatsPathParamsSchema.Type;
|
|
4033
|
+
export declare const UploadCallStatsRequestBodySchema: Schema.Struct<{
|
|
4034
|
+
readonly samples: Schema.$Array<Schema.Struct<{
|
|
4035
|
+
readonly connection_type: Schema.Literals<readonly ["udp", "tcp", "turn", "unknown"]>;
|
|
4036
|
+
readonly elapsed_ms: Schema.Number;
|
|
4037
|
+
readonly freeze_count: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4038
|
+
readonly freeze_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4039
|
+
readonly local_candidate_type: Schema.optional<Schema.Literals<readonly ["host", "srflx", "prflx", "relay"]>>;
|
|
4040
|
+
readonly recv_bitrate_kbps: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4041
|
+
readonly recv_height: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4042
|
+
readonly recv_jitter_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4043
|
+
readonly recv_loss_pct: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4044
|
+
readonly relay_protocol: Schema.optional<Schema.Literals<readonly ["udp", "tcp", "tls"]>>;
|
|
4045
|
+
readonly remote_candidate_type: Schema.optional<Schema.Literals<readonly ["host", "srflx", "prflx", "relay"]>>;
|
|
4046
|
+
readonly rtt_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4047
|
+
readonly send_bitrate_kbps: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4048
|
+
readonly send_jitter_ms: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4049
|
+
readonly send_layer: Schema.optional<Schema.Literals<readonly ["h", "m", "l"]>>;
|
|
4050
|
+
readonly send_loss_pct: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
4051
|
+
readonly window_ms: Schema.Number;
|
|
4052
|
+
}>>;
|
|
4053
|
+
readonly version: Schema.Literal<1>;
|
|
4054
|
+
}>;
|
|
4055
|
+
export type UploadCallStatsRequestBody = typeof UploadCallStatsRequestBodySchema.Type;
|
|
4056
|
+
export declare const UploadCallStats429ResponseHeadersSchema: Schema.Struct<{
|
|
4057
|
+
readonly "Retry-After": Schema.NumberFromString;
|
|
4058
|
+
readonly "X-RateLimit-Limit": Schema.NumberFromString;
|
|
4059
|
+
readonly "X-RateLimit-Remaining": Schema.NumberFromString;
|
|
4060
|
+
}>;
|
|
4061
|
+
export type UploadCallStats429ResponseHeaders = typeof UploadCallStats429ResponseHeadersSchema.Type;
|
|
3905
4062
|
declare const AccessForbiddenError_base: Schema.Class<AccessForbiddenError, Schema.TaggedStruct<"AccessForbiddenError", {
|
|
3906
4063
|
readonly error: Schema.Struct<{
|
|
3907
4064
|
readonly code: Schema.Literal<"access.forbidden">;
|
|
@@ -10795,6 +10952,78 @@ export declare const TestWebhookEndpointErrorSchema: Schema.Union<readonly [Sche
|
|
|
10795
10952
|
}>;
|
|
10796
10953
|
}>, never, never>]>;
|
|
10797
10954
|
export type TestWebhookEndpointError = typeof TestWebhookEndpointErrorSchema.Type;
|
|
10955
|
+
export declare const UpdateCloudflareSFUTracksErrorSchema: Schema.Union<readonly [Schema.decodeTo<typeof AccessForbiddenError, Schema.Struct<{
|
|
10956
|
+
readonly error: Schema.Struct<{
|
|
10957
|
+
readonly code: Schema.Literal<"access.forbidden">;
|
|
10958
|
+
readonly message: Schema.String;
|
|
10959
|
+
}>;
|
|
10960
|
+
}>, never, never>, Schema.decodeTo<typeof AccessUnauthenticatedError, Schema.Struct<{
|
|
10961
|
+
readonly error: Schema.Struct<{
|
|
10962
|
+
readonly code: Schema.Literal<"access.unauthenticated">;
|
|
10963
|
+
readonly message: Schema.String;
|
|
10964
|
+
}>;
|
|
10965
|
+
}>, never, never>, Schema.decodeTo<typeof EpisodeInvalidIdError, Schema.Struct<{
|
|
10966
|
+
readonly error: Schema.Struct<{
|
|
10967
|
+
readonly code: Schema.Literal<"episode.invalid_id">;
|
|
10968
|
+
readonly message: Schema.String;
|
|
10969
|
+
}>;
|
|
10970
|
+
}>, never, never>, Schema.decodeTo<typeof EpisodeNotFoundError, Schema.Struct<{
|
|
10971
|
+
readonly error: Schema.Struct<{
|
|
10972
|
+
readonly code: Schema.Literal<"episode.not_found">;
|
|
10973
|
+
readonly message: Schema.String;
|
|
10974
|
+
}>;
|
|
10975
|
+
}>, never, never>, Schema.decodeTo<typeof MediaConnectionNotFoundError, Schema.Struct<{
|
|
10976
|
+
readonly error: Schema.Struct<{
|
|
10977
|
+
readonly code: Schema.Literal<"media.connection_not_found">;
|
|
10978
|
+
readonly message: Schema.String;
|
|
10979
|
+
}>;
|
|
10980
|
+
}>, never, never>, Schema.decodeTo<typeof MediaUnavailableError, Schema.Struct<{
|
|
10981
|
+
readonly error: Schema.Struct<{
|
|
10982
|
+
readonly code: Schema.Literal<"media.unavailable">;
|
|
10983
|
+
readonly message: Schema.String;
|
|
10984
|
+
}>;
|
|
10985
|
+
}>, never, never>, Schema.decodeTo<typeof ParticipantInvalidIdError, Schema.Struct<{
|
|
10986
|
+
readonly error: Schema.Struct<{
|
|
10987
|
+
readonly code: Schema.Literal<"participant.invalid_id">;
|
|
10988
|
+
readonly message: Schema.String;
|
|
10989
|
+
}>;
|
|
10990
|
+
}>, never, never>, Schema.decodeTo<typeof RequestInvalidError, Schema.Struct<{
|
|
10991
|
+
readonly error: Schema.Struct<{
|
|
10992
|
+
readonly code: Schema.Literal<"request.invalid">;
|
|
10993
|
+
readonly message: Schema.String;
|
|
10994
|
+
}>;
|
|
10995
|
+
}>, never, never>, Schema.decodeTo<typeof RequestPayloadTooLargeError, Schema.Struct<{
|
|
10996
|
+
readonly error: Schema.Struct<{
|
|
10997
|
+
readonly code: Schema.Literal<"request.payload_too_large">;
|
|
10998
|
+
readonly message: Schema.String;
|
|
10999
|
+
}>;
|
|
11000
|
+
}>, never, never>, Schema.decodeTo<typeof RequestRateLimitedError, Schema.Struct<{
|
|
11001
|
+
readonly error: Schema.Struct<{
|
|
11002
|
+
readonly code: Schema.Literal<"request.rate_limited">;
|
|
11003
|
+
readonly message: Schema.String;
|
|
11004
|
+
}>;
|
|
11005
|
+
}>, never, never>, Schema.decodeTo<typeof ServiceInternalError, Schema.Struct<{
|
|
11006
|
+
readonly error: Schema.Struct<{
|
|
11007
|
+
readonly code: Schema.Literal<"service.internal_error">;
|
|
11008
|
+
readonly message: Schema.String;
|
|
11009
|
+
}>;
|
|
11010
|
+
}>, never, never>, Schema.decodeTo<typeof ServiceUnavailableError, Schema.Struct<{
|
|
11011
|
+
readonly error: Schema.Struct<{
|
|
11012
|
+
readonly code: Schema.Literal<"service.unavailable">;
|
|
11013
|
+
readonly message: Schema.String;
|
|
11014
|
+
}>;
|
|
11015
|
+
}>, never, never>, Schema.decodeTo<typeof SpaceInvalidIdError, Schema.Struct<{
|
|
11016
|
+
readonly error: Schema.Struct<{
|
|
11017
|
+
readonly code: Schema.Literal<"space.invalid_id">;
|
|
11018
|
+
readonly message: Schema.String;
|
|
11019
|
+
}>;
|
|
11020
|
+
}>, never, never>, Schema.decodeTo<typeof TenantInvalidIdError, Schema.Struct<{
|
|
11021
|
+
readonly error: Schema.Struct<{
|
|
11022
|
+
readonly code: Schema.Literal<"tenant.invalid_id">;
|
|
11023
|
+
readonly message: Schema.String;
|
|
11024
|
+
}>;
|
|
11025
|
+
}>, never, never>]>;
|
|
11026
|
+
export type UpdateCloudflareSFUTracksError = typeof UpdateCloudflareSFUTracksErrorSchema.Type;
|
|
10798
11027
|
export declare const UpdateMembershipErrorSchema: Schema.Union<readonly [Schema.decodeTo<typeof AccessForbiddenError, Schema.Struct<{
|
|
10799
11028
|
readonly error: Schema.Struct<{
|
|
10800
11029
|
readonly code: Schema.Literal<"access.forbidden">;
|
|
@@ -11195,6 +11424,48 @@ export declare const UpdateWebhookEndpointErrorSchema: Schema.Union<readonly [Sc
|
|
|
11195
11424
|
}>;
|
|
11196
11425
|
}>, never, never>]>;
|
|
11197
11426
|
export type UpdateWebhookEndpointError = typeof UpdateWebhookEndpointErrorSchema.Type;
|
|
11427
|
+
export declare const UploadCallStatsErrorSchema: Schema.Union<readonly [Schema.decodeTo<typeof AccessForbiddenError, Schema.Struct<{
|
|
11428
|
+
readonly error: Schema.Struct<{
|
|
11429
|
+
readonly code: Schema.Literal<"access.forbidden">;
|
|
11430
|
+
readonly message: Schema.String;
|
|
11431
|
+
}>;
|
|
11432
|
+
}>, never, never>, Schema.decodeTo<typeof AccessUnauthenticatedError, Schema.Struct<{
|
|
11433
|
+
readonly error: Schema.Struct<{
|
|
11434
|
+
readonly code: Schema.Literal<"access.unauthenticated">;
|
|
11435
|
+
readonly message: Schema.String;
|
|
11436
|
+
}>;
|
|
11437
|
+
}>, never, never>, Schema.decodeTo<typeof RequestInvalidError, Schema.Struct<{
|
|
11438
|
+
readonly error: Schema.Struct<{
|
|
11439
|
+
readonly code: Schema.Literal<"request.invalid">;
|
|
11440
|
+
readonly message: Schema.String;
|
|
11441
|
+
}>;
|
|
11442
|
+
}>, never, never>, Schema.decodeTo<typeof RequestPayloadTooLargeError, Schema.Struct<{
|
|
11443
|
+
readonly error: Schema.Struct<{
|
|
11444
|
+
readonly code: Schema.Literal<"request.payload_too_large">;
|
|
11445
|
+
readonly message: Schema.String;
|
|
11446
|
+
}>;
|
|
11447
|
+
}>, never, never>, Schema.decodeTo<typeof RequestRateLimitedError, Schema.Struct<{
|
|
11448
|
+
readonly error: Schema.Struct<{
|
|
11449
|
+
readonly code: Schema.Literal<"request.rate_limited">;
|
|
11450
|
+
readonly message: Schema.String;
|
|
11451
|
+
}>;
|
|
11452
|
+
}>, never, never>, Schema.decodeTo<typeof ServiceInternalError, Schema.Struct<{
|
|
11453
|
+
readonly error: Schema.Struct<{
|
|
11454
|
+
readonly code: Schema.Literal<"service.internal_error">;
|
|
11455
|
+
readonly message: Schema.String;
|
|
11456
|
+
}>;
|
|
11457
|
+
}>, never, never>, Schema.decodeTo<typeof ServiceUnavailableError, Schema.Struct<{
|
|
11458
|
+
readonly error: Schema.Struct<{
|
|
11459
|
+
readonly code: Schema.Literal<"service.unavailable">;
|
|
11460
|
+
readonly message: Schema.String;
|
|
11461
|
+
}>;
|
|
11462
|
+
}>, never, never>, Schema.decodeTo<typeof TenantInvalidIdError, Schema.Struct<{
|
|
11463
|
+
readonly error: Schema.Struct<{
|
|
11464
|
+
readonly code: Schema.Literal<"tenant.invalid_id">;
|
|
11465
|
+
readonly message: Schema.String;
|
|
11466
|
+
}>;
|
|
11467
|
+
}>, never, never>]>;
|
|
11468
|
+
export type UploadCallStatsError = typeof UploadCallStatsErrorSchema.Type;
|
|
11198
11469
|
export declare const ChalkOperationPolicies: {
|
|
11199
11470
|
readonly addCloudflareSFUTracks: {
|
|
11200
11471
|
readonly maxBodyBytes: 1048576;
|
|
@@ -11644,6 +11915,14 @@ export declare const ChalkOperationPolicies: {
|
|
|
11644
11915
|
readonly windowSeconds: 60;
|
|
11645
11916
|
};
|
|
11646
11917
|
};
|
|
11918
|
+
readonly updateCloudflareSFUTracks: {
|
|
11919
|
+
readonly maxBodyBytes: 1048576;
|
|
11920
|
+
readonly rateLimit: {
|
|
11921
|
+
readonly limit: 60;
|
|
11922
|
+
readonly policy: "v1.authenticated.write";
|
|
11923
|
+
readonly windowSeconds: 60;
|
|
11924
|
+
};
|
|
11925
|
+
};
|
|
11647
11926
|
readonly updateMembership: {
|
|
11648
11927
|
readonly maxBodyBytes: 1048576;
|
|
11649
11928
|
readonly rateLimit: {
|
|
@@ -11684,6 +11963,14 @@ export declare const ChalkOperationPolicies: {
|
|
|
11684
11963
|
readonly windowSeconds: 60;
|
|
11685
11964
|
};
|
|
11686
11965
|
};
|
|
11966
|
+
readonly uploadCallStats: {
|
|
11967
|
+
readonly maxBodyBytes: 32768;
|
|
11968
|
+
readonly rateLimit: {
|
|
11969
|
+
readonly limit: 30;
|
|
11970
|
+
readonly policy: "call_stats.participant";
|
|
11971
|
+
readonly windowSeconds: 600;
|
|
11972
|
+
};
|
|
11973
|
+
};
|
|
11687
11974
|
};
|
|
11688
11975
|
export type ChalkOperationPolicy = (typeof ChalkOperationPolicies)[keyof typeof ChalkOperationPolicies];
|
|
11689
11976
|
export {};
|
package/dist/generated/sync.d.ts
CHANGED
|
@@ -100,11 +100,20 @@ export declare const SyncProtocolMetadata: {
|
|
|
100
100
|
readonly pattern: "^[a-z][a-z0-9_*\\-/]{0,255}=[\\x21-\\x2b\\x2d-\\x3c\\x3e-\\x7e]{1,256}(,[a-z][a-z0-9_*\\-/]{0,255}=[\\x21-\\x2b\\x2d-\\x3c\\x3e-\\x7e]{1,256})*$";
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
|
+
readonly helloOnlyFields: {
|
|
104
|
+
readonly baggage: {
|
|
105
|
+
readonly kind: "string";
|
|
106
|
+
readonly minBytes: 47;
|
|
107
|
+
readonly maxBytes: 47;
|
|
108
|
+
readonly format: "w3c-baggage-session-id";
|
|
109
|
+
readonly pattern: "^session\\.id=[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
103
112
|
readonly acceptedOn: {
|
|
104
113
|
readonly hello: "client-to-server";
|
|
105
114
|
readonly serverFrames: "server-to-client";
|
|
106
115
|
};
|
|
107
|
-
readonly upgradeHeaders: readonly ["x-chalk-journey-id", "traceparent", "tracestate"];
|
|
116
|
+
readonly upgradeHeaders: readonly ["x-chalk-journey-id", "traceparent", "tracestate", "baggage"];
|
|
108
117
|
readonly rule: "propagate_from_first_observed_layer_to_every_downstream_frame";
|
|
109
118
|
};
|
|
110
119
|
readonly externalIntents: readonly ["admit_participant", "deny_admission", "admission_request_expired", "mute_participant", "stop_participant_camera", "stop_participant_screen_share", "remove_participant", "start_recording", "stop_recording", "participant_leave", "start_episode", "extend_episode", "end_episode", "tenant_set_deadline", "tenant_end_episode", "maximum_duration_expired"];
|
|
@@ -353,6 +362,7 @@ export declare const UuidSchema: Schema.String;
|
|
|
353
362
|
export declare const JourneyIdSchema: Schema.String;
|
|
354
363
|
export declare const TraceparentSchema: Schema.String;
|
|
355
364
|
export declare const TracestateSchema: Schema.String;
|
|
365
|
+
export declare const BaggageSchema: Schema.String;
|
|
356
366
|
export declare const SyncCorrelationFieldsSchema: Schema.Struct<{
|
|
357
367
|
readonly journey_id: Schema.optional<Schema.String>;
|
|
358
368
|
readonly traceparent: Schema.optional<Schema.String>;
|
|
@@ -424,6 +434,7 @@ export declare const HelloFrameSchema: Schema.Struct<{
|
|
|
424
434
|
readonly journey_id: Schema.optional<Schema.String>;
|
|
425
435
|
readonly traceparent: Schema.optional<Schema.String>;
|
|
426
436
|
readonly tracestate: Schema.optional<Schema.String>;
|
|
437
|
+
readonly baggage: Schema.optional<Schema.String>;
|
|
427
438
|
readonly type: Schema.Literal<"hello">;
|
|
428
439
|
readonly protocol: Schema.Literal<1>;
|
|
429
440
|
readonly token: Schema.String;
|
|
@@ -461,6 +472,7 @@ export declare const ExtendedHelloFrameSchema: Schema.Struct<{
|
|
|
461
472
|
readonly journey_id: Schema.optional<Schema.String>;
|
|
462
473
|
readonly traceparent: Schema.optional<Schema.String>;
|
|
463
474
|
readonly tracestate: Schema.optional<Schema.String>;
|
|
475
|
+
readonly baggage: Schema.optional<Schema.String>;
|
|
464
476
|
readonly type: Schema.Literal<"hello">;
|
|
465
477
|
readonly protocol: Schema.Literal<1>;
|
|
466
478
|
readonly token: Schema.String;
|
|
@@ -2793,6 +2805,7 @@ export declare const SyncV1ClientFrameSchema: Schema.decodeTo<Schema.Union<reado
|
|
|
2793
2805
|
readonly journey_id: Schema.optional<Schema.String>;
|
|
2794
2806
|
readonly traceparent: Schema.optional<Schema.String>;
|
|
2795
2807
|
readonly tracestate: Schema.optional<Schema.String>;
|
|
2808
|
+
readonly baggage: Schema.optional<Schema.String>;
|
|
2796
2809
|
readonly type: Schema.Literal<"hello">;
|
|
2797
2810
|
readonly protocol: Schema.Literal<1>;
|
|
2798
2811
|
readonly token: Schema.String;
|
|
@@ -2825,6 +2838,7 @@ export declare const SyncV1ClientFrameSchema: Schema.decodeTo<Schema.Union<reado
|
|
|
2825
2838
|
readonly journey_id: Schema.optional<Schema.String>;
|
|
2826
2839
|
readonly traceparent: Schema.optional<Schema.String>;
|
|
2827
2840
|
readonly tracestate: Schema.optional<Schema.String>;
|
|
2841
|
+
readonly baggage: Schema.optional<Schema.String>;
|
|
2828
2842
|
readonly type: Schema.Literal<"hello">;
|
|
2829
2843
|
readonly protocol: Schema.Literal<1>;
|
|
2830
2844
|
readonly token: Schema.String;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export * from "./space-client";
|
|
|
5
5
|
export * from "./sync";
|
|
6
6
|
export * from "./whiteboard";
|
|
7
7
|
export * from "./public-invites";
|
|
8
|
+
export { currentSessionId, newSessionId, requestContextHeaders, SESSION_ID_KEY, sessionBaggage, setSessionSource, withRequestContext, type SessionSource } from "./session";
|
|
8
9
|
export { formatSyncConnectDiagnostic } from "./sync/connect-diagnostics";
|
|
9
10
|
export { getConnectionFailureDetail } from "./space-client/failure-detail";
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,19 @@ import {
|
|
|
15
15
|
createSpaceClient,
|
|
16
16
|
decodeWhiteboardV1ServerFrame,
|
|
17
17
|
encodeWhiteboardV1ClientFrame
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2CEMOTZF.js";
|
|
19
|
+
import {
|
|
20
|
+
createChalkPublicClient,
|
|
21
|
+
createChalkPublicInviteClient,
|
|
22
|
+
parseInviteCode
|
|
23
|
+
} from "./chunk-VAJ6XNAA.js";
|
|
24
|
+
import {
|
|
25
|
+
ArrivalInvalidHandleError,
|
|
26
|
+
ArrivalUnavailableError,
|
|
27
|
+
SpacePublicInviteUnavailableError,
|
|
28
|
+
parseParsedAccessGrant,
|
|
29
|
+
requireAccessGrant
|
|
30
|
+
} from "./chunk-MHJ4UPM3.js";
|
|
19
31
|
import {
|
|
20
32
|
CloudflareSFUClient,
|
|
21
33
|
CloudflareSFUError,
|
|
@@ -26,21 +38,10 @@ import {
|
|
|
26
38
|
publicationKey,
|
|
27
39
|
requireDescription,
|
|
28
40
|
requireSFUDescription,
|
|
41
|
+
setVideoRenderSize,
|
|
29
42
|
validatePublicationSnapshot,
|
|
30
43
|
waitFor
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
createChalkPublicClient,
|
|
34
|
-
createChalkPublicInviteClient,
|
|
35
|
-
parseInviteCode
|
|
36
|
-
} from "./chunk-O26BHHMI.js";
|
|
37
|
-
import {
|
|
38
|
-
ArrivalInvalidHandleError,
|
|
39
|
-
ArrivalUnavailableError,
|
|
40
|
-
SpacePublicInviteUnavailableError,
|
|
41
|
-
parseParsedAccessGrant,
|
|
42
|
-
requireAccessGrant
|
|
43
|
-
} from "./chunk-GOSWSXTH.js";
|
|
44
|
+
} from "./chunk-O5JB5XVX.js";
|
|
44
45
|
import {
|
|
45
46
|
AsyncStorageV1PendingTargetStore,
|
|
46
47
|
InMemoryV1PendingTargetStore,
|
|
@@ -69,7 +70,16 @@ import {
|
|
|
69
70
|
optimisticV1Control,
|
|
70
71
|
reactionFromFrame,
|
|
71
72
|
restoreV1Snapshot
|
|
72
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-FD7ZSDTM.js";
|
|
74
|
+
import {
|
|
75
|
+
SESSION_ID_KEY,
|
|
76
|
+
currentSessionId,
|
|
77
|
+
newSessionId,
|
|
78
|
+
requestContextHeaders,
|
|
79
|
+
sessionBaggage,
|
|
80
|
+
setSessionSource,
|
|
81
|
+
withRequestContext
|
|
82
|
+
} from "./chunk-N4IPKRS6.js";
|
|
73
83
|
|
|
74
84
|
// src/space-client/reload-rejoin.ts
|
|
75
85
|
import { Schema } from "effect";
|
|
@@ -149,6 +159,7 @@ export {
|
|
|
149
159
|
InMemoryChalkWhiteboardV1PendingOperationStore,
|
|
150
160
|
InMemoryV1PendingTargetStore,
|
|
151
161
|
IndexedDbV1PendingTargetStore,
|
|
162
|
+
SESSION_ID_KEY,
|
|
152
163
|
SpaceClientError,
|
|
153
164
|
SpacePublicInviteUnavailableError,
|
|
154
165
|
SyncBrowserCapabilityError,
|
|
@@ -176,6 +187,7 @@ export {
|
|
|
176
187
|
createReactNativeWebSocketFactory,
|
|
177
188
|
createSpaceClient,
|
|
178
189
|
createV1SyncClient,
|
|
190
|
+
currentSessionId,
|
|
179
191
|
decodeV1ClientFrame,
|
|
180
192
|
decodeV1ServerFrame,
|
|
181
193
|
decodeWhiteboardV1ServerFrame,
|
|
@@ -184,6 +196,7 @@ export {
|
|
|
184
196
|
encodeWhiteboardV1ClientFrame,
|
|
185
197
|
formatSyncConnectDiagnostic,
|
|
186
198
|
getConnectionFailureDetail,
|
|
199
|
+
newSessionId,
|
|
187
200
|
optimisticV1Control,
|
|
188
201
|
parseCloudflareSFUPublicationID,
|
|
189
202
|
parseInviteCode,
|
|
@@ -192,11 +205,16 @@ export {
|
|
|
192
205
|
readReloadRejoin,
|
|
193
206
|
reloadRejoinAccess,
|
|
194
207
|
reloadRejoinStorageKey,
|
|
208
|
+
requestContextHeaders,
|
|
195
209
|
requireDescription,
|
|
196
210
|
requireSFUDescription,
|
|
197
211
|
restoreV1Snapshot,
|
|
198
212
|
resumeReloadRejoin,
|
|
213
|
+
sessionBaggage,
|
|
214
|
+
setSessionSource,
|
|
215
|
+
setVideoRenderSize,
|
|
199
216
|
validatePublicationSnapshot,
|
|
200
217
|
waitFor,
|
|
218
|
+
withRequestContext,
|
|
201
219
|
writeReloadRejoin
|
|
202
220
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { components } from "../generated/openapi-types";
|
|
2
|
+
export type CallStatsRequest = components["schemas"]["CallStatsRequest"];
|
|
3
|
+
export type CallStatsSample = CallStatsRequest["samples"][number];
|
|
4
|
+
/** One summary covers this long, so a call makes about six per minute. */
|
|
5
|
+
export declare const CALL_STATS_WINDOW_MS = 10000;
|
|
6
|
+
/** A batch uploads once it holds this many samples (about a minute of call). */
|
|
7
|
+
export declare const CALL_STATS_UPLOAD_SAMPLES = 6;
|
|
8
|
+
/** The API rejects larger batches. */
|
|
9
|
+
export declare const CALL_STATS_MAX_BATCH = 30;
|
|
10
|
+
/** The API rejects a window longer than this and drops the whole batch, so a longer gap (a stalled tab, a sleeping device) is skipped. */
|
|
11
|
+
export declare const CALL_STATS_MAX_WINDOW_MS = 60000;
|
|
12
|
+
/** Per-call cap: about an hour of samples. Later windows are dropped. */
|
|
13
|
+
export declare const CALL_STATS_CALL_CAP = 360;
|
|
14
|
+
export type CallStatsCollector = {
|
|
15
|
+
/** Feed one `getStats()` report. Cheap; summarises once a window has elapsed. */
|
|
16
|
+
readonly observe: (report: RTCStatsReport) => void;
|
|
17
|
+
/** Close the open window (if long enough) and upload what is buffered with `upload`, once any upload in flight ends. */
|
|
18
|
+
readonly flush: (upload: Upload) => Promise<void>;
|
|
19
|
+
/** A new peer connection starts new counters: drop the open window and its baseline, keep what is already buffered. */
|
|
20
|
+
readonly reset: () => void;
|
|
21
|
+
};
|
|
22
|
+
type Upload = (request: CallStatsRequest) => Promise<void>;
|
|
23
|
+
export declare function createCallStatsCollector(options: {
|
|
24
|
+
readonly upload: Upload;
|
|
25
|
+
readonly now?: () => number;
|
|
26
|
+
}): CallStatsCollector;
|
|
27
|
+
export {};
|
package/dist/media/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export * from "./cloudflare-sfu";
|
|
2
2
|
export type { ClientMediaPlane, ConnectionMediaLocalTrack, ConnectionMediaPhase, ConnectionMediaRemoteTrack, ConnectionMediaSnapshot, MediaPlaneOutcome, MediaPlaneResult, MediaPlaneTarget, MediaPublication, MediaPublicationSource, MediaSource } from "./plane";
|
|
3
3
|
export { describeMediaCaptureError } from "./capture-error";
|
|
4
|
+
export { setVideoRenderSize } from "./video-render-size";
|
|
5
|
+
export type { VideoRenderSize } from "./video-render-size";
|
package/dist/media/index.js
CHANGED
|
@@ -8,9 +8,11 @@ import {
|
|
|
8
8
|
publicationKey,
|
|
9
9
|
requireDescription,
|
|
10
10
|
requireSFUDescription,
|
|
11
|
+
setVideoRenderSize,
|
|
11
12
|
validatePublicationSnapshot,
|
|
12
13
|
waitFor
|
|
13
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-O5JB5XVX.js";
|
|
15
|
+
import "../chunk-N4IPKRS6.js";
|
|
14
16
|
export {
|
|
15
17
|
CloudflareSFUClient,
|
|
16
18
|
CloudflareSFUError,
|
|
@@ -21,6 +23,7 @@ export {
|
|
|
21
23
|
publicationKey,
|
|
22
24
|
requireDescription,
|
|
23
25
|
requireSFUDescription,
|
|
26
|
+
setVideoRenderSize,
|
|
24
27
|
validatePublicationSnapshot,
|
|
25
28
|
waitFor
|
|
26
29
|
};
|
|
@@ -25,15 +25,24 @@ export type ReceiveStallObservation = {
|
|
|
25
25
|
readonly expectedTracks: number;
|
|
26
26
|
readonly stalledTracks: number;
|
|
27
27
|
};
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Owns eligibility, pending stalls and the budget across replacement peers.
|
|
30
|
+
* Rebuild budgets belong to a remote participant's source, not to one publication id:
|
|
31
|
+
* a rebuild republishes every local track, and the peers' replacement publications must not renew them.
|
|
32
|
+
*/
|
|
29
33
|
export declare class ReceiveStallRecovery {
|
|
30
34
|
#private;
|
|
31
35
|
get observations(): readonly ReceiveStallObservation[];
|
|
32
36
|
expect(publications: readonly MediaPublication[], participantId: string): void;
|
|
33
37
|
suspend(): void;
|
|
34
38
|
isStalled(publicationId: string): boolean;
|
|
35
|
-
|
|
39
|
+
canRepull(id: string): boolean;
|
|
40
|
+
reserveRepull(id: string): boolean;
|
|
41
|
+
restarted(id: string): void;
|
|
42
|
+
canRebuild(id?: string): boolean;
|
|
36
43
|
reserveRebuild(): boolean;
|
|
44
|
+
/** The media connection was replaced: its receivers are gone, so nothing is awaiting a restore. */
|
|
45
|
+
replaced(): void;
|
|
37
46
|
clear(): void;
|
|
38
47
|
sample(now: number, connection: RTCPeerConnection, report: RTCStatsReport, tracks: Iterable<CloudflareSFURemoteTrack>): {
|
|
39
48
|
readonly stalled: readonly string[];
|
package/dist/media/types.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { ConnectionReportTransportEvent } from "../transport-diagnostics";
|
|
2
2
|
import type { MediaConnectionReplacementCause, MediaPublication, MediaPublicationSource } from "./plane";
|
|
3
|
+
export type CloudflareSFUIceServer = {
|
|
4
|
+
readonly urls: readonly string[];
|
|
5
|
+
readonly username?: string;
|
|
6
|
+
readonly credential?: string;
|
|
7
|
+
};
|
|
3
8
|
export type CloudflareSFUBootstrap = {
|
|
4
9
|
readonly connectionId: string;
|
|
5
10
|
readonly stunServer: string;
|
|
11
|
+
/** STUN and TURN servers from the API. Absent on older servers, which means STUN only. */
|
|
12
|
+
readonly iceServers?: readonly CloudflareSFUIceServer[];
|
|
6
13
|
};
|
|
7
14
|
export type CloudflareSFUSessionDescription = {
|
|
8
15
|
readonly type: "offer" | "answer";
|
|
@@ -59,12 +66,24 @@ export type CloudflareSFUSignalingTransport = {
|
|
|
59
66
|
readonly sessionDescription?: CloudflareSFUSessionDescription;
|
|
60
67
|
readonly tracks: readonly CloudflareSFUCloseTrackRequest[];
|
|
61
68
|
readonly force: boolean;
|
|
69
|
+
readonly receiveOnly?: boolean;
|
|
70
|
+
}) => Promise<CloudflareSFUTracksResponse>;
|
|
71
|
+
/** Changes the simulcast layer of tracks already pulled, without renegotiating. Transports without it keep the layer chosen at pull time. */
|
|
72
|
+
readonly updateTracks?: (input: {
|
|
73
|
+
readonly connectionId: string;
|
|
74
|
+
readonly tracks: readonly CloudflareSFUTrackRequest[];
|
|
62
75
|
}) => Promise<CloudflareSFUTracksResponse>;
|
|
63
76
|
readonly renegotiate: (input: {
|
|
64
77
|
readonly connectionId: string;
|
|
65
78
|
readonly sessionDescription: CloudflareSFUSessionDescription;
|
|
66
79
|
}) => Promise<void>;
|
|
67
80
|
readonly listPublications: () => Promise<CloudflareSFUPublicationSnapshot>;
|
|
81
|
+
/**
|
|
82
|
+
* Best-effort per-call stats upload; transports without it simply report nothing. The `closing`
|
|
83
|
+
* batch reuses the last token and never asks the credential provider, which could refresh access
|
|
84
|
+
* for a participant who just left or was evicted.
|
|
85
|
+
*/
|
|
86
|
+
readonly uploadCallStats?: (stats: import("./call-stats").CallStatsRequest, closing: boolean) => Promise<void>;
|
|
68
87
|
};
|
|
69
88
|
export type CloudflareSFURemoteTrack = CloudflareSFUPublication & {
|
|
70
89
|
readonly track: MediaStreamTrack;
|