@shakibdshy/signet-auth-client 1.0.0-beta.3 → 1.0.0-rc.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/README.md CHANGED
@@ -14,8 +14,8 @@ It attaches cookies and the CSRF token, so your frontend never builds those requ
14
14
  | **Calls that backend from a frontend** | Browser, Node.js | TypeScript, JavaScript | **`@shakibdshy/signet-auth-client`** (this package) |
15
15
  | Shares the Session with React components and guards routes (optional) | Browser | TypeScript, React | `@shakibdshy/signet-auth-react` |
16
16
 
17
- Current version: **`1.0.0-beta.2`**, a pre-1.0 release, so the API may still change before
18
- `v1.0.0`. The Go module (`v1.0.0-beta.2`) and both npm packages (`1.0.0-beta.2`) are released
17
+ Current version: **`1.0.0-rc.1`**, a release candidate: the contract is frozen and only release-blocking fixes land before
18
+ `v1.0.0`. The Go module (`v1.0.0-rc.1`) and both npm packages (`1.0.0-rc.1`) are released
19
19
  together at the same version.
20
20
 
21
21
  > **This package does not implement authentication.** Every request goes to the Signet
@@ -46,7 +46,7 @@ no separate auth server to install.
46
46
  ## Install
47
47
 
48
48
  ```sh
49
- npm install @shakibdshy/signet-auth-client@1.0.0-beta.2
49
+ npm install @shakibdshy/signet-auth-client@1.0.0-rc.1
50
50
  ```
51
51
 
52
52
  To use a change that is not published yet, install from a checkout of the repository:
package/dist/schema.d.ts CHANGED
@@ -737,6 +737,54 @@ export interface paths {
737
737
  patch?: never;
738
738
  trace?: never;
739
739
  };
