@breign/client 1.0.174 → 1.0.176
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/apis/AppApi.d.ts +15 -1
- package/dist/apis/AppApi.js +32 -0
- package/dist/apis/AuthApi.d.ts +60 -1
- package/dist/apis/AuthApi.js +130 -1
- package/dist/models/ApplicationAuthorizationErrorUio.d.ts +32 -0
- package/dist/models/ApplicationAuthorizationErrorUio.js +50 -0
- package/dist/models/ApplicationAuthorizationRequestUio.d.ts +63 -0
- package/dist/models/ApplicationAuthorizationRequestUio.js +71 -0
- package/dist/models/ApplicationAuthorizationResponseUio.d.ts +38 -0
- package/dist/models/ApplicationAuthorizationResponseUio.js +54 -0
- package/dist/models/ApplicationTokenErrorUio.d.ts +38 -0
- package/dist/models/ApplicationTokenErrorUio.js +52 -0
- package/dist/models/ApplicationTokenRequestUio.d.ts +63 -0
- package/dist/models/ApplicationTokenRequestUio.js +73 -0
- package/dist/models/ApplicationTokenResponseUio.d.ts +63 -0
- package/dist/models/ApplicationTokenResponseUio.js +71 -0
- package/dist/models/EphemeralInstanceTokenUio.d.ts +80 -0
- package/dist/models/EphemeralInstanceTokenUio.js +80 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/dist/openapi.json +351 -0
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -4157,6 +4157,58 @@
|
|
|
4157
4157
|
"tags" : [ "app" ]
|
|
4158
4158
|
}
|
|
4159
4159
|
},
|
|
4160
|
+
"/apps/{appId}/instances/{instanceId}/token" : {
|
|
4161
|
+
"post" : {
|
|
4162
|
+
"description" : "Issue a new token for an ephemeral instance, authenticated either by the instance's own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app's maximum number of active instances is not reached.\n",
|
|
4163
|
+
"operationId" : "refreshInstanceToken",
|
|
4164
|
+
"parameters" : [ {
|
|
4165
|
+
"description" : "ID of the app",
|
|
4166
|
+
"in" : "path",
|
|
4167
|
+
"name" : "appId",
|
|
4168
|
+
"required" : true,
|
|
4169
|
+
"schema" : {
|
|
4170
|
+
"type" : "string"
|
|
4171
|
+
}
|
|
4172
|
+
}, {
|
|
4173
|
+
"description" : "Instance identifier",
|
|
4174
|
+
"in" : "path",
|
|
4175
|
+
"name" : "instanceId",
|
|
4176
|
+
"required" : true,
|
|
4177
|
+
"schema" : {
|
|
4178
|
+
"type" : "string"
|
|
4179
|
+
}
|
|
4180
|
+
} ],
|
|
4181
|
+
"responses" : {
|
|
4182
|
+
"200" : {
|
|
4183
|
+
"content" : {
|
|
4184
|
+
"application/json" : {
|
|
4185
|
+
"schema" : {
|
|
4186
|
+
"$ref" : "#/components/schemas/EphemeralInstanceToken"
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
},
|
|
4190
|
+
"description" : "Token refreshed"
|
|
4191
|
+
},
|
|
4192
|
+
"400" : {
|
|
4193
|
+
"description" : "Maximum number of active instances reached (MAX_INSTANCES_REACHED)"
|
|
4194
|
+
},
|
|
4195
|
+
"401" : {
|
|
4196
|
+
"description" : "Unauthorized"
|
|
4197
|
+
},
|
|
4198
|
+
"403" : {
|
|
4199
|
+
"description" : "Forbidden - no access to this instance, or ephemeral instances not allowed for this app"
|
|
4200
|
+
},
|
|
4201
|
+
"404" : {
|
|
4202
|
+
"description" : "App or ephemeral instance not found"
|
|
4203
|
+
},
|
|
4204
|
+
"409" : {
|
|
4205
|
+
"description" : "Instance changed during the refresh (e.g. deactivated concurrently), retry (INSTANCE_CHANGED)"
|
|
4206
|
+
}
|
|
4207
|
+
},
|
|
4208
|
+
"summary" : "Refresh ephemeral instance token",
|
|
4209
|
+
"tags" : [ "app" ]
|
|
4210
|
+
}
|
|
4211
|
+
},
|
|
4160
4212
|
"/instances/{instanceId}/context" : {
|
|
4161
4213
|
"get" : {
|
|
4162
4214
|
"description" : "Returns the custom context variables for an app instance.",
|
|
@@ -4626,6 +4678,181 @@
|
|
|
4626
4678
|
"tags" : [ "auth" ]
|
|
4627
4679
|
}
|
|
4628
4680
|
},
|
|
4681
|
+
"/auth/authorize" : {
|
|
4682
|
+
"get" : {
|
|
4683
|
+
"description" : "Entry point of the browser authorization of a desktop application (OAuth2 authorization code with PKCE, loopback redirect per RFC 8252). The request is checked, then the browser is redirected to the consent page of Breign App, which issues the code through `POST /auth/authorizations`.\n",
|
|
4684
|
+
"operationId" : "authorizeApplication",
|
|
4685
|
+
"parameters" : [ {
|
|
4686
|
+
"in" : "query",
|
|
4687
|
+
"name" : "response_type",
|
|
4688
|
+
"required" : true,
|
|
4689
|
+
"schema" : {
|
|
4690
|
+
"enum" : [ "code" ],
|
|
4691
|
+
"type" : "string"
|
|
4692
|
+
}
|
|
4693
|
+
}, {
|
|
4694
|
+
"in" : "query",
|
|
4695
|
+
"name" : "client_id",
|
|
4696
|
+
"required" : true,
|
|
4697
|
+
"schema" : {
|
|
4698
|
+
"maxLength" : 100,
|
|
4699
|
+
"type" : "string"
|
|
4700
|
+
}
|
|
4701
|
+
}, {
|
|
4702
|
+
"description" : "Loopback HTTP address with a port, e.g. `http://127.0.0.1:53682/callback`.",
|
|
4703
|
+
"in" : "query",
|
|
4704
|
+
"name" : "redirect_uri",
|
|
4705
|
+
"required" : true,
|
|
4706
|
+
"schema" : {
|
|
4707
|
+
"maxLength" : 200,
|
|
4708
|
+
"type" : "string"
|
|
4709
|
+
}
|
|
4710
|
+
}, {
|
|
4711
|
+
"in" : "query",
|
|
4712
|
+
"name" : "code_challenge",
|
|
4713
|
+
"required" : true,
|
|
4714
|
+
"schema" : {
|
|
4715
|
+
"maxLength" : 128,
|
|
4716
|
+
"minLength" : 43,
|
|
4717
|
+
"type" : "string"
|
|
4718
|
+
}
|
|
4719
|
+
}, {
|
|
4720
|
+
"in" : "query",
|
|
4721
|
+
"name" : "code_challenge_method",
|
|
4722
|
+
"required" : true,
|
|
4723
|
+
"schema" : {
|
|
4724
|
+
"enum" : [ "S256" ],
|
|
4725
|
+
"type" : "string"
|
|
4726
|
+
}
|
|
4727
|
+
}, {
|
|
4728
|
+
"in" : "query",
|
|
4729
|
+
"name" : "state",
|
|
4730
|
+
"required" : false,
|
|
4731
|
+
"schema" : {
|
|
4732
|
+
"maxLength" : 200,
|
|
4733
|
+
"type" : "string"
|
|
4734
|
+
}
|
|
4735
|
+
}, {
|
|
4736
|
+
"description" : "Name of the machine, shown on the consent page and in the API key name.",
|
|
4737
|
+
"in" : "query",
|
|
4738
|
+
"name" : "device_name",
|
|
4739
|
+
"required" : false,
|
|
4740
|
+
"schema" : {
|
|
4741
|
+
"maxLength" : 100,
|
|
4742
|
+
"type" : "string"
|
|
4743
|
+
}
|
|
4744
|
+
} ],
|
|
4745
|
+
"responses" : {
|
|
4746
|
+
"302" : {
|
|
4747
|
+
"description" : "Redirect to the consent page of Breign App"
|
|
4748
|
+
},
|
|
4749
|
+
"400" : {
|
|
4750
|
+
"content" : {
|
|
4751
|
+
"application/json" : {
|
|
4752
|
+
"schema" : {
|
|
4753
|
+
"$ref" : "#/components/schemas/ApplicationTokenError"
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
},
|
|
4757
|
+
"description" : "Invalid authorization request (`invalid_request`), never redirected"
|
|
4758
|
+
}
|
|
4759
|
+
},
|
|
4760
|
+
"security" : [ ],
|
|
4761
|
+
"summary" : "Start an application authorization",
|
|
4762
|
+
"tags" : [ "auth" ]
|
|
4763
|
+
}
|
|
4764
|
+
},
|
|
4765
|
+
"/auth/authorizations" : {
|
|
4766
|
+
"post" : {
|
|
4767
|
+
"description" : "Called on behalf of the signed-in user once they consented to the application. Returns a single-use code, valid 5 minutes, bound to the redirect address and the PKCE challenge.\n",
|
|
4768
|
+
"operationId" : "createApplicationAuthorization",
|
|
4769
|
+
"requestBody" : {
|
|
4770
|
+
"content" : {
|
|
4771
|
+
"application/json" : {
|
|
4772
|
+
"schema" : {
|
|
4773
|
+
"$ref" : "#/components/schemas/ApplicationAuthorizationRequest"
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
},
|
|
4777
|
+
"required" : true
|
|
4778
|
+
},
|
|
4779
|
+
"responses" : {
|
|
4780
|
+
"201" : {
|
|
4781
|
+
"content" : {
|
|
4782
|
+
"application/json" : {
|
|
4783
|
+
"schema" : {
|
|
4784
|
+
"$ref" : "#/components/schemas/ApplicationAuthorizationResponse"
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
},
|
|
4788
|
+
"description" : "Authorization code"
|
|
4789
|
+
},
|
|
4790
|
+
"400" : {
|
|
4791
|
+
"content" : {
|
|
4792
|
+
"application/json" : {
|
|
4793
|
+
"schema" : {
|
|
4794
|
+
"$ref" : "#/components/schemas/ApplicationAuthorizationError"
|
|
4795
|
+
}
|
|
4796
|
+
}
|
|
4797
|
+
},
|
|
4798
|
+
"description" : "Invalid authorization request"
|
|
4799
|
+
},
|
|
4800
|
+
"403" : {
|
|
4801
|
+
"content" : {
|
|
4802
|
+
"application/json" : {
|
|
4803
|
+
"schema" : {
|
|
4804
|
+
"$ref" : "#/components/schemas/ApplicationAuthorizationError"
|
|
4805
|
+
}
|
|
4806
|
+
}
|
|
4807
|
+
},
|
|
4808
|
+
"description" : "No user account behind the call"
|
|
4809
|
+
}
|
|
4810
|
+
},
|
|
4811
|
+
"summary" : "Issue an application authorization code",
|
|
4812
|
+
"tags" : [ "auth" ]
|
|
4813
|
+
}
|
|
4814
|
+
},
|
|
4815
|
+
"/auth/token" : {
|
|
4816
|
+
"post" : {
|
|
4817
|
+
"description" : "Exchanges the code issued by `POST /auth/authorizations` for an API key of the user, after checking the PKCE verifier, the client and the redirect address. The code is single use. Errors follow RFC 6749 section 5.2.\n",
|
|
4818
|
+
"operationId" : "exchangeApplicationAuthorizationCode",
|
|
4819
|
+
"requestBody" : {
|
|
4820
|
+
"content" : {
|
|
4821
|
+
"application/json" : {
|
|
4822
|
+
"schema" : {
|
|
4823
|
+
"$ref" : "#/components/schemas/ApplicationTokenRequest"
|
|
4824
|
+
}
|
|
4825
|
+
}
|
|
4826
|
+
},
|
|
4827
|
+
"required" : true
|
|
4828
|
+
},
|
|
4829
|
+
"responses" : {
|
|
4830
|
+
"200" : {
|
|
4831
|
+
"content" : {
|
|
4832
|
+
"application/json" : {
|
|
4833
|
+
"schema" : {
|
|
4834
|
+
"$ref" : "#/components/schemas/ApplicationTokenResponse"
|
|
4835
|
+
}
|
|
4836
|
+
}
|
|
4837
|
+
},
|
|
4838
|
+
"description" : "API key of the user"
|
|
4839
|
+
},
|
|
4840
|
+
"400" : {
|
|
4841
|
+
"content" : {
|
|
4842
|
+
"application/json" : {
|
|
4843
|
+
"schema" : {
|
|
4844
|
+
"$ref" : "#/components/schemas/ApplicationTokenError"
|
|
4845
|
+
}
|
|
4846
|
+
}
|
|
4847
|
+
},
|
|
4848
|
+
"description" : "OAuth error (`invalid_request`, `invalid_grant`, `unsupported_grant_type`)"
|
|
4849
|
+
}
|
|
4850
|
+
},
|
|
4851
|
+
"security" : [ ],
|
|
4852
|
+
"summary" : "Exchange an application authorization code",
|
|
4853
|
+
"tags" : [ "auth" ]
|
|
4854
|
+
}
|
|
4855
|
+
},
|
|
4629
4856
|
"/.well-known/jwks.json" : {
|
|
4630
4857
|
"get" : {
|
|
4631
4858
|
"description" : "Returns the JSON Web Key Set for JWT verification",
|
|
@@ -23462,6 +23689,19 @@
|
|
|
23462
23689
|
"required" : [ "message" ],
|
|
23463
23690
|
"type" : "object"
|
|
23464
23691
|
},
|
|
23692
|
+
"EphemeralInstanceToken" : {
|
|
23693
|
+
"allOf" : [ {
|
|
23694
|
+
"$ref" : "#/components/schemas/EphemeralInstance"
|
|
23695
|
+
}, {
|
|
23696
|
+
"properties" : {
|
|
23697
|
+
"expiresAt" : {
|
|
23698
|
+
"type" : "string"
|
|
23699
|
+
}
|
|
23700
|
+
},
|
|
23701
|
+
"required" : [ "expiresAt" ],
|
|
23702
|
+
"type" : "object"
|
|
23703
|
+
} ]
|
|
23704
|
+
},
|
|
23465
23705
|
"InstanceContext" : {
|
|
23466
23706
|
"additionalProperties" : false,
|
|
23467
23707
|
"properties" : {
|
|
@@ -23652,6 +23892,117 @@
|
|
|
23652
23892
|
"required" : [ "message" ],
|
|
23653
23893
|
"type" : "object"
|
|
23654
23894
|
},
|
|
23895
|
+
"ApplicationTokenError" : {
|
|
23896
|
+
"properties" : {
|
|
23897
|
+
"error" : {
|
|
23898
|
+
"type" : "string"
|
|
23899
|
+
},
|
|
23900
|
+
"error_description" : {
|
|
23901
|
+
"type" : "string"
|
|
23902
|
+
}
|
|
23903
|
+
},
|
|
23904
|
+
"required" : [ "error" ],
|
|
23905
|
+
"type" : "object"
|
|
23906
|
+
},
|
|
23907
|
+
"ApplicationAuthorizationRequest" : {
|
|
23908
|
+
"additionalProperties" : false,
|
|
23909
|
+
"properties" : {
|
|
23910
|
+
"clientId" : {
|
|
23911
|
+
"maxLength" : 100,
|
|
23912
|
+
"minLength" : 1,
|
|
23913
|
+
"type" : "string"
|
|
23914
|
+
},
|
|
23915
|
+
"redirectUri" : {
|
|
23916
|
+
"description" : "Loopback HTTP address with a port, e.g. `http://127.0.0.1:53682/callback`.",
|
|
23917
|
+
"maxLength" : 200,
|
|
23918
|
+
"minLength" : 1,
|
|
23919
|
+
"type" : "string"
|
|
23920
|
+
},
|
|
23921
|
+
"codeChallenge" : {
|
|
23922
|
+
"maxLength" : 128,
|
|
23923
|
+
"minLength" : 43,
|
|
23924
|
+
"type" : "string"
|
|
23925
|
+
},
|
|
23926
|
+
"codeChallengeMethod" : {
|
|
23927
|
+
"enum" : [ "S256" ],
|
|
23928
|
+
"type" : "string"
|
|
23929
|
+
},
|
|
23930
|
+
"deviceName" : {
|
|
23931
|
+
"maxLength" : 100,
|
|
23932
|
+
"type" : "string"
|
|
23933
|
+
}
|
|
23934
|
+
},
|
|
23935
|
+
"required" : [ "clientId", "codeChallenge", "codeChallengeMethod", "redirectUri" ],
|
|
23936
|
+
"type" : "object"
|
|
23937
|
+
},
|
|
23938
|
+
"ApplicationAuthorizationResponse" : {
|
|
23939
|
+
"properties" : {
|
|
23940
|
+
"code" : {
|
|
23941
|
+
"type" : "string"
|
|
23942
|
+
},
|
|
23943
|
+
"expiresIn" : {
|
|
23944
|
+
"description" : "Lifetime of the code, in seconds.",
|
|
23945
|
+
"type" : "integer"
|
|
23946
|
+
}
|
|
23947
|
+
},
|
|
23948
|
+
"required" : [ "code", "expiresIn" ],
|
|
23949
|
+
"type" : "object"
|
|
23950
|
+
},
|
|
23951
|
+
"ApplicationAuthorizationError" : {
|
|
23952
|
+
"properties" : {
|
|
23953
|
+
"message" : {
|
|
23954
|
+
"type" : "string"
|
|
23955
|
+
}
|
|
23956
|
+
},
|
|
23957
|
+
"required" : [ "message" ],
|
|
23958
|
+
"type" : "object"
|
|
23959
|
+
},
|
|
23960
|
+
"ApplicationTokenRequest" : {
|
|
23961
|
+
"properties" : {
|
|
23962
|
+
"grant_type" : {
|
|
23963
|
+
"enum" : [ "authorization_code" ],
|
|
23964
|
+
"type" : "string"
|
|
23965
|
+
},
|
|
23966
|
+
"code" : {
|
|
23967
|
+
"type" : "string"
|
|
23968
|
+
},
|
|
23969
|
+
"code_verifier" : {
|
|
23970
|
+
"type" : "string"
|
|
23971
|
+
},
|
|
23972
|
+
"redirect_uri" : {
|
|
23973
|
+
"type" : "string"
|
|
23974
|
+
},
|
|
23975
|
+
"client_id" : {
|
|
23976
|
+
"type" : "string"
|
|
23977
|
+
}
|
|
23978
|
+
},
|
|
23979
|
+
"required" : [ "client_id", "code", "code_verifier", "grant_type", "redirect_uri" ],
|
|
23980
|
+
"type" : "object"
|
|
23981
|
+
},
|
|
23982
|
+
"ApplicationTokenResponse" : {
|
|
23983
|
+
"properties" : {
|
|
23984
|
+
"access_token" : {
|
|
23985
|
+
"description" : "API key, to send in the `x-api-key` header.",
|
|
23986
|
+
"type" : "string"
|
|
23987
|
+
},
|
|
23988
|
+
"token_type" : {
|
|
23989
|
+
"enum" : [ "api_key" ],
|
|
23990
|
+
"type" : "string"
|
|
23991
|
+
},
|
|
23992
|
+
"key_id" : {
|
|
23993
|
+
"type" : "string"
|
|
23994
|
+
},
|
|
23995
|
+
"key_name" : {
|
|
23996
|
+
"type" : "string"
|
|
23997
|
+
},
|
|
23998
|
+
"email" : {
|
|
23999
|
+
"nullable" : true,
|
|
24000
|
+
"type" : "string"
|
|
24001
|
+
}
|
|
24002
|
+
},
|
|
24003
|
+
"required" : [ "access_token", "key_id", "key_name", "token_type" ],
|
|
24004
|
+
"type" : "object"
|
|
24005
|
+
},
|
|
23655
24006
|
"Chunk" : {
|
|
23656
24007
|
"properties" : {
|
|
23657
24008
|
"id" : {
|