clerk-sdk-ruby 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/clerk/billing.rb +318 -0
  3. data/lib/clerk/models/components/{commercepriceresponse.rb → billingpriceresponse.rb} +2 -2
  4. data/lib/clerk/models/components/{commercepriceresponse.rbi → billingpriceresponse.rbi} +2 -2
  5. data/lib/clerk/models/components/{commercepriceresponse_object.rb → billingpriceresponse_object.rb} +2 -2
  6. data/lib/clerk/models/components/billingpriceresponse_object.rbi +11 -0
  7. data/lib/clerk/models/components/commercepricetransitiondetails.rb +1 -1
  8. data/lib/clerk/models/components/createbillingpricerequest.rb +48 -0
  9. data/lib/clerk/models/components/createbillingpricerequest.rbi +21 -0
  10. data/lib/clerk/models/components/externalaccountwithverification.rb +6 -1
  11. data/lib/clerk/models/components/externalaccountwithverification.rbi +2 -0
  12. data/lib/clerk/models/components/organizationmembership.rb +1 -1
  13. data/lib/clerk/models/components/paginatedbillingpriceresponse.rb +36 -0
  14. data/lib/clerk/models/components/paginatedbillingpriceresponse.rbi +15 -0
  15. data/lib/clerk/models/components.rb +4 -2
  16. data/lib/clerk/models/operations/createbillingprice_response.rb +44 -0
  17. data/lib/clerk/models/operations/createbillingprice_response.rbi +19 -0
  18. data/lib/clerk/models/operations/createbulkwaitlistentries_requestbody.rb +37 -0
  19. data/lib/clerk/models/operations/createbulkwaitlistentries_requestbody.rbi +15 -0
  20. data/lib/clerk/models/operations/createbulkwaitlistentries_response.rb +44 -0
  21. data/lib/clerk/models/operations/createbulkwaitlistentries_response.rbi +19 -0
  22. data/lib/clerk/models/operations/getbillingpricelist_request.rb +49 -0
  23. data/lib/clerk/models/operations/getbillingpricelist_request.rbi +19 -0
  24. data/lib/clerk/models/operations/getbillingpricelist_response.rb +44 -0
  25. data/lib/clerk/models/operations/getbillingpricelist_response.rbi +19 -0
  26. data/lib/clerk/models/operations/getuserlist_request.rb +25 -1
  27. data/lib/clerk/models/operations/getuserlist_request.rbi +8 -0
  28. data/lib/clerk/models/operations/getuserscount_request.rb +26 -1
  29. data/lib/clerk/models/operations/getuserscount_request.rbi +8 -0
  30. data/lib/clerk/models/operations/updateinstanceauthconfig_request.rb +1 -1
  31. data/lib/clerk/models/operations.rb +5 -0
  32. data/lib/clerk/sdkconfiguration.rb +3 -3
  33. data/lib/clerk/waitlistentries.rb +151 -0
  34. metadata +20 -6
  35. data/lib/clerk/models/components/commercepriceresponse_object.rbi +0 -11
@@ -0,0 +1,19 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Clerk::Models::Operations::CreateBillingPriceResponse
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Clerk::Models::Operations::CreateBillingPriceResponse
11
+ def content_type(); end
12
+ def content_type=(str_); end
13
+ def status_code(); end
14
+ def status_code=(str_); end
15
+ def raw_response(); end
16
+ def raw_response=(str_); end
17
+ def billing_price_response(); end
18
+ def billing_price_response=(str_); end
19
+ end
@@ -0,0 +1,37 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: false
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module Clerk
8
+ module Models
9
+ module Operations
10
+
11
+ class CreateBulkWaitlistEntriesRequestBody
12
+
13
+ include Crystalline::MetadataFields
14
+
15
+ # The email address to add to the waitlist
16
+ field :email_address, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('email_address'), required: true } }
17
+ # Optional flag which denotes whether a confirmation email should be sent to the given email address.
18
+ # Defaults to `true`.
19
+ field :notify, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('notify') } }
20
+
21
+
22
+ def initialize(email_address:, notify: true)
23
+ @email_address = email_address
24
+ @notify = notify
25
+ end
26
+
27
+
28
+ def ==(other)
29
+ return false unless other.is_a? self.class
30
+ return false unless @email_address == other.email_address
31
+ return false unless @notify == other.notify
32
+ true
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,15 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Clerk::Models::Operations::CreateBulkWaitlistEntriesRequestBody
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Clerk::Models::Operations::CreateBulkWaitlistEntriesRequestBody
11
+ def email_address(); end
12
+ def email_address=(str_); end
13
+ def notify(); end
14
+ def notify=(str_); end
15
+ end
@@ -0,0 +1,44 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: false
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module Clerk
8
+ module Models
9
+ module Operations
10
+
11
+ class CreateBulkWaitlistEntriesResponse
12
+
13
+ include Crystalline::MetadataFields
14
+
15
+ # HTTP response content type for this operation
16
+ field :content_type, ::String
17
+ # HTTP response status code for this operation
18
+ field :status_code, ::Integer
19
+ # Raw HTTP response; suitable for custom response parsing
20
+ field :raw_response, ::Faraday::Response
21
+ # Array of waitlist entries
22
+ field :waitlist_entry_list, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::WaitlistEntry))
23
+
24
+
25
+ def initialize(content_type:, status_code:, raw_response:, waitlist_entry_list: nil)
26
+ @content_type = content_type
27
+ @status_code = status_code
28
+ @raw_response = raw_response
29
+ @waitlist_entry_list = waitlist_entry_list
30
+ end
31
+
32
+
33
+ def ==(other)
34
+ return false unless other.is_a? self.class
35
+ return false unless @content_type == other.content_type
36
+ return false unless @status_code == other.status_code
37
+ return false unless @raw_response == other.raw_response
38
+ return false unless @waitlist_entry_list == other.waitlist_entry_list
39
+ true
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,19 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Clerk::Models::Operations::CreateBulkWaitlistEntriesResponse
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Clerk::Models::Operations::CreateBulkWaitlistEntriesResponse
11
+ def content_type(); end
12
+ def content_type=(str_); end
13
+ def status_code(); end
14
+ def status_code=(str_); end
15
+ def raw_response(); end
16
+ def raw_response=(str_); end
17
+ def waitlist_entry_list(); end
18
+ def waitlist_entry_list=(str_); end
19
+ end
@@ -0,0 +1,49 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: false
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module Clerk
8
+ module Models
9
+ module Operations
10
+
11
+ class GetBillingPriceListRequest
12
+
13
+ include Crystalline::MetadataFields
14
+
15
+ # Whether to paginate the results.
16
+ # If true, the results will be paginated.
17
+ # If false, the results will not be paginated.
18
+ field :paginated, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'query_param': { 'field_name': 'paginated', 'style': 'form', 'explode': true } }
19
+ # Filter prices by plan ID
20
+ field :plan_id, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'plan_id', 'style': 'form', 'explode': true } }
21
+ # Applies a limit to the number of results returned.
22
+ # Can be used for paginating the results together with `offset`.
23
+ field :limit, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } }
24
+ # Skip the first `offset` results when paginating.
25
+ # Needs to be an integer greater or equal to zero.
26
+ # To be used in conjunction with `limit`.
27
+ field :offset, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'offset', 'style': 'form', 'explode': true } }
28
+
29
+
30
+ def initialize(paginated: nil, plan_id: nil, limit: 10, offset: 0)
31
+ @paginated = paginated
32
+ @plan_id = plan_id
33
+ @limit = limit
34
+ @offset = offset
35
+ end
36
+
37
+
38
+ def ==(other)
39
+ return false unless other.is_a? self.class
40
+ return false unless @paginated == other.paginated
41
+ return false unless @plan_id == other.plan_id
42
+ return false unless @limit == other.limit
43
+ return false unless @offset == other.offset
44
+ true
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,19 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Clerk::Models::Operations::GetBillingPriceListRequest
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Clerk::Models::Operations::GetBillingPriceListRequest
11
+ def paginated(); end
12
+ def paginated=(str_); end
13
+ def plan_id(); end
14
+ def plan_id=(str_); end
15
+ def limit(); end
16
+ def limit=(str_); end
17
+ def offset(); end
18
+ def offset=(str_); end
19
+ end
@@ -0,0 +1,44 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: false
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module Clerk
8
+ module Models
9
+ module Operations
10
+
11
+ class GetBillingPriceListResponse
12
+
13
+ include Crystalline::MetadataFields
14
+
15
+ # HTTP response content type for this operation
16
+ field :content_type, ::String
17
+ # HTTP response status code for this operation
18
+ field :status_code, ::Integer
19
+ # Raw HTTP response; suitable for custom response parsing
20
+ field :raw_response, ::Faraday::Response
21
+ # A list of billing prices.
22
+ field :paginated_billing_price_response, Crystalline::Nilable.new(Models::Components::PaginatedBillingPriceResponse)
23
+
24
+
25
+ def initialize(content_type:, status_code:, raw_response:, paginated_billing_price_response: nil)
26
+ @content_type = content_type
27
+ @status_code = status_code
28
+ @raw_response = raw_response
29
+ @paginated_billing_price_response = paginated_billing_price_response
30
+ end
31
+
32
+
33
+ def ==(other)
34
+ return false unless other.is_a? self.class
35
+ return false unless @content_type == other.content_type
36
+ return false unless @status_code == other.status_code
37
+ return false unless @raw_response == other.raw_response
38
+ return false unless @paginated_billing_price_response == other.paginated_billing_price_response
39
+ true
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,19 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class Clerk::Models::Operations::GetBillingPriceListResponse
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class Clerk::Models::Operations::GetBillingPriceListResponse
11
+ def content_type(); end
12
+ def content_type=(str_); end
13
+ def status_code(); end
14
+ def status_code=(str_); end
15
+ def raw_response(); end
16
+ def raw_response=(str_); end
17
+ def paginated_billing_price_response(); end
18
+ def paginated_billing_price_response=(str_); end
19
+ end
@@ -87,6 +87,22 @@ module Clerk
87
87
  # Returns users who have been created after the given date (with millisecond precision).
88
88
  # Example: use 1730160000000 to retrieve users who have been created after 2024-10-29.
89
89
  field :created_at_after, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'created_at_after', 'style': 'form', 'explode': true } }
90
+ # Returns users whose last sign-in was before the given date (with millisecond precision).
91
+ # Example: use 1700690400000 to retrieve users whose last sign-in was before 2023-11-23.
92
+ field :last_sign_in_at_before, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'last_sign_in_at_before', 'style': 'form', 'explode': true } }
93
+ # Returns users whose last sign-in was after the given date (with millisecond precision).
94
+ # Example: use 1700690400000 to retrieve users whose last sign-in was after 2023-11-23.
95
+ field :last_sign_in_at_after, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'last_sign_in_at_after', 'style': 'form', 'explode': true } }
96
+ # Returns users with external accounts for the specified OAuth provider.
97
+ # Must be used in combination with the `provider_user_id` parameter.
98
+ # For example, use `provider=oauth_google&provider_user_id=12345` to retrieve a user with Google provider user ID 12345.
99
+ field :provider, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'provider', 'style': 'form', 'explode': true } }
100
+ # Returns users with the specified provider user IDs for a specific provider.
101
+ # Must be used in combination with the `provider` parameter.
102
+ # For example, use `provider=oauth_google&provider_user_id=12345` to retrieve a user with Google provider user ID 12345.
103
+ # Accepts up to 100 provider user IDs.
104
+ # Any provider user IDs not found are ignored.
105
+ field :provider_user_id, Crystalline::Nilable.new(Crystalline::Array.new(::String)), { 'query_param': { 'field_name': 'provider_user_id', 'style': 'form', 'explode': true } }
90
106
  # Applies a limit to the number of results returned.
91
107
  # Can be used for paginating the results together with `offset`.
92
108
  field :limit, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'limit', 'style': 'form', 'explode': true } }
@@ -103,7 +119,7 @@ module Clerk
103
119
  field :order_by, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'order_by', 'style': 'form', 'explode': true } }
104
120
 
105
121
 
