authress-sdk 0.1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/swagger_client.rb +30 -0
- data/lib/swagger_client/api/access_records_api.rb +541 -0
- data/lib/swagger_client/api/accounts_api.rb +232 -0
- data/lib/swagger_client/api/metadata_api.rb +152 -0
- data/lib/swagger_client/api/resource_permissions_api.rb +250 -0
- data/lib/swagger_client/api/roles_api.rb +252 -0
- data/lib/swagger_client/api/service_clients_api.rb +418 -0
- data/lib/swagger_client/api/user_permissions_api.rb +340 -0
- data/lib/swagger_client/api_client.rb +388 -0
- data/lib/swagger_client/api_error.rb +57 -0
- data/lib/swagger_client/configuration.rb +205 -0
- data/lib/swagger_client/models/access_record.rb +351 -0
- data/lib/swagger_client/models/access_record_collection.rb +229 -0
- data/lib/swagger_client/models/access_record_collection_records.rb +351 -0
- data/lib/swagger_client/models/account.rb +268 -0
- data/lib/swagger_client/models/account_collection.rb +211 -0
- data/lib/swagger_client/models/account_collection_accounts.rb +268 -0
- data/lib/swagger_client/models/body.rb +236 -0
- data/lib/swagger_client/models/body_1.rb +229 -0
- data/lib/swagger_client/models/body_10.rb +246 -0
- data/lib/swagger_client/models/body_11.rb +246 -0
- data/lib/swagger_client/models/body_2.rb +213 -0
- data/lib/swagger_client/models/body_3.rb +351 -0
- data/lib/swagger_client/models/body_4.rb +351 -0
- data/lib/swagger_client/models/body_5.rb +225 -0
- data/lib/swagger_client/models/body_6.rb +255 -0
- data/lib/swagger_client/models/body_7.rb +255 -0
- data/lib/swagger_client/models/body_8.rb +227 -0
- data/lib/swagger_client/models/body_9.rb +223 -0
- data/lib/swagger_client/models/claim_request.rb +227 -0
- data/lib/swagger_client/models/claim_response.rb +197 -0
- data/lib/swagger_client/models/client.rb +246 -0
- data/lib/swagger_client/models/client_access_key.rb +242 -0
- data/lib/swagger_client/models/client_collection.rb +229 -0
- data/lib/swagger_client/models/client_collection_clients.rb +246 -0
- data/lib/swagger_client/models/identity.rb +228 -0
- data/lib/swagger_client/models/identity_collection.rb +213 -0
- data/lib/swagger_client/models/identity_collection_identities.rb +228 -0
- data/lib/swagger_client/models/identity_request.rb +223 -0
- data/lib/swagger_client/models/inline_response_200.rb +247 -0
- data/lib/swagger_client/models/inline_response_200_1.rb +236 -0
- data/lib/swagger_client/models/inline_response_200_10.rb +255 -0
- data/lib/swagger_client/models/inline_response_200_11.rb +211 -0
- data/lib/swagger_client/models/inline_response_200_12.rb +213 -0
- data/lib/swagger_client/models/inline_response_200_13.rb +229 -0
- data/lib/swagger_client/models/inline_response_200_14.rb +246 -0
- data/lib/swagger_client/models/inline_response_200_15.rb +242 -0
- data/lib/swagger_client/models/inline_response_200_2.rb +238 -0
- data/lib/swagger_client/models/inline_response_200_3.rb +260 -0
- data/lib/swagger_client/models/inline_response_200_4.rb +228 -0
- data/lib/swagger_client/models/inline_response_200_5.rb +213 -0
- data/lib/swagger_client/models/inline_response_200_6.rb +229 -0
- data/lib/swagger_client/models/inline_response_200_7.rb +229 -0
- data/lib/swagger_client/models/inline_response_200_8.rb +351 -0
- data/lib/swagger_client/models/inline_response_200_9.rb +268 -0
- data/lib/swagger_client/models/invite.rb +225 -0
- data/lib/swagger_client/models/link.rb +223 -0
- data/lib/swagger_client/models/metadata_object.rb +236 -0
- data/lib/swagger_client/models/permission_object.rb +258 -0
- data/lib/swagger_client/models/permission_response.rb +238 -0
- data/lib/swagger_client/models/resource_permission.rb +213 -0
- data/lib/swagger_client/models/resource_permission_collection.rb +228 -0
- data/lib/swagger_client/models/resource_permission_collection_links.rb +220 -0
- data/lib/swagger_client/models/resource_permission_collection_links_next.rb +223 -0
- data/lib/swagger_client/models/resource_permission_collection_resources.rb +213 -0
- data/lib/swagger_client/models/resource_users_collection.rb +229 -0
- data/lib/swagger_client/models/role.rb +255 -0
- data/lib/swagger_client/models/statement.rb +229 -0
- data/lib/swagger_client/models/token_request.rb +229 -0
- data/lib/swagger_client/models/user.rb +212 -0
- data/lib/swagger_client/models/user_resources.rb +247 -0
- data/lib/swagger_client/models/user_resources_resources.rb +207 -0
- data/lib/swagger_client/models/user_token.rb +260 -0
- data/lib/swagger_client/models/user_token_links.rb +211 -0
- data/lib/swagger_client/models/user_token_links_self.rb +223 -0
- data/lib/swagger_client/models/v1clients_options.rb +218 -0
- data/lib/swagger_client/models/v1records_account.rb +211 -0
- data/lib/swagger_client/models/v1records_links.rb +211 -0
- data/lib/swagger_client/models/v1records_links_self.rb +223 -0
- data/lib/swagger_client/models/v1records_users.rb +212 -0
- data/lib/swagger_client/models/v1resourcesresource_uri_permissions.rb +259 -0
- data/lib/swagger_client/models/v1roles_permissions.rb +258 -0
- data/lib/swagger_client/models/v1usersuser_idresourcesresource_urimetadata_account.rb +206 -0
- data/lib/swagger_client/models/v1usersuser_idtokens_resources.rb +212 -0
- data/lib/swagger_client/models/v1usersuser_idtokens_statements.rb +229 -0
- data/lib/swagger_client/version.rb +14 -0
- metadata +313 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 780c05e767e2999aed766676c564ac7003c6e0255895ff3fdf5dd69f8eebe1da
|
4
|
+
data.tar.gz: 9573215968e0a8b2f53f7b43cc7557cdfa5a1cc0592acb43e9ca222224b45f33
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 86b42ff1df2d460f38f14d374d7e67ef36e323c65c44c88ecc0d9553b1c0b5fc6bb60baf2ad36e75a90263621f105eff79651a3c46df76ef8ebc654dcc4888a5
|
7
|
+
data.tar.gz: c91ba75c6f49a5c85475fa69e197febd0ae4568c966529fdccbd3e214f4170cc896fd0dfcd4a6665dfb3e7327752d3dbf9e2db1c729b32d123778d81a14d17e5
|
@@ -0,0 +1,30 @@
|
|
1
|
+
=begin
|
2
|
+
#Authress
|
3
|
+
|
4
|
+
#<p> <h2>Authorization</h2> <p>Authorization for Authress is handled one of two different ways. Both mechanisms use oauth2 <i>Bearer</i> tokens.</p> <br> <h4>Identity Provider JWT</h4> <p>Hook up your preferred identity provider directly to Authress. Authress will verify JWTs sourced from that identify provider and allow direct integration with these APIs. Any OIDC JWT provider works, Google, Auth0, Okta, etc... With this mechanism your web app can make direct calls to the permissions API on behalf of your users. <br> <a href=\"https://authress.io/app/#/manage?focus=identity\">Link identity provider</a> </p> <br> <h4>Authress Clients</h4> <p>Regardless of using direct identity provider integration, with the API you can create Authress clients which can call any of the methods on the API. Your users won't be able to directly make API calls, all web app integrations must go through a service which stores the Authress private key. <br> <a href=\"https://authress.io/app/#/manage?focus=clients\">Create Authress service client</a> </p> <br> <h2>Usage</h2> <h4>Billable APIs</h4> <p>Most of the api available is completely free. Use it to populate your roles and configure your account. You'll only be charged for the ones marked as Billable.</p> <p><ul> <li><i class=\"far fa-fw fa-money-bill-alt text-primary\"></i> <span class=\"text-primary\">Billable</span> - <small>These APIs count as calls for your account and will be charged.</small></li> <li><i class=\"fas fa-fw fa-angle-double-right text-secondary\"></i> <span class=\"text-secondary\">Free</span> - <small>These are totally free.</small></li> <li><i class=\"fas fa-fw fa-balance-scale text-secondary\"></i> <span class=\"text-secondary\">Condition</span> - <small>Are conditionally free, see api methods for details.</small></li> </ul></p> <br> <h4>API Access</h4> <p>Access to the following APIs is based on Authress permissions, not the application permissions assigned in Authress to the application services. Each resource is tagged with the required permission <span class=\"badge badge-outline-secondary\">Action: Resource</span> </p>
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: support@authress.io
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.23
|
10
|
+
=end
|
11
|
+
|
12
|
+
Dir["#{File.expand_path(File.dirname(__FILE__))}/**/*.rb"].each{|f| require f}
|
13
|
+
|
14
|
+
module SwaggerClient
|
15
|
+
class << self
|
16
|
+
# Customize default settings for the SDK using block.
|
17
|
+
# SwaggerClient.configure do |config|
|
18
|
+
# config.username = "xxx"
|
19
|
+
# config.password = "xxx"
|
20
|
+
# end
|
21
|
+
# If no block given, return the default Configuration object.
|
22
|
+
def configure
|
23
|
+
if block_given?
|
24
|
+
yield(Configuration.default)
|
25
|
+
else
|
26
|
+
Configuration.default
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,541 @@
|
|
1
|
+
=begin
|
2
|
+
#Authress
|
3
|
+
|
4
|
+
#<p> <h2>Authorization</h2> <p>Authorization for Authress is handled one of two different ways. Both mechanisms use oauth2 <i>Bearer</i> tokens.</p> <br> <h4>Identity Provider JWT</h4> <p>Hook up your preferred identity provider directly to Authress. Authress will verify JWTs sourced from that identify provider and allow direct integration with these APIs. Any OIDC JWT provider works, Google, Auth0, Okta, etc... With this mechanism your web app can make direct calls to the permissions API on behalf of your users. <br> <a href=\"https://authress.io/app/#/manage?focus=identity\">Link identity provider</a> </p> <br> <h4>Authress Clients</h4> <p>Regardless of using direct identity provider integration, with the API you can create Authress clients which can call any of the methods on the API. Your users won't be able to directly make API calls, all web app integrations must go through a service which stores the Authress private key. <br> <a href=\"https://authress.io/app/#/manage?focus=clients\">Create Authress service client</a> </p> <br> <h2>Usage</h2> <h4>Billable APIs</h4> <p>Most of the api available is completely free. Use it to populate your roles and configure your account. You'll only be charged for the ones marked as Billable.</p> <p><ul> <li><i class=\"far fa-fw fa-money-bill-alt text-primary\"></i> <span class=\"text-primary\">Billable</span> - <small>These APIs count as calls for your account and will be charged.</small></li> <li><i class=\"fas fa-fw fa-angle-double-right text-secondary\"></i> <span class=\"text-secondary\">Free</span> - <small>These are totally free.</small></li> <li><i class=\"fas fa-fw fa-balance-scale text-secondary\"></i> <span class=\"text-secondary\">Condition</span> - <small>Are conditionally free, see api methods for details.</small></li> </ul></p> <br> <h4>API Access</h4> <p>Access to the following APIs is based on Authress permissions, not the application permissions assigned in Authress to the application services. Each resource is tagged with the required permission <span class=\"badge badge-outline-secondary\">Action: Resource</span> </p>
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
Contact: support@authress.io
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.23
|
10
|
+
=end
|
11
|
+
|
12
|
+
module SwaggerClient
|
13
|
+
class AccessRecordsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Claim a resource by an allowed user.
|
20
|
+
# Claim a resource by allowing a user to pick an identifier and receive admin access to that resource if it hasn't already been claimed. This only works for resources specifically marked as <strong>CLAIM</strong>. The result will be a new access record listing that user as the admin for this resource. The resourceUri will be appended to the collection resource uri using a '/' (forward slash) automatically. <br><span class=\"badge badge-outline-secondary\">RESOURCE CLAIM: {resourceUri}</span> or <span class=\"badge badge-outline-secondary\">DELEGATE *: {resourceUri}</span>
|
21
|
+
# @param body
|
22
|
+
# @param [Hash] opts the optional parameters
|
23
|
+
# @return [Object]
|
24
|
+
def create_claim(body, opts = {})
|
25
|
+
data, _status_code, _headers = create_claim_with_http_info(body, opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Claim a resource by an allowed user.
|
30
|
+
# Claim a resource by allowing a user to pick an identifier and receive admin access to that resource if it hasn't already been claimed. This only works for resources specifically marked as <strong>CLAIM</strong>. The result will be a new access record listing that user as the admin for this resource. The resourceUri will be appended to the collection resource uri using a '/' (forward slash) automatically. <br><span class=\"badge badge-outline-secondary\">RESOURCE CLAIM: {resourceUri}</span> or <span class=\"badge badge-outline-secondary\">DELEGATE *: {resourceUri}</span>
|
31
|
+
# @param body
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
34
|
+
def create_claim_with_http_info(body, opts = {})
|
35
|
+
if @api_client.config.debugging
|
36
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_claim ...'
|
37
|
+
end
|
38
|
+
# verify the required parameter 'body' is set
|
39
|
+
if @api_client.config.client_side_validation && body.nil?
|
40
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_claim"
|
41
|
+
end
|
42
|
+
# resource path
|
43
|
+
local_var_path = '/v1/claims'
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = opts[:query_params] || {}
|
47
|
+
|
48
|
+
# header parameters
|
49
|
+
header_params = opts[:header_params] || {}
|
50
|
+
# HTTP header 'Accept' (if needed)
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
|
52
|
+
# HTTP header 'Content-Type'
|
53
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = opts[:form_params] || {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
60
|
+
|
61
|
+
return_type = opts[:return_type] || 'Object'
|
62
|
+
|
63
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
64
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
65
|
+
:header_params => header_params,
|
66
|
+
:query_params => query_params,
|
67
|
+
:form_params => form_params,
|
68
|
+
:body => post_body,
|
69
|
+
:auth_names => auth_names,
|
70
|
+
:return_type => return_type)
|
71
|
+
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#create_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
# Create a new invite.
|
78
|
+
# Invites are used to easily assign permissions to users that have not been created in your identity provider yet. Create the invite with an email address, and then when the user accepts the invite they will automatically get the permissions assigned here. Invites automatically expire after 7 days. <br><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
|
79
|
+
# @param body
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [nil]
|
82
|
+
def create_invite(body, opts = {})
|
83
|
+
create_invite_with_http_info(body, opts)
|
84
|
+
nil
|
85
|
+
end
|
86
|
+
|
87
|
+
# Create a new invite.
|
88
|
+
# Invites are used to easily assign permissions to users that have not been created in your identity provider yet. Create the invite with an email address, and then when the user accepts the invite they will automatically get the permissions assigned here. Invites automatically expire after 7 days. <br><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
|
89
|
+
# @param body
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
92
|
+
def create_invite_with_http_info(body, opts = {})
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_invite ...'
|
95
|
+
end
|
96
|
+
# verify the required parameter 'body' is set
|
97
|
+
if @api_client.config.client_side_validation && body.nil?
|
98
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_invite"
|
99
|
+
end
|
100
|
+
# resource path
|
101
|
+
local_var_path = '/v1/invites'
|
102
|
+
|
103
|
+
# query parameters
|
104
|
+
query_params = opts[:query_params] || {}
|
105
|
+
|
106
|
+
# header parameters
|
107
|
+
header_params = opts[:header_params] || {}
|
108
|
+
# HTTP header 'Content-Type'
|
109
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
110
|
+
|
111
|
+
# form parameters
|
112
|
+
form_params = opts[:form_params] || {}
|
113
|
+
|
114
|
+
# http body (model)
|
115
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
116
|
+
|
117
|
+
return_type = opts[:return_type]
|
118
|
+
|
119
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => return_type)
|
127
|
+
|
128
|
+
if @api_client.config.debugging
|
129
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#create_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
130
|
+
end
|
131
|
+
return data, status_code, headers
|
132
|
+
end
|
133
|
+
# Create a new access record.
|
134
|
+
# Specify user roles for specific resources. (Records have a maximum size of ~100KB) <br><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
|
135
|
+
# @param body
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [InlineResponse2008]
|
138
|
+
def create_record(body, opts = {})
|
139
|
+
data, _status_code, _headers = create_record_with_http_info(body, opts)
|
140
|
+
data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Create a new access record.
|
144
|
+
# Specify user roles for specific resources. (Records have a maximum size of ~100KB) <br><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
|
145
|
+
# @param body
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
148
|
+
def create_record_with_http_info(body, opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_record ...'
|
151
|
+
end
|
152
|
+
# verify the required parameter 'body' is set
|
153
|
+
if @api_client.config.client_side_validation && body.nil?
|
154
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_record"
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = '/v1/records'
|
158
|
+
|
159
|
+
# query parameters
|
160
|
+
query_params = opts[:query_params] || {}
|
161
|
+
|
162
|
+
# header parameters
|
163
|
+
header_params = opts[:header_params] || {}
|
164
|
+
# HTTP header 'Accept' (if needed)
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
|
166
|
+
# HTTP header 'Content-Type'
|
167
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = opts[:form_params] || {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
174
|
+
|
175
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
176
|
+
|
177
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
178
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => return_type)
|
185
|
+
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#create_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
188
|
+
end
|
189
|
+
return data, status_code, headers
|
190
|
+
end
|
191
|
+
# Delete an invite.
|
192
|
+
# Deletes an invite. <br><span class=\"badge badge-outline-secondary\">READ: Authress:UserPermissions/{userId}</span>
|
193
|
+
# @param invite_id The identifier of the invite.
|
194
|
+
# @param [Hash] opts the optional parameters
|
195
|
+
# @return [nil]
|
196
|
+
def delete_invite(invite_id, opts = {})
|
197
|
+
delete_invite_with_http_info(invite_id, opts)
|
198
|
+
nil
|
199
|
+
end
|
200
|
+
|
201
|
+
# Delete an invite.
|
202
|
+
# Deletes an invite. <br><span class=\"badge badge-outline-secondary\">READ: Authress:UserPermissions/{userId}</span>
|
203
|
+
# @param invite_id The identifier of the invite.
|
204
|
+
# @param [Hash] opts the optional parameters
|
205
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
206
|
+
def delete_invite_with_http_info(invite_id, opts = {})
|
207
|
+
if @api_client.config.debugging
|
208
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_invite ...'
|
209
|
+
end
|
210
|
+
# verify the required parameter 'invite_id' is set
|
211
|
+
if @api_client.config.client_side_validation && invite_id.nil?
|
212
|
+
fail ArgumentError, "Missing the required parameter 'invite_id' when calling AccessRecordsApi.delete_invite"
|
213
|
+
end
|
214
|
+
# resource path
|
215
|
+
local_var_path = '/v1/invites/{inviteId}'.sub('{' + 'inviteId' + '}', invite_id.to_s)
|
216
|
+
|
217
|
+
# query parameters
|
218
|
+
query_params = opts[:query_params] || {}
|
219
|
+
|
220
|
+
# header parameters
|
221
|
+
header_params = opts[:header_params] || {}
|
222
|
+
|
223
|
+
# form parameters
|
224
|
+
form_params = opts[:form_params] || {}
|
225
|
+
|
226
|
+
# http body (model)
|
227
|
+
post_body = opts[:body]
|
228
|
+
|
229
|
+
return_type = opts[:return_type]
|
230
|
+
|
231
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
232
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
233
|
+
:header_params => header_params,
|
234
|
+
:query_params => query_params,
|
235
|
+
:form_params => form_params,
|
236
|
+
:body => post_body,
|
237
|
+
:auth_names => auth_names,
|
238
|
+
:return_type => return_type)
|
239
|
+
|
240
|
+
if @api_client.config.debugging
|
241
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#delete_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
242
|
+
end
|
243
|
+
return data, status_code, headers
|
244
|
+
end
|
245
|
+
# Deletes an access record.
|
246
|
+
# Remove an access record, removing associated permissions from all users in record. If a user has a permission from another record, that permission will not be removed. (Note: This disables the record by changing the status to <strong>DELETED</strong> but not completely remove the record for tracking purposes. <br><span class=\"badge badge-outline-secondary\">UPDATE (or Admin): Authress:AccessRecords/{recordId}</span>
|
247
|
+
# @param record_id The identifier of the access record.
|
248
|
+
# @param [Hash] opts the optional parameters
|
249
|
+
# @return [nil]
|
250
|
+
def delete_record(record_id, opts = {})
|
251
|
+
delete_record_with_http_info(record_id, opts)
|
252
|
+
nil
|
253
|
+
end
|
254
|
+
|
255
|
+
# Deletes an access record.
|
256
|
+
# Remove an access record, removing associated permissions from all users in record. If a user has a permission from another record, that permission will not be removed. (Note: This disables the record by changing the status to <strong>DELETED</strong> but not completely remove the record for tracking purposes. <br><span class=\"badge badge-outline-secondary\">UPDATE (or Admin): Authress:AccessRecords/{recordId}</span>
|
257
|
+
# @param record_id The identifier of the access record.
|
258
|
+
# @param [Hash] opts the optional parameters
|
259
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
260
|
+
def delete_record_with_http_info(record_id, opts = {})
|
261
|
+
if @api_client.config.debugging
|
262
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_record ...'
|
263
|
+
end
|
264
|
+
# verify the required parameter 'record_id' is set
|
265
|
+
if @api_client.config.client_side_validation && record_id.nil?
|
266
|
+
fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.delete_record"
|
267
|
+
end
|
268
|
+
# resource path
|
269
|
+
local_var_path = '/v1/records/{recordId}'.sub('{' + 'recordId' + '}', record_id.to_s)
|
270
|
+
|
271
|
+
# query parameters
|
272
|
+
query_params = opts[:query_params] || {}
|
273
|
+
|
274
|
+
# header parameters
|
275
|
+
header_params = opts[:header_params] || {}
|
276
|
+
|
277
|
+
# form parameters
|
278
|
+
form_params = opts[:form_params] || {}
|
279
|
+
|
280
|
+
# http body (model)
|
281
|
+
post_body = opts[:body]
|
282
|
+
|
283
|
+
return_type = opts[:return_type]
|
284
|
+
|
285
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
286
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
287
|
+
:header_params => header_params,
|
288
|
+
:query_params => query_params,
|
289
|
+
:form_params => form_params,
|
290
|
+
:body => post_body,
|
291
|
+
:auth_names => auth_names,
|
292
|
+
:return_type => return_type)
|
293
|
+
|
294
|
+
if @api_client.config.debugging
|
295
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#delete_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
296
|
+
end
|
297
|
+
return data, status_code, headers
|
298
|
+
end
|
299
|
+
# Get an access record for the account.
|
300
|
+
# Access records contain information assigning permissions to users for resources. <br><span class=\"badge badge-outline-secondary\">READ (or Admin): Authress:AccessRecords/{recordId}</span>
|
301
|
+
# @param record_id The identifier of the access record.
|
302
|
+
# @param [Hash] opts the optional parameters
|
303
|
+
# @return [InlineResponse2008]
|
304
|
+
def get_record(record_id, opts = {})
|
305
|
+
data, _status_code, _headers = get_record_with_http_info(record_id, opts)
|
306
|
+
data
|
307
|
+
end
|
308
|
+
|
309
|
+
# Get an access record for the account.
|
310
|
+
# Access records contain information assigning permissions to users for resources. <br><span class=\"badge badge-outline-secondary\">READ (or Admin): Authress:AccessRecords/{recordId}</span>
|
311
|
+
# @param record_id The identifier of the access record.
|
312
|
+
# @param [Hash] opts the optional parameters
|
313
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
314
|
+
def get_record_with_http_info(record_id, opts = {})
|
315
|
+
if @api_client.config.debugging
|
316
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.get_record ...'
|
317
|
+
end
|
318
|
+
# verify the required parameter 'record_id' is set
|
319
|
+
if @api_client.config.client_side_validation && record_id.nil?
|
320
|
+
fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.get_record"
|
321
|
+
end
|
322
|
+
# resource path
|
323
|
+
local_var_path = '/v1/records/{recordId}'.sub('{' + 'recordId' + '}', record_id.to_s)
|
324
|
+
|
325
|
+
# query parameters
|
326
|
+
query_params = opts[:query_params] || {}
|
327
|
+
|
328
|
+
# header parameters
|
329
|
+
header_params = opts[:header_params] || {}
|
330
|
+
# HTTP header 'Accept' (if needed)
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
|
332
|
+
|
333
|
+
# form parameters
|
334
|
+
form_params = opts[:form_params] || {}
|
335
|
+
|
336
|
+
# http body (model)
|
337
|
+
post_body = opts[:body]
|
338
|
+
|
339
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
340
|
+
|
341
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
342
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
343
|
+
:header_params => header_params,
|
344
|
+
:query_params => query_params,
|
345
|
+
:form_params => form_params,
|
346
|
+
:body => post_body,
|
347
|
+
:auth_names => auth_names,
|
348
|
+
:return_type => return_type)
|
349
|
+
|
350
|
+
if @api_client.config.debugging
|
351
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#get_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
352
|
+
end
|
353
|
+
return data, status_code, headers
|
354
|
+
end
|
355
|
+
# Get all account records.
|
356
|
+
# <i class=\"far fa-money-bill-alt text-primary\"></i> <span class=\"text-primary\">Billable</span> Returns a paginated records list for the account. Only records the user has access to are returned. <br><span class=\"badge badge-outline-secondary\">READ (or Admin): Authress:AccessRecords/{recordId}</span>
|
357
|
+
# @param [Hash] opts the optional parameters
|
358
|
+
# @option opts [Integer] :limit Max number of results to return (default to 20)
|
359
|
+
# @option opts [String] :cursor Continuation cursor for paging (will automatically be set)
|
360
|
+
# @option opts [String] :filter Filter to search records by. This is a case insensitive search through every text field.
|
361
|
+
# @option opts [String] :status Filter records by their current status.
|
362
|
+
# @return [InlineResponse2007]
|
363
|
+
def get_records(opts = {})
|
364
|
+
data, _status_code, _headers = get_records_with_http_info(opts)
|
365
|
+
data
|
366
|
+
end
|
367
|
+
|
368
|
+
# Get all account records.
|
369
|
+
# <i class=\"far fa-money-bill-alt text-primary\"></i> <span class=\"text-primary\">Billable</span> Returns a paginated records list for the account. Only records the user has access to are returned. <br><span class=\"badge badge-outline-secondary\">READ (or Admin): Authress:AccessRecords/{recordId}</span>
|
370
|
+
# @param [Hash] opts the optional parameters
|
371
|
+
# @option opts [Integer] :limit Max number of results to return
|
372
|
+
# @option opts [String] :cursor Continuation cursor for paging (will automatically be set)
|
373
|
+
# @option opts [String] :filter Filter to search records by. This is a case insensitive search through every text field.
|
374
|
+
# @option opts [String] :status Filter records by their current status.
|
375
|
+
# @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
|
376
|
+
def get_records_with_http_info(opts = {})
|
377
|
+
if @api_client.config.debugging
|
378
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.get_records ...'
|
379
|
+
end
|
380
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !['ACTIVE', 'DELETED'].include?(opts[:'status'])
|
381
|
+
fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, DELETED'
|
382
|
+
end
|
383
|
+
# resource path
|
384
|
+
local_var_path = '/v1/records'
|
385
|
+
|
386
|
+
# query parameters
|
387
|
+
query_params = opts[:query_params] || {}
|
388
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
389
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
390
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
391
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
392
|
+
|
393
|
+
# header parameters
|
394
|
+
header_params = opts[:header_params] || {}
|
395
|
+
# HTTP header 'Accept' (if needed)
|
396
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
|
397
|
+
|
398
|
+
# form parameters
|
399
|
+
form_params = opts[:form_params] || {}
|
400
|
+
|
401
|
+
# http body (model)
|
402
|
+
post_body = opts[:body]
|
403
|
+
|
404
|
+
return_type = opts[:return_type] || 'InlineResponse2007'
|
405
|
+
|
406
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
407
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
408
|
+
:header_params => header_params,
|
409
|
+
:query_params => query_params,
|
410
|
+
:form_params => form_params,
|
411
|
+
:body => post_body,
|
412
|
+
:auth_names => auth_names,
|
413
|
+
:return_type => return_type)
|
414
|
+
|
415
|
+
if @api_client.config.debugging
|
416
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#get_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
417
|
+
end
|
418
|
+
return data, status_code, headers
|
419
|
+
end
|
420
|
+
# Accept an invite.
|
421
|
+
# Accepts an invite by claiming this invite by this user. The user token used for this request will gain the permissions associated with the invite.
|
422
|
+
# @param invite_id The identifier of the invite.
|
423
|
+
# @param [Hash] opts the optional parameters
|
424
|
+
# @return [InlineResponse2009]
|
425
|
+
def respond_to_invite(invite_id, opts = {})
|
426
|
+
data, _status_code, _headers = respond_to_invite_with_http_info(invite_id, opts)
|
427
|
+
data
|
428
|
+
end
|
429
|
+
|
430
|
+
# Accept an invite.
|
431
|
+
# Accepts an invite by claiming this invite by this user. The user token used for this request will gain the permissions associated with the invite.
|
432
|
+
# @param invite_id The identifier of the invite.
|
433
|
+
# @param [Hash] opts the optional parameters
|
434
|
+
# @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
|
435
|
+
def respond_to_invite_with_http_info(invite_id, opts = {})
|
436
|
+
if @api_client.config.debugging
|
437
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.respond_to_invite ...'
|
438
|
+
end
|
439
|
+
# verify the required parameter 'invite_id' is set
|
440
|
+
if @api_client.config.client_side_validation && invite_id.nil?
|
441
|
+
fail ArgumentError, "Missing the required parameter 'invite_id' when calling AccessRecordsApi.respond_to_invite"
|
442
|
+
end
|
443
|
+
# resource path
|
444
|
+
local_var_path = '/v1/invites/{inviteId}'.sub('{' + 'inviteId' + '}', invite_id.to_s)
|
445
|
+
|
446
|
+
# query parameters
|
447
|
+
query_params = opts[:query_params] || {}
|
448
|
+
|
449
|
+
# header parameters
|
450
|
+
header_params = opts[:header_params] || {}
|
451
|
+
# HTTP header 'Accept' (if needed)
|
452
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
|
453
|
+
|
454
|
+
# form parameters
|
455
|
+
form_params = opts[:form_params] || {}
|
456
|
+
|
457
|
+
# http body (model)
|
458
|
+
post_body = opts[:body]
|
459
|
+
|
460
|
+
return_type = opts[:return_type] || 'InlineResponse2009'
|
461
|
+
|
462
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
463
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
464
|
+
:header_params => header_params,
|
465
|
+
:query_params => query_params,
|
466
|
+
:form_params => form_params,
|
467
|
+
:body => post_body,
|
468
|
+
:auth_names => auth_names,
|
469
|
+
:return_type => return_type)
|
470
|
+
|
471
|
+
if @api_client.config.debugging
|
472
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#respond_to_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
473
|
+
end
|
474
|
+
return data, status_code, headers
|
475
|
+
end
|
476
|
+
# Update an access record.
|
477
|
+
# Updates an access record adding or removing user permissions to resources. (Records have a maximum size of ~100KB) <br><span class=\"badge badge-outline-secondary\">UPDATE (or Admin): Authress:AccessRecords/{recordId}</span><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
|
478
|
+
# @param body
|
479
|
+
# @param record_id The identifier of the access record.
|
480
|
+
# @param [Hash] opts the optional parameters
|
481
|
+
# @return [InlineResponse2008]
|
482
|
+
def update_record(body, record_id, opts = {})
|
483
|
+
data, _status_code, _headers = update_record_with_http_info(body, record_id, opts)
|
484
|
+
data
|
485
|
+
end
|
486
|
+
|
487
|
+
# Update an access record.
|
488
|
+
# Updates an access record adding or removing user permissions to resources. (Records have a maximum size of ~100KB) <br><span class=\"badge badge-outline-secondary\">UPDATE (or Admin): Authress:AccessRecords/{recordId}</span><span class=\"badge badge-outline-secondary\">GRANT: Existing Resource Permissions</span>
|
489
|
+
# @param body
|
490
|
+
# @param record_id The identifier of the access record.
|
491
|
+
# @param [Hash] opts the optional parameters
|
492
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
493
|
+
def update_record_with_http_info(body, record_id, opts = {})
|
494
|
+
if @api_client.config.debugging
|
495
|
+
@api_client.config.logger.debug 'Calling API: AccessRecordsApi.update_record ...'
|
496
|
+
end
|
497
|
+
# verify the required parameter 'body' is set
|
498
|
+
if @api_client.config.client_side_validation && body.nil?
|
499
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.update_record"
|
500
|
+
end
|
501
|
+
# verify the required parameter 'record_id' is set
|
502
|
+
if @api_client.config.client_side_validation && record_id.nil?
|
503
|
+
fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.update_record"
|
504
|
+
end
|
505
|
+
# resource path
|
506
|
+
local_var_path = '/v1/records/{recordId}'.sub('{' + 'recordId' + '}', record_id.to_s)
|
507
|
+
|
508
|
+
# query parameters
|
509
|
+
query_params = opts[:query_params] || {}
|
510
|
+
|
511
|
+
# header parameters
|
512
|
+
header_params = opts[:header_params] || {}
|
513
|
+
# HTTP header 'Accept' (if needed)
|
514
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
|
515
|
+
# HTTP header 'Content-Type'
|
516
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
517
|
+
|
518
|
+
# form parameters
|
519
|
+
form_params = opts[:form_params] || {}
|
520
|
+
|
521
|
+
# http body (model)
|
522
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
523
|
+
|
524
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
525
|
+
|
526
|
+
auth_names = opts[:auth_names] || ['oauth2']
|
527
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
528
|
+
:header_params => header_params,
|
529
|
+
:query_params => query_params,
|
530
|
+
:form_params => form_params,
|
531
|
+
:body => post_body,
|
532
|
+
:auth_names => auth_names,
|
533
|
+
:return_type => return_type)
|
534
|
+
|
535
|
+
if @api_client.config.debugging
|
536
|
+
@api_client.config.logger.debug "API called: AccessRecordsApi#update_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
537
|
+
end
|
538
|
+
return data, status_code, headers
|
539
|
+
end
|
540
|
+
end
|
541
|
+
end
|