daytona_api_client 0.216.0 → 0.216.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +15 -16
  3. data/lib/daytona_api_client/api/organizations_api.rb +260 -484
  4. data/lib/daytona_api_client/api/sandbox_api.rb +14 -163
  5. data/lib/daytona_api_client/api/users_api.rb +82 -90
  6. data/lib/daytona_api_client/models/account_provider.rb +48 -19
  7. data/lib/daytona_api_client/models/api_key_list.rb +14 -4
  8. data/lib/daytona_api_client/models/create_runner.rb +37 -4
  9. data/lib/daytona_api_client/models/create_runner_sandbox_class.rb +42 -0
  10. data/lib/daytona_api_client/models/daytona_configuration.rb +45 -1
  11. data/lib/daytona_api_client/models/{organization_preview_warning.rb → generate_workos_admin_portal_link.rb} +42 -20
  12. data/lib/daytona_api_client/models/{send_webhook_dto.rb → gpu_capacity.rb} +77 -43
  13. data/lib/daytona_api_client/models/{organization_sso_enabled.rb → gpu_capacity_response.rb} +48 -20
  14. data/lib/daytona_api_client/models/oidc_config.rb +65 -4
  15. data/lib/daytona_api_client/models/organization.rb +38 -1
  16. data/lib/daytona_api_client/models/sandbox_created_webhook.rb +349 -0
  17. data/lib/daytona_api_client/models/{organization_sandbox_default_limited_network_egress.rb → sandbox_identity.rb} +47 -20
  18. data/lib/daytona_api_client/models/sandbox_state_updated_webhook.rb +349 -0
  19. data/lib/daytona_api_client/models/snapshot_created_webhook.rb +349 -0
  20. data/lib/daytona_api_client/models/{create_user.rb → snapshot_removed_webhook.rb} +119 -71
  21. data/lib/daytona_api_client/models/snapshot_state_updated_webhook.rb +376 -0
  22. data/lib/daytona_api_client/models/user.rb +11 -1
  23. data/lib/daytona_api_client/models/volume_created_webhook.rb +349 -0
  24. data/lib/daytona_api_client/models/volume_state_updated_webhook.rb +376 -0
  25. data/lib/daytona_api_client/models/workos_admin_portal_intent.rb +41 -0
  26. data/lib/daytona_api_client/models/{set_snapshot_general_status_dto.rb → workos_admin_portal_link.rb} +20 -20
  27. data/lib/daytona_api_client/models/{admin_create_runner.rb → workos_sso_connection.rb} +123 -120
  28. data/lib/daytona_api_client/version.rb +1 -1
  29. data/lib/daytona_api_client.rb +15 -16
  30. metadata +16 -17
  31. data/lib/daytona_api_client/api/admin_api.rb +0 -1618
  32. data/lib/daytona_api_client/models/admin_create_organization.rb +0 -219
  33. data/lib/daytona_api_client/models/admin_get_webhook_status200_response.rb +0 -147
  34. data/lib/daytona_api_client/models/create_organization_quota.rb +0 -238
  35. data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -386
  36. data/lib/daytona_api_client/models/organization_suspension.rb +0 -221
  37. data/lib/daytona_api_client/models/paginated_sandboxes_deprecated.rb +0 -244
  38. data/lib/daytona_api_client/models/update_organization_quota.rb +0 -333
  39. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -313
@@ -1785,6 +1785,8 @@ module DaytonaApiClient
1785
1785
  # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1786
1786
  # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1787
1787
  # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1788
+ # @option opts [Float] :min_gpu Minimum GPU
1789
+ # @option opts [Float] :max_gpu Maximum GPU
1788
1790
  # @option opts [Boolean] :is_public Filter by public status
1789
1791
  # @option opts [Boolean] :is_recoverable Filter by recoverable status
1790
1792
  # @option opts [Time] :created_at_after Include items created after this timestamp
@@ -1822,6 +1824,8 @@ module DaytonaApiClient
1822
1824
  # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1823
1825
  # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1824
