@protobase/schema 0.62.4 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ //#region src/calls/call-guests.d.ts
2
+ /**
3
+ * The path of the guests' routes under the API's system path (`/api`), or of one of them: the lobby, the guest call
4
+ * socket, and an organization's switch for guest links.
5
+ */
6
+ export declare const guestCallsPath: (systemPath: string, part?: "lobby" | "socket" | "organization") => string;
7
+ //#endregion
@@ -0,0 +1,8 @@
1
+ //#region src/calls/call-guests.ts
2
+ /**
3
+ * The path of the guests' routes under the API's system path (`/api`), or of one of them: the lobby, the guest call
4
+ * socket, and an organization's switch for guest links.
5
+ */
6
+ const guestCallsPath = (systemPath, part) => `${systemPath}/calls/guests${part ? `/${part}` : ""}`;
7
+ //#endregion
8
+ export { guestCallsPath };
@@ -51,11 +51,13 @@ export type CallDescription = {
51
51
  };
52
52
  /** How the call's media flows: through a media server, or directly between the members' browsers. */
53
53
  export type CallMode = 'sfu' | 'peer';
54
- /** A message from the browser. */
54
+ /** A message from the browser. `guest` is a guest's token, on the guest call socket only. */
55
55
  export type CallClientMessage = {
56
56
  type: 'join';
57
+ guest?: string;
57
58
  } | ({
58
59
  type: 'resume';
60
+ guest?: string;
59
61
  } & CallResume) | {
60
62
  type: 'publish';
61
63
  tracks: CallTrackRequest[];
@@ -90,6 +92,24 @@ export type CallClientMessage = {
90
92
  hidden?: boolean;
91
93
  } | {
92
94
  type: 'leave';
95
+ } |
96
+ /** A member who may invite: a new guest link to the call, with the sources a guest may send and when it expires. */
97
+ {
98
+ type: 'guest-link';
99
+ publish: CallTrackSource[];
100
+ expires_at?: string;
101
+ } | {
102
+ type: 'guest-link-revoke';
103
+ link: string;
104
+ } |
105
+ /** Lets a waiting guest into the call, or turns them away. */
106
+ {
107
+ type: 'guest-decide';
108
+ guest: string;
109
+ admit: boolean;
110
+ } | {
111
+ type: 'guest-remove';
112
+ guest: string;
93
113
  };
94
114
  /** A track of another member the member hears. */
95
115
  export type CallRemoteTrack = {
@@ -104,11 +124,32 @@ export type CallRemoteTrack = {
104
124
  * browser to join anew, and `unavailable` is a server that could not take the member in, after the browser tried again.
105
125
  */
106
126
  export type CallLeftReason = 'ended' | 'removed' | 'full' | 'refused' | 'unavailable' | 'rejoin';
107
- /** Someone in a call, since when (ISO 8601). */
127
+ /** Someone in a call, since when (ISO 8601), with the name they show: a guest's own, or the one the app gave the member. */
108
128
  export type CallRosterMember = {
109
129
  member: string;
110
130
  joined_at: string;
131
+ name?: string;
132
+ };
133
+ /** A guest waiting in the lobby of a call, by the name they gave, since when (ISO 8601). */
134
+ export type CallLobbyGuest = {
135
+ guest: string;
136
+ name: string;
137
+ since: string;
111
138
  };
139
+ /** A guest link of a call: who made it, what a guest may send, and until when (ISO 8601) it lets guests in. */
140
+ export type CallGuestLink = {
141
+ id: string;
142
+ created_by: string;
143
+ publish: CallTrackSource[];
144
+ expires_at: string | null;
145
+ };
146
+ /**
147
+ * Why a member's guest request did nothing: the guest or link is gone, the call is full, the organization turned guest
148
+ * links off, the record has no organization to ask, or the member may not invite.
149
+ */
150
+ export type CallGuestRefusal = 'gone' | 'full' | 'off' | 'no-organization' | 'not-allowed';
151
+ /** A guest's lobby wait: waiting, let in, turned away, or the call or link is over. */
152
+ export type CallGuestState = 'waiting' | 'admitted' | 'denied' | 'ended';
112
153
  /** A message from the server. */
113
154
  export type CallServerMessage = {
114
155
  type: 'joined';
@@ -181,5 +222,24 @@ export type CallServerMessage = {
181
222
  } | {
182
223
  type: 'left';
183
224
  reason: CallLeftReason;
225
+ } |
226
+ /** To a member who may invite: who waits in the lobby, and the call's guest links, whenever that changes. */
227
+ {
228
+ type: 'lobby';
229
+ guests: CallLobbyGuest[];
230
+ links: CallGuestLink[];
231
+ } |
232
+ /** Each guest request is answered once, in order: the link a `guest-link` made, with its token, which only its maker gets, once. */
233
+ {
234
+ type: 'guest-link';
235
+ link: CallGuestLink;
236
+ token: string;
237
+ } |
238
+ /** A `guest-link-revoke`, `guest-decide` or `guest-remove` that was done. */
239
+ {
240
+ type: 'guest-done';
241
+ } | {
242
+ type: 'guest-refused';
243
+ reason: CallGuestRefusal;
184
244
  };
185
245
  //#endregion
@@ -37,6 +37,7 @@ import { historyIdParam, historyIdPattern, historyPath } from "./history-path.js
37
37
  import { Availability, PersonStatus, StatusInput, availabilities, heldStatus, maxStatusText, statusPath, statusTextProblem } from "./status.js";
38
38
  import { listColumnNames } from "./list-columns.js";
39
39
  import { builtInFieldTypes } from "./built-in-field-types.js";
40
- import { CallCandidate, CallClientMessage, CallDescription, CallLeftReason, CallMode, CallRemoteTrack, CallResume, CallRosterMember, CallServerMessage, CallTrackRequest, CallTrackSource, CallVideoLayer } from "./calls/call-protocol.js";
40
+ import { CallCandidate, CallClientMessage, CallDescription, CallGuestLink, CallGuestRefusal, CallGuestState, CallLeftReason, CallLobbyGuest, CallMode, CallRemoteTrack, CallResume, CallRosterMember, CallServerMessage, CallTrackRequest, CallTrackSource, CallVideoLayer } from "./calls/call-protocol.js";
41
+ import { guestCallsPath } from "./calls/call-guests.js";
41
42
  import { CallRing, callsChannelEvent, declineWord, ringNotice, ringsPath } from "./calls/call-rings.js";
42
- export { type AddressCheck, type Availability, type CallCandidate, type CallClientMessage, type CallDescription, type CallLeftReason, type CallMode, type CallRemoteTrack, type CallResume, type CallRing, type CallRosterMember, type CallServerMessage, type CallTrackRequest, type CallTrackSource, type CallVideoLayer, type FormulaNode, type Locale, type MobileReleaseAnswer, type PersonStatus, type PluginHost, type PluginRequirement, type PropShapes, type RefShape, type ReleaseBinding, type SearchTerm, type StatusInput, actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, availabilities, boardErrors, bottomBarFor, builtInFieldTypes, callsChannelEvent, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, declineWord, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, heldStatus, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, maxStatusText, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, releaseStatementContext, releaseStatementFile, renderPrompt, ringNotice, ringsPath, searchTerms, serviceWorkerFile, shapes, shownInputs, statusPath, statusTextProblem, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
43
+ export { type AddressCheck, type Availability, type CallCandidate, type CallClientMessage, type CallDescription, type CallGuestLink, type CallGuestRefusal, type CallGuestState, type CallLeftReason, type CallLobbyGuest, type CallMode, type CallRemoteTrack, type CallResume, type CallRing, type CallRosterMember, type CallServerMessage, type CallTrackRequest, type CallTrackSource, type CallVideoLayer, type FormulaNode, type Locale, type MobileReleaseAnswer, type PersonStatus, type PluginHost, type PluginRequirement, type PropShapes, type RefShape, type ReleaseBinding, type SearchTerm, type StatusInput, actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, availabilities, boardErrors, bottomBarFor, builtInFieldTypes, callsChannelEvent, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, declineWord, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, guestCallsPath, heldStatus, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, maxStatusText, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, releaseStatementContext, releaseStatementFile, renderPrompt, ringNotice, ringsPath, searchTerms, serviceWorkerFile, shapes, shownInputs, statusPath, statusTextProblem, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
package/dist/internal.js CHANGED
@@ -37,5 +37,6 @@ import { historyIdParam, historyIdPattern, historyPath } from "./history-path.js
37
37
  import { availabilities, heldStatus, maxStatusText, statusPath, statusTextProblem } from "./status.js";
38
38
  import { listColumnNames } from "./list-columns.js";
39
39
  import { builtInFieldTypes } from "./built-in-field-types.js";
40
+ import { guestCallsPath } from "./calls/call-guests.js";
40
41
  import { callsChannelEvent, declineWord, ringNotice, ringsPath } from "./calls/call-rings.js";
41
- export { actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, availabilities, boardErrors, bottomBarFor, builtInFieldTypes, callsChannelEvent, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, declineWord, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, heldStatus, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, maxStatusText, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, releaseStatementContext, releaseStatementFile, renderPrompt, ringNotice, ringsPath, searchTerms, serviceWorkerFile, shapes, shownInputs, statusPath, statusTextProblem, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
42
+ export { actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, availabilities, boardErrors, bottomBarFor, builtInFieldTypes, callsChannelEvent, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, declineWord, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, guestCallsPath, heldStatus, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, maxStatusText, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, releaseStatementContext, releaseStatementFile, renderPrompt, ringNotice, ringsPath, searchTerms, serviceWorkerFile, shapes, shownInputs, statusPath, statusTextProblem, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/schema",
3
- "version": "0.62.4",
3
+ "version": "0.63.0",
4
4
  "description": "Resource, field, view and access definitions for Protobase configs.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {