@protobase/client 0.67.11 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +1 -0
- package/dist/client.js +8 -2
- package/dist/index.d.ts +2 -1
- package/dist/routed-client.js +2 -1
- package/dist/workflow-types.d.ts +2 -0
- package/dist/workflow-types.js +14 -0
- package/package.json +3 -3
package/dist/client.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ export declare const createClient: (options?: ClientOptions) => {
|
|
|
129
129
|
allowed: () => Promise<boolean>;
|
|
130
130
|
setAllowed: (allowed: boolean) => Promise<void>;
|
|
131
131
|
};
|
|
132
|
+
workflowTypes: () => Promise<import("@protobase/schema/internal").WorkflowTypeList>;
|
|
132
133
|
};
|
|
133
134
|
export type Client = ReturnType<typeof createClient>;
|
|
134
135
|
//#endregion
|
package/dist/client.js
CHANGED
|
@@ -7,6 +7,7 @@ import { sharedLive } from "./shared-live.js";
|
|
|
7
7
|
import { channelsClient } from "./channels.js";
|
|
8
8
|
import { devicesClient } from "./devices.js";
|
|
9
9
|
import { statusClient } from "./status.js";
|
|
10
|
+
import { workflowTypesClient } from "./workflow-types.js";
|
|
10
11
|
import { notificationHistoryClient } from "./notification-history.js";
|
|
11
12
|
import { recordCallsClient } from "./record-calls.js";
|
|
12
13
|
import { ringsClient } from "./rings.js";
|
|
@@ -446,6 +447,10 @@ const createClient = (options = {}) => {
|
|
|
446
447
|
const notifications = notificationHistoryClient(send);
|
|
447
448
|
/** A record's calls, live with `watchCalls`, for whoever may read the record (see `recordCallsClient`). */
|
|
448
449
|
const { calls, watchCalls } = recordCallsClient(send, callsPath);
|
|
450
|
+
/** People's own status, and that of those who share an organization with the signed-in person (see `statusClient`). */
|
|
451
|
+
const status = statusClient(send);
|
|
452
|
+
/** The app's workflow trigger and step types, each with its input's JSON Schema (see `workflowTypesClient`). */
|
|
453
|
+
const workflowTypes = workflowTypesClient(send);
|
|
449
454
|
return {
|
|
450
455
|
list,
|
|
451
456
|
search,
|
|
@@ -477,11 +482,12 @@ const createClient = (options = {}) => {
|
|
|
477
482
|
channel,
|
|
478
483
|
devices,
|
|
479
484
|
notifications,
|
|
480
|
-
status
|
|
485
|
+
status,
|
|
481
486
|
calls,
|
|
482
487
|
watchCalls,
|
|
483
488
|
rings: ringsClient(send),
|
|
484
|
-
callGuests: callGuestsClient(send)
|
|
489
|
+
callGuests: callGuestsClient(send),
|
|
490
|
+
workflowTypes
|
|
485
491
|
};
|
|
486
492
|
};
|
|
487
493
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { LiveChange, LiveHandlers } from "./live.js";
|
|
|
12
12
|
import { Client, InvokeOptions, UploadOptions, UploadResult, createClient } from "./client.js";
|
|
13
13
|
import { LiveSocket, PollThenSocketOptions, pollThenSocket } from "./poll-then-socket.js";
|
|
14
14
|
import { Availability, PersonStatus, StatusClient, StatusInput } from "./status.js";
|
|
15
|
+
import { WorkflowTypeEntry, WorkflowTypeList } from "./workflow-types.js";
|
|
15
16
|
import { CallRing, RingsClient } from "./rings.js";
|
|
16
17
|
import { ApiError, PreconditionFailedError, ProblemDetails, ProblemError, isApiError } from "./problem.js";
|
|
17
18
|
import { fileUrl } from "./file-urls.js";
|
|
@@ -32,4 +33,4 @@ import { createStaticSession } from "./static-session.js";
|
|
|
32
33
|
import { AssistantClient, AssistantClientOptions, AssistantConnection, createAssistantClient } from "./assistant.js";
|
|
33
34
|
import { RuntimeClient, RuntimeClientOptions, RuntimeLastUpdate, RuntimePolicy, RuntimeStatus, RuntimeUpdateStage, createRuntimeClient } from "./runtime.js";
|
|
34
35
|
import { availabilities, heldStatus, maxStatusText, statusTextProblem } from "@protobase/schema/internal";
|
|
35
|
-
export { type AccountSecurity, type AccountSignIn, type ActiveRole, type Aggregate, type AggregateGroup, type AggregateParams, type AggregateSplitTotal, ApiError, type AppUser, type AssistantClient, type AssistantClientOptions, type AssistantConnection, AuthError, type AuthSession, type AuthSessionOptions, type AuthUser, type AuthenticatorSetup, type Availability, type BatchOp, type BatchRef, type BatchResult, type CallRing, type Channel, type ChannelError, type ChannelMessage, ChannelRefusal, type ChannelStatus, type ChannelUser, type Client, type ClientOptions, type CommentPage, type CommentPerson, type ConnectClient, type ConnectedApp, type ConnectingClient, type CurrentOrganization, type DeviceSession, type DevicesClient, type Facet, type FilterInput, type FormChallenge, type FormProof, type Histogram, type HistogramBucket, type HistoryChange, type HistoryPage, type InboxNotification, type InboxPage, type InvitationPreview, type InvitationSent, type InvokeOptions, type ListPage, type ListParams, type LiveChange, type LiveHandlers, type LiveSocket, type MapBounds, type MapBucket, type MapLayerModel, type MapParams, type MapResult, type MentionableUser, type Meta, type MetaResult, type NotificationHistoryClient, type Organization, type OrganizationInvitation, type OrganizationMember, type OrganizationPerson, type OrganizationRole, type OrganizationsClient, type OrganizationsFound, type Passkey, type PersonStatus, type PersonalMailLink, type PlatformSignIn, type PluginRef, type PollThenSocketOptions, PreconditionFailedError, type PresenceChange, type PresenceEntry, type ProblemDetails, type ProblemError, type PublicForm, type RecordCall, type RecordCallsHandlers, type RecordComment, type RecordOf, type RecordPermissions, type RecordPhotos, type RegisteredDevice, type RelatedLabels, type RequiredSetup, type ResourcePermissions, type ResourceRef, type RingsClient, type RoleLabel, type RoleOption, type RolesClient, type RuntimeClient, type RuntimeClientOptions, type RuntimeLastUpdate, type RuntimePolicy, type RuntimeStatus, type RuntimeUpdateStage, type SamlSignIn, type Series, type SeriesParams, type SeriesPoint, type SetupStatus, type SignInMethod, type SignInPolicy, type SignInPolicyClient, type SignInPolicyState, type SignInResult, type SignInRule, type SocketLike, type SourceMeta, type SourceRef, type StaffAccessRule, type StaffSignIn, type StaffSignInClient, type StatusClient, type StatusInput, type Stored, type StoredFile, type StoredFileVariant, type TwoFactorMethod, type UploadOptions, type UploadProgress, type UploadResult, type UserInvitation, type UserInvitationSent, type UsersClient, type UsersFound, type WebDeviceRegistration, availabilities, createAssistantClient, createAuthSession, createClient, createRuntimeClient, createStaticSession, fileUrl, filterText, heldStatus, isApiError, listWire, maxStatusText, pollThenSocket, routedClient, sourceMeta, statusTextProblem, tokenExpiry };
|
|
36
|
+
export { type AccountSecurity, type AccountSignIn, type ActiveRole, type Aggregate, type AggregateGroup, type AggregateParams, type AggregateSplitTotal, ApiError, type AppUser, type AssistantClient, type AssistantClientOptions, type AssistantConnection, AuthError, type AuthSession, type AuthSessionOptions, type AuthUser, type AuthenticatorSetup, type Availability, type BatchOp, type BatchRef, type BatchResult, type CallRing, type Channel, type ChannelError, type ChannelMessage, ChannelRefusal, type ChannelStatus, type ChannelUser, type Client, type ClientOptions, type CommentPage, type CommentPerson, type ConnectClient, type ConnectedApp, type ConnectingClient, type CurrentOrganization, type DeviceSession, type DevicesClient, type Facet, type FilterInput, type FormChallenge, type FormProof, type Histogram, type HistogramBucket, type HistoryChange, type HistoryPage, type InboxNotification, type InboxPage, type InvitationPreview, type InvitationSent, type InvokeOptions, type ListPage, type ListParams, type LiveChange, type LiveHandlers, type LiveSocket, type MapBounds, type MapBucket, type MapLayerModel, type MapParams, type MapResult, type MentionableUser, type Meta, type MetaResult, type NotificationHistoryClient, type Organization, type OrganizationInvitation, type OrganizationMember, type OrganizationPerson, type OrganizationRole, type OrganizationsClient, type OrganizationsFound, type Passkey, type PersonStatus, type PersonalMailLink, type PlatformSignIn, type PluginRef, type PollThenSocketOptions, PreconditionFailedError, type PresenceChange, type PresenceEntry, type ProblemDetails, type ProblemError, type PublicForm, type RecordCall, type RecordCallsHandlers, type RecordComment, type RecordOf, type RecordPermissions, type RecordPhotos, type RegisteredDevice, type RelatedLabels, type RequiredSetup, type ResourcePermissions, type ResourceRef, type RingsClient, type RoleLabel, type RoleOption, type RolesClient, type RuntimeClient, type RuntimeClientOptions, type RuntimeLastUpdate, type RuntimePolicy, type RuntimeStatus, type RuntimeUpdateStage, type SamlSignIn, type Series, type SeriesParams, type SeriesPoint, type SetupStatus, type SignInMethod, type SignInPolicy, type SignInPolicyClient, type SignInPolicyState, type SignInResult, type SignInRule, type SocketLike, type SourceMeta, type SourceRef, type StaffAccessRule, type StaffSignIn, type StaffSignInClient, type StatusClient, type StatusInput, type Stored, type StoredFile, type StoredFileVariant, type TwoFactorMethod, type UploadOptions, type UploadProgress, type UploadResult, type UserInvitation, type UserInvitationSent, type UsersClient, type UsersFound, type WebDeviceRegistration, type WorkflowTypeEntry, type WorkflowTypeList, availabilities, createAssistantClient, createAuthSession, createClient, createRuntimeClient, createStaticSession, fileUrl, filterText, heldStatus, isApiError, listWire, maxStatusText, pollThenSocket, routedClient, sourceMeta, statusTextProblem, tokenExpiry };
|
package/dist/routed-client.js
CHANGED
|
@@ -47,7 +47,8 @@ const routedClient = (own, sourceOf) => {
|
|
|
47
47
|
rings: own.rings,
|
|
48
48
|
callGuests: own.callGuests,
|
|
49
49
|
calls: (resource, key) => to(resource).calls(resource, key),
|
|
50
|
-
watchCalls: (resource, key, handlers) => to(resource).watchCalls(resource, key, handlers)
|
|
50
|
+
watchCalls: (resource, key, handlers) => to(resource).watchCalls(resource, key, handlers),
|
|
51
|
+
workflowTypes: () => to("workflows").workflowTypes()
|
|
51
52
|
};
|
|
52
53
|
};
|
|
53
54
|
//#endregion
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { workflowTypesPath } from "@protobase/schema/internal";
|
|
2
|
+
//#region src/workflow-types.ts
|
|
3
|
+
/**
|
|
4
|
+
* The app's workflow trigger and step types (`/api/workflows/types`), with the JSON Schema of each one's input, in an
|
|
5
|
+
* app with workflows: the graph editor draws its menus and forms from them. Rejects with an `ApiError` for a caller who
|
|
6
|
+
* may not read workflows.
|
|
7
|
+
*/
|
|
8
|
+
const workflowTypesClient = (send) => async () => (await send({
|
|
9
|
+
method: "GET",
|
|
10
|
+
path: workflowTypesPath(""),
|
|
11
|
+
system: true
|
|
12
|
+
})).json();
|
|
13
|
+
//#endregion
|
|
14
|
+
export { workflowTypesClient };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"description": "Typed fetch client for the Protobase REST API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.7.12",
|
|
34
|
-
"@protobase/layout": "0.
|
|
35
|
-
"@protobase/schema": "0.
|
|
34
|
+
"@protobase/layout": "0.68.0",
|
|
35
|
+
"@protobase/schema": "0.68.0",
|
|
36
36
|
"@simplewebauthn/browser": "^13.3.0",
|
|
37
37
|
"better-auth": "^1.7.12"
|
|
38
38
|
}
|