106
- def initialize(email_address: nil, phone_number: nil, external_id: nil, username: nil, web3_wallet: nil, user_id: nil, organization_id: nil, query: nil, email_address_query: nil, phone_number_query: nil, username_query: nil, name_query: nil, banned: nil, last_active_at_before: nil, last_active_at_after: nil, last_active_at_since: nil, created_at_before: nil, created_at_after: nil, limit: 10, offset: 0, order_by: '-created_at')
122
+ def initialize(email_address: nil, phone_number: nil, external_id: nil, username: nil, web3_wallet: nil, user_id: nil, organization_id: nil, query: nil, email_address_query: nil, phone_number_query: nil, username_query: nil, name_query: nil, banned: nil, last_active_at_before: nil, last_active_at_after: nil, last_active_at_since: nil, created_at_before: nil, created_at_after: nil, last_sign_in_at_before: nil, last_sign_in_at_after: nil, provider: nil, provider_user_id: nil, limit: 10, offset: 0, order_by: '-created_at')
107
123
  @email_address = email_address
108
124
  @phone_number = phone_number
109
125
  @external_id = external_id
@@ -122,6 +138,10 @@ module Clerk
122
138
  @last_active_at_since = last_active_at_since
123
139
  @created_at_before = created_at_before
124
140
  @created_at_after = created_at_after
141
+ @last_sign_in_at_before = last_sign_in_at_before
142
+ @last_sign_in_at_after = last_sign_in_at_after
143
+ @provider = provider
144
+ @provider_user_id = provider_user_id
125
145
  @limit = limit
126
146
  @offset = offset
127
147
  @order_by = order_by
@@ -148,6 +168,10 @@ module Clerk
148
168
  return false unless @last_active_at_since == other.last_active_at_since
149
169
  return false unless @created_at_before == other.created_at_before
150
170
  return false unless @created_at_after == other.created_at_after
171
+ return false unless @last_sign_in_at_before == other.last_sign_in_at_before
172
+ return false unless @last_sign_in_at_after == other.last_sign_in_at_after
173
+ return false unless @provider == other.provider
174
+ return false unless @provider_user_id == other.provider_user_id
151
175
  return false unless @limit == other.limit
152
176
  return false unless @offset == other.offset
153
177
  return false unless @order_by == other.order_by
@@ -44,6 +44,14 @@ class Clerk::Models::Operations::GetUserListRequest
44
44
  def created_at_before=(str_); end
45
45
  def created_at_after(); end
46
46
  def created_at_after=(str_); end
47
+ def last_sign_in_at_before(); end
48
+ def last_sign_in_at_before=(str_); end
49
+ def last_sign_in_at_after(); end
50
+ def last_sign_in_at_after=(str_); end
51
+ def provider(); end
52
+ def provider=(str_); end
53
+ def provider_user_id(); end
54
+ def provider_user_id=(str_); end
47
55
  def limit(); end
48
56
  def limit=(str_); end
49
57
  def offset(); end
@@ -78,9 +78,26 @@ module Clerk
78
78
  # Returns users who have been created after the given date (with millisecond precision).
79
79
  # Example: use 1730160000000 to retrieve users who have been created after 2024-10-29.
80
80
  field :created_at_after, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'created_at_after', 'style': 'form', 'explode': true } }
81
+ # Counts users whose last sign-in was before the given date (with millisecond precision).
82
+ # Example: use 1700690400000 to count users whose last sign-in was before 2023-11-23.
83
+ field :last_sign_in_at_before, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'last_sign_in_at_before', 'style': 'form', 'explode': true } }
84
+ # Counts users whose last sign-in was after the given date (with millisecond precision).
85
+ # Example: use 1700690400000 to count users whose last sign-in was after 2023-11-23.
86
+ field :last_sign_in_at_after, Crystalline::Nilable.new(::Integer), { 'query_param': { 'field_name': 'last_sign_in_at_after', 'style': 'form', 'explode': true } }
87
+ # Counts users with external accounts for the specified OAuth provider.
88
+ # Must be used in combination with the `provider_user_id` parameter.
89
+ # For example, use `provider=oauth_google&provider_user_id=12345` to count users with Google provider user ID 12345.
90
+ # Accepts up to 100 providers.
91
+ field :provider, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'provider', 'style': 'form', 'explode': true } }
92
+ # Counts users with the specified provider user IDs for a specific provider.
93
+ # Must be used in combination with the `provider` parameter.
94
+ # For example, use `provider=oauth_google&provider_user_id=12345` to count users with Google provider user ID 12345.
95
+ # Accepts up to 100 provider user IDs.
96
+ # Any provider user IDs not found are ignored.
97
+ field :provider_user_id, Crystalline::Nilable.new(Crystalline::Array.new(::String)), { 'query_param': { 'field_name': 'provider_user_id', 'style': 'form', 'explode': true } }
81
98
 
