speakeasy_client_sdk_ruby 4.2.22 → 4.2.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. checksums.yaml +4 -4
  2. data/lib/open_api_sdk/apiendpoints.rb +66 -0
  3. data/lib/{speakeasy_client_sdk → open_api_sdk}/apis.rb +134 -109
  4. data/lib/{speakeasy_client_sdk → open_api_sdk}/artifacts.rb +129 -150
  5. data/lib/{speakeasy_client_sdk → open_api_sdk}/auth.rb +53 -46
  6. data/lib/{speakeasy_client_sdk → open_api_sdk}/embeds.rb +36 -29
  7. data/lib/{speakeasy_client_sdk → open_api_sdk}/events.rb +111 -54
  8. data/lib/{speakeasy_client_sdk → open_api_sdk}/github.rb +139 -127
  9. data/lib/{speakeasy_client_sdk → open_api_sdk}/metadata.rb +63 -48
  10. data/lib/{speakeasy_client_sdk/models/operations/checkaccess_request.rb → open_api_sdk/models/operations/checkgithubaccess_request.rb} +2 -2
  11. data/lib/{speakeasy_client_sdk/models/operations/deleteapi_response.rb → open_api_sdk/models/operations/checkgithubaccess_response.rb} +4 -4
  12. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/create_requestbody.rb +3 -3
  13. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/create_response.rb +4 -4
  14. data/lib/open_api_sdk/models/operations/createfreetrial_response.rb +33 -0
  15. data/lib/open_api_sdk/models/operations/createorganization_response.rb +36 -0
  16. data/lib/open_api_sdk/models/operations/createworkspace_response.rb +36 -0
  17. data/lib/open_api_sdk/models/operations/createworkspacetoken_request.rb +27 -0
  18. data/lib/{speakeasy_client_sdk/models/operations/deleteschema_response.rb → open_api_sdk/models/operations/createworkspacetoken_response.rb} +4 -4
  19. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/deleteapi_request.rb +2 -2
  20. data/lib/open_api_sdk/models/operations/deleteapi_response.rb +33 -0
  21. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/deleteapiendpoint_request.rb +2 -2
  22. data/lib/open_api_sdk/models/operations/deleteapiendpoint_response.rb +33 -0
  23. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/deleteschema_request.rb +2 -2
  24. data/lib/open_api_sdk/models/operations/deleteschema_response.rb +33 -0
  25. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/deleteversionmetadata_request.rb +2 -2
  26. data/lib/{speakeasy_client_sdk/models/operations/triggeraction_response.rb → open_api_sdk/models/operations/deleteversionmetadata_response.rb} +4 -4
  27. data/lib/open_api_sdk/models/operations/deleteworkspacetoken_request.rb +27 -0
  28. data/lib/open_api_sdk/models/operations/deleteworkspacetoken_response.rb +33 -0
  29. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/downloadschema_request.rb +2 -2
  30. data/lib/open_api_sdk/models/operations/downloadschema_response.rb +39 -0
  31. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/downloadschemarevision_request.rb +2 -2
  32. data/lib/open_api_sdk/models/operations/downloadschemarevision_response.rb +39 -0
  33. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/file.rb +2 -2
  34. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/findapiendpoint_request.rb +2 -2
  35. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/findapiendpoint_response.rb +5 -5
  36. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generateopenapispec_request.rb +2 -2
  37. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generateopenapispec_response.rb +5 -5
  38. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generateopenapispecforapiendpoint_request.rb +2 -2
  39. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generateopenapispecforapiendpoint_response.rb +5 -5
  40. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generatepostmancollection_request.rb +2 -2
  41. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generatepostmancollection_response.rb +4 -4
  42. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generatepostmancollectionforapiendpoint_request.rb +2 -2
  43. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generatepostmancollectionforapiendpoint_response.rb +4 -4
  44. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generaterequestpostmancollection_request.rb +2 -2
  45. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/generaterequestpostmancollection_response.rb +4 -4
  46. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getaccesstoken_request.rb +2 -2
  47. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getaccesstoken_response.rb +5 -5
  48. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getallapiendpoints_request.rb +2 -2
  49. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getallapiendpoints_response.rb +5 -5
  50. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getallapiversions_request.rb +4 -4
  51. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getallapiversions_response.rb +5 -5
  52. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getallforversionapiendpoints_request.rb +2 -2
  53. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getallforversionapiendpoints_response.rb +5 -5
  54. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getapiendpoint_request.rb +2 -2
  55. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getapiendpoint_response.rb +5 -5
  56. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getapis_request.rb +4 -4
  57. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getapis_response.rb +5 -5
  58. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getblob_request.rb +2 -2
  59. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getblob_response.rb +4 -4
  60. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getchangesreportsignedurl_request.rb +2 -2
  61. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getchangesreportsignedurl_response.rb +4 -4
  62. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getchangesreportsignedurl_signedaccess.rb +3 -3
  63. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getembedaccesstoken_request.rb +4 -4
  64. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getembedaccesstoken_response.rb +5 -5
  65. data/lib/{speakeasy_client_sdk/models/operations/getaction_request.rb → open_api_sdk/models/operations/getgithubaction_request.rb} +2 -2
  66. data/lib/{speakeasy_client_sdk/models/operations/getaction_response.rb → open_api_sdk/models/operations/getgithubaction_response.rb} +5 -5
  67. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getlintingreportsignedurl_request.rb +2 -2
  68. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getlintingreportsignedurl_response.rb +4 -4
  69. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getlintingreportsignedurl_signedaccess.rb +3 -3
  70. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getmanifest_request.rb +2 -2
  71. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getmanifest_response.rb +5 -5
  72. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getnamespaces_response.rb +5 -5
  73. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getorganization_request.rb +2 -2
  74. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getorganization_response.rb +5 -5
  75. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getorganizations_response.rb +5 -5
  76. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getorganizationusage_response.rb +5 -5
  77. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getrequestfromeventlog_request.rb +2 -2
  78. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getrequestfromeventlog_response.rb +5 -5
  79. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getrevisions_request.rb +2 -2
  80. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getrevisions_response.rb +5 -5
  81. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getschema_request.rb +2 -2
  82. data/lib/{speakeasy_client_sdk/models/operations/getschemarevision_response.rb → open_api_sdk/models/operations/getschema_response.rb} +5 -5
  83. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getschemadiff_request.rb +2 -2
  84. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getschemadiff_response.rb +5 -5
  85. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getschemarevision_request.rb +2 -2
  86. data/lib/{speakeasy_client_sdk/models/operations/getschema_response.rb → open_api_sdk/models/operations/getschemarevision_response.rb} +5 -5
  87. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getschemas_request.rb +2 -2
  88. data/lib/open_api_sdk/models/operations/getschemas_response.rb +36 -0
  89. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/gettags_request.rb +2 -2
  90. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/gettags_response.rb +5 -5
  91. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getuser_response.rb +5 -5
  92. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getvalidembedaccesstokens_response.rb +5 -5
  93. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getversionmetadata_request.rb +2 -2
  94. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getversionmetadata_response.rb +5 -5
  95. data/lib/open_api_sdk/models/operations/getworkspace_request.rb +24 -0
  96. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspace_response.rb +5 -5
  97. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspaceaccess_request.rb +2 -2
  98. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspaceaccess_response.rb +4 -4
  99. data/lib/{speakeasy_client_sdk/models/operations/getoassummary_response.rb → open_api_sdk/models/operations/getworkspacebycontext_response.rb} +7 -7
  100. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspaceeventsbytarget_request.rb +8 -8
  101. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspaceeventsbytarget_response.rb +5 -5
  102. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspacefeatureflags_request.rb +4 -4
  103. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspacefeatureflags_response.rb +5 -5
  104. data/lib/open_api_sdk/models/operations/getworkspaces_response.rb +36 -0
  105. data/lib/{speakeasy_client_sdk/models/operations/getworkspace_request.rb → open_api_sdk/models/operations/getworkspacesettings_request.rb} +4 -4
  106. data/lib/open_api_sdk/models/operations/getworkspacesettings_response.rb +36 -0
  107. data/lib/open_api_sdk/models/operations/getworkspacetargets_request.rb +24 -0
  108. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/getworkspacetargets_response.rb +5 -5
  109. data/lib/{speakeasy_client_sdk/models/operations/getworkspacetargets_request.rb → open_api_sdk/models/operations/getworkspacetargetsdeprecated_request.rb} +7 -7
  110. data/lib/{speakeasy_client_sdk/models/operations/deleteversionmetadata_response.rb → open_api_sdk/models/operations/getworkspacetargetsdeprecated_response.rb} +9 -6
  111. data/lib/open_api_sdk/models/operations/getworkspaceteam_request.rb +24 -0
  112. data/lib/open_api_sdk/models/operations/getworkspaceteam_response.rb +36 -0
  113. data/lib/open_api_sdk/models/operations/getworkspacetokens_request.rb +24 -0
  114. data/lib/{speakeasy_client_sdk/models/operations/getschemas_response.rb → open_api_sdk/models/operations/getworkspacetokens_response.rb} +8 -8
  115. data/lib/{speakeasy_client_sdk/models/operations/fetchpublishingprs_request.rb → open_api_sdk/models/operations/githubcheckpublishingprs_request.rb} +2 -2
  116. data/lib/{speakeasy_client_sdk/models/operations/fetchpublishingprs_response.rb → open_api_sdk/models/operations/githubcheckpublishingprs_response.rb} +5 -5
  117. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/githubcheckpublishingsecrets_request.rb +2 -2
  118. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/githubcheckpublishingsecrets_response.rb +5 -5
  119. data/lib/{speakeasy_client_sdk/models/operations/configurecodesamples_response.rb → open_api_sdk/models/operations/githubconfigurecodesamples_response.rb} +5 -5
  120. data/lib/open_api_sdk/models/operations/githubconfiguremintlifyrepo_response.rb +33 -0
  121. data/lib/open_api_sdk/models/operations/githubconfiguretarget_response.rb +33 -0
  122. data/lib/open_api_sdk/models/operations/githubstorepublishingsecrets_response.rb +33 -0
  123. data/lib/{speakeasy_client_sdk/models/operations/checkaccess_response.rb → open_api_sdk/models/operations/githubtriggeraction_response.rb} +4 -4
  124. data/lib/open_api_sdk/models/operations/grantuseraccesstoworkspace_request.rb +27 -0
  125. data/lib/{speakeasy_client_sdk/models/operations/configuremintlifyrepo_response.rb → open_api_sdk/models/operations/grantuseraccesstoworkspace_response.rb} +8 -5
  126. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/insertversionmetadata_request.rb +4 -4
  127. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/insertversionmetadata_response.rb +5 -5
  128. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/op.rb +2 -2
  129. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/posttags_request.rb +4 -4
  130. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/posttags_response.rb +4 -4
  131. data/lib/open_api_sdk/models/operations/postworkspaceevents_request.rb +27 -0
  132. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/postworkspaceevents_response.rb +4 -4
  133. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/preflight_response.rb +5 -5
  134. data/lib/open_api_sdk/models/operations/queryeventlog_request.rb +24 -0
  135. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/queryeventlog_response.rb +5 -5
  136. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/queryparam_op.rb +2 -2
  137. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/registerschema_request.rb +4 -4
  138. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/registerschema_requestbody.rb +4 -4
  139. data/lib/open_api_sdk/models/operations/registerschema_response.rb +33 -0
  140. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/revokeembedaccesstoken_request.rb +2 -2
  141. data/lib/{speakeasy_client_sdk/models/operations/registerschema_response.rb → open_api_sdk/models/operations/revokeembedaccesstoken_response.rb} +4 -4
  142. data/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_request.rb +27 -0
  143. data/lib/open_api_sdk/models/operations/revokeuseraccesstoworkspace_response.rb +33 -0
  144. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/schema.rb +2 -2
  145. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/searchworkspaceevents_request.rb +8 -8
  146. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/searchworkspaceevents_response.rb +5 -5
  147. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/suggest_request.rb +4 -4
  148. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/suggest_response.rb +2 -2
  149. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/suggestopenapi_request.rb +4 -4
  150. data/lib/open_api_sdk/models/operations/suggestopenapi_requestbody.rb +27 -0
  151. data/lib/{speakeasy_client_sdk/models/operations/suggestopenapiregistry_response.rb → open_api_sdk/models/operations/suggestopenapi_response.rb} +2 -2
  152. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/suggestopenapiregistry_request.rb +4 -4
  153. data/lib/{speakeasy_client_sdk/models/operations/suggestopenapi_response.rb → open_api_sdk/models/operations/suggestopenapiregistry_response.rb} +2 -2
  154. data/lib/open_api_sdk/models/operations/updateworkspacedetails_request.rb +27 -0
  155. data/lib/open_api_sdk/models/operations/updateworkspacedetails_response.rb +33 -0
  156. data/lib/open_api_sdk/models/operations/updateworkspacesettings_request.rb +27 -0
  157. data/lib/{speakeasy_client_sdk/models/operations/configuretarget_response.rb → open_api_sdk/models/operations/updateworkspacesettings_response.rb} +4 -4
  158. data/lib/{speakeasy_client_sdk/models/operations/registerschema_file.rb → open_api_sdk/models/operations/uploadreport_file.rb} +2 -2
  159. data/lib/open_api_sdk/models/operations/uploadreport_requestbody.rb +27 -0
  160. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/uploadreport_response.rb +4 -4
  161. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/uploadreport_uploadedreport.rb +3 -3
  162. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/upsertapi_request.rb +4 -4
  163. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/upsertapi_response.rb +5 -5
  164. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/upsertapiendpoint_request.rb +4 -4
  165. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/upsertapiendpoint_response.rb +5 -5
  166. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/operations/validateapikey_response.rb +5 -5
  167. data/lib/open_api_sdk/models/operations.rb +166 -0
  168. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/accessdetails.rb +6 -6
  169. data/lib/open_api_sdk/models/shared/accesstoken.rb +36 -0
  170. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/accesstoken_user.rb +8 -8
  171. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/accounttype.rb +1 -1
  172. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/addtags.rb +4 -4
  173. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/annotations.rb +14 -14
  174. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/api.rb +10 -10
  175. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/api_input.rb +6 -6
  176. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/apiendpoint.rb +13 -13
  177. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/apiendpoint_input.rb +8 -8
  178. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/apikeydetails.rb +11 -11
  179. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/auth.rb +4 -4
  180. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/boundedrequest.rb +17 -17
  181. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/claims.rb +2 -2
  182. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/clievent.rb +81 -81
  183. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/diagnostic.rb +6 -6
  184. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/embedaccesstokenresponse.rb +3 -3
  185. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/embedtoken.rb +12 -12
  186. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/error.rb +4 -4
  187. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/featureflag.rb +4 -4
  188. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/filter.rb +5 -5
  189. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/filters.rb +7 -7
  190. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/generate_bump_type.rb +1 -1
  191. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/generateopenapispecdiff.rb +4 -4
  192. data/lib/open_api_sdk/models/shared/getnamespacesresponse.rb +24 -0
  193. data/lib/open_api_sdk/models/shared/getrevisionsresponse.rb +27 -0
  194. data/lib/open_api_sdk/models/shared/gettagsresponse.rb +24 -0
  195. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubconfigurecodesamplesrequest.rb +5 -5
  196. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubconfigurecodesamplesresponse.rb +6 -6
  197. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubconfiguremintlifyreporequest.rb +7 -7
  198. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubconfiguretargetrequest.rb +4 -4
  199. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubgetactionresponse.rb +4 -4
  200. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubmissingpublishingsecretsresponse.rb +3 -3
  201. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubpublishingprresponse.rb +4 -4
  202. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubstorepublishingsecretsrequest.rb +4 -4
  203. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/githubtriggeractionrequest.rb +8 -8
  204. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/interactiontype.rb +1 -1
  205. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/level.rb +1 -1
  206. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/license.rb +3 -3
  207. data/lib/open_api_sdk/models/shared/manifest.rb +36 -0
  208. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/namespace.rb +6 -6
  209. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/oasinfo.rb +8 -8
  210. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/oasoperation.rb +9 -9
  211. data/lib/open_api_sdk/models/shared/oassummary.rb +27 -0
  212. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/openapi_diff_bump_type.rb +1 -1
  213. data/lib/open_api_sdk/models/shared/organization.rb +45 -0
  214. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/organizationusage.rb +9 -9
  215. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/organizationusageresponse.rb +7 -7
  216. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/preflightrequest.rb +3 -3
  217. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/preflighttoken.rb +3 -3
  218. data/lib/open_api_sdk/models/shared/relationship.rb +27 -0
  219. data/lib/open_api_sdk/models/shared/report.rb +24 -0
  220. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/requestmetadata.rb +4 -4
  221. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/revision.rb +8 -8
  222. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/schema.rb +8 -8
  223. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/schemadiff.rb +6 -6
  224. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/security.rb +7 -4
  225. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/shorturl.rb +4 -4
  226. data/lib/open_api_sdk/models/shared/ssometadata.rb +27 -0
  227. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/suggestion_type.rb +1 -1
  228. data/lib/open_api_sdk/models/shared/suggestoptsold.rb +27 -0
  229. data/lib/open_api_sdk/models/shared/suggestrequestbody.rb +30 -0
  230. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/suggestrequestbody_suggestion_type.rb +1 -1
  231. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/tag.rb +6 -6
  232. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/targetsdk.rb +52 -40
  233. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/type.rb +1 -1
  234. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/unboundedrequest.rb +7 -7
  235. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/user.rb +19 -19
  236. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/v2descriptor.rb +7 -7
  237. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/valuechange.rb +4 -4
  238. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/versionmetadata.rb +8 -8
  239. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/versionmetadata_input.rb +4 -4
  240. data/lib/open_api_sdk/models/shared/workflowdocument.rb +27 -0
  241. data/lib/{speakeasy_client_sdk → open_api_sdk}/models/shared/workspace.rb +12 -12
  242. data/lib/open_api_sdk/models/shared/workspaceandorganization.rb +27 -0
  243. data/lib/open_api_sdk/models/shared/workspacefeatureflagresponse.rb +24 -0
  244. data/lib/open_api_sdk/models/shared/workspaceinviteresponse.rb +27 -0
  245. data/lib/open_api_sdk/models/shared/workspaces.rb +33 -0
  246. data/lib/open_api_sdk/models/shared/workspacesettings.rb +27 -0
  247. data/lib/open_api_sdk/models/shared/workspaceteamresponse.rb +27 -0
  248. data/lib/open_api_sdk/models/shared/workspacetoken.rb +48 -0
  249. data/lib/open_api_sdk/models/shared.rb +90 -0
  250. data/lib/{speakeasy_client_sdk → open_api_sdk}/organizations.rb +94 -48
  251. data/lib/{speakeasy_client_sdk → open_api_sdk}/reports.rb +50 -42
  252. data/lib/{speakeasy_client_sdk → open_api_sdk}/requests.rb +58 -49
  253. data/lib/{speakeasy_client_sdk → open_api_sdk}/schemas.rb +157 -119
  254. data/lib/{speakeasy_client_sdk → open_api_sdk}/sdkconfiguration.rb +7 -7
  255. data/lib/{speakeasy_client_sdk → open_api_sdk}/shorturls.rb +5 -5
  256. data/lib/{speakeasy_client_sdk/sdk.rb → open_api_sdk/speakeasyclientsdk.rb} +10 -9
  257. data/lib/{speakeasy_client_sdk/apiendpoints.rb → open_api_sdk/speakeasyclientsdk_apiendpoints.rb} +138 -145
  258. data/lib/{speakeasy_client_sdk → open_api_sdk}/suggest.rb +38 -21
  259. data/lib/{speakeasy_client_sdk → open_api_sdk}/utils/metadata_fields.rb +1 -1
  260. data/lib/{speakeasy_client_sdk → open_api_sdk}/utils/utils.rb +1 -1
  261. data/lib/open_api_sdk/workspaces.rb +654 -0
  262. data/lib/speakeasy_client_sdk_ruby.rb +24 -23
  263. metadata +263 -233
  264. data/lib/speakeasy_client_sdk/models/operations/createfreetrial_response.rb +0 -33
  265. data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_response.rb +0 -33
  266. data/lib/speakeasy_client_sdk/models/operations/downloadschema_response.rb +0 -39
  267. data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_response.rb +0 -39
  268. data/lib/speakeasy_client_sdk/models/operations/getoassummary_request.rb +0 -27
  269. data/lib/speakeasy_client_sdk/models/operations/githubstorepublishingsecrets_response.rb +0 -33
  270. data/lib/speakeasy_client_sdk/models/operations/postworkspaceevents_request.rb +0 -27
  271. data/lib/speakeasy_client_sdk/models/operations/queryeventlog_request.rb +0 -24
  272. data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_response.rb +0 -33
  273. data/lib/speakeasy_client_sdk/models/operations/suggestopenapi_requestbody.rb +0 -27
  274. data/lib/speakeasy_client_sdk/models/operations/uploadreport_requestbody.rb +0 -27
  275. data/lib/speakeasy_client_sdk/models/operations.rb +0 -144
  276. data/lib/speakeasy_client_sdk/models/shared/accesstoken.rb +0 -36
  277. data/lib/speakeasy_client_sdk/models/shared/getnamespacesresponse.rb +0 -24
  278. data/lib/speakeasy_client_sdk/models/shared/getrevisionsresponse.rb +0 -27
  279. data/lib/speakeasy_client_sdk/models/shared/gettagsresponse.rb +0 -24
  280. data/lib/speakeasy_client_sdk/models/shared/manifest.rb +0 -36
  281. data/lib/speakeasy_client_sdk/models/shared/oassummary.rb +0 -27
  282. data/lib/speakeasy_client_sdk/models/shared/organization.rb +0 -45
  283. data/lib/speakeasy_client_sdk/models/shared/report.rb +0 -24
  284. data/lib/speakeasy_client_sdk/models/shared/suggestoptsold.rb +0 -27
  285. data/lib/speakeasy_client_sdk/models/shared/suggestrequestbody.rb +0 -30
  286. data/lib/speakeasy_client_sdk/models/shared/workflowdocument.rb +0 -27
  287. data/lib/speakeasy_client_sdk/models/shared/workspacefeatureflagresponse.rb +0 -24
  288. data/lib/speakeasy_client_sdk/models/shared/workspaces.rb +0 -33
  289. data/lib/speakeasy_client_sdk/models/shared.rb +0 -83
  290. data/lib/speakeasy_client_sdk/workspaces.rb +0 -105
  291. /data/lib/{speakeasy_client_sdk → open_api_sdk}/utils/t.rb +0 -0