1826
  # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1827
+ # @option opts [Float] :min_gpu Minimum GPU
1828
+ # @option opts [Float] :max_gpu Maximum GPU
1825
1829
  # @option opts [Boolean] :is_public Filter by public status
1826
1830
  # @option opts [Boolean] :is_recoverable Filter by recoverable status
1827
1831
  # @option opts [Time] :created_at_after Include items created after this timestamp
@@ -1869,6 +1873,14 @@ module DaytonaApiClient
1869
1873
  fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
1870
1874
  end
1871
1875
 
1876
+ if @api_client.config.client_side_validation && !opts[:'min_gpu'].nil? && opts[:'min_gpu'] < 0
1877
+ fail ArgumentError, 'invalid value for "opts[:"min_gpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 0.'
1878
+ end
1879
+
1880
+ if @api_client.config.client_side_validation && !opts[:'max_gpu'].nil? && opts[:'max_gpu'] < 0
1881
+ fail ArgumentError, 'invalid value for "opts[:"max_gpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 0.'
1882
+ end
1883
+
1872
1884
  # resource path
1873
1885
  local_var_path = '/sandbox'
1874
1886
 
@@ -1891,6 +1903,8 @@ module DaytonaApiClient
1891
1903
  query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
1892
1904
  query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
1893
1905
  query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
1906
+ query_params[:'minGpu'] = opts[:'min_gpu'] if !opts[:'min_gpu'].nil?
1907
+ query_params[:'maxGpu'] = opts[:'max_gpu'] if !opts[:'max_gpu'].nil?
1894
1908
  query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
1895
1909
  query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
1896
1910
  query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
@@ -1937,169 +1951,6 @@ module DaytonaApiClient
1937
1951
  return data, status_code, headers
1938
1952
  end
1939
1953
 
