@faable/auth-sdk 1.3.14 → 1.3.15
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 +77 -0
- package/dist/FaableAuthApi.d.ts +15 -0
- package/dist/api/types.d.ts +997 -365
- package/package.json +2 -2
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Sync from Auth
|
|
2
|
+
permissions:
|
|
3
|
+
contents: write # push del commit de tipos
|
|
4
|
+
pull-requests: write
|
|
5
|
+
issues: write
|
|
6
|
+
id-token: write # OIDC para publicar en npm (igual que release.yml)
|
|
7
|
+
on:
|
|
8
|
+
repository_dispatch:
|
|
9
|
+
types: [auth-released]
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
version:
|
|
13
|
+
description: Auth version to sync (e.g. 1.8.12)
|
|
14
|
+
required: true
|
|
15
|
+
jobs:
|
|
16
|
+
sync:
|
|
17
|
+
name: sync
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 10
|
|
20
|
+
env:
|
|
21
|
+
AUTH_OPENAPI: openapi.json # gentypes lee este archivo en vez de la URL viva
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
with:
|
|
25
|
+
ref: main
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
- uses: actions/setup-node@v6
|
|
28
|
+
with:
|
|
29
|
+
cache: npm
|
|
30
|
+
node-version: lts/*
|
|
31
|
+
- run: npm ci
|
|
32
|
+
|
|
33
|
+
- name: Resolve version
|
|
34
|
+
id: ver
|
|
35
|
+
run: echo "version=${{ github.event.client_payload.version || inputs.version }}" >> "$GITHUB_OUTPUT"
|
|
36
|
+
|
|
37
|
+
- name: Generate app token
|
|
38
|
+
id: app-token
|
|
39
|
+
uses: actions/create-github-app-token@v2
|
|
40
|
+
with:
|
|
41
|
+
app-id: ${{ secrets.APP_SYNC_SDK_ID }}
|
|
42
|
+
private-key: ${{ secrets.APP_SYNC_SDK_PRIVATE_KEY }}
|
|
43
|
+
owner: faablecloud
|
|
44
|
+
repositories: auth
|
|
45
|
+
|
|
46
|
+
- name: Download OpenAPI spec from auth release
|
|
47
|
+
env:
|
|
48
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }} # lee releases de faablecloud/auth (privado)
|
|
49
|
+
VERSION: ${{ steps.ver.outputs.version }}
|
|
50
|
+
run: gh release download "v$VERSION" --repo faablecloud/auth --pattern openapi.json --output openapi.json
|
|
51
|
+
|
|
52
|
+
- run: npm run gentypes # usa AUTH_OPENAPI=openapi.json
|
|
53
|
+
|
|
54
|
+
- name: Commit regenerated types
|
|
55
|
+
id: commit
|
|
56
|
+
env:
|
|
57
|
+
VERSION: ${{ steps.ver.outputs.version }}
|
|
58
|
+
run: |
|
|
59
|
+
if git diff --quiet -- src/api/types.ts; then
|
|
60
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
61
|
+
echo "Sin cambios de API para auth v$VERSION; no se publica."
|
|
62
|
+
exit 0
|
|
63
|
+
fi
|
|
64
|
+
git config user.name "github-actions[bot]"
|
|
65
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
66
|
+
git add src/api/types.ts
|
|
67
|
+
git commit -m "fix: sync with auth v$VERSION"
|
|
68
|
+
git push origin main
|
|
69
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
70
|
+
|
|
71
|
+
- run: npm run build
|
|
72
|
+
if: steps.commit.outputs.changed == 'true'
|
|
73
|
+
- run: npm run release
|
|
74
|
+
if: steps.commit.outputs.changed == 'true'
|
|
75
|
+
env:
|
|
76
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
77
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
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;
|