@faable/auth-sdk 1.3.14 → 1.3.16
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/.github/workflows/release.yml +0 -1
- package/.github/workflows/sync-from-auth.yml +67 -0
- package/dist/FaableAuthApi.d.ts +15 -0
- package/dist/api/types.d.ts +997 -365
- package/package.json +2 -2
- package/spec/openapi.json +17268 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Sync from Auth
|
|
2
|
+
# Regenera el spec/tipos desde el release de auth y pushea a main.
|
|
3
|
+
# NO publica: el push (hecho con el token del GitHub App, no el GITHUB_TOKEN)
|
|
4
|
+
# dispara release.yml, que es el único workflow autorizado en npm Trusted
|
|
5
|
+
# Publishing (un solo workflow filename permitido por paquete).
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
on:
|
|
9
|
+
repository_dispatch:
|
|
10
|
+
types: [auth-released]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
inputs:
|
|
13
|
+
version:
|
|
14
|
+
description: Auth version to sync (e.g. 1.8.13)
|
|
15
|
+
required: true
|
|
16
|
+
jobs:
|
|
17
|
+
sync:
|
|
18
|
+
name: sync
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 10
|
|
21
|
+
steps:
|
|
22
|
+
- name: Generate app token
|
|
23
|
+
id: app-token
|
|
24
|
+
uses: actions/create-github-app-token@v2
|
|
25
|
+
with:
|
|
26
|
+
app-id: ${{ secrets.APP_SYNC_SDK_ID }}
|
|
27
|
+
private-key: ${{ secrets.APP_SYNC_SDK_PRIVATE_KEY }}
|
|
28
|
+
owner: faablecloud
|
|
29
|
+
repositories: | # read auth (asset) + write auth-sdk (push que dispara release.yml)
|
|
30
|
+
auth
|
|
31
|
+
auth-sdk
|
|
32
|
+
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
|
+
with:
|
|
35
|
+
ref: main
|
|
36
|
+
token: ${{ steps.app-token.outputs.token }} # el push hereda este token → dispara release.yml
|
|
37
|
+
- uses: actions/setup-node@v6
|
|
38
|
+
with:
|
|
39
|
+
cache: npm
|
|
40
|
+
node-version: lts/*
|
|
41
|
+
- run: npm ci
|
|
42
|
+
|
|
43
|
+
- name: Resolve version
|
|
44
|
+
id: ver
|
|
45
|
+
run: echo "version=${{ github.event.client_payload.version || inputs.version }}" >> "$GITHUB_OUTPUT"
|
|
46
|
+
|
|
47
|
+
- name: Download OpenAPI spec from auth release
|
|
48
|
+
env:
|
|
49
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
50
|
+
VERSION: ${{ steps.ver.outputs.version }}
|
|
51
|
+
run: gh release download "v$VERSION" --repo faablecloud/auth --pattern openapi.json --output spec/openapi.json --clobber
|
|
52
|
+
|
|
53
|
+
- run: npm run gentypes # default: spec/openapi.json
|
|
54
|
+
|
|
55
|
+
- name: Commit and push (triggers release.yml)
|
|
56
|
+
env:
|
|
57
|
+
VERSION: ${{ steps.ver.outputs.version }}
|
|
58
|
+
run: |
|
|
59
|
+
if git diff --quiet -- spec/openapi.json src/api/types.ts; then
|
|
60
|
+
echo "Sin cambios de API para auth v$VERSION; nada que publicar."
|
|
61
|
+
exit 0
|
|
62
|
+
fi
|
|
63
|
+
git config user.name "github-actions[bot]"
|
|
64
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
65
|
+
git add spec/openapi.json src/api/types.ts
|
|
66
|
+
git commit -m "fix: sync with auth v$VERSION"
|
|
67
|
+
git push origin main
|
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -472,6 +472,9 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
472
472
|
authorize_params: {
|
|
473
473
|
[key: string]: string;
|
|
474
474
|
};
|
|
475
|
+
claims_mapping?: {
|
|
476
|
+
[key: string]: string;
|
|
477
|
+
} | undefined;
|
|
475
478
|
readonly is_using_default_credentials: boolean;
|
|
476
479
|
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
477
480
|
account: string;
|
|
@@ -499,6 +502,9 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
499
502
|
authorize_params: {
|
|
500
503
|
[key: string]: string;
|
|
501
504
|
};
|
|
505
|
+
claims_mapping?: {
|
|
506
|
+
[key: string]: string;
|
|
507
|
+
} | undefined;
|
|
502
508
|
readonly is_using_default_credentials: boolean;
|
|
503
509
|
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
504
510
|
account: string;
|
|
@@ -529,6 +535,9 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
529
535
|
authorize_params: {
|
|
530
536
|
[key: string]: string;
|
|
531
537
|
};
|
|
538
|
+
claims_mapping?: {
|
|
539
|
+
[key: string]: string;
|
|
540
|
+
} | undefined;
|
|
532
541
|
readonly is_using_default_credentials: boolean;
|
|
533
542
|
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
534
543
|
account: string;
|
|
@@ -557,6 +566,9 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
557
566
|
authorize_params: {
|
|
558
567
|
[key: string]: string;
|
|
559
568
|
};
|
|
569
|
+
claims_mapping?: {
|
|
570
|
+
[key: string]: string;
|
|
571
|
+
} | undefined;
|
|
560
572
|
readonly is_using_default_credentials: boolean;
|
|
561
573
|
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
562
574
|
account: string;
|
|
@@ -690,6 +702,9 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
690
702
|
authorize_params: {
|
|
691
703
|
[key: string]: string;
|
|
692
704
|
};
|
|
705
|
+
claims_mapping?: {
|
|
706
|
+
[key: string]: string;
|
|
707
|
+
} | undefined;
|
|
693
708
|
readonly is_using_default_credentials: boolean;
|
|
694
709
|
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
695
710
|
account: string;
|