1940
- # [DEPRECATED] List all sandboxes paginated
1941
- # @param [Hash] opts the optional parameters
1942
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1943
- # @option opts [Integer] :page Page number of the results (default to 1)
1944
- # @option opts [Integer] :limit Number of results per page (default to 100)
1945
- # @option opts [String] :id Filter by partial ID match
1946
- # @option opts [String] :name Filter by partial name match
1947
- # @option opts [String] :labels JSON encoded labels to filter by
1948
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1949
- # @option opts [Array<String>] :states List of states to filter by
1950
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1951
- # @option opts [Array<String>] :regions List of regions to filter by
1952
- # @option opts [Float] :min_cpu Minimum CPU
1953
- # @option opts [Float] :max_cpu Maximum CPU
1954
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1955
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1956
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1957
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1958
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1959
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1960
- # @option opts [String] :sort Field to sort by (default to 'createdAt')
1961
- # @option opts [String] :order Direction to sort by (default to 'desc')
1962
- # @return [PaginatedSandboxesDeprecated]
1963
- def list_sandboxes_paginated_deprecated(opts = {})
1964
- data, _status_code, _headers = list_sandboxes_paginated_deprecated_with_http_info(opts)
1965
- data
1966
- end
1967
-
1968
- # [DEPRECATED] List all sandboxes paginated
1969
- # @param [Hash] opts the optional parameters
1970
- # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
1971
- # @option opts [Integer] :page Page number of the results (default to 1)
1972
- # @option opts [Integer] :limit Number of results per page (default to 100)
1973
- # @option opts [String] :id Filter by partial ID match
1974
- # @option opts [String] :name Filter by partial name match
1975
- # @option opts [String] :labels JSON encoded labels to filter by
1976
- # @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
1977
- # @option opts [Array<String>] :states List of states to filter by
1978
- # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1979
- # @option opts [Array<String>] :regions List of regions to filter by
1980
- # @option opts [Float] :min_cpu Minimum CPU
1981
- # @option opts [Float] :max_cpu Maximum CPU
1982
- # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
1983
- # @option opts [Float] :max_memory_gi_b Maximum memory in GiB
1984
- # @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
1985
- # @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
1986
- # @option opts [Time] :last_event_after Include items with last event after this timestamp
1987
- # @option opts [Time] :last_event_before Include items with last event before this timestamp
1988
- # @option opts [String] :sort Field to sort by (default to 'createdAt')
1989
- # @option opts [String] :order Direction to sort by (default to 'desc')
1990
- # @return [Array<(PaginatedSandboxesDeprecated, Integer, Hash)>] PaginatedSandboxesDeprecated data, response status code and response headers
1991
- def list_sandboxes_paginated_deprecated_with_http_info(opts = {})
1992
- if @api_client.config.debugging
1993
- @api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated_deprecated ...'
1994
- end
1995
- if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1996
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
1997
- end
1998
-
1999
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
2000
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be smaller than or equal to 200.'
2001
- end
2002
-
2003
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
2004
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2005
- end
2006
-
2007
- allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "pausing", "paused", "resuming", "unknown_default_open_api"]
2008
- if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
2009
- fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
2010
- end
2011
- if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
2012
- fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2013
- end
2014
-
2015
- if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
2016
- fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2017
- end
2018
-
2019
- if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
2020
- fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2021
- end
2022
-
2023
- if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
2024
- fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2025
- end
2026
-
2027
- if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
2028
- fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2029
- end
2030
-
2031
- if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
2032
- fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
2033
- end
2034
-
2035
- allowable_values = ["id", "name", "state", "snapshot", "region", "updatedAt", "createdAt", "lastActivityAt", "unknown_default_open_api"]
2036
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
2037
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
2038
- end
2039
- allowable_values = ["asc", "desc", "unknown_default_open_api"]
2040
- if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
2041
- fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
2042
- end
2043
- # resource path
2044
- local_var_path = '/sandbox/paginated'
2045
-
2046
- # query parameters
2047
- query_params = opts[:query_params] || {}
2048
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2049
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2050
- query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
2051
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
2052
- query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
2053
- query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
2054
- query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
2055
- query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
2056
- query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
2057
- query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
2058
- query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
2059
- query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
2060
- query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
2061
- query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
2062
- query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
2063
- query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
2064
- query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
2065
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
2066
- query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
2067
-
2068
- # header parameters
2069
- header_params = opts[:header_params] || {}
2070
- # HTTP header 'Accept' (if needed)
2071
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2072
- header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
2073
-
2074
- # form parameters
2075
- form_params = opts[:form_params] || {}
2076
-
2077
- # http body (model)
2078
- post_body = opts[:debug_body]
2079
-
2080
- # return_type
2081
- return_type = opts[:debug_return_type] || 'PaginatedSandboxesDeprecated'
2082
-
2083
- # auth_names
2084
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
2085
-
2086
- new_options = opts.merge(
2087
- :operation => :"SandboxApi.list_sandboxes_paginated_deprecated",
2088
- :header_params => header_params,
2089
- :query_params => query_params,
2090
- :form_params => form_params,
2091
- :body => post_body,
2092
- :auth_names => auth_names,
2093
- :return_type => return_type
2094
- )
2095
-
2096
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2097
- if @api_client.config.debugging
2098
- @api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2099
- end
2100
- return data, status_code, headers
2101
- end
2102
-
2103
1954
  # Pause sandbox
2104
1955
  # @param sandbox_id_or_name [String] ID or name of the sandbox
2105
1956
  # @param [Hash] opts the optional parameters
@@ -19,29 +19,23 @@ module DaytonaApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Confirm (link) a pending SSO account link
23
- # @param id [String]
22
+ # Accept the current privacy policies
24
23
  # @param [Hash] opts the optional parameters
25
24
  # @return [nil]
26
- def confirm_pending_sso_link(id, opts = {})
27
- confirm_pending_sso_link_with_http_info(id, opts)
25
+ def accept_privacy_policies(opts = {})
26
+ accept_privacy_policies_with_http_info(opts)
28
27
  nil
29
28
  end
30
29
 
31
- # Confirm (link) a pending SSO account link
32
- # @param id [String]
30
+ # Accept the current privacy policies
33
31
  # @param [Hash] opts the optional parameters
