workos 4.1.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +37 -0
  3. data/.github/workflows/release.yml +43 -0
  4. data/.rubocop.yml +8 -1
  5. data/Gemfile.lock +22 -69
  6. data/lib/workos/audit_log_export.rb +8 -31
  7. data/lib/workos/audit_logs.rb +0 -26
  8. data/lib/workos/authentication_factor_and_challenge.rb +0 -3
  9. data/lib/workos/authentication_response.rb +3 -6
  10. data/lib/workos/challenge.rb +9 -28
  11. data/lib/workos/client.rb +0 -41
  12. data/lib/workos/configuration.rb +0 -1
  13. data/lib/workos/connection.rb +11 -35
  14. data/lib/workos/directory.rb +10 -37
  15. data/lib/workos/directory_group.rb +9 -36
  16. data/lib/workos/directory_sync.rb +0 -21
  17. data/lib/workos/directory_user.rb +17 -51
  18. data/lib/workos/errors.rb +0 -16
  19. data/lib/workos/event.rb +5 -26
  20. data/lib/workos/events.rb +0 -7
  21. data/lib/workos/factor.rb +9 -28
  22. data/lib/workos/hash_provider.rb +0 -1
  23. data/lib/workos/impersonator.rb +0 -3
  24. data/lib/workos/invitation.rb +12 -37
  25. data/lib/workos/mfa.rb +0 -42
  26. data/lib/workos/organization.rb +8 -31
  27. data/lib/workos/organization_membership.rb +8 -27
  28. data/lib/workos/organizations.rb +0 -26
  29. data/lib/workos/passwordless.rb +0 -14
  30. data/lib/workos/portal.rb +1 -13
  31. data/lib/workos/profile.rb +12 -39
  32. data/lib/workos/profile_and_token.rb +1 -4
  33. data/lib/workos/refresh_authentication_response.rb +2 -5
  34. data/lib/workos/sso.rb +1 -43
  35. data/lib/workos/types/intent.rb +16 -0
  36. data/lib/workos/types/list_struct.rb +8 -5
  37. data/lib/workos/types/passwordless_session_struct.rb +10 -9
  38. data/lib/workos/types/provider.rb +15 -0
  39. data/lib/workos/types.rb +5 -23
  40. data/lib/workos/user.rb +10 -31
  41. data/lib/workos/user_and_token.rb +1 -4
  42. data/lib/workos/user_management.rb +36 -244
  43. data/lib/workos/user_response.rb +0 -3
  44. data/lib/workos/verify_challenge.rb +4 -18
  45. data/lib/workos/version.rb +1 -2
  46. data/lib/workos/webhook.rb +5 -26
  47. data/lib/workos/webhooks.rb +1 -38
  48. data/lib/workos.rb +0 -2
  49. data/spec/lib/workos/audit_logs_spec.rb +2 -3
  50. data/spec/lib/workos/configuration_spec.rb +0 -1
  51. data/spec/lib/workos/directory_sync_spec.rb +0 -1
  52. data/spec/lib/workos/directory_user_spec.rb +0 -1
  53. data/spec/lib/workos/event_spec.rb +0 -1
  54. data/spec/lib/workos/mfa_spec.rb +0 -1
  55. data/spec/lib/workos/organizations_spec.rb +0 -1
  56. data/spec/lib/workos/passwordless_spec.rb +0 -1
  57. data/spec/lib/workos/portal_spec.rb +0 -1
  58. data/spec/lib/workos/sso_spec.rb +0 -1
  59. data/spec/lib/workos/user_management_spec.rb +29 -1
  60. data/spec/lib/workos/webhooks_spec.rb +0 -1
  61. data/spec/spec_helper.rb +0 -9
  62. data/spec/support/fixtures/vcr_cassettes/user_management/revoke_session/not_found.yml +80 -0
  63. data/spec/support/fixtures/vcr_cassettes/user_management/revoke_session/valid.yml +76 -0
  64. data/spec/support/shared_examples/client_spec.rb +0 -1
  65. data/workos.gemspec +1 -6
  66. metadata +15 -129
  67. data/.semaphore/rubygems.yml +0 -24
  68. data/.semaphore/semaphore.yml +0 -51
  69. data/bin/tapioca +0 -29
  70. data/codecov.yml +0 -12
  71. data/devbox.json +0 -18
  72. data/devbox.lock +0 -11
  73. data/lib/workos/types/audit_log_export_struct.rb +0 -17
  74. data/lib/workos/types/challenge_struct.rb +0 -18
  75. data/lib/workos/types/connection_struct.rb +0 -20
  76. data/lib/workos/types/directory_group_struct.rb +0 -19
  77. data/lib/workos/types/directory_struct.rb +0 -19
  78. data/lib/workos/types/directory_user_struct.rb +0 -26
  79. data/lib/workos/types/event_struct.rb +0 -15
  80. data/lib/workos/types/factor_struct.rb +0 -18
  81. data/lib/workos/types/intent_enum.rb +0 -17
  82. data/lib/workos/types/invitation_struct.rb +0 -20
  83. data/lib/workos/types/magic_auth_challenge_struct.rb +0 -12
  84. data/lib/workos/types/organization_membership_struct.rb +0 -16
  85. data/lib/workos/types/organization_struct.rb +0 -17
  86. data/lib/workos/types/profile_struct.rb +0 -21
  87. data/lib/workos/types/provider_enum.rb +0 -16
  88. data/lib/workos/types/user_struct.rb +0 -18
  89. data/lib/workos/types/verify_challenge_struct.rb +0 -13
  90. data/lib/workos/types/webhook_struct.rb +0 -15
  91. data/sorbet/config +0 -2
  92. data/sorbet/rbi/gems/addressable@2.8.0.rbi +0 -290
  93. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -54
  94. data/sorbet/rbi/gems/codecov@0.2.12.rbi +0 -55
  95. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
  96. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -57
  97. data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +0 -185
  98. data/sorbet/rbi/gems/docile@1.3.5.rbi +0 -54
  99. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -82
  100. data/sorbet/rbi/gems/json@2.5.1.rbi +0 -109
  101. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
  102. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -113
  103. data/sorbet/rbi/gems/parser@3.0.1.0.rbi +0 -1187
  104. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -8
  105. data/sorbet/rbi/gems/public_suffix@4.0.6.rbi +0 -146
  106. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -153
  107. data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -807
  108. data/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -2118
  109. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -1117
  110. data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -709
  111. data/sorbet/rbi/gems/rspec-core@3.9.3.rbi +0 -2467
  112. data/sorbet/rbi/gems/rspec-expectations@3.9.4.rbi +0 -1569
  113. data/sorbet/rbi/gems/rspec-mocks@3.9.1.rbi +0 -1493
  114. data/sorbet/rbi/gems/rspec-support@3.9.4.rbi +0 -511
  115. data/sorbet/rbi/gems/rspec@3.9.0.rbi +0 -38
  116. data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -1881
  117. data/sorbet/rbi/gems/rubocop@0.93.1.rbi +0 -11497
  118. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -405
  119. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -89
  120. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -577
  121. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.2.rbi +0 -8
  122. data/sorbet/rbi/gems/spoom@1.1.15.rbi +0 -1549
  123. data/sorbet/rbi/gems/tapioca@0.7.3.rbi +0 -1718
  124. data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -844
  125. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +0 -22
  126. data/sorbet/rbi/gems/unparser@0.6.2.rbi +0 -8
  127. data/sorbet/rbi/gems/vcr@5.0.0.rbi +0 -699
  128. data/sorbet/rbi/gems/webmock@3.12.2.rbi +0 -662
  129. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +0 -268
  130. data/sorbet/rbi/gems/yard@0.9.26.rbi +0 -4048
  131. data/sorbet/tapioca/config.yml +0 -13
  132. data/sorbet/tapioca/require.rb +0 -4