82
99
 
83
- def initialize(email_address: nil, phone_number: nil, external_id: nil, username: nil, web3_wallet: nil, user_id: nil, organization_id: nil, query: nil, email_address_query: nil, phone_number_query: nil, username_query: nil, name_query: nil, banned: nil, last_active_at_before: nil, last_active_at_after: nil, last_active_at_since: nil, created_at_before: nil, created_at_after: nil)
100
+ def initialize(email_address: nil, phone_number: nil, external_id: nil, username: nil, web3_wallet: nil, user_id: nil, organization_id: nil, query: nil, email_address_query: nil, phone_number_query: nil, username_query: nil, name_query: nil, banned: nil, last_active_at_before: nil, last_active_at_after: nil, last_active_at_since: nil, created_at_before: nil, created_at_after: nil, last_sign_in_at_before: nil, last_sign_in_at_after: nil, provider: nil, provider_user_id: nil)
84
101
  @email_address = email_address
85
102
  @phone_number = phone_number
86
103
  @external_id = external_id
@@ -99,6 +116,10 @@ module Clerk
99
116
  @last_active_at_since = last_active_at_since
100
117
  @created_at_before = created_at_before
101
118
  @created_at_after = created_at_after
119
+ @last_sign_in_at_before = last_sign_in_at_before
120
+ @last_sign_in_at_after = last_sign_in_at_after
121
+ @provider = provider
122
+ @provider_user_id = provider_user_id
102
123
  end
103
124
 
104
125
 
@@ -122,6 +143,10 @@ module Clerk
122
143
  return false unless @last_active_at_since == other.last_active_at_since
123
144
  return false unless @created_at_before == other.created_at_before
124
145
  return false unless @created_at_after == other.created_at_after
146
+ return false unless @last_sign_in_at_before == other.last_sign_in_at_before
147
+ return false unless @last_sign_in_at_after == other.last_sign_in_at_after
148
+ return false unless @provider == other.provider
149
+ return false unless @provider_user_id == other.provider_user_id
125
150
  true
126
151
  end
127
152
  end
@@ -44,4 +44,12 @@ class Clerk::Models::Operations::GetUsersCountRequest
44
44
  def created_at_before=(str_); end
45
45
  def created_at_after(); end
46
46
  def created_at_after=(str_); end
47
+ def last_sign_in_at_before(); end
48
+ def last_sign_in_at_before=(str_); end
49
+ def last_sign_in_at_after(); end
50
+ def last_sign_in_at_after=(str_); end
51
+ def provider(); end
52
+ def provider=(str_); end
53
+ def provider_user_id(); end
54
+ def provider_user_id=(str_); end
47
55
  end
@@ -16,7 +16,7 @@ module Clerk
16
16
  # Only alphanumeric values are allowed.
17
17
  # Note that this value should contain only the local part of the address (e.g. `foo` for `foo@example.com`).
18
18
  field :from_email_address, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('from_email_address') } }
19
- # Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info.
19
+ # Enable the Progressive Sign Up algorithm. This feature is deprecated, please contact support if you need assistance.
20
20
  field :progressive_sign_up, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('progressive_sign_up') } }
21
21
  # Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
22
22
  # Defaults to true for development instances.
@@ -26,11 +26,14 @@ module Clerk
26
26
  autoload :CreateAllowlistIdentifierResponse, 'clerk/models/operations/createallowlistidentifier_response.rb'
27
27
  autoload :CreateBillingPriceTransitionRequest, 'clerk/models/operations/createbillingpricetransition_request.rb'
28
28
  autoload :CreateBillingPriceTransitionResponse, 'clerk/models/operations/createbillingpricetransition_response.rb'