740
+ "/scim/Groups": {
741
+ parameters: {
742
+ query?: never;
743
+ header?: never;
744
+ path?: never;
745
+ cookie?: never;
746
+ };
747
+ /**
748
+ * /scim/Groups · list
749
+ * @description Bearer-token authenticated. List directory Groups.
750
+ */
751
+ get: operations["scimGroups_list"];
752
+ put?: never;
753
+ /**
754
+ * /scim/Groups · create
755
+ * @description Bearer-token authenticated. Create a Group.
756
+ */
757
+ post: operations["scimGroups_create"];
758
+ delete?: never;
759
+ options?: never;
760
+ head?: never;
761
+ patch?: never;
762
+ trace?: never;
763
+ };
764
+ "/scim/Users": {
765
+ parameters: {
766
+ query?: never;
767
+ header?: never;
768
+ path?: never;
769
+ cookie?: never;
770
+ };
771
+ /**
772
+ * /scim/Users · list
773
+ * @description Bearer-token authenticated. List provisioned Users; filtering is not supported, paging uses startIndex and count.
774
+ */
775
+ get: operations["scimUsers_list"];
776
+ put?: never;
777
+ /**
778
+ * /scim/Users · create
779
+ * @description Bearer-token authenticated. Provision a User: creates the account with a verified email. The email arrives from emails[0].value or userName.
780
+ */
781
+ post: operations["scimUsers_create"];
782
+ delete?: never;
783
+ options?: never;
784
+ head?: never;
785
+ patch?: never;
786
+ trace?: never;
787
+ };
740
788
  "/send-magic-link": {
741
789
  parameters: {
742
790
  query?: never;
@@ -1144,29 +1192,25 @@ export interface components {
1144
1192
  };
1145
1193
  AddOrganizationMemberInput: {
1146
1194
  email?: string;
1147
- org_id: string;
1195
+ organization_id: string;
1148
1196
  role: string;
1149
1197
  user_id?: string;
1150
1198
  };
1151
1199
  AdminListUsersResult: {
1152
- Users: components["schemas"]["UserInfo"][];
1200
+ users: components["schemas"]["UserInfo"][];
1153
1201
  };
1154
1202
  AdminSetUserRoleInput: {
1155
- ActorID: string;
1156
- Roles: string[];
1157
- SessionToken: string;
1158
- UserID: string;
1203
+ roles: string[];
1204
+ user_id: string;
1159
1205
  };
1160
1206
  ApiError: {
1161
1207
  /** @enum {string} */
1162
- error: "captcha_unavailable" | "code_already_used" | "csrf" | "email_exists" | "email_not_verified" | "forbidden" | "internal_error" | "invalid_code" | "invalid_credentials" | "invalid_input" | "invalid_link" | "invalid_request" | "invalid_token" | "last_account" | "link_already_used" | "not_found" | "oauth_account_conflict" | "oauth_email_not_verified" | "password_compromised" | "rate_limited" | "saml_connection_not_found" | "saml_invalid_assertion" | "saml_replay" | "sso_connection_not_found" | "sso_domain_not_verified" | "sso_invalid_assertion" | "two_factor_not_enabled" | "two_factor_required" | "unauthorized" | "user_not_found" | "username_taken";
1208
+ error: "captcha_unavailable" | "code_already_used" | "csrf" | "email_exists" | "email_not_verified" | "forbidden" | "internal_error" | "invalid_code" | "invalid_credentials" | "invalid_input" | "invalid_link" | "invalid_request" | "invalid_token" | "last_account" | "link_already_used" | "not_found" | "oauth_account_conflict" | "oauth_email_not_verified" | "password_compromised" | "rate_limited" | "saml_connection_not_found" | "saml_invalid_assertion" | "saml_replay" | "session_not_fresh" | "sso_connection_not_found" | "sso_domain_not_verified" | "sso_invalid_assertion" | "two_factor_not_enabled" | "two_factor_required" | "unauthorized" | "user_not_found" | "username_taken";
1163
1209
  message: string;
1164
1210
  };
1165
1211
  BanUserInput: {
1166
- ActorID: string;
1167
- Reason: string;
1168
- SessionToken: string;
1169
- UserID: string;
1212
+ reason: string;
1213
+ user_id: string;
1170
1214
  };
1171
1215
  ChangeEmailInput: {
1172
1216
  current_password: string;
@@ -1196,7 +1240,7 @@ export interface components {
1196
1240
  owner_id: string;
1197
1241
  };
1198
1242
  CreateOrganizationResult: {
1199
- Organization: components["schemas"]["Organization"];
1243
+ organization: components["schemas"]["Organization"];
1200
1244
  };
1201
1245
  CreateSSOConnectionInput: {
1202
1246
  client_id: string;
@@ -1232,29 +1276,29 @@ export interface components {
1232
1276
  password: string;
1233
1277
  };
1234
1278
  ImpersonateUserInput: {
1235
- ActorID: string;
1236
- SessionToken: string;
1237
- UserID: string;
1279
+ user_id: string;
1238
1280
  };
1239
1281
  ImpersonationResult: {
1240
- AdminID: string;
1241
- Token: string;
1282
+ admin_id: string;
1283
+ token: string;
1242
1284
  };
1243
1285
  ListAPIKeysResult: {
1244
1286
  keys: components["schemas"]["APIKey"][];
1245
1287
  };
1246
1288
  ListOrganizationMembersResult: {
1247
- Members: components["schemas"]["MemberInfo"][];
1289
+ members: components["schemas"]["MemberInfo"][];
1248
1290
  };
1249
1291
  ListOrganizationsResult: {
1250
- Organizations: components["schemas"]["Organization"][];
1292
+ organizations: components["schemas"]["Organization"][];
1251
1293
  };
1252
1294
  ListSessionsResult: {
1253
1295
  sessions: components["schemas"]["SessionInfo"][];
1254
1296
  };
1255
1297
  MemberInfo: {
1256
- Role: string;
1257
- UserID: string;
1298
+ email: string;
1299
+ name: string;
1300
+ role: string;
1301
+ user_id: string;
1258
1302
  };
1259
1303
  OAuthAuthorizeInput: {
1260
1304
  audience: string;
@@ -1294,10 +1338,10 @@ export interface components {
1294
1338
  };
1295
1339
  Organization: {
1296
1340
  /** Format: date-time */
1297
- CreatedAt: string;
1298
- ID: string;
1299
- Name: string;
1300
- OwnerID: string;
1341
+ created_at: string;
1342
+ id: string;
1343
+ name: string;
1344
+ owner_id: string;
1301
1345
  };
1302
1346
  PasskeyCeremonyResult: {
1303
1347
  options: number[];
@@ -1341,7 +1385,7 @@ export interface components {
1341
1385
  owner_user_id: string;
1342
1386
  };
1343
1387
  RevokeSessionInput: {
1344
- SessionID: string;
1388
+ session_id: string;
1345
1389
  };
1346
1390
  SAMLACSResult: {
1347
1391
  last_sign_in_method: string;
@@ -1377,6 +1421,69 @@ export interface components {
1377
1421
  state: string;
1378
1422
  url: string;
1379
1423
  };
1424
+ ScimGroup: {
1425
+ displayName: string;
1426
+ /** @description The directory's identifier for this Group */
1427
+ externalId?: string;
1428
+ id: string;
1429
+ /** @description Member User references; membership projects onto roles */
1430
+ members?: {
1431
+ value: string;
1432
+ }[];
1433
+ meta?: components["schemas"]["ScimMeta"];
1434
+ /** @description SCIM schema URIs of this resource */
1435
+ schemas: string[];
1436
+ };
1437
+ ScimGroupInput: {
1438
+ displayName: string;
1439
+ externalId?: string;
1440
+ members?: {
1441
+ value: string;
1442
+ }[];
1443
+ };
1444
+ ScimListResponse: {
1445
+ Resources: (components["schemas"]["ScimUser"] | components["schemas"]["ScimGroup"])[];
1446
+ itemsPerPage: number;
1447
+ /** @description SCIM schema URIs of this resource */
1448
+ schemas?: string[];
1449
+ startIndex: number;
1450
+ totalResults: number;
1451
+ };
1452
+ ScimMeta: {
1453
+ /** Format: date-time */
1454
+ created?: string;
1455
+ /** Format: date-time */
1456
+ lastModified?: string;
1457
+ location?: string;
1458
+ resourceType?: string;
1459
+ };
1460
+ ScimUser: {
1461
+ /** @description false once the User is banned */
1462
+ active: boolean;
1463
+ emails?: {
1464
+ primary?: boolean;
1465
+ value: string;
1466
+ }[];
1467
+ /** @description The directory's identifier for this User */
1468
+ externalId?: string;
1469
+ id: string;
1470
+ meta?: components["schemas"]["ScimMeta"];
1471
+ /** @description SCIM schema URIs of this resource */
1472
+ schemas: string[];
1473
+ /** @description The provisioned User's email */
1474
+ userName: string;
1475
+ };
1476
+ ScimUserInput: {
1477
+ /** @description false provisions the User banned */
1478
+ active?: boolean;
1479
+ emails?: {
1480
+ primary?: boolean;
1481
+ value: string;
1482
+ }[];
1483
+ externalId?: string;
1484
+ /** @description The User's email */
1485
+ userName: string;
1486
+ };
1380
1487
  SendEmailOTPInput: {
1381
1488
  email: string;
1382
1489
  name?: string;
@@ -1419,7 +1526,7 @@ export interface components {
1419
1526
  username: string;
1420
1527
  };
1421
1528
  SetActiveOrganizationInput: {
1422
- org_id: string;
1529
+ organization_id: string;
1423
1530
  };
1424
1531
  SignInInput: {
1425
1532
  email?: string;
@@ -1464,9 +1571,7 @@ export interface components {
1464
1571
  two_factor_challenge?: string;
1465
1572
  };
1466
1573
  UnbanUserInput: {
1467
- ActorID: string;
1468
- SessionToken: string;
1469
- UserID: string;
1574
+ user_id: string;
1470
1575
  };
1471
1576
  UnlinkAccountInput: {
1472
1577
  account_id: string;
@@ -5801,6 +5906,128 @@ export interface operations {
5801
5906
  };
5802
5907
  };
5803
5908
  };
5909
+ scimGroups_list: {
5910
+ parameters: {
5911
+ query?: {
5912
+ startIndex?: number;
5913
+ count?: number;
5914
+ };
5915
+ header?: never;
5916
+ path?: never;
5917
+ cookie?: never;
5918
+ };
5919
+ requestBody?: never;
5920
+ responses: {
5921
+ /** @description Success */
5922
+ 200: {
5923
+ headers: {
5924
+ [name: string]: unknown;
5925
+ };
5926
+ content: {
5927
+ "application/scim+json": components["schemas"]["ScimListResponse"];
5928
+ };
5929
+ };
5930
+ /** @description Missing or invalid bearer token, or SCIM not configured */
5931
+ 401: {
5932
+ headers: {
5933
+ [name: string]: unknown;
5934
+ };
5935
+ content?: never;
5936
+ };
5937
+ };
5938
+ };
5939
+ scimGroups_create: {
5940
+ parameters: {
5941
+ query?: never;
5942
+ header?: never;
5943
+ path?: never;
5944
+ cookie?: never;
5945
+ };
5946
+ requestBody: {
5947
+ content: {
5948
+ "application/scim+json": components["schemas"]["ScimGroupInput"];
5949
+ };
5950
+ };
5951
+ responses: {
5952
+ /** @description Created */
5953
+ 201: {
5954
+ headers: {
5955
+ [name: string]: unknown;
5956
+ };
5957
+ content: {
5958
+ "application/scim+json": components["schemas"]["ScimGroup"];
5959
+ };
5960
+ };
5961
+ /** @description Missing or invalid bearer token, or SCIM not configured */
5962
+ 401: {
5963
+ headers: {
5964
+ [name: string]: unknown;
5965
+ };
5966
+ content?: never;
5967
+ };
5968
+ };
5969
+ };
5970
+ scimUsers_list: {
5971
+ parameters: {
5972
+ query?: {
5973
+ startIndex?: number;
5974
+ count?: number;
5975
+ };
5976
+ header?: never;
5977
+ path?: never;
5978
+ cookie?: never;
5979
+ };
5980
+ requestBody?: never;
5981
+ responses: {
5982
+ /** @description Success */
5983
+ 200: {
5984
+ headers: {
5985
+ [name: string]: unknown;
5986
+ };
5987
+ content: {
5988
+ "application/scim+json": components["schemas"]["ScimListResponse"];
5989
+ };
5990
+ };
5991
+ /** @description Missing or invalid bearer token, or SCIM not configured */
5992
+ 401: {
5993
+ headers: {
5994
+ [name: string]: unknown;
5995
+ };
5996
+ content?: never;
5997
+ };
5998
+ };
5999
+ };
6000
+ scimUsers_create: {
6001
+ parameters: {
6002
+ query?: never;
6003
+ header?: never;
6004
+ path?: never;
6005
+ cookie?: never;
6006
+ };
6007
+ requestBody: {
6008
+ content: {
6009
+ "application/scim+json": components["schemas"]["ScimUserInput"];
6010
+ };
6011
+ };
6012
+ responses: {
6013
+ /** @description Created */
6014
+ 201: {
6015
+ headers: {
6016
+ [name: string]: unknown;
6017
+ };
6018
+ content: {
6019
+ "application/scim+json": components["schemas"]["ScimUser"];
6020
+ };
6021
+ };
6022
+ /** @description Missing or invalid bearer token, or SCIM not configured */
6023
+ 401: {
6024
+ headers: {
6025
+ [name: string]: unknown;
6026
+ };
6027
+ content?: never;
6028
+ };
6029
+ };
6030
+ };
5804
6031
  "send-magic-link_post": {
5805
6032
  parameters: {
5806
6033
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakibdshy/signet-auth-client",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "Typed TypeScript client for Signet's HTTP API — the frontend half of Signet, an embeddable authentication library for Go",
5
5
  "keywords": [
6
6
  "auth",