stackone_client 0.39.2 → 0.39.3
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.
- checksums.yaml +4 -4
- data/lib/crystalline/metadata_fields.rb +9 -16
- data/lib/crystalline/types.rb +23 -18
- data/lib/stack_one/ats.rb +1549 -932
- data/lib/stack_one/lms.rb +4 -311
- data/lib/stack_one/models/operations/{lms_update_content_request.rb → ats_create_interview_note_request.rb} +6 -6
- data/lib/stack_one/models/operations/ats_create_interview_note_request.rbi +17 -0
- data/lib/stack_one/models/operations/ats_create_interview_note_response.rb +49 -0
- data/lib/stack_one/models/operations/ats_create_interview_note_response.rbi +21 -0
- data/lib/stack_one/models/operations/ats_update_interview_note_request.rb +45 -0
- data/lib/stack_one/models/operations/ats_update_interview_note_request.rbi +19 -0
- data/lib/stack_one/models/operations/{lms_update_content_response.rb → ats_update_interview_note_response.rb} +2 -2
- data/lib/stack_one/models/operations/{lms_update_content_response.rbi → ats_update_interview_note_response.rbi} +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_shifts_queryparam_filter.rb +1 -1
- data/lib/stack_one/models/operations/hris_list_employee_shifts_request.rb +1 -1
- data/lib/stack_one/models/operations.rb +4 -2
- data/lib/stack_one/models/shared/connectsession.rb +6 -2
- data/lib/stack_one/models/shared/connectsession.rbi +2 -0
- data/lib/stack_one/models/shared/connectsessioncreate.rb +6 -2
- data/lib/stack_one/models/shared/connectsessioncreate.rbi +2 -0
- data/lib/stack_one/models/shared/connectsessiontokenauthlink.rb +6 -2
- data/lib/stack_one/models/shared/connectsessiontokenauthlink.rbi +2 -0
- data/lib/stack_one/models/shared/employee.rb +2 -6
- data/lib/stack_one/models/shared/employee.rbi +0 -2
- data/lib/stack_one/models/shared/employmentmanagerapimodel.rb +10 -2
- data/lib/stack_one/models/shared/employmentmanagerapimodel.rbi +4 -0
- data/lib/stack_one/models/shared/patchaccountexternaldto.rb +6 -2
- data/lib/stack_one/models/shared/patchaccountexternaldto.rbi +2 -0
- data/lib/stack_one/models/shared.rb +0 -8
- data/lib/stack_one/sdk_hooks/hooks.rb +0 -3
- data/lib/stack_one/sdkconfiguration.rb +3 -3
- data/lib/stack_one/utils/forms.rb +1 -1
- metadata +10 -22
- data/lib/stack_one/models/operations/lms_update_content_request.rbi +0 -17
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto.rb +0 -115
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto.rbi +0 -53
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_2.rb +0 -22
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_2.rbi +0 -11
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_4.rb +0 -28
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_4.rbi +0 -11
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_active.rb +0 -28
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_active.rbi +0 -11
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_content_type.rb +0 -37
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_content_type.rbi +0 -15
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_source_value.rb +0 -28
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_source_value.rbi +0 -11
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_value.rb +0 -31
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_value.rbi +0 -11
- data/lib/stack_one/models/shared/manager.rb +0 -45
- data/lib/stack_one/models/shared/manager.rbi +0 -19
data/lib/stack_one/lms.rb
CHANGED
|
@@ -45,6 +45,8 @@ module StackOne
|
|
|
45
45
|
# batch_upsert_content - Batch Upsert External Linking Learning Objects
|
|
46
46
|
# Batch upsert multiple external linking learning objects that redirect users to a provider platform for consumption and progress tracking.
|
|
47
47
|
#
|
|
48
|
+
# **Note:** Partial updates are not supported. When updating content, you must provide all the same fields that are required when creating content.
|
|
49
|
+
#
|
|
48
50
|
# See [here](https://docs.stackone.com/integration-guides/lms/external-content-providers/introduction) for more information about external linking learning objects.
|
|
49
51
|
request = Models::Operations::LmsBatchUpsertContentRequest.new(
|
|
50
52
|
lms_batch_upsert_content_request_dto: lms_batch_upsert_content_request_dto,
|
|
@@ -6822,322 +6824,13 @@ module StackOne
|
|
|
6822
6824
|
end
|
|
6823
6825
|
|
|
6824
6826
|
|
|
6825
|
-
sig { params(lms_create_content_request_dto: Models::Shared::LmsCreateContentRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::LmsUpdateContentResponse) }
|
|
6826
|
-
def update_content(lms_create_content_request_dto:, id:, x_account_id:, retries: nil, timeout_ms: nil)
|
|
6827
|
-
# update_content - Update External Linking Learning Objects
|
|
6828
|
-
# Update an external linking learning object that redirects users to a provider platform for consumption and progress tracking.
|
|
6829
|
-
#
|
|
6830
|
-
# See [here](https://docs.stackone.com/integration-guides/lms/external-content-providers/introduction) for more information about external linking learning objects.
|
|
6831
|
-
request = Models::Operations::LmsUpdateContentRequest.new(
|
|
6832
|
-
lms_create_content_request_dto: lms_create_content_request_dto,
|
|
6833
|
-
id: id,
|
|
6834
|
-
x_account_id: x_account_id
|
|
6835
|
-
)
|
|
6836
|
-
url, params = @sdk_configuration.get_server_details
|
|
6837
|
-
base_url = Utils.template_url(url, params)
|
|
6838
|
-
url = Utils.generate_url(
|
|
6839
|
-
Models::Operations::LmsUpdateContentRequest,
|
|
6840
|
-
base_url,
|
|
6841
|
-
'/unified/lms/content/{id}',
|
|
6842
|
-
request
|
|
6843
|
-
)
|
|
6844
|
-
headers = Utils.get_headers(request)
|
|
6845
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
6846
|
-
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :lms_create_content_request_dto, :json)
|
|
6847
|
-
headers['content-type'] = req_content_type
|
|
6848
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
6849
|
-
|
|
6850
|
-
if form
|
|
6851
|
-
body = Utils.encode_form(form)
|
|
6852
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
6853
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
6854
|
-
else
|
|
6855
|
-
body = data
|
|
6856
|
-
end
|
|
6857
|
-
headers['Accept'] = 'application/json'
|
|
6858
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
|
6859
|
-
retries ||= @sdk_configuration.retry_config
|
|
6860
|
-
retries ||= Utils::RetryConfig.new(
|
|
6861
|
-
backoff: Utils::BackoffStrategy.new(
|
|
6862
|
-
exponent: 1.5,
|
|
6863
|
-
initial_interval: 500,
|
|
6864
|
-
max_elapsed_time: 3_600_000,
|
|
6865
|
-
max_interval: 60_000
|
|
6866
|
-
),
|
|
6867
|
-
retry_connection_errors: true,
|
|
6868
|
-
strategy: 'backoff'
|
|
6869
|
-
)
|
|
6870
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
6871
|
-
retry_options[:retry_statuses] = [429, 408]
|
|
6872
|
-
|
|
6873
|
-
security = @sdk_configuration.security_source&.call
|
|
6874
|
-
|
|
6875
|
-
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
6876
|
-
timeout ||= @sdk_configuration.timeout
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
connection = @sdk_configuration.client.dup
|
|
6880
|
-
connection.request :retry, retry_options
|
|
6881
|
-
|
|
6882
|
-
hook_ctx = SDKHooks::HookContext.new(
|
|
6883
|
-
config: @sdk_configuration,
|
|
6884
|
-
base_url: base_url,
|
|
6885
|
-
oauth2_scopes: nil,
|
|
6886
|
-
operation_id: 'lms_update_content',
|
|
6887
|
-
security_source: @sdk_configuration.security_source
|
|
6888
|
-
)
|
|
6889
|
-
|
|
6890
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
6891
|
-
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
begin
|
|
6895
|
-
http_response = T.must(connection).patch(url) do |req|
|
|
6896
|
-
req.body = body
|
|
6897
|
-
req.headers.merge!(headers)
|
|
6898
|
-
req.options.timeout = timeout unless timeout.nil?
|
|
6899
|
-
Utils.configure_request_security(req, security)
|
|
6900
|
-
|
|
6901
|
-
@sdk_configuration.hooks.before_request(
|
|
6902
|
-
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
6903
|
-
hook_ctx: hook_ctx
|
|
6904
|
-
),
|
|
6905
|
-
request: req
|
|
6906
|
-
)
|
|
6907
|
-
end
|
|
6908
|
-
rescue StandardError => e
|
|
6909
|
-
error = e
|
|
6910
|
-
ensure
|
|
6911
|
-
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
6912
|
-
http_response = @sdk_configuration.hooks.after_error(
|
|
6913
|
-
error: error,
|
|
6914
|
-
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
6915
|
-
hook_ctx: hook_ctx
|
|
6916
|
-
),
|
|
6917
|
-
response: http_response
|
|
6918
|
-
)
|
|
6919
|
-
else
|
|
6920
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
6921
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
6922
|
-
hook_ctx: hook_ctx
|
|
6923
|
-
),
|
|
6924
|
-
response: http_response
|
|
6925
|
-
)
|
|
6926
|
-
end
|
|
6927
|
-
|
|
6928
|
-
if http_response.nil?
|
|
6929
|
-
raise error if !error.nil?
|
|
6930
|
-
raise 'no response'
|
|
6931
|
-
end
|
|
6932
|
-
end
|
|
6933
|
-
|
|
6934
|
-
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
6935
|
-
if Utils.match_status_code(http_response.status, ['201'])
|
|
6936
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
6937
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
6938
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
6939
|
-
hook_ctx: hook_ctx
|
|
6940
|
-
),
|
|
6941
|
-
response: http_response
|
|
6942
|
-
)
|
|
6943
|
-
response_data = http_response.env.response_body
|
|
6944
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::UpdateResult)
|
|
6945
|
-
response = Models::Operations::LmsUpdateContentResponse.new(
|
|
6946
|
-
status_code: http_response.status,
|
|
6947
|
-
content_type: content_type,
|
|
6948
|
-
raw_response: http_response,
|
|
6949
|
-
headers: {},
|
|
6950
|
-
update_result: T.unsafe(obj)
|
|
6951
|
-
)
|
|
6952
|
-
|
|
6953
|
-
return response
|
|
6954
|
-
else
|
|
6955
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
6956
|
-
end
|
|
6957
|
-
elsif Utils.match_status_code(http_response.status, ['400'])
|
|
6958
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
6959
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
6960
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
6961
|
-
hook_ctx: hook_ctx
|
|
6962
|
-
),
|
|
6963
|
-
response: http_response
|
|
6964
|
-
)
|
|
6965
|
-
response_data = http_response.env.response_body
|
|
6966
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestResponse)
|
|
6967
|
-
raise obj
|
|
6968
|
-
else
|
|
6969
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
6970
|
-
end
|
|
6971
|
-
elsif Utils.match_status_code(http_response.status, ['401'])
|
|
6972
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
6973
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
6974
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
6975
|
-
hook_ctx: hook_ctx
|
|
6976
|
-
),
|
|
6977
|
-
response: http_response
|
|
6978
|
-
)
|
|
6979
|
-
response_data = http_response.env.response_body
|
|
6980
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UnauthorizedResponse)
|
|
6981
|
-
raise obj
|
|
6982
|
-
else
|
|
6983
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
6984
|
-
end
|
|
6985
|
-
elsif Utils.match_status_code(http_response.status, ['403'])
|
|
6986
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
6987
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
6988
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
6989
|
-
hook_ctx: hook_ctx
|
|
6990
|
-
),
|
|
6991
|
-
response: http_response
|
|
6992
|
-
)
|
|
6993
|
-
response_data = http_response.env.response_body
|
|
6994
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ForbiddenResponse)
|
|
6995
|
-
raise obj
|
|
6996
|
-
else
|
|
6997
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
6998
|
-
end
|
|
6999
|
-
elsif Utils.match_status_code(http_response.status, ['404'])
|
|
7000
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7001
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7002
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7003
|
-
hook_ctx: hook_ctx
|
|
7004
|
-
),
|
|
7005
|
-
response: http_response
|
|
7006
|
-
)
|
|
7007
|
-
response_data = http_response.env.response_body
|
|
7008
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundResponse)
|
|
7009
|
-
raise obj
|
|
7010
|
-
else
|
|
7011
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7012
|
-
end
|
|
7013
|
-
elsif Utils.match_status_code(http_response.status, ['408'])
|
|
7014
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7015
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7016
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7017
|
-
hook_ctx: hook_ctx
|
|
7018
|
-
),
|
|
7019
|
-
response: http_response
|
|
7020
|
-
)
|
|
7021
|
-
response_data = http_response.env.response_body
|
|
7022
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RequestTimedOutResponse)
|
|
7023
|
-
raise obj
|
|
7024
|
-
else
|
|
7025
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7026
|
-
end
|
|
7027
|
-
elsif Utils.match_status_code(http_response.status, ['409'])
|
|
7028
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7029
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7030
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7031
|
-
hook_ctx: hook_ctx
|
|
7032
|
-
),
|
|
7033
|
-
response: http_response
|
|
7034
|
-
)
|
|
7035
|
-
response_data = http_response.env.response_body
|
|
7036
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ConflictResponse)
|
|
7037
|
-
raise obj
|
|
7038
|
-
else
|
|
7039
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7040
|
-
end
|
|
7041
|
-
elsif Utils.match_status_code(http_response.status, ['412'])
|
|
7042
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7043
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7044
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7045
|
-
hook_ctx: hook_ctx
|
|
7046
|
-
),
|
|
7047
|
-
response: http_response
|
|
7048
|
-
)
|
|
7049
|
-
response_data = http_response.env.response_body
|
|
7050
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PreconditionFailedResponse)
|
|
7051
|
-
raise obj
|
|
7052
|
-
else
|
|
7053
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7054
|
-
end
|
|
7055
|
-
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
7056
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7057
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7058
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7059
|
-
hook_ctx: hook_ctx
|
|
7060
|
-
),
|
|
7061
|
-
response: http_response
|
|
7062
|
-
)
|
|
7063
|
-
response_data = http_response.env.response_body
|
|
7064
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UnprocessableEntityResponse)
|
|
7065
|
-
raise obj
|
|
7066
|
-
else
|
|
7067
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7068
|
-
end
|
|
7069
|
-
elsif Utils.match_status_code(http_response.status, ['429'])
|
|
7070
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7071
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7072
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7073
|
-
hook_ctx: hook_ctx
|
|
7074
|
-
),
|
|
7075
|
-
response: http_response
|
|
7076
|
-
)
|
|
7077
|
-
response_data = http_response.env.response_body
|
|
7078
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::TooManyRequestsResponse)
|
|
7079
|
-
raise obj
|
|
7080
|
-
else
|
|
7081
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7082
|
-
end
|
|
7083
|
-
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
7084
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7085
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7086
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7087
|
-
hook_ctx: hook_ctx
|
|
7088
|
-
),
|
|
7089
|
-
response: http_response
|
|
7090
|
-
)
|
|
7091
|
-
response_data = http_response.env.response_body
|
|
7092
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerErrorResponse)
|
|
7093
|
-
raise obj
|
|
7094
|
-
else
|
|
7095
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7096
|
-
end
|
|
7097
|
-
elsif Utils.match_status_code(http_response.status, ['501'])
|
|
7098
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7099
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7100
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7101
|
-
hook_ctx: hook_ctx
|
|
7102
|
-
),
|
|
7103
|
-
response: http_response
|
|
7104
|
-
)
|
|
7105
|
-
response_data = http_response.env.response_body
|
|
7106
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotImplementedResponse)
|
|
7107
|
-
raise obj
|
|
7108
|
-
else
|
|
7109
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7110
|
-
end
|
|
7111
|
-
elsif Utils.match_status_code(http_response.status, ['502'])
|
|
7112
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
7113
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
7114
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
7115
|
-
hook_ctx: hook_ctx
|
|
7116
|
-
),
|
|
7117
|
-
response: http_response
|
|
7118
|
-
)
|
|
7119
|
-
response_data = http_response.env.response_body
|
|
7120
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadGatewayResponse)
|
|
7121
|
-
raise obj
|
|
7122
|
-
else
|
|
7123
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
7124
|
-
end
|
|
7125
|
-
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
7126
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
7127
|
-
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
7128
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
7129
|
-
else
|
|
7130
|
-
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
7131
|
-
|
|
7132
|
-
end
|
|
7133
|
-
end
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
6827
|
sig { params(lms_upsert_content_request_dto: Models::Shared::LmsUpsertContentRequestDto, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::LmsUpsertContentResponse) }
|
|
7137
6828
|
def upsert_content(lms_upsert_content_request_dto:, x_account_id:, retries: nil, timeout_ms: nil)
|
|
7138
6829
|
# upsert_content - Upsert External Linking Learning Objects
|
|
7139
6830
|
# Create or update an external linking learning object that redirects users to a provider platform for consumption and progress tracking.
|
|
7140
6831
|
#
|
|
6832
|
+
# **Note:** Partial updates are not supported. When updating content, you must provide all the same fields that are required when creating content.
|
|
6833
|
+
#
|
|
7141
6834
|
# See [here](https://docs.stackone.com/integration-guides/lms/external-content-providers/introduction) for more information about external linking learning objects.
|
|
7142
6835
|
request = Models::Operations::LmsUpsertContentRequest.new(
|
|
7143
6836
|
lms_upsert_content_request_dto: lms_upsert_content_request_dto,
|
|
@@ -9,20 +9,20 @@ module StackOne
|
|
|
9
9
|
module Operations
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class AtsCreateInterviewNoteRequest
|
|
13
13
|
extend T::Sig
|
|
14
14
|
include Crystalline::MetadataFields
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
field :
|
|
17
|
+
field :ats_create_notes_request_dto, Models::Shared::AtsCreateNotesRequestDto, { 'request': { 'media_type': 'application/json' } }
|
|
18
18
|
|
|
19
19
|
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
|
20
20
|
# The account identifier
|
|
21
21
|
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
|
22
22
|
|
|
23
|
-
sig { params(
|
|
24
|
-
def initialize(
|
|
25
|
-
@
|
|
23
|
+
sig { params(ats_create_notes_request_dto: Models::Shared::AtsCreateNotesRequestDto, id: ::String, x_account_id: ::String).void }
|
|
24
|
+
def initialize(ats_create_notes_request_dto:, id:, x_account_id:)
|
|
25
|
+
@ats_create_notes_request_dto = ats_create_notes_request_dto
|
|
26
26
|
@id = id
|
|
27
27
|
@x_account_id = x_account_id
|
|
28
28
|
end
|
|
@@ -30,7 +30,7 @@ module StackOne
|
|
|
30
30
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
31
31
|
def ==(other)
|
|
32
32
|
return false unless other.is_a? self.class
|
|
33
|
-
return false unless @
|
|
33
|
+
return false unless @ats_create_notes_request_dto == other.ats_create_notes_request_dto
|
|
34
34
|
return false unless @id == other.id
|
|
35
35
|
return false unless @x_account_id == other.x_account_id
|
|
36
36
|
true
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class StackOne::Models::Operations::AtsCreateInterviewNoteRequest
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class StackOne::Models::Operations::AtsCreateInterviewNoteRequest
|
|
11
|
+
def ats_create_notes_request_dto(); end
|
|
12
|
+
def ats_create_notes_request_dto=(str_); end
|
|
13
|
+
def id(); end
|
|
14
|
+
def id=(str_); end
|
|
15
|
+
def x_account_id(); end
|
|
16
|
+
def x_account_id=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module StackOne
|
|
8
|
+
module Models
|
|
9
|
+
module Operations
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AtsCreateInterviewNoteResponse
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
# HTTP response content type for this operation
|
|
17
|
+
field :content_type, ::String
|
|
18
|
+
|
|
19
|
+
field :headers, Crystalline::Hash.new(Symbol, Crystalline::Array.new(::String))
|
|
20
|
+
# HTTP response status code for this operation
|
|
21
|
+
field :status_code, ::Integer
|
|
22
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
23
|
+
field :raw_response, ::Faraday::Response
|
|
24
|
+
# Record created successfully.
|
|
25
|
+
field :create_result, Crystalline::Nilable.new(Models::Shared::CreateResult)
|
|
26
|
+
|
|
27
|
+
sig { params(content_type: ::String, headers: T::Hash[Symbol, T::Array[::String]], status_code: ::Integer, raw_response: ::Faraday::Response, create_result: T.nilable(Models::Shared::CreateResult)).void }
|
|
28
|
+
def initialize(content_type:, headers:, status_code:, raw_response:, create_result: nil)
|
|
29
|
+
@content_type = content_type
|
|
30
|
+
@headers = headers
|
|
31
|
+
@status_code = status_code
|
|
32
|
+
@raw_response = raw_response
|
|
33
|
+
@create_result = create_result
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
37
|
+
def ==(other)
|
|
38
|
+
return false unless other.is_a? self.class
|
|
39
|
+
return false unless @content_type == other.content_type
|
|
40
|
+
return false unless @headers == other.headers
|
|
41
|
+
return false unless @status_code == other.status_code
|
|
42
|
+
return false unless @raw_response == other.raw_response
|
|
43
|
+
return false unless @create_result == other.create_result
|
|
44
|
+
true
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class StackOne::Models::Operations::AtsCreateInterviewNoteResponse
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class StackOne::Models::Operations::AtsCreateInterviewNoteResponse
|
|
11
|
+
def content_type(); end
|
|
12
|
+
def content_type=(str_); end
|
|
13
|
+
def headers(); end
|
|
14
|
+
def headers=(str_); end
|
|
15
|
+
def status_code(); end
|
|
16
|
+
def status_code=(str_); end
|
|
17
|
+
def raw_response(); end
|
|
18
|
+
def raw_response=(str_); end
|
|
19
|
+
def create_result(); end
|
|
20
|
+
def create_result=(str_); end
|
|
21
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module StackOne
|
|
8
|
+
module Models
|
|
9
|
+
module Operations
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AtsUpdateInterviewNoteRequest
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :ats_update_notes_request_dto, Models::Shared::AtsUpdateNotesRequestDto, { 'request': { 'media_type': 'application/json' } }
|
|
18
|
+
|
|
19
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
|
20
|
+
|
|
21
|
+
field :sub_resource_id, ::String, { 'path_param': { 'field_name': 'subResourceId', 'style': 'simple', 'explode': false } }
|
|
22
|
+
# The account identifier
|
|
23
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
|
24
|
+
|
|
25
|
+
sig { params(ats_update_notes_request_dto: Models::Shared::AtsUpdateNotesRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String).void }
|
|
26
|
+
def initialize(ats_update_notes_request_dto:, id:, sub_resource_id:, x_account_id:)
|
|
27
|
+
@ats_update_notes_request_dto = ats_update_notes_request_dto
|
|
28
|
+
@id = id
|
|
29
|
+
@sub_resource_id = sub_resource_id
|
|
30
|
+
@x_account_id = x_account_id
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
34
|
+
def ==(other)
|
|
35
|
+
return false unless other.is_a? self.class
|
|
36
|
+
return false unless @ats_update_notes_request_dto == other.ats_update_notes_request_dto
|
|
37
|
+
return false unless @id == other.id
|
|
38
|
+
return false unless @sub_resource_id == other.sub_resource_id
|
|
39
|
+
return false unless @x_account_id == other.x_account_id
|
|
40
|
+
true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class StackOne::Models::Operations::AtsUpdateInterviewNoteRequest
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class StackOne::Models::Operations::AtsUpdateInterviewNoteRequest
|
|
11
|
+
def ats_update_notes_request_dto(); end
|
|
12
|
+
def ats_update_notes_request_dto=(str_); end
|
|
13
|
+
def id(); end
|
|
14
|
+
def id=(str_); end
|
|
15
|
+
def sub_resource_id(); end
|
|
16
|
+
def sub_resource_id=(str_); end
|
|
17
|
+
def x_account_id(); end
|
|
18
|
+
def x_account_id=(str_); end
|
|
19
|
+
end
|
|
@@ -9,7 +9,7 @@ module StackOne
|
|
|
9
9
|
module Operations
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class AtsUpdateInterviewNoteResponse
|
|
13
13
|
extend T::Sig
|
|
14
14
|
include Crystalline::MetadataFields
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ module StackOne
|
|
|
21
21
|
field :status_code, ::Integer
|
|
22
22
|
# Raw HTTP response; suitable for custom response parsing
|
|
23
23
|
field :raw_response, ::Faraday::Response
|
|
24
|
-
#
|
|
24
|
+
# Record updated successfully.
|
|
25
25
|
field :update_result, Crystalline::Nilable.new(Models::Shared::UpdateResult)
|
|
26
26
|
|
|
27
27
|
sig { params(content_type: ::String, headers: T::Hash[Symbol, T::Array[::String]], status_code: ::Integer, raw_response: ::Faraday::Response, update_result: T.nilable(Models::Shared::UpdateResult)).void }
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class StackOne::Models::Operations::
|
|
5
|
+
class StackOne::Models::Operations::AtsUpdateInterviewNoteResponse
|
|
6
6
|
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class StackOne::Models::Operations::
|
|
10
|
+
class StackOne::Models::Operations::AtsUpdateInterviewNoteResponse
|
|
11
11
|
def content_type(); end
|
|
12
12
|
def content_type=(str_); end
|
|
13
13
|
def headers(); end
|
|
@@ -19,7 +19,7 @@ module StackOne
|
|
|
19
19
|
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
|
20
20
|
# The comma separated list of fields to return in the response (if empty, all fields are returned)
|
|
21
21
|
field :fields_, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'fields', 'style': 'form', 'explode': true } }
|
|
22
|
-
# HRIS Shifts filters
|
|
22
|
+
# HRIS Employee Shifts filters
|
|
23
23
|
field :filter, Crystalline::Nilable.new(Models::Operations::HrisListEmployeeShiftsQueryParamFilter), { 'query_param': { 'field_name': 'filter', 'style': 'deepObject', 'explode': true } }
|
|
24
24
|
# The unified cursor
|
|
25
25
|
field :next_, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'next', 'style': 'form', 'explode': true } }
|
|
@@ -41,6 +41,8 @@ module StackOne
|
|
|
41
41
|
autoload :AtsCreateCandidateNoteResponse, 'stack_one/models/operations/ats_create_candidate_note_response.rb'
|
|
42
42
|
autoload :AtsCreateCandidateRequest, 'stack_one/models/operations/ats_create_candidate_request.rb'
|
|
43
43
|
autoload :AtsCreateCandidateResponse, 'stack_one/models/operations/ats_create_candidate_response.rb'
|
|
44
|
+
autoload :AtsCreateInterviewNoteRequest, 'stack_one/models/operations/ats_create_interview_note_request.rb'
|
|
45
|
+
autoload :AtsCreateInterviewNoteResponse, 'stack_one/models/operations/ats_create_interview_note_response.rb'
|
|
44
46
|
autoload :AtsCreateJobRequest, 'stack_one/models/operations/ats_create_job_request.rb'
|
|
45
47
|
autoload :AtsCreateJobResponse, 'stack_one/models/operations/ats_create_job_response.rb'
|
|
46
48
|
autoload :AtsCreateOfferRequest, 'stack_one/models/operations/ats_create_offer_request.rb'
|
|
@@ -205,6 +207,8 @@ module StackOne
|
|
|
205
207
|
autoload :AtsUpdateBackgroundCheckResultResponse, 'stack_one/models/operations/ats_update_background_check_result_response.rb'
|
|
206
208
|
autoload :AtsUpdateCandidateRequest, 'stack_one/models/operations/ats_update_candidate_request.rb'
|
|
207
209
|
autoload :AtsUpdateCandidateResponse, 'stack_one/models/operations/ats_update_candidate_response.rb'
|
|
210
|
+
autoload :AtsUpdateInterviewNoteRequest, 'stack_one/models/operations/ats_update_interview_note_request.rb'
|
|
211
|
+
autoload :AtsUpdateInterviewNoteResponse, 'stack_one/models/operations/ats_update_interview_note_response.rb'
|
|
208
212
|
autoload :AtsUpdateJobRequest, 'stack_one/models/operations/ats_update_job_request.rb'
|
|
209
213
|
autoload :AtsUpdateJobResponse, 'stack_one/models/operations/ats_update_job_response.rb'
|
|
210
214
|
autoload :AtsUploadApplicationDocumentRequest, 'stack_one/models/operations/ats_upload_application_document_request.rb'
|
|
@@ -517,8 +521,6 @@ module StackOne
|
|
|
517
521
|
autoload :LmsListUsersQueryParamFilter, 'stack_one/models/operations/lms_list_users_queryparam_filter.rb'
|
|
518
522
|
autoload :LmsListUsersRequest, 'stack_one/models/operations/lms_list_users_request.rb'
|
|
519
523
|
autoload :LmsListUsersResponse, 'stack_one/models/operations/lms_list_users_response.rb'
|
|
520
|
-
autoload :LmsUpdateContentRequest, 'stack_one/models/operations/lms_update_content_request.rb'
|
|
521
|
-
autoload :LmsUpdateContentResponse, 'stack_one/models/operations/lms_update_content_response.rb'
|
|
522
524
|
autoload :LmsUpsertContentRequest, 'stack_one/models/operations/lms_upsert_content_request.rb'
|
|
523
525
|
autoload :LmsUpsertContentResponse, 'stack_one/models/operations/lms_upsert_content_response.rb'
|
|
524
526
|
autoload :MarketingCreateContentBlockRequest, 'stack_one/models/operations/marketing_create_content_block_request.rb'
|
|
@@ -31,6 +31,8 @@ module StackOne
|
|
|
31
31
|
field :categories, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Categories)), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('categories') } }
|
|
32
32
|
# External trigger token to be used to trigger actions on the account
|
|
33
33
|
field :external_trigger_token, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('external_trigger_token') } }
|
|
34
|
+
# The integration ID (UUID) associated with this connect session
|
|
35
|
+
field :integration_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('integration_id') } }
|
|
34
36
|
|
|
35
37
|
field :label, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('label') } }
|
|
36
38
|
# Arbitrary set of key and values defined during the session token creation. This can be used to tag an account (eg. based on their pricing plan)
|
|
@@ -42,8 +44,8 @@ module StackOne
|
|
|
42
44
|
# The connect session account type
|
|
43
45
|
field :type, Crystalline::Nilable.new(Models::Shared::ConnectSessionType), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('type'), 'decoder': Utils.enum_from_string(Models::Shared::ConnectSessionType, true) } }
|
|
44
46
|
|
|
45
|
-
sig { params(created_at: ::DateTime, id: ::Float, organization_id: ::Float, origin_owner_id: ::String, origin_owner_name: ::String, project_id: ::String, account_id: T.nilable(::String), categories: T.nilable(T::Array[Models::Shared::Categories]), external_trigger_token: T.nilable(::String), label: T.nilable(::String), metadata: T.nilable(Models::Shared::Metadata), origin_username: T.nilable(::String), provider: T.nilable(::String), type: T.nilable(Models::Shared::ConnectSessionType)).void }
|
|
46
|
-
def initialize(created_at:, id:, organization_id:, origin_owner_id:, origin_owner_name:, project_id:, account_id: nil, categories: nil, external_trigger_token: nil, label: nil, metadata: nil, origin_username: nil, provider: nil, type: nil)
|
|
47
|
+
sig { params(created_at: ::DateTime, id: ::Float, organization_id: ::Float, origin_owner_id: ::String, origin_owner_name: ::String, project_id: ::String, account_id: T.nilable(::String), categories: T.nilable(T::Array[Models::Shared::Categories]), external_trigger_token: T.nilable(::String), integration_id: T.nilable(::String), label: T.nilable(::String), metadata: T.nilable(Models::Shared::Metadata), origin_username: T.nilable(::String), provider: T.nilable(::String), type: T.nilable(Models::Shared::ConnectSessionType)).void }
|
|
48
|
+
def initialize(created_at:, id:, organization_id:, origin_owner_id:, origin_owner_name:, project_id:, account_id: nil, categories: nil, external_trigger_token: nil, integration_id: nil, label: nil, metadata: nil, origin_username: nil, provider: nil, type: nil)
|
|
47
49
|
@created_at = created_at
|
|
48
50
|
@id = id
|
|
49
51
|
@organization_id = organization_id
|
|
@@ -53,6 +55,7 @@ module StackOne
|
|
|
53
55
|
@account_id = account_id
|
|
54
56
|
@categories = categories
|
|
55
57
|
@external_trigger_token = external_trigger_token
|
|
58
|
+
@integration_id = integration_id
|
|
56
59
|
@label = label
|
|
57
60
|
@metadata = metadata
|
|
58
61
|
@origin_username = origin_username
|
|
@@ -72,6 +75,7 @@ module StackOne
|
|
|
72
75
|
return false unless @account_id == other.account_id
|
|
73
76
|
return false unless @categories == other.categories
|
|
74
77
|
return false unless @external_trigger_token == other.external_trigger_token
|
|
78
|
+
return false unless @integration_id == other.integration_id
|
|
75
79
|
return false unless @label == other.label
|
|
76
80
|
return false unless @metadata == other.metadata
|
|
77
81
|
return false unless @origin_username == other.origin_username
|
|
@@ -26,6 +26,8 @@ class StackOne::Models::Shared::ConnectSession
|
|
|
26
26
|
def categories=(str_); end
|
|
27
27
|
def external_trigger_token(); end
|
|
28
28
|
def external_trigger_token=(str_); end
|
|
29
|
+
def integration_id(); end
|
|
30
|
+
def integration_id=(str_); end
|
|
29
31
|
def label(); end
|
|
30
32
|
def label=(str_); end
|
|
31
33
|
def metadata(); end
|