29
+ autoload :CreateBillingPriceResponse, 'clerk/models/operations/createbillingprice_response.rb'
29
30
  autoload :CreateBlocklistIdentifierRequest, 'clerk/models/operations/createblocklistidentifier_request.rb'
30
31
  autoload :CreateBlocklistIdentifierResponse, 'clerk/models/operations/createblocklistidentifier_response.rb'
31
32
  autoload :CreateBulkInvitationsRequestBody, 'clerk/models/operations/createbulkinvitations_requestbody.rb'
32
33
  autoload :CreateBulkInvitationsResponse, 'clerk/models/operations/createbulkinvitations_response.rb'
33
34
  autoload :CreateBulkInvitationsTemplateSlug, 'clerk/models/operations/createbulkinvitations_template_slug.rb'
35
+ autoload :CreateBulkWaitlistEntriesRequestBody, 'clerk/models/operations/createbulkwaitlistentries_requestbody.rb'
36
+ autoload :CreateBulkWaitlistEntriesResponse, 'clerk/models/operations/createbulkwaitlistentries_response.rb'
34
37
  autoload :CreateEmailAddressRequest, 'clerk/models/operations/createemailaddress_request.rb'
35
38
  autoload :CreateEmailAddressResponse, 'clerk/models/operations/createemailaddress_response.rb'
36
39
  autoload :CreateInvitationRequest, 'clerk/models/operations/createinvitation_request.rb'
@@ -151,6 +154,8 @@ module Clerk
151
154
  autoload :ExtendBillingSubscriptionItemFreeTrialResponse, 'clerk/models/operations/extendbillingsubscriptionitemfreetrial_response.rb'
152
155
  autoload :ForbiddenError, 'clerk/models/operations/forbidden_error.rb'
153
156
  autoload :GenerateSvixAuthURLResponse, 'clerk/models/operations/generatesvixauthurl_response.rb'
157
+ autoload :GetBillingPriceListRequest, 'clerk/models/operations/getbillingpricelist_request.rb'
158
+ autoload :GetBillingPriceListResponse, 'clerk/models/operations/getbillingpricelist_response.rb'
154
159
  autoload :GetBillingStatementListRequest, 'clerk/models/operations/getbillingstatementlist_request.rb'
155
160
  autoload :GetBillingStatementListResponse, 'clerk/models/operations/getbillingstatementlist_response.rb'
156
161
  autoload :GetBillingStatementPaymentAttemptsRequest, 'clerk/models/operations/getbillingstatementpaymentattempts_request.rb'
@@ -77,9 +77,9 @@ module Clerk
77
77
  end
78
78
  @language = 'ruby'
79
79
  @openapi_doc_version = '2025-11-10'
80
- @sdk_version = '5.0.1'
81
- @gen_version = '2.801.2'
82
- @user_agent = 'speakeasy-sdk/ruby 5.0.1 2.801.2 2025-11-10 clerk-sdk-ruby'
80
+ @sdk_version = '5.0.2'
81
+ @gen_version = '2.809.2'
82
+ @user_agent = 'speakeasy-sdk/ruby 5.0.2 2.809.2 2025-11-10 clerk-sdk-ruby'
83
83
  end
84
84
 
85
85
 
@@ -306,6 +306,157 @@ module Clerk
306
306
 
307
307
 
308
308
 
