@faable/auth-sdk 1.3.22 → 1.3.24

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/spec/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "@faablecloud/auth",
5
5
  "description": "Auth Platform made by Faable. Manage Users and Roles",
6
- "version": "1.9.1",
6
+ "version": "1.9.2",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -1231,10 +1231,6 @@
1231
1231
  "type": "string",
1232
1232
  "description": "A URI pointing to the user's picture."
1233
1233
  },
1234
- "password": {
1235
- "type": "string",
1236
- "description": "Initial password for this user. Only used (and required) when the user is being provisioned against a `database` connection; ignored for federated/social connections."
1237
- },
1238
1234
  "user_metadata": {
1239
1235
  "type": "object",
1240
1236
  "properties": {},
@@ -1286,10 +1282,6 @@
1286
1282
  "type": "boolean",
1287
1283
  "description": "Flip the email verification flag. Setting `true` marks the email as verified by the admin (`email_verified_method=manual`). Setting `false` clears the verification metadata."
1288
1284
  },
1289
- "password": {
1290
- "type": "string",
1291
- "description": "New password for this user"
1292
- },
1293
1285
  "phone": {
1294
1286
  "type": "string",
1295
1287
  "description": "Contact phone number. Changing it to a new value automatically resets `phone_verified` to false (and clears `phone_verified_method` / `phone_verified_at`) unless the same patch sets `phone_verified` explicitly."
@@ -1460,6 +1452,112 @@
1460
1452
  "profile_data": {}
1461
1453
  }
1462
1454
  },
1455
+ "Credential": {
1456
+ "type": "object",
1457
+ "required": [
1458
+ "id",
1459
+ "connection",
1460
+ "user",
1461
+ "account",
1462
+ "createdAt"
1463
+ ],
1464
+ "properties": {
1465
+ "id": {
1466
+ "type": "string",
1467
+ "description": "Credential ID"
1468
+ },
1469
+ "connection": {
1470
+ "anyOf": [
1471
+ {
1472
+ "$ref": "#/components/schemas/Connection"
1473
+ },
1474
+ {
1475
+ "type": "string"
1476
+ },
1477
+ {}
1478
+ ]
1479
+ },
1480
+ "user": {
1481
+ "anyOf": [
1482
+ {
1483
+ "$ref": "#/components/schemas/User"
1484
+ },
1485
+ {
1486
+ "type": "string"
1487
+ },
1488
+ {}
1489
+ ]
1490
+ },
1491
+ "email": {
1492
+ "type": "string",
1493
+ "description": "Email login identifier (unique within the connection)."
1494
+ },
1495
+ "username": {
1496
+ "type": "string",
1497
+ "description": "Username login identifier (unique within the connection)."
1498
+ },
1499
+ "account": {
1500
+ "type": "string",
1501
+ "description": "Object is related with this account"
1502
+ },
1503
+ "metadata": {
1504
+ "type": "object",
1505
+ "properties": {},
1506
+ "additionalProperties": true,
1507
+ "description": "CredentialMetadata",
1508
+ "default": {}
1509
+ },
1510
+ "createdAt": {
1511
+ "type": "string",
1512
+ "description": "Credential creation date"
1513
+ },
1514
+ "updatedAt": {
1515
+ "type": "string",
1516
+ "description": "Credential updated date"
1517
+ }
1518
+ },
1519
+ "description": "Credential"
1520
+ },
1521
+ "CredentialMetadata": {
1522
+ "type": "object",
1523
+ "properties": {},
1524
+ "additionalProperties": true,
1525
+ "description": "CredentialMetadata",
1526
+ "default": {}
1527
+ },
1528
+ "CredentialsCreate": {
1529
+ "type": "object",
1530
+ "required": [
1531
+ "user",
1532
+ "connection"
1533
+ ],
1534
+ "properties": {
1535
+ "user": {
1536
+ "type": "string"
1537
+ },
1538
+ "connection": {
1539
+ "type": "string"
1540
+ },
1541
+ "email": {
1542
+ "type": "string"
1543
+ },
1544
+ "username": {
1545
+ "type": "string"
1546
+ }
1547
+ }
1548
+ },
1549
+ "CredentialsUpdate": {
1550
+ "type": "object",
1551
+ "properties": {
1552
+ "email": {
1553
+ "type": "string"
1554
+ },
1555
+ "username": {
1556
+ "type": "string"
1557
+ }
1558
+ },
1559
+ "additionalProperties": false
1560
+ },
1463
1561
  "Role": {
1464
1562
  "type": "object",
1465
1563
  "required": [
@@ -3786,6 +3884,10 @@
3786
3884
  "response_type": {
3787
3885
  "type": "string"
3788
3886
  },
3887
+ "redirect_to": {
3888
+ "type": "string",
3889
+ "description": "Same-origin path to return the user to after authentication, instead of the OAuth client redirect. Used by first-party interactive flows (e.g. device-code confirm). Non same-origin values are ignored."
3890
+ },
3789
3891
  "client_id": {
3790
3892
  "type": "string"
3791
3893
  },
@@ -7128,10 +7230,6 @@
7128
7230
  "type": "string",
7129
7231
  "description": "A URI pointing to the user's picture."
7130
7232
  },
7131
- "password": {
7132
- "type": "string",
7133
- "description": "Initial password for this user. Only used (and required) when the user is being provisioned against a `database` connection; ignored for federated/social connections."
7134
- },
7135
7233
  "user_metadata": {
7136
7234
  "type": "object",
7137
7235
  "properties": {},
@@ -7811,10 +7909,6 @@
7811
7909
  "type": "boolean",
7812
7910
  "description": "Flip the email verification flag. Setting `true` marks the email as verified by the admin (`email_verified_method=manual`). Setting `false` clears the verification metadata."
7813
7911
  },
7814
- "password": {
7815
- "type": "string",
7816
- "description": "New password for this user"
7817
- },
7818
7912
  "phone": {
7819
7913
  "type": "string",
7820
7914
  "description": "Contact phone number. Changing it to a new value automatically resets `phone_verified` to false (and clears `phone_verified_method` / `phone_verified_at`) unless the same patch sets `phone_verified` explicitly."
@@ -9247,14 +9341,14 @@
9247
9341
  }
9248
9342
  }
