@faable/auth-sdk 2.7.41 → 2.7.42
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 +2 -0
- package/dist/api/generated-client.d.ts +162 -0
- package/dist/api/generated-client.js +63 -0
- package/dist/api/types.d.ts +819 -66
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +1461 -2
package/dist/api/api-types.d.ts
CHANGED
|
@@ -84,6 +84,8 @@ export type RoleMemberMetadata = components["schemas"]["RoleMemberMetadata"];
|
|
|
84
84
|
export type RoleMetadata = components["schemas"]["RoleMetadata"];
|
|
85
85
|
export type RoleMetadataCreate = components["schemas"]["RoleMetadataCreate"];
|
|
86
86
|
export type RoleUpdate = components["schemas"]["RoleUpdate"];
|
|
87
|
+
export type Session = components["schemas"]["Session"];
|
|
88
|
+
export type SessionMetadata = components["schemas"]["SessionMetadata"];
|
|
87
89
|
export type Team = components["schemas"]["Team"];
|
|
88
90
|
export type TeamCreate = components["schemas"]["TeamCreate"];
|
|
89
91
|
export type TeamMember = components["schemas"]["TeamMember"];
|
|
@@ -4571,6 +4571,168 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4571
4571
|
updatedAt?: string | undefined;
|
|
4572
4572
|
}>>;
|
|
4573
4573
|
};
|
|
4574
|
+
/**
|
|
4575
|
+
* `GET /session/{session_id}` — operationId: `session/get`
|
|
4576
|
+
*
|
|
4577
|
+
* Get Session
|
|
4578
|
+
*
|
|
4579
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
4580
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
4581
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4582
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4583
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4584
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4585
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4586
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4587
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4588
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4589
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4590
|
+
*/
|
|
4591
|
+
sessionGet(session_id: string, params?: OpQuery<"session/get">): Promise<{
|
|
4592
|
+
id: string;
|
|
4593
|
+
user: unknown;
|
|
4594
|
+
sid: string;
|
|
4595
|
+
status: "active" | "revoked";
|
|
4596
|
+
ip?: string | undefined;
|
|
4597
|
+
user_agent?: string | undefined;
|
|
4598
|
+
client?: unknown;
|
|
4599
|
+
connection?: unknown;
|
|
4600
|
+
issuer?: string | undefined;
|
|
4601
|
+
last_seen_at: string;
|
|
4602
|
+
expires_at: string;
|
|
4603
|
+
revoked_at?: string | undefined;
|
|
4604
|
+
revoked_reason?: "user" | "admin" | "logout" | undefined;
|
|
4605
|
+
account: string;
|
|
4606
|
+
metadata: {
|
|
4607
|
+
[key: string]: unknown;
|
|
4608
|
+
};
|
|
4609
|
+
createdAt: string;
|
|
4610
|
+
updatedAt?: string | undefined;
|
|
4611
|
+
}>;
|
|
4612
|
+
/**
|
|
4613
|
+
* `GET /session` — operationId: `session/list`
|
|
4614
|
+
*
|
|
4615
|
+
* List Sessions
|
|
4616
|
+
*
|
|
4617
|
+
* @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
|
|
4618
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
4619
|
+
* @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
|
|
4620
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4621
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4622
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4623
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4624
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4625
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4626
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4627
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4628
|
+
*/
|
|
4629
|
+
sessionList(params?: Omit<OpQuery<"session/list">, "cursor" | "next">): {
|
|
4630
|
+
all: () => Promise<{
|
|
4631
|
+
id: string;
|
|
4632
|
+
user: unknown;
|
|
4633
|
+
sid: string;
|
|
4634
|
+
status: "active" | "revoked";
|
|
4635
|
+
ip?: string | undefined;
|
|
4636
|
+
user_agent?: string | undefined;
|
|
4637
|
+
client?: unknown;
|
|
4638
|
+
connection?: unknown;
|
|
4639
|
+
issuer?: string | undefined;
|
|
4640
|
+
last_seen_at: string;
|
|
4641
|
+
expires_at: string;
|
|
4642
|
+
revoked_at?: string | undefined;
|
|
4643
|
+
revoked_reason?: "user" | "admin" | "logout" | undefined;
|
|
4644
|
+
account: string;
|
|
4645
|
+
metadata: {
|
|
4646
|
+
[key: string]: unknown;
|
|
4647
|
+
};
|
|
4648
|
+
createdAt: string;
|
|
4649
|
+
updatedAt?: string | undefined;
|
|
4650
|
+
}[]>;
|
|
4651
|
+
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
4652
|
+
id: string;
|
|
4653
|
+
user: unknown;
|
|
4654
|
+
sid: string;
|
|
4655
|
+
status: "active" | "revoked";
|
|
4656
|
+
ip?: string | undefined;
|
|
4657
|
+
user_agent?: string | undefined;
|
|
4658
|
+
client?: unknown;
|
|
4659
|
+
connection?: unknown;
|
|
4660
|
+
issuer?: string | undefined;
|
|
4661
|
+
last_seen_at: string;
|
|
4662
|
+
expires_at: string;
|
|
4663
|
+
revoked_at?: string | undefined;
|
|
4664
|
+
revoked_reason?: "user" | "admin" | "logout" | undefined;
|
|
4665
|
+
account: string;
|
|
4666
|
+
metadata: {
|
|
4667
|
+
[key: string]: unknown;
|
|
4668
|
+
};
|
|
4669
|
+
createdAt: string;
|
|
4670
|
+
updatedAt?: string | undefined;
|
|
4671
|
+
}>>;
|
|
4672
|
+
pass: (params?: {
|
|
4673
|
+
cursor?: string | undefined;
|
|
4674
|
+
pageSize?: string | undefined;
|
|
4675
|
+
} | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
4676
|
+
id: string;
|
|
4677
|
+
user: unknown;
|
|
4678
|
+
sid: string;
|
|
4679
|
+
status: "active" | "revoked";
|
|
4680
|
+
ip?: string | undefined;
|
|
4681
|
+
user_agent?: string | undefined;
|
|
4682
|
+
client?: unknown;
|
|
4683
|
+
connection?: unknown;
|
|
4684
|
+
issuer?: string | undefined;
|
|
4685
|
+
last_seen_at: string;
|
|
4686
|
+
expires_at: string;
|
|
4687
|
+
revoked_at?: string | undefined;
|
|
4688
|
+
revoked_reason?: "user" | "admin" | "logout" | undefined;
|
|
4689
|
+
account: string;
|
|
4690
|
+
metadata: {
|
|
4691
|
+
[key: string]: unknown;
|
|
4692
|
+
};
|
|
4693
|
+
createdAt: string;
|
|
4694
|
+
updatedAt?: string | undefined;
|
|
4695
|
+
}>>;
|
|
4696
|
+
};
|
|
4697
|
+
/**
|
|
4698
|
+
* `POST /session/{session_id}/revoke` — operationId: `session/revoke`
|
|
4699
|
+
*
|
|
4700
|
+
* Revoke a session
|
|
4701
|
+
*
|
|
4702
|
+
* Ends the session for good: the browser cookie behind it stops working, every refresh token issued through it is refused on its next use (`invalid_grant`), and the relying parties that took part in it are notified. Access and id tokens already issued keep working until they expire. The row stays, marked `revoked`, for the device history.
|
|
4703
|
+
*
|
|
4704
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4705
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4706
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4707
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4708
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4709
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4710
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4711
|
+
* @throws {FaableApiError} `session_already_revoked` (409) — The session was already revoked.
|
|
4712
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4713
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4714
|
+
*/
|
|
4715
|
+
sessionRevoke(session_id: string): Promise<{
|
|
4716
|
+
id: string;
|
|
4717
|
+
user: unknown;
|
|
4718
|
+
sid: string;
|
|
4719
|
+
status: "active" | "revoked";
|
|
4720
|
+
ip?: string | undefined;
|
|
4721
|
+
user_agent?: string | undefined;
|
|
4722
|
+
client?: unknown;
|
|
4723
|
+
connection?: unknown;
|
|
4724
|
+
issuer?: string | undefined;
|
|
4725
|
+
last_seen_at: string;
|
|
4726
|
+
expires_at: string;
|
|
4727
|
+
revoked_at?: string | undefined;
|
|
4728
|
+
revoked_reason?: "user" | "admin" | "logout" | undefined;
|
|
4729
|
+
account: string;
|
|
4730
|
+
metadata: {
|
|
4731
|
+
[key: string]: unknown;
|
|
4732
|
+
};
|
|
4733
|
+
createdAt: string;
|
|
4734
|
+
updatedAt?: string | undefined;
|
|
4735
|
+
}>;
|
|
4574
4736
|
/**
|
|
4575
4737
|
* `POST /team/{team_id}/member` — operationId: `team/addMembers`
|
|
4576
4738
|
*
|
|
@@ -1639,6 +1639,69 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1639
1639
|
rolememberList(params) {
|
|
1640
1640
|
return this.paginator({ url: `/rolemember`, params });
|
|
1641
1641
|
}
|
|
1642
|
+
/**
|
|
1643
|
+
* `GET /session/{session_id}` — operationId: `session/get`
|
|
1644
|
+
*
|
|
1645
|
+
* Get Session
|
|
1646
|
+
*
|
|
1647
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
1648
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
1649
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1650
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1651
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1652
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1653
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1654
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1655
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1656
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1657
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1658
|
+
*/
|
|
1659
|
+
sessionGet(session_id, params) {
|
|
1660
|
+
requireId("session_id", session_id);
|
|
1661
|
+
return this.fetcher.request({ method: "GET", url: `/session/${session_id}`, params });
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* `GET /session` — operationId: `session/list`
|
|
1665
|
+
*
|
|
1666
|
+
* List Sessions
|
|
1667
|
+
*
|
|
1668
|
+
* @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
|
|
1669
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
1670
|
+
* @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
|
|
1671
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1672
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1673
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1674
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1675
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1676
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1677
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1678
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1679
|
+
*/
|
|
1680
|
+
sessionList(params) {
|
|
1681
|
+
return this.paginator({ url: `/session`, params });
|
|
1682
|
+
}
|
|
1683
|
+
/**
|
|
1684
|
+
* `POST /session/{session_id}/revoke` — operationId: `session/revoke`
|
|
1685
|
+
*
|
|
1686
|
+
* Revoke a session
|
|
1687
|
+
*
|
|
1688
|
+
* Ends the session for good: the browser cookie behind it stops working, every refresh token issued through it is refused on its next use (`invalid_grant`), and the relying parties that took part in it are notified. Access and id tokens already issued keep working until they expire. The row stays, marked `revoked`, for the device history.
|
|
1689
|
+
*
|
|
1690
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1691
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1692
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1693
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1694
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1695
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1696
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1697
|
+
* @throws {FaableApiError} `session_already_revoked` (409) — The session was already revoked.
|
|
1698
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1699
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1700
|
+
*/
|
|
1701
|
+
sessionRevoke(session_id) {
|
|
1702
|
+
requireId("session_id", session_id);
|
|
1703
|
+
return this.fetcher.post(`/session/${session_id}/revoke`, {});
|
|
1704
|
+
}
|
|
1642
1705
|
/**
|
|
1643
1706
|
* `POST /team/{team_id}/member` — operationId: `team/addMembers`
|
|
1644
1707
|
*
|