309
+ def bulk_create(request: nil, retries: nil, timeout_ms: nil)
310
+ # bulk_create - Create multiple waitlist entries
311
+ # Creates multiple waitlist entries for the provided email addresses.
312
+ # You can choose whether to send confirmation emails by setting the `notify` parameter to `true` or `false` for each entry.
313
+ # If the `notify` parameter is omitted, it defaults to `true`.
314
+ #
315
+ # If an email address is already on the waitlist, no new entry will be created and the existing waitlist entry will be returned.
316
+ # Duplicate email addresses within the same request are not allowed.
317
+ #
318
+ # This endpoint is limited to a maximum of 50 entries per API call. If you need to add more entries, please make multiple requests.
319
+ url, params = @sdk_configuration.get_server_details
320
+ base_url = Utils.template_url(url, params)
321
+ url = "#{base_url}/waitlist_entries/bulk"
322
+ headers = {}
323
+
324
+ req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
325
+ headers['content-type'] = req_content_type
326
+
327
+ if form
328
+ body = Utils.encode_form(form)
329
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
330
+ body = URI.encode_www_form(data)
331
+ else
332
+ body = data
333
+ end
334
+ headers['Accept'] = 'application/json'
335
+ headers['user-agent'] = @sdk_configuration.user_agent
336
+ retries ||= @sdk_configuration.retry_config
337
+ retries ||= Utils::RetryConfig.new(
338
+ backoff: Utils::BackoffStrategy.new(
339
+ exponent: 1.5,
340
+ initial_interval: 500,
341
+ max_elapsed_time: 3_600_000,
342
+ max_interval: 60_000
343
+ ),
344
+ retry_connection_errors: true,
345
+ strategy: 'backoff'
346
+ )
347
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
348
+ retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
349
+
350
+ security = @sdk_configuration.security_source&.call
351
+
352
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
353
+ timeout ||= @sdk_configuration.timeout
354
+
355
+
356
+ connection = @sdk_configuration.client.dup
357
+ connection.request :retry, retry_options
358
+
359
+ hook_ctx = SDKHooks::HookContext.new(
360
+ config: @sdk_configuration,
361
+ base_url: base_url,
362
+ oauth2_scopes: nil,
363
+ operation_id: 'CreateBulkWaitlistEntries',
364
+ security_source: @sdk_configuration.security_source
365
+ )
366
+
367
+ error = nil
368
+ http_response = nil
369
+
370
+
371
+ begin
372
+ http_response = connection.post(url) do |req|
373
+ req.body = body
374
+ req.headers.merge!(headers)
375
+ req.options.timeout = timeout unless timeout.nil?
376
+ Utils.configure_request_security(req, security)
377
+
378
+ @sdk_configuration.hooks.before_request(
379
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
380
+ hook_ctx: hook_ctx
381
+ ),
382
+ request: req
383
+ )
384
+ end
385
+ rescue StandardError => e
386
+ error = e
387
+ ensure
388
+ if http_response.nil? || Utils.error_status?(http_response.status)
389
+ http_response = @sdk_configuration.hooks.after_error(
390
+ error: error,
391
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
392
+ hook_ctx: hook_ctx
393
+ ),
394
+ response: http_response
395
+ )
396
+ else
397
+ http_response = @sdk_configuration.hooks.after_success(
398
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
399
+ hook_ctx: hook_ctx
400
+ ),
401
+ response: http_response
402
+ )
403
+ end
404
+
405
+ if http_response.nil?
406
+ raise error if !error.nil?
407
+ raise 'no response'
408
+ end
409
+ end
410
+
411
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
412
+ if Utils.match_status_code(http_response.status, ['200'])
413
+ if Utils.match_content_type(content_type, 'application/json')
414
+ http_response = @sdk_configuration.hooks.after_success(
415
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
416
+ hook_ctx: hook_ctx
417
+ ),
418
+ response: http_response
419
+ )
420
+ response_data = http_response.env.response_body
421
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Components::WaitlistEntry))
422
+ response = Models::Operations::CreateBulkWaitlistEntriesResponse.new(
423
+ status_code: http_response.status,
424
+ content_type: content_type,
425
+ raw_response: http_response,
426
+ waitlist_entry_list: obj
427
+ )
428
+
429
+ return response
430
+ else
431
+ raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
432
+ end
433
+ elsif Utils.match_status_code(http_response.status, ['400', '422'])
434
+ if Utils.match_content_type(content_type, 'application/json')
435
+ http_response = @sdk_configuration.hooks.after_success(
436
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
437
+ hook_ctx: hook_ctx
438
+ ),
439
+ response: http_response
440
+ )
441
+ response_data = http_response.env.response_body
442
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
443
+ obj.raw_response = http_response
444
+ raise obj
445
+ else
446
+ raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
447
+ end
448
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
449
+ raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
450
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
451
+ raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
452
+ else
453
+ raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
454
+
455
+ end
456
+ end
457
+
458
+
459
+
309
460
  def delete(waitlist_entry_id:, retries: nil, timeout_ms: nil)
310
461
  # delete - Delete a pending waitlist entry
311
462
  # Delete a pending waitlist entry.