@@ -0,0 +1,654 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+ require 'faraday'
7
+ require 'faraday/multipart'
8
+ require 'sorbet-runtime'
9
+
10
+ module OpenApiSDK
11
+ extend T::Sig
12
+ class Workspaces
13
+ extend T::Sig
14
+
15
+
16
+ sig { params(sdk_config: SDKConfiguration).void }
17
+ def initialize(sdk_config)
18
+ @sdk_configuration = sdk_config
19
+ end
20
+
21
+
22
+ sig { returns(::OpenApiSDK::Operations::GetWorkspacesResponse) }
23
+ def get_all
24
+ # get_all - Get workspaces for a user
25
+ # Returns a list of workspaces a user has access too
26
+ url, params = @sdk_configuration.get_server_details
27
+ base_url = Utils.template_url(url, params)
28
+ url = "#{base_url}/v1/workspaces"
29
+ headers = {}
30
+ headers['Accept'] = 'application/json'
31
+ headers['user-agent'] = @sdk_configuration.user_agent
32
+
33
+ r = @sdk_configuration.client.get(url) do |req|
34
+ req.headers = headers
35
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
36
+ end
37
+
38
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
39
+
40
+ res = ::OpenApiSDK::Operations::GetWorkspacesResponse.new(
41
+ status_code: r.status, content_type: content_type, raw_response: r
42
+ )
43
+ if r.status >= 200 && r.status < 300
44
+ if Utils.match_content_type(content_type, 'application/json')
45
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::Workspace])
46
+ res.workspaces = out
47
+ end
48
+ elsif r.status >= 400 && r.status < 500
49
+ if Utils.match_content_type(content_type, 'application/json')
50
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
51
+ res.error = out
52
+ end
53
+ end
54
+ res
55
+ end
56
+
57
+
58
+ sig { returns(::OpenApiSDK::Operations::GetWorkspaceByContextResponse) }
59
+ def get
60
+ # get - Get workspace by context
61
+ # Get information about a particular workspace by context.
62
+ url, params = @sdk_configuration.get_server_details
63
+ base_url = Utils.template_url(url, params)
64
+ url = "#{base_url}/v1/workspace"
65
+ headers = {}
66
+ headers['Accept'] = 'application/json'
67
+ headers['user-agent'] = @sdk_configuration.user_agent
68
+
69
+ r = @sdk_configuration.client.get(url) do |req|
70
+ req.headers = headers
71
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
72
+ end
73
+
74
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
75
+
76
+ res = ::OpenApiSDK::Operations::GetWorkspaceByContextResponse.new(
77
+ status_code: r.status, content_type: content_type, raw_response: r
78
+ )
79
+ if r.status >= 200 && r.status < 300
80
+ if Utils.match_content_type(content_type, 'application/json')
81
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceAndOrganization)
82
+ res.workspace_and_organization = out
83
+ end
84
+ elsif r.status >= 400 && r.status < 500
85
+ if Utils.match_content_type(content_type, 'application/json')
86
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
87
+ res.error = out
88
+ end
89
+ end
90
+ res
91
+ end
92
+
93
+
94
+ sig { params(request: ::OpenApiSDK::Shared::Workspace).returns(::OpenApiSDK::Operations::CreateWorkspaceResponse) }
95
+ def create(request)
96
+ # create - Create a workspace
97
+ # Creates a workspace
98
+ url, params = @sdk_configuration.get_server_details
99
+ base_url = Utils.template_url(url, params)
100
+ url = "#{base_url}/v1/workspace"
101
+ headers = {}
102
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
103
+ headers['content-type'] = req_content_type
104
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
105
+ headers['Accept'] = 'application/json'
106
+ headers['user-agent'] = @sdk_configuration.user_agent
107
+
108
+ r = @sdk_configuration.client.post(url) do |req|
109
+ req.headers = headers
110
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
111
+ if form
112
+ req.body = Utils.encode_form(form)
113
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
114
+ req.body = URI.encode_www_form(data)
115
+ else
116
+ req.body = data
117
+ end
118
+ end
119
+
120
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
121
+
122
+ res = ::OpenApiSDK::Operations::CreateWorkspaceResponse.new(
123
+ status_code: r.status, content_type: content_type, raw_response: r
124
+ )
125
+ if r.status >= 200 && r.status < 300
126
+ if Utils.match_content_type(content_type, 'application/json')
127
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Workspace)
128
+ res.workspace = out
129
+ end
130
+ elsif r.status >= 400 && r.status < 500
131
+ if Utils.match_content_type(content_type, 'application/json')
132
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
133
+ res.error = out
134
+ end
135
+ end
136
+ res
137
+ end
138
+
139
+
140
+ sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceResponse) }
141
+ def get_by_id(workspace_id)
142
+ # get_by_id - Get workspace
143
+ # Get information about a particular workspace.
144
+ request = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(
145
+
146
+ workspace_id: workspace_id
147
+ )
148
+ url, params = @sdk_configuration.get_server_details
149
+ base_url = Utils.template_url(url, params)
150
+ url = Utils.generate_url(
151
+ ::OpenApiSDK::Operations::GetWorkspaceRequest,
152
+ base_url,
153
+ '/v1/workspace/{workspace_id}',
154
+ request,
155
+ @sdk_configuration.globals
156
+ )
157
+ headers = {}
158
+ headers['Accept'] = 'application/json'
159
+ headers['user-agent'] = @sdk_configuration.user_agent
160
+
161
+ r = @sdk_configuration.client.get(url) do |req|
162
+ req.headers = headers
163
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
164
+ end
165
+
166
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
167
+
168
+ res = ::OpenApiSDK::Operations::GetWorkspaceResponse.new(
169
+ status_code: r.status, content_type: content_type, raw_response: r
170
+ )
171
+ if r.status >= 200 && r.status < 300
172
+ if Utils.match_content_type(content_type, 'application/json')
173
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Workspace)
174
+ res.workspace = out
175
+ end
176
+ elsif r.status >= 400 && r.status < 500
177
+ if Utils.match_content_type(content_type, 'application/json')
178
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
179
+ res.error = out
180
+ end
181
+ end
182
+ res
183
+ end
184
+
185
+
186
+ sig { params(workspace_id: ::String, workspace: ::OpenApiSDK::Shared::Workspace).returns(::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse) }
187
+ def update_details(workspace_id, workspace)
188
+ # update_details - Update workspace details
189
+ # Update information about a particular workspace.
190
+ request = ::OpenApiSDK::Operations::UpdateWorkspaceDetailsRequest.new(
191
+
192
+ workspace_id: workspace_id,
193
+ workspace: workspace
194
+ )
195
+ url, params = @sdk_configuration.get_server_details
196
+ base_url = Utils.template_url(url, params)
197
+ url = Utils.generate_url(
198
+ ::OpenApiSDK::Operations::UpdateWorkspaceDetailsRequest,
199
+ base_url,
200
+ '/v1/workspace/{workspace_id}/details',
201
+ request,
202
+ @sdk_configuration.globals
203
+ )
204
+ headers = {}
205
+ req_content_type, data, form = Utils.serialize_request_body(request, :workspace, :json)
206
+ headers['content-type'] = req_content_type
207
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
208
+ headers['Accept'] = 'application/json'
209
+ headers['user-agent'] = @sdk_configuration.user_agent
210
+
211
+ r = @sdk_configuration.client.post(url) do |req|
212
+ req.headers = headers
213
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
214
+ if form
215
+ req.body = Utils.encode_form(form)
216
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
217
+ req.body = URI.encode_www_form(data)
218
+ else
219
+ req.body = data
220
+ end
221
+ end
222
+
223
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
224
+
225
+ res = ::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse.new(
226
+ status_code: r.status, content_type: content_type, raw_response: r
227
+ )
228
+ if r.status >= 200 && r.status < 300
229
+ elsif r.status >= 400 && r.status < 500
230
+ if Utils.match_content_type(content_type, 'application/json')
231
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
232
+ res.error = out
233
+ end
234
+ end
235
+ res
236
+ end
237
+
238
+
239
+ sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceSettingsResponse) }
240
+ def get_settings(workspace_id)
241
+ # get_settings - Get workspace settings
242
+ # Get settings about a particular workspace.
243
+ request = ::OpenApiSDK::Operations::GetWorkspaceSettingsRequest.new(
244
+
245
+ workspace_id: workspace_id
246
+ )
247
+ url, params = @sdk_configuration.get_server_details
248
+ base_url = Utils.template_url(url, params)
249
+ url = Utils.generate_url(
250
+ ::OpenApiSDK::Operations::GetWorkspaceSettingsRequest,
251
+ base_url,
252
+ '/v1/workspace/{workspace_id}/settings',
253
+ request,
254
+ @sdk_configuration.globals
255
+ )
256
+ headers = {}
257
+ headers['Accept'] = 'application/json'
258
+ headers['user-agent'] = @sdk_configuration.user_agent
259
+
260
+ r = @sdk_configuration.client.get(url) do |req|
261
+ req.headers = headers
262
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
263
+ end
264
+
265
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
266
+
267
+ res = ::OpenApiSDK::Operations::GetWorkspaceSettingsResponse.new(
268
+ status_code: r.status, content_type: content_type, raw_response: r
269
+ )
270
+ if r.status >= 200 && r.status < 300
271
+ if Utils.match_content_type(content_type, 'application/json')
272
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceSettings)
273
+ res.workspace_settings = out
274
+ end
275
+ elsif r.status >= 400 && r.status < 500
276
+ if Utils.match_content_type(content_type, 'application/json')
277
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
278
+ res.error = out
279
+ end
280
+ end
281
+ res
282
+ end
283
+
284
+
285
+ sig { params(workspace_id: ::String, workspace_settings: ::OpenApiSDK::Shared::WorkspaceSettings).returns(::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse) }
286
+ def update_settings(workspace_id, workspace_settings)
287
+ # update_settings - Update workspace settings
288
+ # Update settings about a particular workspace.
289
+ request = ::OpenApiSDK::Operations::UpdateWorkspaceSettingsRequest.new(
290
+
291
+ workspace_id: workspace_id,
292
+ workspace_settings: workspace_settings
293
+ )
294
+ url, params = @sdk_configuration.get_server_details
295
+ base_url = Utils.template_url(url, params)
296
+ url = Utils.generate_url(
297
+ ::OpenApiSDK::Operations::UpdateWorkspaceSettingsRequest,
298
+ base_url,
299
+ '/v1/workspace/{workspace_id}/settings',
300
+ request,
301
+ @sdk_configuration.globals
302
+ )
303
+ headers = {}
304
+ req_content_type, data, form = Utils.serialize_request_body(request, :workspace_settings, :json)
305
+ headers['content-type'] = req_content_type
306
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
307
+ headers['Accept'] = 'application/json'
308
+ headers['user-agent'] = @sdk_configuration.user_agent
309
+
310
+ r = @sdk_configuration.client.put(url) do |req|
311
+ req.headers = headers
312
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
313
+ if form
314
+ req.body = Utils.encode_form(form)
315
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
316
+ req.body = URI.encode_www_form(data)
317
+ else
318
+ req.body = data
319
+ end
320
+ end
321
+
322
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
323
+
324
+ res = ::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse.new(
325
+ status_code: r.status, content_type: content_type, raw_response: r
326
+ )
327
+ if r.status >= 200 && r.status < 300
328
+ elsif r.status >= 400 && r.status < 500
329
+ if Utils.match_content_type(content_type, 'application/json')
330
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
331
+ res.error = out
332
+ end
333
+ end
334
+ res
335
+ end
336
+
337
+
338
+ sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceTeamResponse) }
339
+ def get_team(workspace_id)
340
+ # get_team - Get team members for a particular workspace
341
+ request = ::OpenApiSDK::Operations::GetWorkspaceTeamRequest.new(
342
+
343
+ workspace_id: workspace_id
344
+ )
345
+ url, params = @sdk_configuration.get_server_details
346
+ base_url = Utils.template_url(url, params)
347
+ url = Utils.generate_url(
348
+ ::OpenApiSDK::Operations::GetWorkspaceTeamRequest,
349
+ base_url,
350
+ '/v1/workspace/{workspace_id}/team',
351
+ request,
352
+ @sdk_configuration.globals
353
+ )
354
+ headers = {}
355
+ headers['Accept'] = 'application/json'
356
+ headers['user-agent'] = @sdk_configuration.user_agent
357
+
358
+ r = @sdk_configuration.client.get(url) do |req|
359
+ req.headers = headers
360
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
361
+ end
362
+
363
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
364
+
365
+ res = ::OpenApiSDK::Operations::GetWorkspaceTeamResponse.new(
366
+ status_code: r.status, content_type: content_type, raw_response: r
367
+ )
368
+ if r.status >= 200 && r.status < 300
369
+ if Utils.match_content_type(content_type, 'application/json')
370
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceTeamResponse)
371
+ res.workspace_team_response = out
372
+ end
373
+ elsif r.status >= 400 && r.status < 500
374
+ if Utils.match_content_type(content_type, 'application/json')
375
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
376
+ res.error = out
377
+ end
378
+ end
379
+ res
380
+ end
381
+
382
+
383
+ sig { params(workspace_id: ::String, email: ::String).returns(::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse) }
384
+ def grant_access(workspace_id, email)
385
+ # grant_access - Grant a user access to a particular workspace
386
+ request = ::OpenApiSDK::Operations::GrantUserAccessToWorkspaceRequest.new(
387
+
388
+ workspace_id: workspace_id,
389
+ email: email
390
+ )
391
+ url, params = @sdk_configuration.get_server_details
392
+ base_url = Utils.template_url(url, params)
393
+ url = Utils.generate_url(
394
+ ::OpenApiSDK::Operations::GrantUserAccessToWorkspaceRequest,
395
+ base_url,
396
+ '/v1/workspace/{workspace_id}/team/email/{email}',
397
+ request,
398
+ @sdk_configuration.globals
399
+ )
400
+ headers = {}
401
+ headers['Accept'] = 'application/json'
402
+ headers['user-agent'] = @sdk_configuration.user_agent
403
+
404
+ r = @sdk_configuration.client.put(url) do |req|
405
+ req.headers = headers
406
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
407
+ end
408
+
409
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
410
+
411
+ res = ::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse.new(
412
+ status_code: r.status, content_type: content_type, raw_response: r
413
+ )
414
+ if r.status == 200
415
+ if Utils.match_content_type(content_type, 'application/json')
416
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceInviteResponse)
417
+ res.workspace_invite_response = out
418
+ end
419
+ elsif r.status >= 400 && r.status < 500
420
+ if Utils.match_content_type(content_type, 'application/json')
421
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
422
+ res.error = out
423
+ end
424
+ end
425
+ res
426
+ end
427
+
428
+
429
+ sig { params(workspace_id: ::String, user_id: ::String).returns(::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse) }
430
+ def revoke_access(workspace_id, user_id)
431
+ # revoke_access - Revoke a user's access to a particular workspace
432
+ request = ::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceRequest.new(
433
+
434
+ workspace_id: workspace_id,
435
+ user_id: user_id
436
+ )
437
+ url, params = @sdk_configuration.get_server_details
438
+ base_url = Utils.template_url(url, params)
439
+ url = Utils.generate_url(
440
+ ::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceRequest,
441
+ base_url,
442
+ '/v1/workspace/{workspace_id}/team/{userId}',
443
+ request,
444
+ @sdk_configuration.globals
445
+ )
446
+ headers = {}
447
+ headers['Accept'] = 'application/json'
448
+ headers['user-agent'] = @sdk_configuration.user_agent
449
+
450
+ r = @sdk_configuration.client.delete(url) do |req|
451
+ req.headers = headers
452
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
453
+ end
454
+
455
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
456
+
457
+ res = ::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse.new(
458
+ status_code: r.status, content_type: content_type, raw_response: r
459
+ )
460
+ if r.status >= 200 && r.status < 300
461
+ elsif r.status >= 400 && r.status < 500
462
+ if Utils.match_content_type(content_type, 'application/json')
463
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
464
+ res.error = out
465
+ end
466
+ end
467
+ res
468
+ end
469
+
470
+
471
+ sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceTokensResponse) }
472
+ def get_tokens(workspace_id)
473
+ # get_tokens - Get tokens for a particular workspace
474
+ request = ::OpenApiSDK::Operations::GetWorkspaceTokensRequest.new(
475
+
476
+ workspace_id: workspace_id
477
+ )
478
+ url, params = @sdk_configuration.get_server_details
479
+ base_url = Utils.template_url(url, params)
480
+ url = Utils.generate_url(
481
+ ::OpenApiSDK::Operations::GetWorkspaceTokensRequest,
482
+ base_url,
483
+ '/v1/workspace/{workspace_id}/tokens',
484
+ request,
485
+ @sdk_configuration.globals
486
+ )
487
+ headers = {}
488
+ headers['Accept'] = 'application/json'
489
+ headers['user-agent'] = @sdk_configuration.user_agent
490
+
491
+ r = @sdk_configuration.client.get(url) do |req|
492
+ req.headers = headers
493
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
494
+ end
495
+
496
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
497
+
498
+ res = ::OpenApiSDK::Operations::GetWorkspaceTokensResponse.new(
499
+ status_code: r.status, content_type: content_type, raw_response: r
500
+ )
501
+ if r.status >= 200 && r.status < 300
502
+ if Utils.match_content_type(content_type, 'application/json')
503
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Shared::WorkspaceToken])
504
+ res.workspace_tokens = out
505
+ end
506
+ elsif r.status >= 400 && r.status < 500
507
+ if Utils.match_content_type(content_type, 'application/json')
508
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
509
+ res.error = out
510
+ end
511
+ end
512
+ res
513
+ end
514
+
515
+
516
+ sig { params(workspace_id: ::String, workspace_token: ::OpenApiSDK::Shared::WorkspaceToken).returns(::OpenApiSDK::Operations::CreateWorkspaceTokenResponse) }
517
+ def create_token(workspace_id, workspace_token)
518
+ # create_token - Create a token for a particular workspace
519
+ request = ::OpenApiSDK::Operations::CreateWorkspaceTokenRequest.new(
520
+
521
+ workspace_id: workspace_id,
522
+ workspace_token: workspace_token
523
+ )
524
+ url, params = @sdk_configuration.get_server_details
525
+ base_url = Utils.template_url(url, params)
526
+ url = Utils.generate_url(
527
+ ::OpenApiSDK::Operations::CreateWorkspaceTokenRequest,
528
+ base_url,
529
+ '/v1/workspace/{workspace_id}/tokens',
530
+ request,
531
+ @sdk_configuration.globals
532
+ )
533
+ headers = {}
534
+ req_content_type, data, form = Utils.serialize_request_body(request, :workspace_token, :json)
535
+ headers['content-type'] = req_content_type
536
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
537
+ headers['Accept'] = 'application/json'
538
+ headers['user-agent'] = @sdk_configuration.user_agent
539
+
540
+ r = @sdk_configuration.client.post(url) do |req|
541
+ req.headers = headers
542
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
543
+ if form
544
+ req.body = Utils.encode_form(form)
545
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
546
+ req.body = URI.encode_www_form(data)
547
+ else
548
+ req.body = data
549
+ end
550
+ end
551
+
552
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
553
+
554
+ res = ::OpenApiSDK::Operations::CreateWorkspaceTokenResponse.new(
555
+ status_code: r.status, content_type: content_type, raw_response: r
556
+ )
557
+ if r.status >= 200 && r.status < 300
558
+ elsif r.status >= 400 && r.status < 500
559
+ if Utils.match_content_type(content_type, 'application/json')
560
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
561
+ res.error = out
562
+ end
563
+ end
564
+ res
565
+ end
566
+
567
+
568
+ sig { params(workspace_id: ::String, token_id: ::String).returns(::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse) }
569
+ def delete_token(workspace_id, token_id)
570
+ # delete_token - Delete a token for a particular workspace
571
+ request = ::OpenApiSDK::Operations::DeleteWorkspaceTokenRequest.new(
572
+
573
+ workspace_id: workspace_id,
574
+ token_id: token_id
575
+ )
576
+ url, params = @sdk_configuration.get_server_details
577
+ base_url = Utils.template_url(url, params)
578
+ url = Utils.generate_url(
579
+ ::OpenApiSDK::Operations::DeleteWorkspaceTokenRequest,
580
+ base_url,
581
+ '/v1/workspace/{workspace_id}/tokens/{tokenID}',
582
+ request,
583
+ @sdk_configuration.globals
584
+ )
585
+ headers = {}
586
+ headers['Accept'] = 'application/json'
587
+ headers['user-agent'] = @sdk_configuration.user_agent
588
+
589
+ r = @sdk_configuration.client.delete(url) do |req|
590
+ req.headers = headers
591
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
592
+ end
593
+
594
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
595
+
596
+ res = ::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse.new(
597
+ status_code: r.status, content_type: content_type, raw_response: r
598
+ )
599
+ if r.status >= 200 && r.status < 300
600
+ elsif r.status >= 400 && r.status < 500
601
+ if Utils.match_content_type(content_type, 'application/json')
602
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
603
+ res.error = out
604
+ end
605
+ end
606
+ res
607
+ end
608
+
609
+
610
+ sig { params(workspace_id: ::String).returns(::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse) }
611
+ def get_feature_flags(workspace_id)
612
+ # get_feature_flags - Get workspace feature flags
613
+ request = ::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsRequest.new(
614
+
615
+ workspace_id: workspace_id
616
+ )
617
+ url, params = @sdk_configuration.get_server_details
618
+ base_url = Utils.template_url(url, params)
619
+ url = Utils.generate_url(
620
+ ::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsRequest,
621
+ base_url,
622
+ '/v1/workspace/{workspace_id}/feature_flags',
623
+ request,
624
+ @sdk_configuration.globals
625
+ )
626
+ headers = {}
627
+ headers['Accept'] = 'application/json'
628
+ headers['user-agent'] = @sdk_configuration.user_agent
629
+
630
+ r = @sdk_configuration.client.get(url) do |req|
631
+ req.headers = headers
632
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
633
+ end
634
+
635
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
636
+
637
+ res = ::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse.new(
638
+ status_code: r.status, content_type: content_type, raw_response: r
639
+ )
640
+ if r.status == 200
641
+ if Utils.match_content_type(content_type, 'application/json')
642
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::WorkspaceFeatureFlagResponse)
643
+ res.workspace_feature_flag_response = out
644
+ end
645
+ elsif r.status >= 500 && r.status < 600
646
+ if Utils.match_content_type(content_type, 'application/json')
647
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Error)
648
+ res.error = out
649
+ end
650
+ end
651
+ res
652
+ end
653
+ end
654
+ end