@@ -1,268 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `yard-sorbet` gem.
5
- # Please instead update this file by running `bin/tapioca gem yard-sorbet`.
6
-
7
- module YARDSorbet; end
8
-
9
- module YARDSorbet::Directives
10
- class << self
11
- sig { params(docstring: ::String, directives: T::Array[::String]).void }
12
- def add_directives(docstring, directives); end
13
-
14
- sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) }
15
- def extract_directives(docstring); end
16
- end
17
- end
18
-
19
- module YARDSorbet::Handlers; end
20
-
21
- class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base
22
- sig { void }
23
- def process; end
24
- end
25
-
26
- YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String)
27
- YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String)
28
-
29
- class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base
30
- sig { void }
31
- def process; end
32
-
33
- private
34
-
35
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
36
- def const_assign_node?(node); end
37
- end
38
-
39
- class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base
40
- sig { void }
41
- def process; end
42
-
43
- private
44
-
45
- sig { returns(::YARD::CodeObjects::NamespaceObject) }
46
- def included_in; end
47
- end
48
-
49
- class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base
50
- sig { void }
51
- def process; end
52
-
53
- class << self
54
- sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) }
55
- def mixed_in_class_methods(code_obj); end
56
- end
57
- end
58
-
59
- class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base
60
- sig { void }
61
- def process; end
62
-
63
- private
64
-
65
- sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void }
66
- def document_attr_methods(method_objects); end
67
-
68
- sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) }
69
- def merged_into_attr?(attr_node); end
70
-
71
- sig do
72
- params(
73
- attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode),
74
- docstring: T.nilable(::String),
75
- include_params: T::Boolean
76
- ).void
77
- end
78
- def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end
79
-
80
- sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
81
- def parse_params(node, docstring); end
82
-
83
- sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
84
- def parse_return(node, docstring); end
85
-
86
- sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void }
87
- def parse_sig(docstring, include_params: T.unsafe(nil)); end
88
-
89
- sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void }
90
- def process_attr(attr_node); end
91
-
92
- sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void }
93
- def process_def(def_node); end
94
- end
95
-
96
- YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
97
-
98
- module YARDSorbet::Handlers::StructClassHandler
99
- sig { void }
100
- def process; end
101
-
102
- private
103
-
104
- sig do
105
- params(
106
- object: ::YARD::CodeObjects::MethodObject,
107
- props: T::Array[::YARDSorbet::TStructProp],
108
- docstring: ::YARD::Docstring,
109
- directives: T::Array[::String]
110
- ).void
111
- end
112
- def decorate_t_struct_init(object, props, docstring, directives); end
113
-
114
- sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void }
115
- def process_t_struct_props(props, class_ns); end
116
-
117
- sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) }
118
- def to_object_parameters(props); end
119
- end
120
-
121
- class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base
122
- sig { void }
123
- def process; end
124
-
125
- private
126
-
127
- sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void }
128
- def decorate_object(object, prop); end
129
-
130
- sig { returns(T::Boolean) }
131
- def immutable?; end
132
-
133
- sig { params(kwd: ::String).returns(T.nilable(::String)) }
134
- def kw_arg(kwd); end
135
-
136
- sig { params(name: ::String).returns(::YARDSorbet::TStructProp) }
137
- def make_prop(name); end
138
-
139
- sig { returns(T::Array[T.untyped]) }
140
- def params; end
141
-
142
- sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void }
143
- def register_attrs(object, name); end
144
-
145
- sig { params(prop: ::YARDSorbet::TStructProp).void }
146
- def update_state(prop); end
147
- end
148
-
149
- module YARDSorbet::NodeUtils
150
- class << self
151
- sig do
152
- params(
153
- node: ::YARD::Parser::Ruby::AstNode,
154
- _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void
155
- ).void
156
- end
157
- def bfs_traverse(node, &_blk); end
158
-
159
- sig { params(node: ::YARD::Parser::Ruby::AstNode).void }
160
- def delete_node(node); end
161
-
162
- sig do
163
- params(
164
- node: ::YARD::Parser::Ruby::AstNode
165
- ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode))
166
- end
167
- def get_method_node(node); end
168
-
169
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) }
170
- def sibling_node(node); end
171
-
172
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
173
- def sigable_node?(node); end
174
-
175
- sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
176
- def validated_attribute_names(attr_node); end
177
- end
178
- end
179
-
180
- YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array)
181
- YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array)
182
- YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
183
-
184
- module YARDSorbet::SigToYARD
185
- class << self
186
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
187
- def convert(node); end
188
-
189
- private
190
-
191
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) }
192
- def build_generic_type(node); end
193
-
194
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
195
- def convert_aref(node); end
196
-
197
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
198
- def convert_array(node); end
199
-
200
- sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
201
- def convert_call(node); end
202
-
203
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
204
- def convert_collection(node); end
205
-
206
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
207
- def convert_hash(node); end
208
-
209
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
210
- def convert_list(node); end
211
-
212
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
213
- def convert_node(node); end
214
-
215
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
216
- def convert_node_type(node); end
217
-
218
- sig { params(node_source: ::String).returns([::String]) }
219
- def convert_ref(node_source); end
220
-
221
- sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
222
- def convert_t_method(node); end
223
-
224
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
225
- def convert_unknown(node); end
226
- end
227
- end
228
-
229
- YARDSorbet::SigToYARD::REF_TYPES = T.let(T.unsafe(nil), Hash)
230
-
231
- class YARDSorbet::TStructProp < ::T::Struct
232
- const :default, T.nilable(::String)
233
- const :doc, ::String
234
- const :prop_name, ::String
235
- const :source, ::String
236
- const :types, T::Array[::String]
237
-
238
- class << self
239
- def inherited(s); end
240
- end
241
- end
242
-
243
- module YARDSorbet::TagUtils
244
- class << self
245
- sig do
246
- params(
247
- docstring: ::YARD::Docstring,
248
- tag_name: ::String,
249
- name: T.nilable(::String)
250
- ).returns(T.nilable(::YARD::Tags::Tag))
251
- end
252
- def find_tag(docstring, tag_name, name); end
253
-
254
- sig do
255
- params(
256
- docstring: ::YARD::Docstring,
257
- tag_name: ::String,
258
- types: T.nilable(T::Array[::String]),
259
- name: T.nilable(::String),
260
- text: ::String
261
- ).void
262
- end
263
- def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end
264
- end
265
- end
266
-
267
- YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array)
268
- YARDSorbet::VERSION = T.let(T.unsafe(nil), String)