@nauticana/sail 1.1.39 → 1.1.40
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/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A shared Angular component library for building CRUD-based admin frontends. Provides table management, form handling, navigation, authentication, two-factor authentication, and trusted device management — all driven by metadata from a [keel](https://github.com/nauticana/keel) Go backend.
|
|
4
4
|
|
|
5
|
-
> **Compatibility:** sail and keel are versioned in lock-step. The current line is **sail v1.1.x ↔ keel v1.2.x**; sail v1.1.39
|
|
5
|
+
> **Compatibility:** sail and keel are versioned in lock-step. The current line is **sail v1.1.x ↔ keel v1.2.x**; sail v1.1.39 and v1.1.40 adopt keel v1.2.115 (usage captions, provider-managed subscriptions, the connect disconnect route), sail v1.1.37 adopts keel v1.2.114 (scopes validated against a constant list), sail v1.1.36 adopts keel v1.2.113 (API key expiry, caller-aware scope policy), sail v1.1.35 adopts keel v1.2.112 (minor-unit money, the `currency` catalog, OAuth grant routes), sail v1.1.33 adopts keel v1.2.106 (`prompt` on the login page, new-device step-up, sign-in sessions), sail v1.1.32 adopts keel v1.2.101 (the OAuth connect callback ticket), sail v1.1.31 adopts keel v1.2.100 (tenant single sign-on, DNS and HTTP-file domain verification), sail v1.1.30 adopts keel v1.2.99 (password routes; a password change signs out), sail v1.1.29 adopts keel v1.2.94 (signup: confirmation signs in, partner setup, sign-in hand-off code), sail v1.1.28 adopts keel v1.2.93 (absolute `return` for the OAuth hand-off), sail v1.1.18 adopts keel v1.2.58 (refresh-token rotation, `/public/logout`, setup intents, the realtime hub), the agency components in sail v1.1.14 require keel v1.2.41 (sail v1.1.9 needs keel v1.2.16 for the OAuth-connect layer). Earlier lines: **sail v0.5.x ↔ keel v0.5.x**, **sail v0.6.x / v0.7.x ↔ keel v0.7.x**, **sail v0.8.x ↔ keel v0.8.x**, **sail v0.9.x ↔ keel v0.9.x**. Newer sail releases extend the contract — older keel servers reject unknown endpoints with HTTP 404 / 400. The v0.8.x line additionally ships the `table_action` framework (per-table custom buttons surfaced in `TableList` / `TableSearch` / `TableEdit` / `TableDetail`); see the [Migrating to v0.7.0 §5 — TableAction](#migrating-to-v070--payout-user-payment-methods-table-actions) section for the seed shape (basis `table_action` + `authorization_object` + `authorization_object_action` rows) and the [keel/README Table Actions](https://github.com/nauticana/keel#table-actions) section for backend wiring via `handler.WrapTableAction`.
|
|
6
6
|
|
|
7
7
|
**Recent additions:** `BaseAuthService.acceptToken(jwt)` — adopt an externally-minted JWT (registration / SSO-handoff flows) and run the full post-login sequence (store under the canonical `jwt` key, load appdata, init routes); apps must use this instead of writing `localStorage` directly. `BaseRestService.analytic<T>(endpoint, params?)` — GET a keel `analytic/<endpoint>` report and return its rows. `passwordPolicyValidator` + `BaseAuthService.ensurePasswordPolicy()` — validate passwords against keel's policy (via `SailGuiConfig.passwordPolicyUrl`); see Configuration reference.
|
|
8
8
|
|
|
@@ -1277,7 +1277,8 @@ catalog and any routing via the outputs.
|
|
|
1277
1277
|
`FrontendReturnURL` must require sign-in before the panel runs.**
|
|
1278
1278
|
- **`OAuthConnectionService`** — `startOAuth(provider, extra)` → consent URL,
|
|
1279
1279
|
`completeOAuth(provider, ticket)` → `{status, provider}`, `testConnection`,
|
|
1280
|
-
`list(entityId)`
|
|
1280
|
+
`list(entityId)` (generic `partner_credential` REST), `disconnect(provider, entityId)`
|
|
1281
|
+
(POSTs `/api/oauth/disconnect`, so keel announces the change), and
|
|
1281
1282
|
`saveApiKey` (POSTs the sealed `/api/oauth/apikey`).
|
|
1282
1283
|
|
|
1283
1284
|
```html
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nauticana/sail",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.40",
|
|
4
4
|
"description": "Metadata-driven Angular component library for CRUD admin frontends backed by the keel Go backend. Tables, forms, navigation, OTP/2FA/social auth, billing, payout onboarding.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -245,9 +245,9 @@ export class OAuthConnectionPanelComponent implements OnInit {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
disconnect(v: OAuthConnectionView): void {
|
|
248
|
-
if (!v.connection
|
|
248
|
+
if (!v.connection) return;
|
|
249
249
|
this.busy.set(v.provider.code);
|
|
250
|
-
this.svc.disconnect(v.
|
|
250
|
+
this.svc.disconnect(v.provider.code, this.entityId()).subscribe({
|
|
251
251
|
next: () => {
|
|
252
252
|
this.busy.set('');
|
|
253
253
|
this.disconnected.emit(v.provider.code);
|
|
@@ -8,8 +8,8 @@ import { PartnerCredential } from '../model/oauth_connection';
|
|
|
8
8
|
/**
|
|
9
9
|
* OAuthConnectionService — frontend client for keel oauth/connect.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Flow and write endpoints live under /api/oauth/*; stored connection rows are
|
|
12
|
+
* listed through the generic REST `partner_credential` API. entityId (0 =
|
|
13
13
|
* tenant-wide, >0 = a specific business) scopes per-entity connections.
|
|
14
14
|
*/
|
|
15
15
|
@Injectable({ providedIn: 'root' })
|
|
@@ -49,9 +49,9 @@ export class OAuthConnectionService extends BaseRestService {
|
|
|
49
49
|
return this.backend.list<PartnerCredential>(this.crudApi, { EntityId: String(entityId) });
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
/** Remove
|
|
53
|
-
disconnect(
|
|
54
|
-
return this.
|
|
52
|
+
/** Remove the partner's connection to a provider in one entity scope. */
|
|
53
|
+
disconnect(provider: string, entityId = 0): Observable<{ status: string }> {
|
|
54
|
+
return this.http.post<{ status: string }>(this.url('/api/oauth/disconnect'), { provider, entity_id: entityId });
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/** Save an API-key connection (sealed server-side by the connect handler). */
|