@hiver/connector-admin 4.22.3-authCta-beta.0 → 4.22.3-authCta-beta.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/app/connectors/pages/api-view/index.d.ts.map +1 -1
- package/app/connectors/pages/app-detail/Overview.d.ts +4 -1
- package/app/connectors/pages/app-detail/Overview.d.ts.map +1 -1
- package/app/connectors/pages/app-detail/StatusMenu.d.ts +23 -0
- package/app/connectors/pages/app-detail/StatusMenu.d.ts.map +1 -0
- package/app/connectors/pages/app-detail/index.d.ts +2 -2
- package/app/connectors/pages/app-detail/index.d.ts.map +1 -1
- package/app/connectors/pages/app-detail/legacy/EnabledToggle.d.ts.map +1 -0
- package/app/connectors/pages/app-detail/legacy/Overview.d.ts +27 -0
- package/app/connectors/pages/app-detail/legacy/Overview.d.ts.map +1 -0
- package/app/connectors/pages/app-detail/legacy/index.d.ts +36 -0
- package/app/connectors/pages/app-detail/legacy/index.d.ts.map +1 -0
- package/app/connectors/pages/app-detail/legacy/style.d.ts +7 -0
- package/app/connectors/pages/app-detail/legacy/style.d.ts.map +1 -0
- package/app/connectors/pages/app-detail/registry.d.ts +33 -0
- package/app/connectors/pages/app-detail/registry.d.ts.map +1 -1
- package/app/connectors/pages/app-detail/style.d.ts +19 -0
- package/app/connectors/pages/app-detail/style.d.ts.map +1 -1
- package/app/connectors/pages/settings/auth/index.d.ts +5 -1
- package/app/connectors/pages/settings/auth/index.d.ts.map +1 -1
- package/app/connectors/pages/settings/index.d.ts.map +1 -1
- package/app/connectors/pages/settings/visibility/index.d.ts.map +1 -1
- package/app/connectors/router.d.ts +3 -0
- package/app/connectors/router.d.ts.map +1 -1
- package/components/ui/connector-alert/index.d.ts.map +1 -1
- package/components/ui/connector-item/index.d.ts.map +1 -1
- package/constants/global-constants.d.ts +2 -0
- package/constants/global-constants.d.ts.map +1 -1
- package/features/advanced-features/components/feature-item/index.d.ts.map +1 -1
- package/features/advanced-features/components/feature-list/index.d.ts +3 -2
- package/features/advanced-features/components/feature-list/index.d.ts.map +1 -1
- package/features/advanced-features/constants/index.d.ts +3 -0
- package/features/advanced-features/constants/index.d.ts.map +1 -1
- package/features/advanced-features/types/index.d.ts +0 -2
- package/features/advanced-features/types/index.d.ts.map +1 -1
- package/features/auth/api/authDetailsMutation.d.ts +18 -0
- package/features/auth/api/authDetailsMutation.d.ts.map +1 -1
- package/features/auth/api/index.d.ts +10 -0
- package/features/auth/api/index.d.ts.map +1 -1
- package/features/auth/components/auth-form/index.d.ts +9 -1
- package/features/auth/components/auth-form/index.d.ts.map +1 -1
- package/features/auth/components/connector-auth-card/index.d.ts +3 -0
- package/features/auth/components/connector-auth-card/index.d.ts.map +1 -0
- package/features/auth/components/connector-auth-card/styles.d.ts +53 -0
- package/features/auth/components/connector-auth-card/styles.d.ts.map +1 -0
- package/features/auth/components/connector-auth-card/types.d.ts +141 -0
- package/features/auth/components/connector-auth-card/types.d.ts.map +1 -0
- package/features/auth/constants/index.d.ts +1 -0
- package/features/auth/constants/index.d.ts.map +1 -1
- package/features/auth/utils/credentialSetup.d.ts +29 -0
- package/features/auth/utils/credentialSetup.d.ts.map +1 -0
- package/features/auth/utils/oauthPopup.d.ts +9 -1
- package/features/auth/utils/oauthPopup.d.ts.map +1 -1
- package/features/clickup/controller.d.ts +28 -0
- package/features/clickup/controller.d.ts.map +1 -0
- package/features/connector-library/components/custom-connector-card-item/index.d.ts.map +1 -1
- package/features/connector-library/components/custom-connector-card-list/index.d.ts.map +1 -1
- package/features/template-library/components/library-card-list/index.d.ts.map +1 -1
- package/index.d.ts +18 -1
- package/index.d.ts.map +1 -1
- package/index.es.js +15111 -14107
- package/index.umd.js +586 -313
- package/package.json +1 -1
- package/style.css +1 -1
- package/testing/mocks/handlers/connector-template.d.ts.map +1 -1
- package/testing/test-utils.d.ts +11 -1
- package/testing/test-utils.d.ts.map +1 -1
- package/types/connector.d.ts +10 -0
- package/types/connector.d.ts.map +1 -1
- package/types/exposedTypes.d.ts +12 -0
- package/types/exposedTypes.d.ts.map +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -1
- package/app/connectors/pages/app-detail/EnabledToggle.d.ts.map +0 -1
- /package/app/connectors/pages/app-detail/{EnabledToggle.d.ts → legacy/EnabledToggle.d.ts} +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prop contract for <ConnectorAuthCard>.
|
|
3
|
+
*
|
|
4
|
+
* This file is PUBLISHED — `apps/admin/src/index.ts` re-exports these types
|
|
5
|
+
* from `@hiver/connector-admin`, and the `web` assistant is the consumer. Treat
|
|
6
|
+
* every shape here as a cross-repo contract: widening is additive and safe,
|
|
7
|
+
* renaming or narrowing is a breaking change that needs a major changeset.
|
|
8
|
+
*
|
|
9
|
+
* The card owns the OAuth popup end-to-end. `web` supplies a server-built
|
|
10
|
+
* `authorizeUrl` (it carries the OAuth `state`) and receives an outcome — it
|
|
11
|
+
* never sees `openOAuthPopup`, the AUTH_SUCCESS_MSG wire literal, or the
|
|
12
|
+
* auth-success bouncer page.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The five terminal outcomes of the popup flow, mirroring `OAuthPopupOutcome`
|
|
16
|
+
* in `@/features/auth/utils/oauthPopup`. Re-declared (rather than
|
|
17
|
+
* re-exported) so the published contract doesn't drag the popup helper's
|
|
18
|
+
* module onto the public surface.
|
|
19
|
+
*
|
|
20
|
+
* - `success` — the bouncer posted back an authenticated token
|
|
21
|
+
* - `failed` — the bouncer posted back a failure
|
|
22
|
+
* - `cancelled` — the admin closed the popup mid-flow
|
|
23
|
+
* - `timeout` — no resolution within the popup helper's 5-minute budget
|
|
24
|
+
* - `blocked` — `window.open` returned null (popup blocker)
|
|
25
|
+
*/
|
|
26
|
+
export type ConnectorAuthOutcome = 'success' | 'failed' | 'cancelled' | 'timeout' | 'blocked';
|
|
27
|
+
/**
|
|
28
|
+
* The connector's lifecycle state, as the admin sees it.
|
|
29
|
+
*
|
|
30
|
+
* Four states, not two. `30534` draws status as a dot and a label in this card's
|
|
31
|
+
* header and nowhere else — there is no app-level status surface anywhere in the
|
|
32
|
+
* flow — while QA asserts on four distinct values: TC-009 expects
|
|
33
|
+
* *"Authenticated but disabled"* for an interrupted setup, and TC-017 requires
|
|
34
|
+
* `Enabled` to be *"distinct from Authenticated but disabled"*. A binary
|
|
35
|
+
* connected/not-connected cannot express either.
|
|
36
|
+
*
|
|
37
|
+
* So the design's one status surface carries the model QA tests. Widening this
|
|
38
|
+
* is what lets both be true at once.
|
|
39
|
+
*/
|
|
40
|
+
export type ConnectorAuthConnectionStatus = 'not_connected' | 'authenticated' | 'authenticated_disabled' | 'enabled';
|
|
41
|
+
/**
|
|
42
|
+
* The card's host-driven lifecycle state.
|
|
43
|
+
* - `pending` — waiting on the admin (or on a submit the host is running)
|
|
44
|
+
* - `complete` — the host has accepted the credentials; the card goes inert
|
|
45
|
+
* - `error` — render `error` per D-16
|
|
46
|
+
*/
|
|
47
|
+
export type ConnectorAuthCardState = 'pending' | 'complete' | 'error';
|
|
48
|
+
/** Input type for one manual-auth field. `password` is masked (D-17). */
|
|
49
|
+
export type ConnectorAuthFieldType = 'text' | 'password' | 'url';
|
|
50
|
+
export interface IConnectorAuthProvider {
|
|
51
|
+
/** Connector type, e.g. `clickup`. Not rendered — used for keys/telemetry. */
|
|
52
|
+
key: string;
|
|
53
|
+
/** Display name, e.g. `ClickUp`. */
|
|
54
|
+
name: string;
|
|
55
|
+
logoUrl?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface IConnectorAuthField {
|
|
58
|
+
key: string;
|
|
59
|
+
label: string;
|
|
60
|
+
type: ConnectorAuthFieldType;
|
|
61
|
+
/** Blocks submit while empty, and renders the D-17 validation-error state. */
|
|
62
|
+
required?: boolean;
|
|
63
|
+
/** Rendered disabled — a value the admin copies out, not one they fill in. */
|
|
64
|
+
readonly?: boolean;
|
|
65
|
+
/** Adds the copy-to-clipboard adornment (e.g. a redirect URL). */
|
|
66
|
+
copyable?: boolean;
|
|
67
|
+
/** Prefill. `readonly` fields are expected to carry one. */
|
|
68
|
+
value?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface IConnectorAuthManualConfig {
|
|
71
|
+
/**
|
|
72
|
+
* Setup instructions shown above the form. Rendered as PLAIN TEXT with
|
|
73
|
+
* whitespace preserved — this repo ships no markdown renderer and a
|
|
74
|
+
* published component is the wrong place to add one, so markup is NOT
|
|
75
|
+
* interpreted. See the note in `index.tsx`.
|
|
76
|
+
*/
|
|
77
|
+
instructionsMarkdown: string;
|
|
78
|
+
fields: IConnectorAuthField[];
|
|
79
|
+
}
|
|
80
|
+
export interface IConnectorAuthError {
|
|
81
|
+
code: string;
|
|
82
|
+
message: string;
|
|
83
|
+
/** When true the card offers a retry affordance (D-16 "retried"). */
|
|
84
|
+
retryable: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface IConnectorAuthCardBaseProps {
|
|
87
|
+
/**
|
|
88
|
+
* The card's own heading — `30534` puts it on the header row, left of the
|
|
89
|
+
* status. Distinct from `provider.name`, which labels the app row beneath it.
|
|
90
|
+
*/
|
|
91
|
+
title?: string;
|
|
92
|
+
provider: IConnectorAuthProvider;
|
|
93
|
+
description: string;
|
|
94
|
+
connectionStatus: ConnectorAuthConnectionStatus;
|
|
95
|
+
/** Server-built authorization URL; carries the OAuth `state` parameter. */
|
|
96
|
+
authorizeUrl: string;
|
|
97
|
+
/** Overrides the connect button's label. Defaults to `Connect <name>`. */
|
|
98
|
+
ctaLabel?: string;
|
|
99
|
+
state: ConnectorAuthCardState;
|
|
100
|
+
error?: IConnectorAuthError | null;
|
|
101
|
+
/** Called exactly once per popup flow, with the flow's terminal outcome. */
|
|
102
|
+
onOutcome: (outcome: ConnectorAuthOutcome) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Opt-in in-card credential setup. When set, the card fetches the
|
|
105
|
+
* connector (by `connectorId`) or else its template (by `templateId`),
|
|
106
|
+
* renders the credential fields itself (client ID/secret + redirect URL for
|
|
107
|
+
* OAuth2, key/secret for ApiKey/Basic, plus template variables) and on
|
|
108
|
+
* Connect POSTs/PATCHes them before running the popup. If the fetch fails or
|
|
109
|
+
* the auth type isn't supported, the card behaves exactly as without it,
|
|
110
|
+
* using `authorizeUrl`. Server errors (409/400/…) render inline and do NOT
|
|
111
|
+
* call `onOutcome`.
|
|
112
|
+
*/
|
|
113
|
+
credentialsSetup?: {
|
|
114
|
+
connectorId?: string | null;
|
|
115
|
+
templateId?: string | null;
|
|
116
|
+
} | null;
|
|
117
|
+
/**
|
|
118
|
+
* Fired once per card: when an OAuth popup opens (setup mode or the plain
|
|
119
|
+
* `authorizeUrl` flow; never for a blocked popup) or a non-OAuth setup submit is sent.
|
|
120
|
+
*/
|
|
121
|
+
onStart?: () => void;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A card that renders the manual form must be given its submit handler, so
|
|
125
|
+
* `onManualSubmit` is required whenever `manualAuth` is provided.
|
|
126
|
+
*/
|
|
127
|
+
export type IConnectorAuthCardProps = IConnectorAuthCardBaseProps & ({
|
|
128
|
+
/** Manual-credential form. */
|
|
129
|
+
manualAuth: IConnectorAuthManualConfig;
|
|
130
|
+
/** Called with the manual form's values once client-side validation passes. */
|
|
131
|
+
onManualSubmit: (values: Record<string, string>) => void;
|
|
132
|
+
} | {
|
|
133
|
+
/**
|
|
134
|
+
* Omit (or pass null) when the connector has a registered OAuth app and
|
|
135
|
+
* the popup is the only path.
|
|
136
|
+
*/
|
|
137
|
+
manualAuth?: null;
|
|
138
|
+
onManualSubmit?: (values: Record<string, string>) => void;
|
|
139
|
+
});
|
|
140
|
+
export {};
|
|
141
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/components/connector-auth-card/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;GAW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EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,2EAA2E;IAC3E,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,4EAA4E;IAC5E,SAAS,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACnD;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACtF;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAC/D,CACI;IACE,8BAA8B;IAC9B,UAAU,EAAE,0BAA0B,CAAC;IACvC,+EAA+E;IAC/E,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;CAC1D,GACD;IACE;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;CAC3D,CACJ,CAAC"}
|
|
@@ -9,6 +9,7 @@ export declare const AUTH_STATUS: {
|
|
|
9
9
|
export declare const AUTH_SUCCESS_TOAST_MSG = "Successfully authorized";
|
|
10
10
|
export declare const AUTH_FAILED_TOAST_MSG = "Authorization failed";
|
|
11
11
|
export declare const COPY_SUCCESS = "Copied to clipboard";
|
|
12
|
+
export declare const COPY_FAILED = "Could not copy to clipboard";
|
|
12
13
|
export declare const AUTH_REQUEST_FAILED_TOAST_MSG = "Something went wrong";
|
|
13
14
|
export declare const AUTH_POLL_TIMEOUT_MS: number;
|
|
14
15
|
export declare const AUTH_POLL_TIMEOUT_MSG = "We couldn't confirm the sign-in. Close the sign-in tab and try authenticating again.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/auth/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,eAAO,MAAM,WAAW,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAYtD,CAAC;AAEF,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAChE,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAC5D,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAClD,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AAKpE,eAAO,MAAM,oBAAoB,QAAiB,CAAC;AACnD,eAAO,MAAM,qBAAqB,yFACsD,CAAC;AAIzF,eAAO,MAAM,sBAAsB,wFACoD,CAAC;AACxF,eAAO,MAAM,qBAAqB,+BAA+B,CAAC;AAClE,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AACxE,eAAO,MAAM,6BAA6B,oCAAoC,CAAC;AAE/E,eAAO,MAAM,eAAe,qCAAqC,CAAC;AAClE,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AACxD,eAAO,MAAM,cAAc,+CAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,EAAE,MAAsB,CAAC;AACtD,eAAO,MAAM,qBAAqB,EAAE,MAC4C,CAAC;AACjF,eAAO,MAAM,cAAc,EAAE,MAA0B,C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AM,qBAAqB,EAAE,MAC4C,CAAC;AACjF,eAAO,MAAM,cAAc,EAAE,MAA0B,CAAC;AACxD,eAAO,MAAM,kBAAkB,EAAE,MAA6B,CAAC;AAC/D,eAAO,MAAM,eAAe,EAAE,MAAoC,CAAC;AACnE,eAAO,MAAM,eAAe,EAAE,MAA6B,CAAC;AAC5D,eAAO,MAAM,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IConnectorAuthField } from '../components/connector-auth-card/types';
|
|
2
|
+
import { AuthRequest, EditAuthRequest } from '../types/request';
|
|
3
|
+
import { IConnectorDetails } from '../../../types/connector';
|
|
4
|
+
/** The slice of GET /connectors/{id} or GET /template/{id} the in-card setup reads. */
|
|
5
|
+
export type CredentialSetupDetails = Pick<IConnectorDetails, 'authDetails' | 'variables' | 'redirectUrl' | 'hiddenFields' | 'oneClickAuthEnabled' | 'baseUrlRequired'> & {
|
|
6
|
+
variablesConfig?: Array<{
|
|
7
|
+
name: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
label?: unknown;
|
|
10
|
+
isRequired?: boolean;
|
|
11
|
+
is_required?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The fields the card should render for in-card credential setup, or `null`
|
|
16
|
+
* when the auth type isn't supported here (the card then falls back to the
|
|
17
|
+
* host's `authorizeUrl`). An empty array means nothing to ask (one-click).
|
|
18
|
+
*/
|
|
19
|
+
export declare const credentialFields: (details: CredentialSetupDetails) => IConnectorAuthField[] | null;
|
|
20
|
+
/**
|
|
21
|
+
* Request body for POST /connector/auth (pass `templateId`) or
|
|
22
|
+
* PATCH /connector/{id}/auth (omit it). Oauth2 sends only the client
|
|
23
|
+
* credentials — the server fills endpoints/scopes from the template, and
|
|
24
|
+
* one-click (no credentials entered) uses Hiver's own app.
|
|
25
|
+
*/
|
|
26
|
+
export declare const credentialRequestBody: (details: CredentialSetupDetails, values: Record<string, string>, { templateId }?: {
|
|
27
|
+
templateId?: string | null;
|
|
28
|
+
}) => AuthRequest | EditAuthRequest;
|
|
29
|
+
//# sourceMappingURL=credentialSetup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentialSetup.d.ts","sourceRoot":"","sources":["../../../../src/features/auth/utils/credentialSetup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,uFAAuF;AACvF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,iBAAiB,EACjB,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,qBAAqB,GAAG,iBAAiB,CACzG,GAAG;IAEF,eAAe,CAAC,EAAE,KAAK,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC,CAAC;CACJ,CAAC;AAoBF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAa,sBAAsB,KAAG,mBAAmB,EAAE,GAAG,IAgE1F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,YACvB,sBAAsB,UACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,mBACd;IAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,KAC7C,WAAW,GAAG,eAqChB,CAAC"}
|
|
@@ -16,6 +16,14 @@ export type OAuthPopupOutcome = 'success' | 'failed' | 'cancelled' | 'timeout' |
|
|
|
16
16
|
* Save Configuration flow needs the same popup behaviour without
|
|
17
17
|
* pulling in the legacy AuthForm/Settings page shell. The returned
|
|
18
18
|
* promise NEVER rejects — callers branch on the resolved outcome.
|
|
19
|
+
*
|
|
20
|
+
* `preOpened`: a window the caller opened synchronously in the click handler
|
|
21
|
+
* (`window.open('about:blank')`) before awaiting the request that produces
|
|
22
|
+
* `authUrl` — opening after an await loses the user gesture and gets blocked.
|
|
23
|
+
* It is navigated to `authUrl` instead of opening a new one. Pass `null` when
|
|
24
|
+
* that pre-open was blocked; omit it to open here as before.
|
|
25
|
+
*
|
|
26
|
+
* `onOpened`: called once the popup window exists (not when it is blocked).
|
|
19
27
|
*/
|
|
20
|
-
export declare function openOAuthPopup(authUrl: string): Promise<OAuthPopupOutcome>;
|
|
28
|
+
export declare function openOAuthPopup(authUrl: string, preOpened?: Window | null, onOpened?: () => void): Promise<OAuthPopupOutcome>;
|
|
21
29
|
//# sourceMappingURL=oauthPopup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauthPopup.d.ts","sourceRoot":"","sources":["../../../../src/features/auth/utils/oauthPopup.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAK3F
|
|
1
|
+
{"version":3,"file":"oauthPopup.d.ts","sourceRoot":"","sources":["../../../../src/features/auth/utils/oauthPopup.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAK3F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,CAAC,EAAE,MAAM,IAAI,GACpB,OAAO,CAAC,iBAAiB,CAAC,CAuC5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AppController, AppControllerArgs } from '../../app/connectors/pages/app-detail/schema';
|
|
2
|
+
/**
|
|
3
|
+
* ClickUp's AppController.
|
|
4
|
+
*
|
|
5
|
+
* Structurally mirrors `useSlackController` (same hydrate → dirty-track →
|
|
6
|
+
* save → re-arm shape), but ClickUp is an ORDINARY custom connector, so the
|
|
7
|
+
* save target differs: it has no per-(ug, sm) admin configs collection of its
|
|
8
|
+
* own. Its Configuration tab edits connector-level visibility — the same
|
|
9
|
+
* inboxes + role pair the post-install `InitialSetup` screen writes — so the
|
|
10
|
+
* save goes through the generic `updateConnectorById` PATCH rather than any
|
|
11
|
+
* ClickUp-specific endpoint. There is no ClickUp equivalent of Slack's
|
|
12
|
+
* `default_message`, so `defaultMessage` is carried only to satisfy the
|
|
13
|
+
* `AppController` contract and is never read or persisted here.
|
|
14
|
+
*
|
|
15
|
+
* Mode-aware:
|
|
16
|
+
* - `connector` mode (URL = /connector/app/:connectorId, post-install):
|
|
17
|
+
* hydrate from the install's persisted visibility and PATCH it back.
|
|
18
|
+
* - `template` mode (URL = /template/app/:templateId, pre-install): the URL
|
|
19
|
+
* id is a TEMPLATE id, and `updateConnectorById` needs an install id — so
|
|
20
|
+
* there is nothing to save against yet. ClickUp's install row is created
|
|
21
|
+
* by the OAuth flow, not by this form, so the form stays read-only
|
|
22
|
+
* (`canSave: false`) and Cancel bails back to the marketplace, matching
|
|
23
|
+
* Slack's template-mode Cancel. See the note in the run's implementation
|
|
24
|
+
* artifact: what template mode should offer for an OAuth connector is
|
|
25
|
+
* still an open product question.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useClickUpController({ mode, id }: AppControllerArgs): AppController;
|
|
28
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/features/clickup/controller.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAuBjG;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,iBAAiB,GAAG,aAAa,CAmInF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-library/components/custom-connector-card-item/index.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAgBtD,UAAU,wBAAwB;IAChC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAsBD,eAAO,MAAM,uBAAuB,iEAKjC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-library/components/custom-connector-card-item/index.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAgBtD,UAAU,wBAAwB;IAChC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAsBD,eAAO,MAAM,uBAAuB,iEAKjC,wBAAwB,4CA+L1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-library/components/custom-connector-card-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAoBvC,eAAO,MAAM,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/connector-library/components/custom-connector-card-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAoBvC,eAAO,MAAM,uBAAuB,EAAE,EAiFrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/template-library/components/library-card-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAkBvC,UAAU,qBAAqB;IAC7B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/template-library/components/library-card-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAkBvC,UAAU,qBAAqB;IAC7B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,qBAAqB,CAyErD,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -2,8 +2,25 @@ export { ConnectorsApp } from './bootstrap';
|
|
|
2
2
|
export { initConnectorsBifrost, getConnectorsBifrostConfigs, HiverConnectorBifrostAuth } from '@connector/bifrost';
|
|
3
3
|
export { getMetaData, getEnabledAuthenticatedConnectors, getConnectorFieldDropdownOptions, getConnectorStaticFieldOptions, getConnectorDynamicFieldOptions } from '@connector/utils';
|
|
4
4
|
export { AutomationMapDefaults } from './app/automation-map-fields';
|
|
5
|
+
export { ConnectorAuthCard } from './features/auth/components/connector-auth-card';
|
|
5
6
|
export type { ISectionItems, IActionButtons, ISections, IMetaData, ITemplateUpdates, Connector, ConnectorFieldOption } from '@connector/utils';
|
|
6
7
|
export type { IInboxData, IRolesData, ConnectorsAdminFunctions } from './types/exposedTypes';
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The theme tokens, and the CSS-variable map built from them.
|
|
10
|
+
*
|
|
11
|
+
* `connectorAdminThemeCssVariables` is newly exported (2026-09-21) because a host
|
|
12
|
+
* rendering these components **outside** the admin app's own root cannot get the
|
|
13
|
+
* tokens any other way. `style.css` ships only a static subset scoped to
|
|
14
|
+
* `.connectorsAdmin-v2, .connectorAdmin-portal`; the fuller set — including
|
|
15
|
+
* `--connector-admin-primary-action`, which `ConnectorAuthCard`'s CTA paints with
|
|
16
|
+
* — is produced here at runtime and applied by the host as inline variables.
|
|
17
|
+
*
|
|
18
|
+
* `web` hit exactly this: it imports `style.css`, mounts the published
|
|
19
|
+
* `ConnectorAuthCard` in its activation assistant, and the button rendered with
|
|
20
|
+
* no background because that token is not in the stylesheet. Additive export, so
|
|
21
|
+
* no consumer changes.
|
|
22
|
+
*/
|
|
23
|
+
export { connectorAdminThemeCssVariables, connectorAdminThemeDefaults, resolveConnectorAdminThemeTokens } from './theme/connector-admin-theme';
|
|
8
24
|
export type { ConnectorAdminColorScheme, ConnectorAdminThemeConfig, ConnectorAdminThemeTokens } from './theme/connector-admin-theme';
|
|
25
|
+
export type { ConnectorAuthCardState, ConnectorAuthConnectionStatus, ConnectorAuthFieldType, ConnectorAuthOutcome, IConnectorAuthCardProps, IConnectorAuthError, IConnectorAuthField, IConnectorAuthManualConfig, IConnectorAuthProvider } from './features/auth/components/connector-auth-card/types';
|
|
9
26
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACnH,OAAO,EACL,WAAW,EACX,iCAAiC,EACjC,gCAA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