@faable/auth-sdk 2.3.0 → 2.4.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/dist/api/api-types.d.ts +89 -6
- package/dist/api/api-types.js +3 -0
- package/package.json +1 -1
- package/scripts/gen-client.mjs +26 -0
- package/spec/openapi.json +1 -1
package/dist/api/api-types.d.ts
CHANGED
|
@@ -1,10 +1,93 @@
|
|
|
1
1
|
import type { components } from "./types.js";
|
|
2
|
+
export type AccountNotificationSettings = components["schemas"]["AccountNotificationSettings"];
|
|
3
|
+
export type Action = components["schemas"]["Action"];
|
|
4
|
+
export type ActionCreate = components["schemas"]["ActionCreate"];
|
|
5
|
+
export type ActionMetadata = components["schemas"]["ActionMetadata"];
|
|
6
|
+
export type Api = components["schemas"]["Api"];
|
|
7
|
+
export type ApiCreate = components["schemas"]["ApiCreate"];
|
|
8
|
+
export type ApiMetadata = components["schemas"]["ApiMetadata"];
|
|
9
|
+
export type ApiSigningAlg = components["schemas"]["ApiSigningAlg"];
|
|
10
|
+
export type ApiTokenDialect = components["schemas"]["ApiTokenDialect"];
|
|
11
|
+
export type ApiUpdate = components["schemas"]["ApiUpdate"];
|
|
12
|
+
export type AuthAccount = components["schemas"]["AuthAccount"];
|
|
13
|
+
export type AuthAccountCreate = components["schemas"]["AuthAccountCreate"];
|
|
14
|
+
export type AuthAccountMetadataCreate = components["schemas"]["AuthAccountMetadataCreate"];
|
|
15
|
+
export type AuthAccountUpdate = components["schemas"]["AuthAccountUpdate"];
|
|
16
|
+
export type Client = components["schemas"]["Client"];
|
|
17
|
+
export type ClientCreate = components["schemas"]["ClientCreate"];
|
|
18
|
+
export type ClientMetadata = components["schemas"]["ClientMetadata"];
|
|
19
|
+
export type ClientMetadataCreate = components["schemas"]["ClientMetadataCreate"];
|
|
20
|
+
export type ClientRegistrationRequest = components["schemas"]["ClientRegistrationRequest"];
|
|
21
|
+
export type ClientRegistrationResponse = components["schemas"]["ClientRegistrationResponse"];
|
|
22
|
+
export type ClientUpdate = components["schemas"]["ClientUpdate"];
|
|
23
|
+
export type Connection = components["schemas"]["Connection"];
|
|
24
|
+
export type ConnectionCreate = components["schemas"]["ConnectionCreate"];
|
|
25
|
+
export type ConnectionMetadata = components["schemas"]["ConnectionMetadata"];
|
|
26
|
+
export type ConnectionMetadataCreate = components["schemas"]["ConnectionMetadataCreate"];
|
|
27
|
+
export type ConnectionUpdate = components["schemas"]["ConnectionUpdate"];
|
|
28
|
+
export type Credential = components["schemas"]["Credential"];
|
|
29
|
+
export type CredentialMetadata = components["schemas"]["CredentialMetadata"];
|
|
30
|
+
export type CredentialsCreate = components["schemas"]["CredentialsCreate"];
|
|
31
|
+
export type CredentialsUpdate = components["schemas"]["CredentialsUpdate"];
|
|
32
|
+
export type Customdomain = components["schemas"]["Customdomain"];
|
|
33
|
+
export type CustomdomainCreate = components["schemas"]["CustomdomainCreate"];
|
|
34
|
+
export type CustomdomainMetadata = components["schemas"]["CustomdomainMetadata"];
|
|
35
|
+
export type CustomdomainMetadataCreate = components["schemas"]["CustomdomainMetadataCreate"];
|
|
36
|
+
export type EmailChangeVerificationMode = components["schemas"]["EmailChangeVerificationMode"];
|
|
37
|
+
export type Identity = components["schemas"]["Identity"];
|
|
38
|
+
export type IdentityCreate = components["schemas"]["IdentityCreate"];
|
|
39
|
+
export type IdentityMetadata = components["schemas"]["IdentityMetadata"];
|
|
40
|
+
export type Log = components["schemas"]["Log"];
|
|
41
|
+
export type LogMetadata = components["schemas"]["LogMetadata"];
|
|
42
|
+
export type LoginCallbackBody = components["schemas"]["LoginCallbackBody"];
|
|
43
|
+
export type NotificationSubscription = components["schemas"]["NotificationSubscription"];
|
|
44
|
+
export type NotificationSubscriptionCreate = components["schemas"]["NotificationSubscriptionCreate"];
|
|
45
|
+
export type NotificationSubscriptionEmail = components["schemas"]["NotificationSubscriptionEmail"];
|
|
46
|
+
export type NotificationSubscriptionEmailConfig = components["schemas"]["NotificationSubscriptionEmailConfig"];
|
|
47
|
+
export type NotificationSubscriptionEmailConfigCreate = components["schemas"]["NotificationSubscriptionEmailConfigCreate"];
|
|
48
|
+
export type NotificationSubscriptionEmailCreate = components["schemas"]["NotificationSubscriptionEmailCreate"];
|
|
49
|
+
export type NotificationSubscriptionEmailMetadata = components["schemas"]["NotificationSubscriptionEmailMetadata"];
|
|
50
|
+
export type NotificationSubscriptionEmailMetadataCreate = components["schemas"]["NotificationSubscriptionEmailMetadataCreate"];
|
|
51
|
+
export type NotificationSubscriptionEmailMetadataUpdate = components["schemas"]["NotificationSubscriptionEmailMetadataUpdate"];
|
|
52
|
+
export type NotificationSubscriptionUpdate = components["schemas"]["NotificationSubscriptionUpdate"];
|
|
53
|
+
export type NotificationSubscriptionWebhook = components["schemas"]["NotificationSubscriptionWebhook"];
|
|
54
|
+
export type NotificationSubscriptionWebhookConfig = components["schemas"]["NotificationSubscriptionWebhookConfig"];
|
|
55
|
+
export type NotificationSubscriptionWebhookConfigCreate = components["schemas"]["NotificationSubscriptionWebhookConfigCreate"];
|
|
56
|
+
export type NotificationSubscriptionWebhookCreate = components["schemas"]["NotificationSubscriptionWebhookCreate"];
|
|
57
|
+
export type NotificationSubscriptionWebhookMetadata = components["schemas"]["NotificationSubscriptionWebhookMetadata"];
|
|
58
|
+
export type NotificationSubscriptionWebhookMetadataCreate = components["schemas"]["NotificationSubscriptionWebhookMetadataCreate"];
|
|
59
|
+
export type NotificationSubscriptionWebhookMetadataUpdate = components["schemas"]["NotificationSubscriptionWebhookMetadataUpdate"];
|
|
60
|
+
export type OAuthGrantType = components["schemas"]["OAuthGrantType"];
|
|
61
|
+
export type OAuthTokenParams = components["schemas"]["OAuthTokenParams"];
|
|
62
|
+
export type Permission = components["schemas"]["Permission"];
|
|
63
|
+
export type PermissionCreate = components["schemas"]["PermissionCreate"];
|
|
64
|
+
export type Role = components["schemas"]["Role"];
|
|
65
|
+
export type RoleCreate = components["schemas"]["RoleCreate"];
|
|
66
|
+
export type RoleMember = components["schemas"]["RoleMember"];
|
|
67
|
+
export type RoleMemberCreate = components["schemas"]["RoleMemberCreate"];
|
|
68
|
+
export type RoleMemberMetadata = components["schemas"]["RoleMemberMetadata"];
|
|
69
|
+
export type RoleMetadata = components["schemas"]["RoleMetadata"];
|
|
70
|
+
export type RoleMetadataCreate = components["schemas"]["RoleMetadataCreate"];
|
|
71
|
+
export type RoleUpdate = components["schemas"]["RoleUpdate"];
|
|
72
|
+
export type Team = components["schemas"]["Team"];
|
|
73
|
+
export type TeamCreate = components["schemas"]["TeamCreate"];
|
|
74
|
+
export type TeamMember = components["schemas"]["TeamMember"];
|
|
75
|
+
export type TeamMemberCreate = components["schemas"]["TeamMemberCreate"];
|
|
76
|
+
export type TeamMemberMetadata = components["schemas"]["TeamMemberMetadata"];
|
|
77
|
+
export type TeamMetadata = components["schemas"]["TeamMetadata"];
|
|
78
|
+
export type TeamMetadataCreate = components["schemas"]["TeamMetadataCreate"];
|
|
79
|
+
export type TeamUpdate = components["schemas"]["TeamUpdate"];
|
|
80
|
+
export type TeamUpdateMetadata = components["schemas"]["TeamUpdateMetadata"];
|
|
81
|
+
export type TokenSigningAlg = components["schemas"]["TokenSigningAlg"];
|
|
2
82
|
export type User = components["schemas"]["User"];
|
|
83
|
+
export type UserAddress = components["schemas"]["UserAddress"];
|
|
84
|
+
export type UserAppCreate = components["schemas"]["UserAppCreate"];
|
|
85
|
+
export type UserAppMetadata = components["schemas"]["UserAppMetadata"];
|
|
86
|
+
export type UserAppMetadataUpdate = components["schemas"]["UserAppMetadataUpdate"];
|
|
3
87
|
export type UserCreate = components["schemas"]["UserCreate"];
|
|
88
|
+
export type UserMetadata = components["schemas"]["UserMetadata"];
|
|
4
89
|
export type UserUpdate = components["schemas"]["UserUpdate"];
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type Connection = components["schemas"]["Connection"];
|
|
10
|
-
export type Client = components["schemas"]["Client"];
|
|
90
|
+
export type UserUserCreate = components["schemas"]["UserUserCreate"];
|
|
91
|
+
export type UserUserMetadata = components["schemas"]["UserUserMetadata"];
|
|
92
|
+
export type UserUserMetadataUpdate = components["schemas"]["UserUserMetadataUpdate"];
|
|
93
|
+
export type UsernamepasswordLoginBody = components["schemas"]["UsernamepasswordLoginBody"];
|
package/dist/api/api-types.js
CHANGED
package/package.json
CHANGED
package/scripts/gen-client.mjs
CHANGED
|
@@ -22,6 +22,7 @@ const ROOT = resolve(__dirname, "..");
|
|
|
22
22
|
|
|
23
23
|
const SPEC = process.env.AUTH_OPENAPI || resolve(ROOT, "spec/openapi.json");
|
|
24
24
|
const OUT = resolve(ROOT, "src/api/generated-client.ts");
|
|
25
|
+
const OUT_TYPES = resolve(ROOT, "src/api/api-types.ts");
|
|
25
26
|
|
|
26
27
|
const spec = JSON.parse(readFileSync(SPEC, "utf8"));
|
|
27
28
|
|
|
@@ -203,3 +204,28 @@ writeFileSync(OUT, out);
|
|
|
203
204
|
console.warn(
|
|
204
205
|
`gen-client: wrote ${operations.length} methods → ${OUT.replace(ROOT + "/", "")}`,
|
|
205
206
|
);
|
|
207
|
+
|
|
208
|
+
// Simple-named aliases for every component schema (User, UserCreate, Team, …),
|
|
209
|
+
// so consumers import `User` instead of `components["schemas"]["User"]`. One
|
|
210
|
+
// alias per schema, sorted for a stable diff.
|
|
211
|
+
const schemaNames = Object.keys(spec.components?.schemas || {})
|
|
212
|
+
.filter((name) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name))
|
|
213
|
+
.sort();
|
|
214
|
+
|
|
215
|
+
const typeAliases = schemaNames
|
|
216
|
+
.map((name) => `export type ${name} = components["schemas"]["${name}"];`)
|
|
217
|
+
.join("\n");
|
|
218
|
+
|
|
219
|
+
const typesOut = `// AUTO-GENERATED by scripts/gen-client.mjs — do not edit by hand.
|
|
220
|
+
// Regenerated from the OpenAPI spec on every build (npm run gentypes).
|
|
221
|
+
// One simple-named alias per schema in \`components["schemas"]\`.
|
|
222
|
+
|
|
223
|
+
import type { components } from "./types.js";
|
|
224
|
+
|
|
225
|
+
${typeAliases}
|
|
226
|
+
`;
|
|
227
|
+
|
|
228
|
+
writeFileSync(OUT_TYPES, typesOut);
|
|
229
|
+
console.warn(
|
|
230
|
+
`gen-client: wrote ${schemaNames.length} type aliases → ${OUT_TYPES.replace(ROOT + "/", "")}`,
|
|
231
|
+
);
|
package/spec/openapi.json
CHANGED