34
32
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
- def confirm_pending_sso_link_with_http_info(id, opts = {})
33
+ def accept_privacy_policies_with_http_info(opts = {})
36
34
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: UsersApi.confirm_pending_sso_link ...'
38
- end
39
- # verify the required parameter 'id' is set
40
- if @api_client.config.client_side_validation && id.nil?
41
- fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.confirm_pending_sso_link"
35
+ @api_client.config.logger.debug 'Calling API: UsersApi.accept_privacy_policies ...'
42
36
  end
43
37
  # resource path
44
- local_var_path = '/users/me/pending-sso-links/{id}/confirm'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
38
+ local_var_path = '/users/privacy-policies/accept'
45
39
 
46
40
  # query parameters
47
41
  query_params = opts[:query_params] || {}
@@ -62,7 +56,7 @@ module DaytonaApiClient
62
56
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
63
57
 
64
58
  new_options = opts.merge(
65
- :operation => :"UsersApi.confirm_pending_sso_link",
59
+ :operation => :"UsersApi.accept_privacy_policies",
66
60
  :header_params => header_params,
67
61
  :query_params => query_params,
68
62
  :form_params => form_params,
@@ -73,34 +67,34 @@ module DaytonaApiClient
73
67
 
74
68
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
75
69
  if @api_client.config.debugging
76
- @api_client.config.logger.debug "API called: UsersApi#confirm_pending_sso_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ @api_client.config.logger.debug "API called: UsersApi#accept_privacy_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
71
  end
78
72
  return data, status_code, headers
79
73
  end
80
74
 
81
- # Dismiss a pending SSO account link
75
+ # Confirm (link) a pending SSO account link
82
76
  # @param id [String]
83
77
  # @param [Hash] opts the optional parameters
84
78
  # @return [nil]
85
- def dismiss_pending_sso_link(id, opts = {})
86
- dismiss_pending_sso_link_with_http_info(id, opts)
79
+ def confirm_pending_sso_link(id, opts = {})
80
+ confirm_pending_sso_link_with_http_info(id, opts)
87
81
  nil
88
82
  end
89
83
 
90
- # Dismiss a pending SSO account link
84
+ # Confirm (link) a pending SSO account link
91
85
  # @param id [String]
92
86
  # @param [Hash] opts the optional parameters
93
87
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
94
- def dismiss_pending_sso_link_with_http_info(id, opts = {})
88
+ def confirm_pending_sso_link_with_http_info(id, opts = {})
95
89
  if @api_client.config.debugging
96
- @api_client.config.logger.debug 'Calling API: UsersApi.dismiss_pending_sso_link ...'
90
+ @api_client.config.logger.debug 'Calling API: UsersApi.confirm_pending_sso_link ...'
97
91
  end
98
92
  # verify the required parameter 'id' is set
99
93
  if @api_client.config.client_side_validation && id.nil?
100
- fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.dismiss_pending_sso_link"
94
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.confirm_pending_sso_link"
101
95
  end
102
96
  # resource path
103
- local_var_path = '/users/me/pending-sso-links/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
97
+ local_var_path = '/users/me/pending-sso-links/{id}/confirm'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
104
98
 
105
99
  # query parameters
106
100
  query_params = opts[:query_params] || {}
@@ -121,7 +115,7 @@ module DaytonaApiClient
121
115
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
122
116
 
123
117
  new_options = opts.merge(
124
- :operation => :"UsersApi.dismiss_pending_sso_link",
118
+ :operation => :"UsersApi.confirm_pending_sso_link",
125
119
  :header_params => header_params,
126
120
  :query_params => query_params,
127
121
  :form_params => form_params,
@@ -130,38 +124,42 @@ module DaytonaApiClient
130
124
  :return_type => return_type
131
125
  )
132
126
 
133
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
127
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
134
128
  if @api_client.config.debugging
135
- @api_client.config.logger.debug "API called: UsersApi#dismiss_pending_sso_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ @api_client.config.logger.debug "API called: UsersApi#confirm_pending_sso_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
136
130
  end
137
131
  return data, status_code, headers
138
132
  end
139
133
 
140
- # Enroll in SMS MFA
134
+ # Dismiss a pending SSO account link
135
+ # @param id [String]
141
136
  # @param [Hash] opts the optional parameters
142
- # @return [String]
143
- def enroll_in_sms_mfa(opts = {})
144
- data, _status_code, _headers = enroll_in_sms_mfa_with_http_info(opts)
145
- data
137
+ # @return [nil]
138
+ def dismiss_pending_sso_link(id, opts = {})
139
+ dismiss_pending_sso_link_with_http_info(id, opts)
140
+ nil
146
141
  end
147
142
 
148
- # Enroll in SMS MFA
143
+ # Dismiss a pending SSO account link
144
+ # @param id [String]
149
145
  # @param [Hash] opts the optional parameters
150
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
151
- def enroll_in_sms_mfa_with_http_info(opts = {})
146
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
147
+ def dismiss_pending_sso_link_with_http_info(id, opts = {})
152
148
  if @api_client.config.debugging
153
- @api_client.config.logger.debug 'Calling API: UsersApi.enroll_in_sms_mfa ...'
149
+ @api_client.config.logger.debug 'Calling API: UsersApi.dismiss_pending_sso_link ...'
150
+ end
151
+ # verify the required parameter 'id' is set
152
+ if @api_client.config.client_side_validation && id.nil?
153
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.dismiss_pending_sso_link"
154
154
  end
155
155
  # resource path
156
- local_var_path = '/users/mfa/sms/enroll'
156
+ local_var_path = '/users/me/pending-sso-links/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
157
157
 
158
158
  # query parameters
159
159
  query_params = opts[:query_params] || {}
160
160
 
161
161
  # header parameters
162
162
  header_params = opts[:header_params] || {}
163
- # HTTP header 'Accept' (if needed)
164
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
165
163
 
166
164
  # form parameters
167
165
  form_params = opts[:form_params] || {}
@@ -170,13 +168,13 @@ module DaytonaApiClient
170
168
  post_body = opts[:debug_body]
171
169
 
172
170
  # return_type
173
- return_type = opts[:debug_return_type] || 'String'
171
+ return_type = opts[:debug_return_type]
174
172
 
175
173
  # auth_names
176
174
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
177
175
 
178
176
  new_options = opts.merge(
179
- :operation => :"UsersApi.enroll_in_sms_mfa",
177
+ :operation => :"UsersApi.dismiss_pending_sso_link",
180
178
  :header_params => header_params,
181
179
  :query_params => query_params,
182
180
  :form_params => form_params,
@@ -185,30 +183,32 @@ module DaytonaApiClient
185
183
  :return_type => return_type
186
184
  )
187
185
 
188
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
186
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
189
187
  if @api_client.config.debugging
190
- @api_client.config.logger.debug "API called: UsersApi#enroll_in_sms_mfa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
188
+ @api_client.config.logger.debug "API called: UsersApi#dismiss_pending_sso_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
191
189
  end
192
190
  return data, status_code, headers
193
191
  end
194
192
 
195
- # Get authenticated user
193
+ # Get account providers
194
+ # Social sign-in providers (Google, GitHub, ...) enabled for this environment, each flagged with whether the authenticated user has an identity linked through it.
196
195
  # @param [Hash] opts the optional parameters
197
- # @return [User]
198
- def get_authenticated_user(opts = {})
199
- data, _status_code, _headers = get_authenticated_user_with_http_info(opts)
196
+ # @return [Array<AccountProvider>]
197
+ def get_account_providers(opts = {})
198
+ data, _status_code, _headers = get_account_providers_with_http_info(opts)
200
199
  data
201
200
  end
202
201
 
203
- # Get authenticated user
202
+ # Get account providers
203
+ # Social sign-in providers (Google, GitHub, ...) enabled for this environment, each flagged with whether the authenticated user has an identity linked through it.
204
204
  # @param [Hash] opts the optional parameters
205
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
206
- def get_authenticated_user_with_http_info(opts = {})
205
+ # @return [Array<(Array<AccountProvider>, Integer, Hash)>] Array<AccountProvider> data, response status code and response headers
206
+ def get_account_providers_with_http_info(opts = {})
207
207
  if @api_client.config.debugging
208
- @api_client.config.logger.debug 'Calling API: UsersApi.get_authenticated_user ...'
208
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_account_providers ...'
209
209
  end
210
210
  # resource path
211
- local_var_path = '/users/me'
211
+ local_var_path = '/users/account-providers'
212
212
 
213
213
  # query parameters
214
214
  query_params = opts[:query_params] || {}
@@ -225,13 +225,13 @@ module DaytonaApiClient
225
225
  post_body = opts[:debug_body]
226
226
 
227
227
  # return_type
228
- return_type = opts[:debug_return_type] || 'User'
228
+ return_type = opts[:debug_return_type] || 'Array<AccountProvider>'
229
229
 
230
230
  # auth_names
231
231
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
232
232
 
233
233
  new_options = opts.merge(
234
- :operation => :"UsersApi.get_authenticated_user",
234
+ :operation => :"UsersApi.get_account_providers",
235
235
  :header_params => header_params,
236
236
  :query_params => query_params,
237
237
  :form_params => form_params,
@@ -242,28 +242,28 @@ module DaytonaApiClient
242
242
 
243
243
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
244
244
  if @api_client.config.debugging
245
- @api_client.config.logger.debug "API called: UsersApi#get_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ @api_client.config.logger.debug "API called: UsersApi#get_account_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
246
246
  end
247
247
  return data, status_code, headers
248
248
  end
249
249
 
250
- # Get available account providers
250
+ # Get authenticated user
251
251
  # @param [Hash] opts the optional parameters
252
- # @return [Array<AccountProvider>]
253
- def get_available_account_providers(opts = {})
254
- data, _status_code, _headers = get_available_account_providers_with_http_info(opts)
252
+ # @return [User]
253
+ def get_authenticated_user(opts = {})
254
+ data, _status_code, _headers = get_authenticated_user_with_http_info(opts)
255
255
  data
256
256
  end
257
257
 
258
- # Get available account providers
258
+ # Get authenticated user
259
259
  # @param [Hash] opts the optional parameters
260
- # @return [Array<(Array<AccountProvider>, Integer, Hash)>] Array<AccountProvider> data, response status code and response headers
261
- def get_available_account_providers_with_http_info(opts = {})
260
+ # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
261
+ def get_authenticated_user_with_http_info(opts = {})
262
262
  if @api_client.config.debugging
263
- @api_client.config.logger.debug 'Calling API: UsersApi.get_available_account_providers ...'
263
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_authenticated_user ...'
264
264
  end
265
265
  # resource path
266
- local_var_path = '/users/account-providers'
266
+ local_var_path = '/users/me'
267
267
 
268
268
  # query parameters
269
269
  query_params = opts[:query_params] || {}
@@ -280,13 +280,13 @@ module DaytonaApiClient
280
280
  post_body = opts[:debug_body]
281
281
 
282
282
  # return_type
283
- return_type = opts[:debug_return_type] || 'Array<AccountProvider>'
283
+ return_type = opts[:debug_return_type] || 'User'
284
284
 
285
285
  # auth_names
286
286
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
287
287
 
288
288
  new_options = opts.merge(
289
- :operation => :"UsersApi.get_available_account_providers",
289
+ :operation => :"UsersApi.get_authenticated_user",
290
290
  :header_params => header_params,
291
291
  :query_params => query_params,
292
292
  :form_params => form_params,
@@ -297,12 +297,13 @@ module DaytonaApiClient
297
297
 
298
298
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
299
299
  if @api_client.config.debugging
300
- @api_client.config.logger.debug "API called: UsersApi#get_available_account_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
+ @api_client.config.logger.debug "API called: UsersApi#get_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
301
  end
302
302
  return data, status_code, headers
303
303
  end
304
304
 
305
- # Link account
305
+ # Link account (withdrawn)
306
+ # Withdrawn. This operation is no longer supported and always responds 410.
306
307
  # @param create_linked_account [CreateLinkedAccount]
307
308
  # @param [Hash] opts the optional parameters
308
309
  # @return [nil]
@@ -311,7 +312,8 @@ module DaytonaApiClient
311
312
  nil
312
313
  end
313
314
 
314
- # Link account
315
+ # Link account (withdrawn)
316
+ # Withdrawn. This operation is no longer supported and always responds 410.
315
317
  # @param create_linked_account [CreateLinkedAccount]
316
318
  # @param [Hash] opts the optional parameters
317
319
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -421,35 +423,25 @@ module DaytonaApiClient
421
423
  return data, status_code, headers
422
424
  end
423
425
 
424
- # Unlink account
425
- # @param provider [String]
426
- # @param provider_user_id [String]
426
+ # Record a completed login
427
+ # Called by the dashboard once per completed sign-in. The email access gate evaluates the user and reports the login to analytics; a refused user receives 403 with code EMAIL_ACCESS_DENIED.
427
428
  # @param [Hash] opts the optional parameters
428
429
  # @return [nil]
429
- def unlink_account(provider, provider_user_id, opts = {})
430
- unlink_account_with_http_info(provider, provider_user_id, opts)
430
+ def record_login(opts = {})
431
+ record_login_with_http_info(opts)
431
432
  nil
432
433
  end
433
434
 
434
- # Unlink account
435
- # @param provider [String]
436
- # @param provider_user_id [String]
435
+ # Record a completed login
436
+ # Called by the dashboard once per completed sign-in. The email access gate evaluates the user and reports the login to analytics; a refused user receives 403 with code EMAIL_ACCESS_DENIED.
437
437
  # @param [Hash] opts the optional parameters
438
438
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
439
- def unlink_account_with_http_info(provider, provider_user_id, opts = {})
439
+ def record_login_with_http_info(opts = {})
440
440
  if @api_client.config.debugging
441
- @api_client.config.logger.debug 'Calling API: UsersApi.unlink_account ...'
442
- end
443
- # verify the required parameter 'provider' is set
444
- if @api_client.config.client_side_validation && provider.nil?
445
- fail ArgumentError, "Missing the required parameter 'provider' when calling UsersApi.unlink_account"
446
- end
447
- # verify the required parameter 'provider_user_id' is set
448
- if @api_client.config.client_side_validation && provider_user_id.nil?
449
- fail ArgumentError, "Missing the required parameter 'provider_user_id' when calling UsersApi.unlink_account"
441
+ @api_client.config.logger.debug 'Calling API: UsersApi.record_login ...'
450
442
  end
451
443
  # resource path
452
- local_var_path = '/users/linked-accounts/{provider}/{providerUserId}'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s)).sub('{' + 'providerUserId' + '}', CGI.escape(provider_user_id.to_s))
444
+ local_var_path = '/users/me/logins'
453
445
 
454
446
  # query parameters
455
447
  query_params = opts[:query_params] || {}
@@ -470,7 +462,7 @@ module DaytonaApiClient
470
462
  auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
471
463
 
472
464
  new_options = opts.merge(
473
- :operation => :"UsersApi.unlink_account",
465
+ :operation => :"UsersApi.record_login",
474
466
  :header_params => header_params,
475
467
  :query_params => query_params,
476
468
  :form_params => form_params,
@@ -479,9 +471,9 @@ module DaytonaApiClient
479
471
  :return_type => return_type
480
472
  )
481
473
 
482
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
474
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
483
475
  if @api_client.config.debugging
484
- @api_client.config.logger.debug "API called: UsersApi#unlink_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
476
+ @api_client.config.logger.debug "API called: UsersApi#record_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
485
477
  end
486
478
  return data, status_code, headers
487
479
  end