9249
9343
  },
9250
- "/role": {
9344
+ "/credentials": {
9251
9345
  "get": {
9252
- "operationId": "role/list",
9253
- "summary": "List Roles",
9346
+ "operationId": "credentials/list",
9347
+ "summary": "List Credentialss",
9254
9348
  "tags": [
9255
- "role"
9349
+ "credentials"
9256
9350
  ],
9257
- "description": "List Roles",
9351
+ "description": "List Credentialss",
9258
9352
  "parameters": [
9259
9353
  {
9260
9354
  "schema": {
@@ -9294,6 +9388,24 @@
9294
9388
  "required": false,
9295
9389
  "description": "Filter using a FaableQL query"
9296
9390
  },
9391
+ {
9392
+ "schema": {
9393
+ "type": "array",
9394
+ "items": {
9395
+ "type": "string",
9396
+ "enum": [
9397
+ "user",
9398
+ "connection"
9399
+ ],
9400
+ "description": "Allowed expand paths on `credentials`: `user`, `connection`."
9401
+ },
9402
+ "maxItems": 2
9403
+ },
9404
+ "in": "query",
9405
+ "name": "expand",
9406
+ "required": false,
9407
+ "description": "Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`)."
9408
+ },
9297
9409
  {
9298
9410
  "schema": {
9299
9411
  "type": "string",
@@ -9303,7 +9415,7 @@
9303
9415
  "in": "query",
9304
9416
  "name": "q",
9305
9417
  "required": false,
9306
- "description": "Full-text search across: `name`, `description`."
9418
+ "description": "Full-text search across: `email`, `username`."
9307
9419
  }
9308
9420
  ],
9309
9421
  "responses": {
@@ -9331,7 +9443,7 @@
9331
9443
  "results": {
9332
9444
  "type": "array",
9333
9445
  "items": {
9334
- "$ref": "#/components/schemas/Role"
9446
+ "$ref": "#/components/schemas/Credential"
9335
9447
  }
9336
9448
  }
9337
9449
  },
@@ -9343,12 +9455,12 @@
9343
9455
  }
9344
9456
  },
9345
9457
  "post": {
9346
- "operationId": "role/create",
9347
- "summary": "Create Role",
9458
+ "operationId": "credentials/create",
9459
+ "summary": "Create Credentials",
9348
9460
  "tags": [
9349
- "role"
9461
+ "credentials"
9350
9462
  ],
9351
- "description": "Create Role",
9463
+ "description": "Create Credentials",
9352
9464
  "requestBody": {
9353
9465
  "required": true,
9354
9466
  "content": {
@@ -9356,59 +9468,75 @@
9356
9468
  "schema": {
9357
9469
  "type": "object",
9358
9470
  "required": [
9359
- "name"
9471
+ "user",
9472
+ "connection"
9360
9473
  ],
9361
9474
  "properties": {
9362
- "name": {
9363
- "type": "string",
9364
- "description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`).",
9365
- "example": "admin"
9475
+ "user": {
9476
+ "type": "string"
9366
9477
  },
9367
- "description": {
9368
- "type": "string",
9369
- "description": "Free-form explanation of what users in this role are expected to do or have access to."
9478
+ "connection": {
9479
+ "type": "string"
9370
9480
  },
9371
- "metadata": {
9372
- "type": "object",
9373
- "properties": {},
9374
- "additionalProperties": true,
9375
- "description": "Add Metadata"
9481
+ "email": {
9482
+ "type": "string"
9483
+ },
9484
+ "username": {
9485
+ "type": "string"
9376
9486
  }
9377
- },
9378
- "description": "RoleCreate",
9379
- "additionalProperties": false
9487
+ }
9380
9488
  }
9381
9489
  }
9382
- },
9383
- "description": "RoleCreate"
9490
+ }
9384
9491
  },
9385
9492
  "responses": {
9386
9493
  "200": {
9387
- "description": "Role",
9494
+ "description": "Credential",
9388
9495
  "content": {
9389
9496
  "application/json": {
9390
9497
  "schema": {
9391
9498
  "type": "object",
9392
9499
  "required": [
9393
9500
  "id",
9394
- "name",
9395
- "description",
9501
+ "connection",
9502
+ "user",
9396
9503
  "account",
9397
9504
  "createdAt"
9398
9505
  ],
9399
9506
  "properties": {
9400
9507
  "id": {
9401
9508
  "type": "string",
9402
- "description": "Role ID"
9509
+ "description": "Credential ID"
9403
9510
  },
9404
- "name": {
9511
+ "connection": {
9512
+ "anyOf": [
9513
+ {
9514
+ "$ref": "#/components/schemas/Connection"
9515
+ },
9516
+ {
9517
+ "type": "string"
9518
+ },
9519
+ {}
9520
+ ]
9521
+ },
9522
+ "user": {
9523
+ "anyOf": [
9524
+ {
9525
+ "$ref": "#/components/schemas/User"
9526
+ },
9527
+ {
9528
+ "type": "string"
9529
+ },
9530
+ {}
9531
+ ]
9532
+ },
9533
+ "email": {
9405
9534
  "type": "string",
9406
- "description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
9407
- "example": "admin"
9535
+ "description": "Email login identifier (unique within the connection)."
9408
9536
  },
9409
- "description": {
9537
+ "username": {
9410
9538
  "type": "string",
9411
- "description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
9539
+ "description": "Username login identifier (unique within the connection)."
9412
9540
  },
9413
9541
  "account": {
9414
9542
  "type": "string",
@@ -9418,19 +9546,19 @@
9418
9546
  "type": "object",
9419
9547
  "properties": {},
9420
9548
  "additionalProperties": true,
9421
- "description": "RoleMetadata",
9549
+ "description": "CredentialMetadata",
9422
9550
  "default": {}
9423
9551
  },
9424
9552
  "createdAt": {
9425
9553
  "type": "string",
9426
- "description": "Role creation date"
9554
+ "description": "Credential creation date"
9427
9555
  },
9428
9556
  "updatedAt": {
9429
9557
  "type": "string",
9430
- "description": "Role updated date"
9558
+ "description": "Credential updated date"
9431
9559
  }
9432
9560
  },
9433
- "description": "Role"
9561
+ "description": "Credential"
9434
9562
  }
9435
9563
  }
9436
9564
  }
@@ -9438,55 +9566,679 @@
9438
9566
  }
9439
9567
  }
9440
9568
  },
9441
- "/role/{role_id}": {
9569
+ "/credentials/{credentials_id}": {
9442
9570
  "get": {
9443
- "operationId": "role/get",
9444
- "summary": "Get Role",
9571
+ "operationId": "credentials/get",
9572
+ "summary": "Get Credentials",
9445
9573
  "tags": [
9446
- "role"
9574
+ "credentials"
9447
9575
  ],
9448
- "description": "Get Role",
9576
+ "description": "Get Credentials",
9449
9577
  "parameters": [
9578
+ {
9579
+ "schema": {
9580
+ "type": "array",
9581
+ "items": {
9582
+ "type": "string",
9583
+ "enum": [
9584
+ "user",
9585
+ "connection"
9586
+ ],
9587
+ "description": "Allowed expand paths on `credentials`: `user`, `connection`."
9588
+ },
9589
+ "maxItems": 2
9590
+ },
9591
+ "in": "query",
9592
+ "name": "expand",
9593
+ "required": false,
9594
+ "description": "Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`)."
9595
+ },
9450
9596
  {
9451
9597
  "schema": {
9452
9598
  "type": "string"
9453
9599
  },
9454
9600
  "in": "path",
9455
- "name": "role_id",
9601
+ "name": "credentials_id",
9456
9602
  "required": true
9457
9603
  }
9458
9604
  ],
9459
9605
  "responses": {
9460
9606
  "200": {
9461
- "description": "Role",
9607
+ "description": "Credential",
9462
9608
  "content": {
9463
9609
  "application/json": {
9464
9610
  "schema": {
9465
9611
  "type": "object",
9466
9612
  "required": [
9467
9613
  "id",
9468
- "name",
9469
- "description",
9614
+ "connection",
9615
+ "user",
9470
9616
  "account",
9471
9617
  "createdAt"
9472
9618
  ],
9473
9619
  "properties": {
9474
9620
  "id": {
9475
9621
  "type": "string",
9476
- "description": "Role ID"
9477
- },
9478
- "name": {
9479
- "type": "string",
9480
- "description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
9481
- "example": "admin"
9622
+ "description": "Credential ID"
9482
9623
  },
9483
- "description": {
9484
- "type": "string",
9485
- "description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
9624
+ "connection": {
9625
+ "anyOf": [
9626
+ {
9627
+ "$ref": "#/components/schemas/Connection"
9628
+ },
9629
+ {
9630
+ "type": "string"
9631
+ },
9632
+ {}
9633
+ ]
9486
9634
  },
9487
- "account": {
9488
- "type": "string",
9489
- "description": "Object is related with this account"
9635
+ "user": {
9636
+ "anyOf": [
9637
+ {
9638
+ "$ref": "#/components/schemas/User"
9639
+ },
9640
+ {
9641
+ "type": "string"
9642
+ },
9643
+ {}
9644
+ ]
9645
+ },
9646
+ "email": {
9647
+ "type": "string",
9648
+ "description": "Email login identifier (unique within the connection)."
9649
+ },
9650
+ "username": {
9651
+ "type": "string",
9652
+ "description": "Username login identifier (unique within the connection)."
9653
+ },
9654
+ "account": {
9655
+ "type": "string",
9656
+ "description": "Object is related with this account"
9657
+ },
9658
+ "metadata": {
9659
+ "type": "object",
9660
+ "properties": {},
9661
+ "additionalProperties": true,
9662
+ "description": "CredentialMetadata",
9663
+ "default": {}
9664
+ },
9665
+ "createdAt": {
9666
+ "type": "string",
9667
+ "description": "Credential creation date"
9668
+ },
9669
+ "updatedAt": {
9670
+ "type": "string",
9671
+ "description": "Credential updated date"
9672
+ }
9673
+ },
9674
+ "description": "Credential"
9675
+ }
9676
+ }
9677
+ }
9678
+ }
9679
+ }
9680
+ },
9681
+ "post": {
9682
+ "operationId": "credentials/update",
9683
+ "summary": "Update Credentials",
9684
+ "tags": [
9685
+ "credentials"
9686
+ ],
9687
+ "description": "Update Credentials",
9688
+ "requestBody": {
9689
+ "required": true,
9690
+ "content": {
9691
+ "application/json": {
9692
+ "schema": {
9693
+ "type": "object",
9694
+ "properties": {
9695
+ "email": {
9696
+ "type": "string"
9697
+ },
9698
+ "username": {
9699
+ "type": "string"
9700
+ }
9701
+ },
9702
+ "additionalProperties": false
9703
+ }
9704
+ }
9705
+ }
9706
+ },
9707
+ "parameters": [
9708
+ {
9709
+ "schema": {
9710
+ "type": "string"
9711
+ },
9712
+ "in": "path",
9713
+ "name": "credentials_id",
9714
+ "required": true
9715
+ }
9716
+ ],
9717
+ "responses": {
9718
+ "200": {
9719
+ "description": "Credential",
9720
+ "content": {
9721
+ "application/json": {
9722
+ "schema": {
9723
+ "type": "object",
9724
+ "required": [
9725
+ "id",
9726
+ "connection",
9727
+ "user",
9728
+ "account",
9729
+ "createdAt"
9730
+ ],
9731
+ "properties": {
9732
+ "id": {
9733
+ "type": "string",
9734
+ "description": "Credential ID"
9735
+ },
9736
+ "connection": {
9737
+ "anyOf": [
9738
+ {
9739
+ "$ref": "#/components/schemas/Connection"
9740
+ },
9741
+ {
9742
+ "type": "string"
9743
+ },
9744
+ {}
9745
+ ]
9746
+ },
9747
+ "user": {
9748
+ "anyOf": [
9749
+ {
9750
+ "$ref": "#/components/schemas/User"
9751
+ },
9752
+ {
9753
+ "type": "string"
9754
+ },
9755
+ {}
9756
+ ]
9757
+ },
9758
+ "email": {
9759
+ "type": "string",
9760
+ "description": "Email login identifier (unique within the connection)."
9761
+ },
9762
+ "username": {
9763
+ "type": "string",
9764
+ "description": "Username login identifier (unique within the connection)."
9765
+ },
9766
+ "account": {
9767
+ "type": "string",
9768
+ "description": "Object is related with this account"
9769
+ },
9770
+ "metadata": {
9771
+ "type": "object",
9772
+ "properties": {},
9773
+ "additionalProperties": true,
9774
+ "description": "CredentialMetadata",
9775
+ "default": {}
9776
+ },
9777
+ "createdAt": {
9778
+ "type": "string",
9779
+ "description": "Credential creation date"
9780
+ },
9781
+ "updatedAt": {
9782
+ "type": "string",
9783
+ "description": "Credential updated date"
9784
+ }
9785
+ },
9786
+ "description": "Credential"
9787
+ }
9788
+ }
9789
+ }
9790
+ }
9791
+ }
9792
+ },
9793
+ "delete": {
9794
+ "operationId": "credentials/delete",
9795
+ "summary": "Delete Credentials",
9796
+ "tags": [
9797
+ "credentials"
9798
+ ],
9799
+ "description": "Delete Credentials",
9800
+ "parameters": [
9801
+ {
9802
+ "schema": {
9803
+ "type": "string"
9804
+ },
9805
+ "in": "path",
9806
+ "name": "credentials_id",
9807
+ "required": true
9808
+ }
9809
+ ],
9810
+ "responses": {
9811
+ "200": {
9812
+ "description": "Credential",
9813
+ "content": {
9814
+ "application/json": {
9815
+ "schema": {
9816
+ "type": "object",
9817
+ "required": [
9818
+ "id",
9819
+ "connection",
9820
+ "user",
9821
+ "account",
9822
+ "createdAt"
9823
+ ],
9824
+ "properties": {
9825
+ "id": {
9826
+ "type": "string",
9827
+ "description": "Credential ID"
9828
+ },
9829
+ "connection": {
9830
+ "anyOf": [
9831
+ {
9832
+ "$ref": "#/components/schemas/Connection"
9833
+ },
9834
+ {
9835
+ "type": "string"
9836
+ },
9837
+ {}
9838
+ ]
9839
+ },
9840
+ "user": {
9841
+ "anyOf": [
9842
+ {
9843
+ "$ref": "#/components/schemas/User"
9844
+ },
9845
+ {
9846
+ "type": "string"
9847
+ },
9848
+ {}
9849
+ ]
9850
+ },
9851
+ "email": {
9852
+ "type": "string",
9853
+ "description": "Email login identifier (unique within the connection)."
9854
+ },
9855
+ "username": {
9856
+ "type": "string",
9857
+ "description": "Username login identifier (unique within the connection)."
9858
+ },
9859
+ "account": {
9860
+ "type": "string",
9861
+ "description": "Object is related with this account"
9862
+ },
9863
+ "metadata": {
9864
+ "type": "object",
9865
+ "properties": {},
9866
+ "additionalProperties": true,
9867
+ "description": "CredentialMetadata",
9868
+ "default": {}
9869
+ },
9870
+ "createdAt": {
9871
+ "type": "string",
9872
+ "description": "Credential creation date"
9873
+ },
9874
+ "updatedAt": {
9875
+ "type": "string",
9876
+ "description": "Credential updated date"
9877
+ }
9878
+ },
9879
+ "description": "Credential"
9880
+ }
9881
+ }
9882
+ }
9883
+ }
9884
+ }
9885
+ }
9886
+ },
9887
+ "/credentials/{credentials_id}/set-password": {
9888
+ "post": {
9889
+ "operationId": "credentials/setPassword",
9890
+ "summary": "Set a credential's password",
9891
+ "tags": [
9892
+ "credentials"
9893
+ ],
9894
+ "description": "Sets or rotates the password for a database credential. The previous password is invalidated immediately. Records a `credential.password_changed` audit entry (initiated_by=admin) for traceability. The password is never returned.",
9895
+ "requestBody": {
9896
+ "required": true,
9897
+ "content": {
9898
+ "application/json": {
9899
+ "schema": {
9900
+ "type": "object",
9901
+ "required": [
9902
+ "password"
9903
+ ],
9904
+ "properties": {
9905
+ "password": {
9906
+ "type": "string",
9907
+ "description": "New plaintext password (hashed on write)."
9908
+ }
9909
+ },
9910
+ "additionalProperties": false
9911
+ }
9912
+ }
9913
+ }
9914
+ },
9915
+ "parameters": [
9916
+ {
9917
+ "schema": {
9918
+ "type": "string"
9919
+ },
9920
+ "in": "path",
9921
+ "name": "credentials_id",
9922
+ "required": true
9923
+ }
9924
+ ],
9925
+ "responses": {
9926
+ "200": {
9927
+ "description": "Credential",
9928
+ "content": {
9929
+ "application/json": {
9930
+ "schema": {
9931
+ "type": "object",
9932
+ "required": [
9933
+ "id",
9934
+ "connection",
9935
+ "user",
9936
+ "account",
9937
+ "createdAt"
9938
+ ],
9939
+ "properties": {
9940
+ "id": {
9941
+ "type": "string",
9942
+ "description": "Credential ID"
9943
+ },
9944
+ "connection": {
9945
+ "anyOf": [
9946
+ {
9947
+ "$ref": "#/components/schemas/Connection"
9948
+ },
9949
+ {
9950
+ "type": "string"
9951
+ },
9952
+ {}
9953
+ ]
9954
+ },
9955
+ "user": {
9956
+ "anyOf": [
9957
+ {
9958
+ "$ref": "#/components/schemas/User"
9959
+ },
9960
+ {
9961
+ "type": "string"
9962
+ },
9963
+ {}
9964
+ ]
9965
+ },
9966
+ "email": {
9967
+ "type": "string",
9968
+ "description": "Email login identifier (unique within the connection)."
9969
+ },
9970
+ "username": {
9971
+ "type": "string",
9972
+ "description": "Username login identifier (unique within the connection)."
9973
+ },
9974
+ "account": {
9975
+ "type": "string",
9976
+ "description": "Object is related with this account"
9977
+ },
9978
+ "metadata": {
9979
+ "type": "object",
9980
+ "properties": {},
9981
+ "additionalProperties": true,
9982
+ "description": "CredentialMetadata",
9983
+ "default": {}
9984
+ },
9985
+ "createdAt": {
9986
+ "type": "string",
9987
+ "description": "Credential creation date"
9988
+ },
9989
+ "updatedAt": {
9990
+ "type": "string",
9991
+ "description": "Credential updated date"
9992
+ }
9993
+ },
9994
+ "description": "Credential"
9995
+ }
9996
+ }
9997
+ }
9998
+ }
9999
+ }
10000
+ }
10001
+ },
10002
+ "/role": {
10003
+ "get": {
10004
+ "operationId": "role/list",
10005
+ "summary": "List Roles",
10006
+ "tags": [
10007
+ "role"
10008
+ ],
10009
+ "description": "List Roles",
10010
+ "parameters": [
10011
+ {
10012
+ "schema": {
10013
+ "type": "number",
10014
+ "minimum": 1,
10015
+ "maximum": 200
10016
+ },
10017
+ "in": "query",
10018
+ "name": "pageSize",
10019
+ "required": false,
10020
+ "description": "Number of items per page (max 200)"
10021
+ },
10022
+ {
10023
+ "schema": {
10024
+ "type": "string"
10025
+ },
10026
+ "in": "query",
10027
+ "name": "cursor",
10028
+ "required": false,
10029
+ "description": "Cursor for next page"
10030
+ },
10031
+ {
10032
+ "schema": {
10033
+ "type": "string"
10034
+ },
10035
+ "in": "query",
10036
+ "name": "next",
10037
+ "required": false,
10038
+ "description": "Cursor returned by the previous page"
10039
+ },
10040
+ {
10041
+ "schema": {
10042
+ "type": "string"
10043
+ },
10044
+ "in": "query",
10045
+ "name": "query",
10046
+ "required": false,
10047
+ "description": "Filter using a FaableQL query"
10048
+ },
10049
+ {
10050
+ "schema": {
10051
+ "type": "string",
10052
+ "minLength": 1,
10053
+ "maxLength": 200
10054
+ },
10055
+ "in": "query",
10056
+ "name": "q",
10057
+ "required": false,
10058
+ "description": "Full-text search across: `name`, `description`."
10059
+ }
10060
+ ],
10061
+ "responses": {
10062
+ "200": {
10063
+ "description": "Default Response",
10064
+ "content": {
10065
+ "application/json": {
10066
+ "schema": {
10067
+ "type": "object",
10068
+ "required": [
10069
+ "next",
10070
+ "results"
10071
+ ],
10072
+ "properties": {
10073
+ "next": {
10074
+ "anyOf": [
10075
+ {
10076
+ "type": "string"
10077
+ },
10078
+ {
10079
+ "type": "null"
10080
+ }
10081
+ ]
10082
+ },
10083
+ "results": {
10084
+ "type": "array",
10085
+ "items": {
10086
+ "$ref": "#/components/schemas/Role"
10087
+ }
10088
+ }
10089
+ },
10090
+ "additionalProperties": false
10091
+ }
10092
+ }
10093
+ }
10094
+ }
10095
+ }
10096
+ },
10097
+ "post": {
10098
+ "operationId": "role/create",
10099
+ "summary": "Create Role",
10100
+ "tags": [
10101
+ "role"
10102
+ ],
10103
+ "description": "Create Role",
10104
+ "requestBody": {
10105
+ "required": true,
10106
+ "content": {
10107
+ "application/json": {
10108
+ "schema": {
10109
+ "type": "object",
10110
+ "required": [
10111
+ "name"
10112
+ ],
10113
+ "properties": {
10114
+ "name": {
10115
+ "type": "string",
10116
+ "description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`).",
10117
+ "example": "admin"
10118
+ },
10119
+ "description": {
10120
+ "type": "string",
10121
+ "description": "Free-form explanation of what users in this role are expected to do or have access to."
10122
+ },
10123
+ "metadata": {
10124
+ "type": "object",
10125
+ "properties": {},
10126
+ "additionalProperties": true,
10127
+ "description": "Add Metadata"
10128
+ }
10129
+ },
10130
+ "description": "RoleCreate",
10131
+ "additionalProperties": false
10132
+ }
10133
+ }
10134
+ },
10135
+ "description": "RoleCreate"
10136
+ },
10137
+ "responses": {
10138
+ "200": {
10139
+ "description": "Role",
10140
+ "content": {
10141
+ "application/json": {
10142
+ "schema": {
10143
+ "type": "object",
10144
+ "required": [
10145
+ "id",
10146
+ "name",
10147
+ "description",
10148
+ "account",
10149
+ "createdAt"
10150
+ ],
10151
+ "properties": {
10152
+ "id": {
10153
+ "type": "string",
10154
+ "description": "Role ID"
10155
+ },
10156
+ "name": {
10157
+ "type": "string",
10158
+ "description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
10159
+ "example": "admin"
10160
+ },
10161
+ "description": {
10162
+ "type": "string",
10163
+ "description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
10164
+ },
10165
+ "account": {
10166
+ "type": "string",
10167
+ "description": "Object is related with this account"
10168
+ },
10169
+ "metadata": {
10170
+ "type": "object",
10171
+ "properties": {},
10172
+ "additionalProperties": true,
10173
+ "description": "RoleMetadata",
10174
+ "default": {}
10175
+ },
10176
+ "createdAt": {
10177
+ "type": "string",
10178
+ "description": "Role creation date"
10179
+ },
10180
+ "updatedAt": {
10181
+ "type": "string",
10182
+ "description": "Role updated date"
10183
+ }
10184
+ },
10185
+ "description": "Role"
10186
+ }
10187
+ }
10188
+ }
10189
+ }
10190
+ }
10191
+ }
10192
+ },
10193
+ "/role/{role_id}": {
10194
+ "get": {
10195
+ "operationId": "role/get",
10196
+ "summary": "Get Role",
10197
+ "tags": [
10198
+ "role"
10199
+ ],
10200
+ "description": "Get Role",
10201
+ "parameters": [
10202
+ {
10203
+ "schema": {
10204
+ "type": "string"
10205
+ },
10206
+ "in": "path",
10207
+ "name": "role_id",
10208
+ "required": true
10209
+ }
10210
+ ],
10211
+ "responses": {
10212
+ "200": {
10213
+ "description": "Role",
10214
+ "content": {
10215
+ "application/json": {
10216
+ "schema": {
10217
+ "type": "object",
10218
+ "required": [
10219
+ "id",
10220
+ "name",
10221
+ "description",
10222
+ "account",
10223
+ "createdAt"
10224
+ ],
10225
+ "properties": {
10226
+ "id": {
10227
+ "type": "string",
10228
+ "description": "Role ID"
10229
+ },
10230
+ "name": {
10231
+ "type": "string",
10232
+ "description": "Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.",
10233
+ "example": "admin"
10234
+ },
10235
+ "description": {
10236
+ "type": "string",
10237
+ "description": "Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard."
10238
+ },
10239
+ "account": {
10240
+ "type": "string",
10241
+ "description": "Object is related with this account"
9490
10242
  },
9491
10243
  "metadata": {
9492
10244
  "type": "object",
@@ -15641,6 +16393,15 @@
15641
16393
  "required": false,
15642
16394
  "description": "Challenge for PKCE authorization code flow"
15643
16395
  },
16396
+ {
16397
+ "schema": {
16398
+ "type": "string"
16399
+ },
16400
+ "in": "query",
16401
+ "name": "redirect_to",
16402
+ "required": false,
16403
+ "description": "Same-origin path to return the user to after authentication, instead of the OAuth client redirect. Used by first-party interactive flows (e.g. device-code confirm). Non same-origin values are ignored."
16404
+ },
15644
16405
  {
15645
16406
  "schema": {
15646
16407
  "type": "string"
@@ -16456,7 +17217,7 @@
16456
17217
  "tags": [
16457
17218
  "oauth"
16458
17219
  ],
16459
- "description": "Authorizes a `device_code` on behalf of the currently authenticated user, allowing the device to subsequently exchange that code for tokens at `/oauth/token`.",
17220
+ "description": "Authorizes a `device_code` on behalf of the currently authenticated user, allowing the device to subsequently exchange that code for tokens at `/oauth/token`. Called by the first-party device-code confirm page, so it authenticates with the browser `faable_sess` session — NOT a bearer token (the page has no access token to send).",
16460
17221
  "requestBody": {
16461
17222
  "required": true,
16462
17223
  "content": {
@@ -17010,6 +17771,10 @@
17010
17771
  "response_type": {
17011
17772
  "type": "string"
17012
17773
  },
17774
+ "redirect_to": {
17775
+ "type": "string",
17776
+ "description": "Same-origin path to return the user to after authentication, instead of the OAuth client redirect. Used by first-party interactive flows (e.g. device-code confirm). Non same-origin values are ignored."
17777
+ },
17013
17778
  "client_id": {
17014
17779
  "type": "string"
17015
17780
  },