workos 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d59f479bcadc439580843b8c8a608b41e4c0183d657241955ed3cfbc0f75a38
4
- data.tar.gz: 48209d43a10edf6d5afa7b4ed5d92c69ee400afb660d23152706b46970602dcc
3
+ metadata.gz: 928be28f91db58c18a6348d67d6a2db1ffd1de55a1bf84e65dad4b250cbd3c85
4
+ data.tar.gz: adc3b8e361b4e4da51155a8f68bb79209ad48946b650dcc930c6130dbb3261ee
5
5
  SHA512:
6
- metadata.gz: 4457fcc8b132f5c7229d8ac5a480b0a3b86de5c1f5a8f28b688cca1e228a1d745fb906495708cf1466cc3a97aaead69fcb970f5fbffd457cdb8cf474ae72eda9
7
- data.tar.gz: 778cebe2ed866d97858822ec755de7ebe105203450e1cc1de8858b863c1af21788582c74d86f249ea2c5561d5c330c669540d970e2769fadbed8f997e223daba
6
+ metadata.gz: 82560b233bd0361d6be1ae87f71c92ebf6af803cfabd1ff0864470769a5a1b1892f052f62c1cd6c4c3f51472a4b1d4e59b720c22100f0e9f7664637ef80e77ed
7
+ data.tar.gz: 161ab6186cc0ed7230714da2d3a216d3a5727a73e478bddd674110cce88457a31dc70df2f20f4085535bd223f7f7bd14a3b432440ca04d6f863a4e05639827eb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (5.0.0)
4
+ workos (5.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -74,12 +74,13 @@ module WorkOS
74
74
  # @param [Array<Hash>] domain_data List of domain hashes describing an orgnaization domain.
75
75
  # @option domain_data [String] domain The domain that belongs to the organization.
76
76
  # @option domain_data [String] state The state of the domain. "verified" or "pending"
77
- # @param [Array<String>] domains List of domains that belong to the organization.
78
- # Deprecated: Use domain_data instead.
79
77
  # @param [String] name A unique, descriptive name for the organization
80
- # @param [Boolean, nil] allow_profiles_outside_organization Whether Connections
81
- # within the Organization allow profiles that are outside of the Organization's configured User Email Domains.
82
78
  # @param [String] idempotency_key An idempotency key
79
+ # @param [Boolean, nil] allow_profiles_outside_organization Whether Connections
80
+ # within the Organization allow profiles that are outside of the Organization's configured User Email Domains.
81
+ # Deprecated: If you need to allow sign-ins from any email domain, contact suppport@workos.com.
82
+ # @param [Array<String>] domains List of domains that belong to the organization.
83
+ # Deprecated: Use domain_data instead.
83
84
  def create_organization(
84
85
  domain_data: nil,
85
86
  domains: nil,
@@ -87,16 +88,23 @@ module WorkOS
87
88
  allow_profiles_outside_organization: nil,
88
89
  idempotency_key: nil
89
90
  )
90
- warn_deprecation '`domains` is deprecated. Use `domain_data` instead.' if domains
91
+ body = { name: name }
92
+ body[:domain_data] = domain_data if domain_data
93
+
94
+ if domains
95
+ warn_deprecation '`domains` is deprecated. Use `domain_data` instead.'
96
+ body[:domains] = domains
97
+ end
98
+
99
+ unless allow_profiles_outside_organization.nil?
100
+ warn_deprecation '`allow_profiles_outside_organization` is deprecated. ' \
101
+ 'If you need to allow sign-ins from any email domain, contact support@workos.com.'
102
+ body[:allow_profiles_outside_organization] = allow_profiles_outside_organization
103
+ end
91
104
 
92
105
  request = post_request(
93
106
  auth: true,
94
- body: {
95
- domain_data: domain_data,
96
- domains: domains,
97
- name: name,
98
- allow_profiles_outside_organization: allow_profiles_outside_organization,
99
- },
107
+ body: body,
100
108
  path: '/organizations',
101
109
  idempotency_key: idempotency_key,
102
110
  )
@@ -113,21 +121,36 @@ module WorkOS
113
121
  # @param [Array<Hash>] domain_data List of domain hashes describing an orgnaization domain.
114
122
  # @option domain_data [String] domain The domain that belongs to the organization.
115
123
  # @option domain_data [String] state The state of the domain. "verified" or "pending"
116
- # @param [Array<String>] domains List of domains that belong to the organization.
117
- # Deprecated: Use domain_data instead.
118
124
  # @param [String] name A unique, descriptive name for the organization
119
125
  # @param [Boolean, nil] allow_profiles_outside_organization Whether Connections
120
- # within the Organization allow profiles that are outside of the Organization's configured User Email Domains.
121
- def update_organization(organization:, domains:, name:, allow_profiles_outside_organization: nil)
122
- warn_deprecation '`domains` is deprecated. Use `domain_data` instead.' if domains
126
+ # within the Organization allow profiles that are outside of the Organization's configured User Email Domains.
127
+ # Deprecated: If you need to allow sign-ins from any email domain, contact suppport@workos.com.
128
+ # @param [Array<String>] domains List of domains that belong to the organization.
129
+ # Deprecated: Use domain_data instead.
130
+ def update_organization(
131
+ organization:,
132
+ domain_data: nil,
133
+ domains: nil,
134
+ name:,
135
+ allow_profiles_outside_organization: nil
136
+ )
137
+ body = { name: name }
138
+ body[:domain_data] = domain_data if domain_data
139
+
140
+ if domains
141
+ warn_deprecation '`domains` is deprecated. Use `domain_data` instead.'
142
+ body[:domains] = domains
143
+ end
144
+
145
+ unless allow_profiles_outside_organization.nil?
146
+ warn_deprecation '`allow_profiles_outside_organization` is deprecated. ' \
147
+ 'If you need to allow sign-ins from any email domain, contact support@workos.com.'
148
+ body[:allow_profiles_outside_organization] = allow_profiles_outside_organization
149
+ end
123
150
 
124
151
  request = put_request(
125
152
  auth: true,
126
- body: {
127
- domains: domains,
128
- name: name,
129
- allow_profiles_outside_organization: allow_profiles_outside_organization,
130
- },
153
+ body: body,
131
154
  path: "/organizations/#{organization}",
132
155
  )
133
156
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkOS
4
- VERSION = '5.0.0'
4
+ VERSION = '5.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-06 00:00:00.000000000 Z
11
+ date: 2024-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler