@cosmoops/connect-sdk 0.45.0 → 0.47.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/CHANGELOG.md +89 -0
- package/dist/cjs/client/components/access-gate.js +1 -1
- package/dist/cjs/client/components/account-sessions.js +1 -1
- package/dist/cjs/client/components/ai-format.js +3 -3
- package/dist/cjs/client/components/ai-widgets.js +5 -5
- package/dist/cjs/client/components/apps-grid.js +2 -2
- package/dist/cjs/client/components/ask-ai-history.js +2 -2
- package/dist/cjs/client/components/ask-ai.js +1 -1
- package/dist/cjs/client/components/availability-form.js +1 -1
- package/dist/cjs/client/components/booking-calendar.js +4 -4
- package/dist/cjs/client/components/booking-dialogs.js +2 -2
- package/dist/cjs/client/components/call-button.js +6 -6
- package/dist/cjs/client/components/create-workspace-form.js +1 -1
- package/dist/cjs/client/components/event-type-form.js +1 -1
- package/dist/cjs/client/components/filter-tabs.js +1 -1
- package/dist/cjs/client/components/grievance-notice.js +1 -1
- package/dist/cjs/client/components/integrations-modal.js +2 -2
- package/dist/cjs/client/components/plans.js +5 -5
- package/dist/cjs/client/components/readiness.js +1 -1
- package/dist/cjs/client/components/subscribe-dialog.js +1 -1
- package/dist/cjs/client/components/subscription.js +5 -5
- package/dist/cjs/client/components/usage-meter.js +2 -2
- package/dist/cjs/client/components/user-menu.js +1 -1
- package/dist/cjs/client/components/workspace-switcher.js +1 -1
- package/dist/cjs/client/portal-links.js +1 -1
- package/dist/cjs/errors.js +9 -0
- package/dist/cjs/server/client.js +1 -1
- package/dist/cjs/server/http.js +4 -1
- package/dist/cjs/server/resources/drive.js +11 -0
- package/dist/cjs/server/resources/integrations.js +16 -0
- package/dist/cjs/server/resources/workspaces.js +9 -0
- package/dist/cjs/ui/page-shell.js +64 -2
- package/dist/esm/client/components/access-gate.js +1 -1
- package/dist/esm/client/components/account-sessions.js +1 -1
- package/dist/esm/client/components/ai-format.js +3 -3
- package/dist/esm/client/components/ai-widgets.js +5 -5
- package/dist/esm/client/components/apps-grid.js +2 -2
- package/dist/esm/client/components/ask-ai-history.js +2 -2
- package/dist/esm/client/components/ask-ai.js +1 -1
- package/dist/esm/client/components/availability-form.js +1 -1
- package/dist/esm/client/components/booking-calendar.js +4 -4
- package/dist/esm/client/components/booking-dialogs.js +2 -2
- package/dist/esm/client/components/call-button.js +6 -6
- package/dist/esm/client/components/create-workspace-form.js +1 -1
- package/dist/esm/client/components/event-type-form.js +1 -1
- package/dist/esm/client/components/filter-tabs.js +1 -1
- package/dist/esm/client/components/grievance-notice.js +1 -1
- package/dist/esm/client/components/integrations-modal.js +2 -2
- package/dist/esm/client/components/plans.js +5 -5
- package/dist/esm/client/components/readiness.js +1 -1
- package/dist/esm/client/components/subscribe-dialog.js +1 -1
- package/dist/esm/client/components/subscription.js +5 -5
- package/dist/esm/client/components/usage-meter.js +2 -2
- package/dist/esm/client/components/user-menu.js +1 -1
- package/dist/esm/client/components/workspace-switcher.js +1 -1
- package/dist/esm/client/portal-links.js +1 -1
- package/dist/esm/errors.js +9 -0
- package/dist/esm/server/client.js +1 -1
- package/dist/esm/server/http.js +4 -1
- package/dist/esm/server/resources/drive.js +11 -0
- package/dist/esm/server/resources/integrations.js +16 -0
- package/dist/esm/server/resources/workspaces.js +9 -0
- package/dist/esm/ui/page-shell.js +31 -2
- package/dist/theme.css +78 -2
- package/dist/types/client/components/call-button.d.ts +3 -1
- package/dist/types/client/portal-links.d.ts +1 -1
- package/dist/types/errors.d.ts +7 -0
- package/dist/types/server/client.d.ts +1 -1
- package/dist/types/server/index.d.ts +1 -1
- package/dist/types/server/resources/drive.d.ts +8 -1
- package/dist/types/server/resources/integrations.d.ts +33 -1
- package/dist/types/server/resources/workspaces.d.ts +9 -0
- package/dist/types/types.d.ts +21 -0
- package/dist/types/ui/page-shell.d.ts +20 -2
- package/package.json +1 -1
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
import { Suspense } from "react";
|
|
3
4
|
import { ConnectPageHeader } from "./page-header.js";
|
|
4
5
|
import { cn } from "../cn.js";
|
|
6
|
+
/**
|
|
7
|
+
* React's `<ViewTransition>`, when the host's React has one.
|
|
8
|
+
*
|
|
9
|
+
* It ships in the React canary that Next's App Router bundles and in no stable
|
|
10
|
+
* React yet - 19.2 exports nothing by that name. So it is looked up rather
|
|
11
|
+
* than imported: a static `import { ViewTransition }` resolves to `undefined`
|
|
12
|
+
* on a Vite or Storybook host and renders as an invalid element type, which
|
|
13
|
+
* would take down every page drawn in this shell to animate it. Absent, the
|
|
14
|
+
* page renders exactly as it did before, with no motion.
|
|
15
|
+
*
|
|
16
|
+
* Read by a computed key so a bundler doing strict export checks does not
|
|
17
|
+
* warn that `react` has no such export - on those hosts it genuinely has not.
|
|
18
|
+
*/
|
|
19
|
+
const RouteTransition = React["ViewTransition"];
|
|
5
20
|
/**
|
|
6
21
|
* The frame a page opens with: its vertical rhythm, its header, and the
|
|
7
22
|
* suspended regions beneath.
|
|
@@ -20,9 +35,23 @@ import { cn } from "../cn.js";
|
|
|
20
35
|
* never be made to wait, not that every title can be static.
|
|
21
36
|
*
|
|
22
37
|
* `space-y-5` is the page gap, owned here so it has exactly one definition.
|
|
38
|
+
*
|
|
39
|
+
* **It is also where the route transition lives**, because it is the one
|
|
40
|
+
* thing every page opens with. A transition has to wrap the *page*: a layout
|
|
41
|
+
* persists across navigation, so its enter and exit never fire, and a
|
|
42
|
+
* `template.tsx` remounts its subtree on every navigation, discarding the
|
|
43
|
+
* form drafts and scroll positions Next's `<Activity>` keeps. Where a layout
|
|
44
|
+
* draws the shell instead - a record with tabs - entering and leaving the
|
|
45
|
+
* record animates and switching tabs does not, which is right: a tab is the
|
|
46
|
+
* same place. `default="none"` keeps it still during anything else - a
|
|
47
|
+
* filter written to the URL, a `router.refresh()` after a save. The
|
|
48
|
+
* animations are `connect-page-enter`/`connect-page-exit` in `theme.css`.
|
|
23
49
|
*/
|
|
24
|
-
export function ConnectPageShell({ title, description, action, clamp, above, children, className, }) {
|
|
25
|
-
|
|
50
|
+
export function ConnectPageShell({ title, description, action, clamp, above, children, className, transition = true, }) {
|
|
51
|
+
const page = (_jsxs("div", { className: cn("space-y-5", className), children: [above, title !== undefined && (_jsx(ConnectPageHeader, { title: title, description: description, action: action, clamp: clamp })), children] }));
|
|
52
|
+
if (!transition || !RouteTransition)
|
|
53
|
+
return page;
|
|
54
|
+
return (_jsx(RouteTransition, { enter: "connect-page-enter", exit: "connect-page-exit", default: "none", children: page }));
|
|
26
55
|
}
|
|
27
56
|
/**
|
|
28
57
|
* The page header, for a detail route that can only name itself once its data
|
package/dist/theme.css
CHANGED
|
@@ -97,8 +97,13 @@
|
|
|
97
97
|
* around a green primary button, and measured 3.33:1 against the page;
|
|
98
98
|
* indigo is a different hue from the thing it outlines and clears 5:1.
|
|
99
99
|
*
|
|
100
|
-
*
|
|
101
|
-
* A
|
|
100
|
+
* - `secondary` Buttons, as a *soft* fill - see `.button--secondary`
|
|
101
|
+
* below. A view's main action is the solid green; the actions beside it
|
|
102
|
+
* are an indigo tint, so they read as branded without competing.
|
|
103
|
+
*
|
|
104
|
+
* Green acts, indigo navigates and supports - which is why indigo is never
|
|
105
|
+
* a *solid* fill. A second solid hue beside the green competes for the
|
|
106
|
+
* main action.
|
|
102
107
|
*
|
|
103
108
|
* The hue is chosen by what is already taken: danger sits at ~13 and
|
|
104
109
|
* warning at ~60-76, so green's textbook complement (magenta) would read as
|
|
@@ -110,6 +115,11 @@
|
|
|
110
115
|
--secondary: oklch(50% 0.16 268);
|
|
111
116
|
--link: var(--secondary);
|
|
112
117
|
--focus: var(--secondary);
|
|
118
|
+
/* The secondary button's tint. Its text is a step darker than
|
|
119
|
+
`--secondary` so it clears 4.5:1 on the tint, not just on the page. */
|
|
120
|
+
--secondary-soft: oklch(95% 0.03 268);
|
|
121
|
+
--secondary-soft-hover: oklch(91.5% 0.05 268);
|
|
122
|
+
--secondary-soft-foreground: oklch(44% 0.16 268);
|
|
113
123
|
}
|
|
114
124
|
|
|
115
125
|
.dark,
|
|
@@ -137,6 +147,27 @@
|
|
|
137
147
|
--secondary: oklch(68% 0.13 268);
|
|
138
148
|
--link: var(--secondary);
|
|
139
149
|
--focus: var(--secondary);
|
|
150
|
+
--secondary-soft: oklch(29% 0.06 268);
|
|
151
|
+
--secondary-soft-hover: oklch(34% 0.08 268);
|
|
152
|
+
--secondary-soft-foreground: oklch(84% 0.08 268);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
* The secondary button, in the secondary colour.
|
|
157
|
+
*
|
|
158
|
+
* HeroUI paints `variant="secondary"` with the neutral `--default`, which left
|
|
159
|
+
* the indigo on links and focus rings only - a page's actions were one green
|
|
160
|
+
* button and a row of grey ones, and the brand's second colour appeared on no
|
|
161
|
+
* control at all. This re-points the same four variables HeroUI's own rule
|
|
162
|
+
* sets, so hover, press, disabled and the focus ring all behave exactly as
|
|
163
|
+
* before; only the paint changes. `tertiary` stays neutral, which is what keeps
|
|
164
|
+
* an in-row control quieter than a page action.
|
|
165
|
+
*/
|
|
166
|
+
.button--secondary {
|
|
167
|
+
--button-bg: var(--secondary-soft);
|
|
168
|
+
--button-bg-hover: var(--secondary-soft-hover);
|
|
169
|
+
--button-bg-pressed: var(--secondary-soft-hover);
|
|
170
|
+
--button-fg: var(--secondary-soft-foreground);
|
|
140
171
|
}
|
|
141
172
|
|
|
142
173
|
/*
|
|
@@ -274,6 +305,51 @@ body {
|
|
|
274
305
|
}
|
|
275
306
|
}
|
|
276
307
|
|
|
308
|
+
/* ---------------------------------------------------------------------------
|
|
309
|
+
* The route transition `ConnectPageShell` plays.
|
|
310
|
+
*
|
|
311
|
+
* The old page leaves fast and accelerating, so it never competes with the
|
|
312
|
+
* arrival; the new one fades in once it has gone and settles as it rises. An
|
|
313
|
+
* exit and an entrance on the same curve is the mistake these two avoid.
|
|
314
|
+
* Inert on any host whose React has no `<ViewTransition>`, which is every
|
|
315
|
+
* stable React today - see `page-shell.tsx`.
|
|
316
|
+
* ------------------------------------------------------------------------- */
|
|
317
|
+
|
|
318
|
+
/* Clicks during a transition reach the live page rather than the overlay. */
|
|
319
|
+
::view-transition {
|
|
320
|
+
pointer-events: none;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@keyframes connect-vt-fade-in {
|
|
324
|
+
from { opacity: 0; }
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@keyframes connect-vt-fade-out {
|
|
328
|
+
to { opacity: 0; }
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@keyframes connect-vt-rise {
|
|
332
|
+
from { transform: translateY(8px); }
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
::view-transition-old(.connect-page-exit) {
|
|
336
|
+
animation: 140ms cubic-bezier(0.64, 0, 0.78, 0) both connect-vt-fade-out;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
::view-transition-new(.connect-page-enter) {
|
|
340
|
+
animation:
|
|
341
|
+
200ms cubic-bezier(0.22, 1, 0.36, 1) 60ms both connect-vt-fade-in,
|
|
342
|
+
260ms cubic-bezier(0.22, 1, 0.36, 1) both connect-vt-rise;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
@media (prefers-reduced-motion: reduce) {
|
|
346
|
+
::view-transition-old(.connect-page-exit),
|
|
347
|
+
::view-transition-new(.connect-page-enter) {
|
|
348
|
+
animation-duration: 0s;
|
|
349
|
+
animation-delay: 0s;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
277
353
|
/* ---------------------------------------------------------------------------
|
|
278
354
|
* A hand-rolled button still looks pressable.
|
|
279
355
|
*
|
|
@@ -25,7 +25,9 @@ import type { CallingAvailability } from "../../types.js";
|
|
|
25
25
|
* a number and the member must have "Make calls". What comes back lets this
|
|
26
26
|
* browser place exactly this call and no other.
|
|
27
27
|
* 3. The browser places it. Connect dials the number from the workspace's own
|
|
28
|
-
* number
|
|
28
|
+
* number. It is recorded only when the workspace has turned recording on
|
|
29
|
+
* (`connect.calls.getCallSettings`), and then the other party hears a
|
|
30
|
+
* disclosure before the conversation starts.
|
|
29
31
|
*
|
|
30
32
|
* ## Logging a call
|
|
31
33
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Connect answers any of these paths for a signed-in user on the bare URL -
|
|
7
7
|
* these two params only add the `"Back to <your app>"` banner
|
|
8
|
-
* (`
|
|
8
|
+
* (the hand-off strip in `ShellAnnouncements` on Connect's side). It validates `return_to`
|
|
9
9
|
* against this `client_id`'s registered redirect origins and silently drops
|
|
10
10
|
* the banner if they don't match, so a wrong or stale `appUrl`/`clientId`
|
|
11
11
|
* pairing degrades to what linking there did before rather than erroring.
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -34,6 +34,13 @@ export declare class ConnectError extends Error {
|
|
|
34
34
|
* already retries these internally (see `ConnectClientOptions.maxRetries`);
|
|
35
35
|
* this is for callers deciding whether to queue their own retry after the
|
|
36
36
|
* SDK has given up.
|
|
37
|
+
*
|
|
38
|
+
* **A 503 is retryable only when it carries `Retry-After`.** Connect sends
|
|
39
|
+
* that header on every 503 it means to be retried - a dependency blip, a
|
|
40
|
+
* contended transaction - and leaves it off when the dependency is
|
|
41
|
+
* *misconfigured* (a revoked provider key, say), where every retry gets the
|
|
42
|
+
* identical answer. Retrying those anyway cost a page three round trips and
|
|
43
|
+
* two sleeps per read to learn nothing.
|
|
37
44
|
*/
|
|
38
45
|
get isRetryable(): boolean;
|
|
39
46
|
/**
|
|
@@ -26,7 +26,7 @@ export type { OtpResource } from "./resources/otp.js";
|
|
|
26
26
|
export type { LogsResource } from "./resources/logs.js";
|
|
27
27
|
export type { AnalyticsResource } from "./resources/analytics.js";
|
|
28
28
|
export type { SessionsResource } from "./resources/sessions.js";
|
|
29
|
-
export type { ExecuteIntegrationActionInput, InitiateIntegrationConnectionInput, IntegrationsResource, } from "./resources/integrations.js";
|
|
29
|
+
export type { ExecuteIntegrationActionInput, InitiateIntegrationConnectionInput, IntegrationsResource, ProxyIntegrationRequestInput, } from "./resources/integrations.js";
|
|
30
30
|
export type { PlatformResource } from "./resources/platform.js";
|
|
31
31
|
export type { SchedulingResource, FindSlotsInput, ListBookingsInput, CreateBookingInput, RescheduleBookingInput, } from "./resources/scheduling.js";
|
|
32
32
|
export type { ContactsResource, LookupContactInput } from "./resources/contacts.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TransportOptions } from "../http.js";
|
|
2
|
-
import type { ThumbnailSize, UploadedFile } from "../../types.js";
|
|
2
|
+
import type { DriveUsage, ThumbnailSize, UploadedFile } from "../../types.js";
|
|
3
3
|
export interface UploadInput {
|
|
4
4
|
workspaceId: string;
|
|
5
5
|
/** Any `Blob`/`File`. In Node, `new Blob([buffer])` or `fs.openAsBlob(path)`. */
|
|
@@ -23,4 +23,11 @@ export declare class DriveResource {
|
|
|
23
23
|
workspaceId: string;
|
|
24
24
|
size?: ThumbnailSize;
|
|
25
25
|
}): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* How much of the workspace's Drive is used, against its limit. Needs
|
|
28
|
+
* `drive:read` and an active subscription to your application.
|
|
29
|
+
*/
|
|
30
|
+
getUsage(input: {
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
}): Promise<DriveUsage>;
|
|
26
33
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TransportOptions } from "../http.js";
|
|
2
|
-
import type { DisconnectIntegrationResponse, ExecuteIntegrationActionResponse, InitiateIntegrationConnectionResponse, IntegrationsListResponse } from "../../types.js";
|
|
2
|
+
import type { DisconnectIntegrationResponse, ExecuteIntegrationActionResponse, InitiateIntegrationConnectionResponse, IntegrationProxyMethod, IntegrationsListResponse, ProxyIntegrationRequestResponse } from "../../types.js";
|
|
3
3
|
export interface InitiateIntegrationConnectionInput {
|
|
4
4
|
toolkitSlug: string;
|
|
5
5
|
returnUrl: string;
|
|
@@ -13,6 +13,13 @@ export interface InitiateIntegrationConnectionInput {
|
|
|
13
13
|
* is present to finish the OAuth screen either.
|
|
14
14
|
*/
|
|
15
15
|
userId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Pre-fills the toolkit's own connection fields on the provider screen -
|
|
18
|
+
* `{ extension: "in" }` puts a Zoho connection on the India data centre,
|
|
19
|
+
* which otherwise defaults to `zoho.com`. Which keys a toolkit reads is
|
|
20
|
+
* Composio's catalogue; Connect passes them through.
|
|
21
|
+
*/
|
|
22
|
+
connectionData?: Record<string, string>;
|
|
16
23
|
}
|
|
17
24
|
export interface ExecuteIntegrationActionInput {
|
|
18
25
|
toolkitSlug: string;
|
|
@@ -20,6 +27,21 @@ export interface ExecuteIntegrationActionInput {
|
|
|
20
27
|
/** Passed through to Composio verbatim - its shape is defined by the toolkit's own action schema, which Connect does not model. */
|
|
21
28
|
params?: Record<string, unknown>;
|
|
22
29
|
}
|
|
30
|
+
export interface ProxyIntegrationRequestInput {
|
|
31
|
+
toolkitSlug: string;
|
|
32
|
+
method: IntegrationProxyMethod;
|
|
33
|
+
/**
|
|
34
|
+
* A path relative to the provider's API base - `/salesorders`, not a URL.
|
|
35
|
+
* Connect refuses anything with a scheme, a host, a `?` or a dot segment,
|
|
36
|
+
* because whoever picks the host picks where the workspace's credential
|
|
37
|
+
* goes. Parameters belong in `query`.
|
|
38
|
+
*/
|
|
39
|
+
endpoint: string;
|
|
40
|
+
query?: Record<string, string>;
|
|
41
|
+
body?: unknown;
|
|
42
|
+
/** Whose connection to act through - omitted or `null` for the workspace's shared one. */
|
|
43
|
+
onBehalfOfUserId?: string | null;
|
|
44
|
+
}
|
|
23
45
|
/**
|
|
24
46
|
* Composio-hosted third-party connections (Google Calendar, Slack,
|
|
25
47
|
* Twitter/X, ...) a workspace has connected. Connect proxies every call
|
|
@@ -51,6 +73,16 @@ export declare class IntegrationsResource {
|
|
|
51
73
|
initiateConnect(workspaceId: string, input: InitiateIntegrationConnectionInput): Promise<InitiateIntegrationConnectionResponse>;
|
|
52
74
|
/** Idempotent - disconnecting a toolkit that was never connected, or is already disconnected, is a success. */
|
|
53
75
|
disconnect(workspaceId: string, toolkitSlug: string): Promise<DisconnectIntegrationResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* One raw request to a connected provider's own API, for an endpoint the
|
|
78
|
+
* toolkit has no action for (Zoho Books ships no "create sales order").
|
|
79
|
+
*
|
|
80
|
+
* **Resolves whenever Connect relayed the request**, whatever the provider
|
|
81
|
+
* answered: read `status` and `data` for that. A provider-side 4xx is a
|
|
82
|
+
* business answer ("that GSTIN is invalid") rather than a transport
|
|
83
|
+
* failure, so it is not thrown as one.
|
|
84
|
+
*/
|
|
85
|
+
request(workspaceId: string, input: ProxyIntegrationRequestInput): Promise<ProxyIntegrationRequestResponse>;
|
|
54
86
|
/** Calls a Composio action against this workspace's connected account for the named toolkit. */
|
|
55
87
|
execute(workspaceId: string, input: ExecuteIntegrationActionInput): Promise<ExecuteIntegrationActionResponse>;
|
|
56
88
|
}
|
|
@@ -104,9 +104,18 @@ export declare class WorkspacesResource {
|
|
|
104
104
|
* Connect roles - so you never reimplement Connect's role resolution, and
|
|
105
105
|
* you are told nothing about the customer's Connect account beyond what your
|
|
106
106
|
* application needs.
|
|
107
|
+
*
|
|
108
|
+
* **Seat holders only, by default.** A workspace member with no seat on your
|
|
109
|
+
* application cannot sign in to it, so they are not part of your team and
|
|
110
|
+
* do not belong in an owner picker or an assignee list. Pass
|
|
111
|
+
* `includeUnassigned: true` from the screen where an admin *gives* a seat -
|
|
112
|
+
* it needs the people who do not have one yet. That form needs the signed-in
|
|
113
|
+
* member to be able to change access (a 403 otherwise), and every row
|
|
114
|
+
* carries `assigned` so the screen can tell the two apart.
|
|
107
115
|
*/
|
|
108
116
|
members(options: {
|
|
109
117
|
asUser: string;
|
|
118
|
+
includeUnassigned?: boolean;
|
|
110
119
|
}): Promise<ConnectWorkspaceMember[]>;
|
|
111
120
|
/**
|
|
112
121
|
* Seats, what the caller may do with them, and the invitations already
|
package/dist/types/types.d.ts
CHANGED
|
@@ -588,6 +588,15 @@ export interface UploadedFile {
|
|
|
588
588
|
size: number;
|
|
589
589
|
url: string;
|
|
590
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
* How full a workspace's Drive is. The limit is the one an upload is refused
|
|
593
|
+
* against, so a meter built on this agrees with `quota_exceeded`.
|
|
594
|
+
*/
|
|
595
|
+
export interface DriveUsage {
|
|
596
|
+
usedBytes: number;
|
|
597
|
+
/** `null` = unlimited. */
|
|
598
|
+
limitBytes: number | null;
|
|
599
|
+
}
|
|
591
600
|
export type ThumbnailSize = "small" | "medium" | "large";
|
|
592
601
|
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
593
602
|
export interface WriteLogInput {
|
|
@@ -1043,6 +1052,12 @@ export interface ExecuteIntegrationActionResponse {
|
|
|
1043
1052
|
data: unknown;
|
|
1044
1053
|
successful: boolean;
|
|
1045
1054
|
}
|
|
1055
|
+
export type IntegrationProxyMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1056
|
+
/** See `IntegrationsResource.request` - `status` is the provider's, not Connect's. */
|
|
1057
|
+
export interface ProxyIntegrationRequestResponse {
|
|
1058
|
+
status: number;
|
|
1059
|
+
data: unknown;
|
|
1060
|
+
}
|
|
1046
1061
|
/**
|
|
1047
1062
|
* The metrics Connect can report for your application.
|
|
1048
1063
|
*
|
|
@@ -1903,6 +1918,12 @@ export interface ConnectWorkspaceMember {
|
|
|
1903
1918
|
*/
|
|
1904
1919
|
memberId: string;
|
|
1905
1920
|
userId: string;
|
|
1921
|
+
/**
|
|
1922
|
+
* Whether this member holds a seat on your application. Only assigned
|
|
1923
|
+
* members can sign in to it; unassigned rows appear only when you asked
|
|
1924
|
+
* for them with `members({ includeUnassigned: true })`, to assign from.
|
|
1925
|
+
*/
|
|
1926
|
+
assigned: boolean;
|
|
1906
1927
|
email: string;
|
|
1907
1928
|
displayName: string | null;
|
|
1908
1929
|
photoUrl: string | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import { ConnectPageHeader } from "./page-header.js";
|
|
3
4
|
export interface ConnectPageShellProps {
|
|
@@ -13,6 +14,12 @@ export interface ConnectPageShellProps {
|
|
|
13
14
|
* See `cn`.
|
|
14
15
|
*/
|
|
15
16
|
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The route transition - the outgoing page fades out, the arriving one fades
|
|
19
|
+
* in and rises. On by default; pass `false` where a host already animates
|
|
20
|
+
* its routes, or the two play over each other. See {@link RouteTransition}.
|
|
21
|
+
*/
|
|
22
|
+
transition?: boolean;
|
|
16
23
|
children?: ReactNode;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
@@ -33,13 +40,24 @@ export interface ConnectPageShellProps {
|
|
|
33
40
|
* never be made to wait, not that every title can be static.
|
|
34
41
|
*
|
|
35
42
|
* `space-y-5` is the page gap, owned here so it has exactly one definition.
|
|
43
|
+
*
|
|
44
|
+
* **It is also where the route transition lives**, because it is the one
|
|
45
|
+
* thing every page opens with. A transition has to wrap the *page*: a layout
|
|
46
|
+
* persists across navigation, so its enter and exit never fire, and a
|
|
47
|
+
* `template.tsx` remounts its subtree on every navigation, discarding the
|
|
48
|
+
* form drafts and scroll positions Next's `<Activity>` keeps. Where a layout
|
|
49
|
+
* draws the shell instead - a record with tabs - entering and leaving the
|
|
50
|
+
* record animates and switching tabs does not, which is right: a tab is the
|
|
51
|
+
* same place. `default="none"` keeps it still during anything else - a
|
|
52
|
+
* filter written to the URL, a `router.refresh()` after a save. The
|
|
53
|
+
* animations are `connect-page-enter`/`connect-page-exit` in `theme.css`.
|
|
36
54
|
*/
|
|
37
|
-
export declare function ConnectPageShell({ title, description, action, clamp, above, children, className, }: Readonly<ConnectPageShellProps>):
|
|
55
|
+
export declare function ConnectPageShell({ title, description, action, clamp, above, children, className, transition, }: Readonly<ConnectPageShellProps>): React.JSX.Element;
|
|
38
56
|
export declare namespace ConnectPageShell {
|
|
39
57
|
var Header: typeof ConnectPageHeader;
|
|
40
58
|
var Async: ({ fallback, children, }: Readonly<{
|
|
41
59
|
/** Omit where the region has nothing to draw while it waits. */
|
|
42
60
|
fallback?: ReactNode;
|
|
43
61
|
children: ReactNode;
|
|
44
|
-
}>) =>
|
|
62
|
+
}>) => React.JSX.Element;
|
|
45
63
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmoops/connect-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Official server-side SDK for the CosmoOps Connect platform API - Login with Connect, entitlements, billing and metering.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "commonjs",
|