appwrite 22.0.0 → 23.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 +4 -4
- data/lib/appwrite/client.rb +35 -2
- data/lib/appwrite/enums/auth_method.rb +13 -0
- data/lib/appwrite/enums/build_runtime.rb +3 -0
- data/lib/appwrite/enums/email_template_locale.rb +137 -0
- data/lib/appwrite/enums/email_template_type.rb +13 -0
- data/lib/appwrite/enums/o_auth_provider.rb +6 -0
- data/lib/appwrite/enums/platform_type.rb +11 -0
- data/lib/appwrite/enums/project_policy.rb +15 -0
- data/lib/appwrite/enums/protocol_id.rb +9 -0
- data/lib/appwrite/enums/proxy_resource_type.rb +8 -0
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +8 -0
- data/lib/appwrite/enums/proxy_rule_status.rb +9 -0
- data/lib/appwrite/enums/runtime.rb +3 -0
- data/lib/appwrite/enums/scopes.rb +44 -27
- data/lib/appwrite/enums/secure.rb +8 -0
- data/lib/appwrite/enums/service_id.rb +23 -0
- data/lib/appwrite/enums/status_code.rb +10 -0
- data/lib/appwrite/models/attribute_bigint.rb +96 -0
- data/lib/appwrite/models/auth_provider.rb +47 -0
- data/lib/appwrite/models/billing_limits.rb +62 -0
- data/lib/appwrite/models/block.rb +72 -0
- data/lib/appwrite/models/column_bigint.rb +96 -0
- data/lib/appwrite/models/dev_key.rb +62 -0
- data/lib/appwrite/models/email_template.rb +62 -0
- data/lib/appwrite/models/email_template_list.rb +32 -0
- data/lib/appwrite/models/ephemeral_key.rb +67 -0
- data/lib/appwrite/models/key.rb +67 -0
- data/lib/appwrite/models/key_list.rb +32 -0
- data/lib/appwrite/models/log.rb +5 -0
- data/lib/appwrite/models/membership.rb +5 -0
- data/lib/appwrite/models/mock_number.rb +42 -0
- data/lib/appwrite/models/mock_number_list.rb +32 -0
- data/lib/appwrite/models/o_auth2_amazon.rb +42 -0
- data/lib/appwrite/models/o_auth2_apple.rb +52 -0
- data/lib/appwrite/models/o_auth2_auth0.rb +47 -0
- data/lib/appwrite/models/o_auth2_authentik.rb +47 -0
- data/lib/appwrite/models/o_auth2_autodesk.rb +42 -0
- data/lib/appwrite/models/o_auth2_bitbucket.rb +42 -0
- data/lib/appwrite/models/o_auth2_bitly.rb +42 -0
- data/lib/appwrite/models/o_auth2_box.rb +42 -0
- data/lib/appwrite/models/o_auth2_dailymotion.rb +42 -0
- data/lib/appwrite/models/o_auth2_discord.rb +42 -0
- data/lib/appwrite/models/o_auth2_disqus.rb +42 -0
- data/lib/appwrite/models/o_auth2_dropbox.rb +42 -0
- data/lib/appwrite/models/o_auth2_etsy.rb +42 -0
- data/lib/appwrite/models/o_auth2_facebook.rb +42 -0
- data/lib/appwrite/models/o_auth2_figma.rb +42 -0
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +47 -0
- data/lib/appwrite/models/o_auth2_github.rb +42 -0
- data/lib/appwrite/models/o_auth2_gitlab.rb +47 -0
- data/lib/appwrite/models/o_auth2_google.rb +42 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +52 -0
- data/lib/appwrite/models/o_auth2_kick.rb +42 -0
- data/lib/appwrite/models/o_auth2_linkedin.rb +42 -0
- data/lib/appwrite/models/o_auth2_microsoft.rb +47 -0
- data/lib/appwrite/models/o_auth2_notion.rb +42 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +62 -0
- data/lib/appwrite/models/o_auth2_okta.rb +52 -0
- data/lib/appwrite/models/o_auth2_paypal.rb +42 -0
- data/lib/appwrite/models/o_auth2_podio.rb +42 -0
- data/lib/appwrite/models/o_auth2_provider_list.rb +32 -0
- data/lib/appwrite/models/o_auth2_salesforce.rb +42 -0
- data/lib/appwrite/models/o_auth2_slack.rb +42 -0
- data/lib/appwrite/models/o_auth2_spotify.rb +42 -0
- data/lib/appwrite/models/o_auth2_stripe.rb +42 -0
- data/lib/appwrite/models/o_auth2_tradeshift.rb +42 -0
- data/lib/appwrite/models/o_auth2_twitch.rb +42 -0
- data/lib/appwrite/models/o_auth2_word_press.rb +42 -0
- data/lib/appwrite/models/o_auth2_x.rb +42 -0
- data/lib/appwrite/models/o_auth2_yahoo.rb +42 -0
- data/lib/appwrite/models/o_auth2_yandex.rb +42 -0
- data/lib/appwrite/models/o_auth2_zoho.rb +42 -0
- data/lib/appwrite/models/o_auth2_zoom.rb +42 -0
- data/lib/appwrite/models/platform_android.rb +71 -0
- data/lib/appwrite/models/platform_apple.rb +71 -0
- data/lib/appwrite/models/platform_linux.rb +71 -0
- data/lib/appwrite/models/platform_list.rb +32 -0
- data/lib/appwrite/models/platform_web.rb +71 -0
- data/lib/appwrite/models/platform_windows.rb +71 -0
- data/lib/appwrite/models/policy_list.rb +32 -0
- data/lib/appwrite/models/policy_membership_privacy.rb +52 -0
- data/lib/appwrite/models/policy_password_dictionary.rb +32 -0
- data/lib/appwrite/models/policy_password_history.rb +32 -0
- data/lib/appwrite/models/policy_password_personal_data.rb +32 -0
- data/lib/appwrite/models/policy_session_alert.rb +32 -0
- data/lib/appwrite/models/policy_session_duration.rb +32 -0
- data/lib/appwrite/models/policy_session_invalidation.rb +32 -0
- data/lib/appwrite/models/policy_session_limit.rb +32 -0
- data/lib/appwrite/models/policy_user_limit.rb +32 -0
- data/lib/appwrite/models/project.rb +427 -0
- data/lib/appwrite/models/proxy_rule.rb +127 -0
- data/lib/appwrite/models/proxy_rule_list.rb +32 -0
- data/lib/appwrite/models/webhook.rb +20 -20
- data/lib/appwrite/service.rb +1 -1
- data/lib/appwrite/services/account.rb +47 -2
- data/lib/appwrite/services/activities.rb +3 -1
- data/lib/appwrite/services/avatars.rb +9 -1
- data/lib/appwrite/services/backups.rb +13 -1
- data/lib/appwrite/services/databases.rb +258 -6
- data/lib/appwrite/services/functions.rb +40 -8
- data/lib/appwrite/services/graphql.rb +5 -3
- data/lib/appwrite/services/health.rb +26 -1
- data/lib/appwrite/services/locale.rb +9 -1
- data/lib/appwrite/services/messaging.rb +49 -1
- data/lib/appwrite/services/project.rb +3251 -5
- data/lib/appwrite/services/proxy.rb +303 -0
- data/lib/appwrite/services/sites.rb +39 -8
- data/lib/appwrite/services/storage.rb +14 -1
- data/lib/appwrite/services/tables_db.rb +252 -6
- data/lib/appwrite/services/teams.rb +14 -1
- data/lib/appwrite/services/tokens.rb +6 -1
- data/lib/appwrite/services/users.rb +44 -1
- data/lib/appwrite/services/webhooks.rb +31 -21
- data/lib/appwrite.rb +86 -0
- metadata +88 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Figma
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@client_secret = client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Figma.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
client_secret: map["clientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"clientSecret": @client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2FusionAuth
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
attr_reader :endpoint
|
|
11
|
+
|
|
12
|
+
def initialize(
|
|
13
|
+
id:,
|
|
14
|
+
enabled:,
|
|
15
|
+
client_id:,
|
|
16
|
+
client_secret:,
|
|
17
|
+
endpoint:
|
|
18
|
+
)
|
|
19
|
+
@id = id
|
|
20
|
+
@enabled = enabled
|
|
21
|
+
@client_id = client_id
|
|
22
|
+
@client_secret = client_secret
|
|
23
|
+
@endpoint = endpoint
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from(map:)
|
|
27
|
+
OAuth2FusionAuth.new(
|
|
28
|
+
id: map["$id"],
|
|
29
|
+
enabled: map["enabled"],
|
|
30
|
+
client_id: map["clientId"],
|
|
31
|
+
client_secret: map["clientSecret"],
|
|
32
|
+
endpoint: map["endpoint"]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_map
|
|
37
|
+
{
|
|
38
|
+
"$id": @id,
|
|
39
|
+
"enabled": @enabled,
|
|
40
|
+
"clientId": @client_id,
|
|
41
|
+
"clientSecret": @client_secret,
|
|
42
|
+
"endpoint": @endpoint
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Github
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@client_secret = client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Github.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
client_secret: map["clientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"clientSecret": @client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Gitlab
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :application_id
|
|
9
|
+
attr_reader :secret
|
|
10
|
+
attr_reader :endpoint
|
|
11
|
+
|
|
12
|
+
def initialize(
|
|
13
|
+
id:,
|
|
14
|
+
enabled:,
|
|
15
|
+
application_id:,
|
|
16
|
+
secret:,
|
|
17
|
+
endpoint:
|
|
18
|
+
)
|
|
19
|
+
@id = id
|
|
20
|
+
@enabled = enabled
|
|
21
|
+
@application_id = application_id
|
|
22
|
+
@secret = secret
|
|
23
|
+
@endpoint = endpoint
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from(map:)
|
|
27
|
+
OAuth2Gitlab.new(
|
|
28
|
+
id: map["$id"],
|
|
29
|
+
enabled: map["enabled"],
|
|
30
|
+
application_id: map["applicationId"],
|
|
31
|
+
secret: map["secret"],
|
|
32
|
+
endpoint: map["endpoint"]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_map
|
|
37
|
+
{
|
|
38
|
+
"$id": @id,
|
|
39
|
+
"enabled": @enabled,
|
|
40
|
+
"applicationId": @application_id,
|
|
41
|
+
"secret": @secret,
|
|
42
|
+
"endpoint": @endpoint
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Google
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@client_secret = client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Google.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
client_secret: map["clientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"clientSecret": @client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Keycloak
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
attr_reader :endpoint
|
|
11
|
+
attr_reader :realm_name
|
|
12
|
+
|
|
13
|
+
def initialize(
|
|
14
|
+
id:,
|
|
15
|
+
enabled:,
|
|
16
|
+
client_id:,
|
|
17
|
+
client_secret:,
|
|
18
|
+
endpoint:,
|
|
19
|
+
realm_name:
|
|
20
|
+
)
|
|
21
|
+
@id = id
|
|
22
|
+
@enabled = enabled
|
|
23
|
+
@client_id = client_id
|
|
24
|
+
@client_secret = client_secret
|
|
25
|
+
@endpoint = endpoint
|
|
26
|
+
@realm_name = realm_name
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from(map:)
|
|
30
|
+
OAuth2Keycloak.new(
|
|
31
|
+
id: map["$id"],
|
|
32
|
+
enabled: map["enabled"],
|
|
33
|
+
client_id: map["clientId"],
|
|
34
|
+
client_secret: map["clientSecret"],
|
|
35
|
+
endpoint: map["endpoint"],
|
|
36
|
+
realm_name: map["realmName"]
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_map
|
|
41
|
+
{
|
|
42
|
+
"$id": @id,
|
|
43
|
+
"enabled": @enabled,
|
|
44
|
+
"clientId": @client_id,
|
|
45
|
+
"clientSecret": @client_secret,
|
|
46
|
+
"endpoint": @endpoint,
|
|
47
|
+
"realmName": @realm_name
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Kick
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@client_secret = client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Kick.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
client_secret: map["clientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"clientSecret": @client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Linkedin
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :primary_client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
primary_client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@primary_client_secret = primary_client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Linkedin.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
primary_client_secret: map["primaryClientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"primaryClientSecret": @primary_client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Microsoft
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :application_id
|
|
9
|
+
attr_reader :application_secret
|
|
10
|
+
attr_reader :tenant
|
|
11
|
+
|
|
12
|
+
def initialize(
|
|
13
|
+
id:,
|
|
14
|
+
enabled:,
|
|
15
|
+
application_id:,
|
|
16
|
+
application_secret:,
|
|
17
|
+
tenant:
|
|
18
|
+
)
|
|
19
|
+
@id = id
|
|
20
|
+
@enabled = enabled
|
|
21
|
+
@application_id = application_id
|
|
22
|
+
@application_secret = application_secret
|
|
23
|
+
@tenant = tenant
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from(map:)
|
|
27
|
+
OAuth2Microsoft.new(
|
|
28
|
+
id: map["$id"],
|
|
29
|
+
enabled: map["enabled"],
|
|
30
|
+
application_id: map["applicationId"],
|
|
31
|
+
application_secret: map["applicationSecret"],
|
|
32
|
+
tenant: map["tenant"]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_map
|
|
37
|
+
{
|
|
38
|
+
"$id": @id,
|
|
39
|
+
"enabled": @enabled,
|
|
40
|
+
"applicationId": @application_id,
|
|
41
|
+
"applicationSecret": @application_secret,
|
|
42
|
+
"tenant": @tenant
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Notion
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :oauth_client_id
|
|
9
|
+
attr_reader :oauth_client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
oauth_client_id:,
|
|
15
|
+
oauth_client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@oauth_client_id = oauth_client_id
|
|
20
|
+
@oauth_client_secret = oauth_client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Notion.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
oauth_client_id: map["oauthClientId"],
|
|
28
|
+
oauth_client_secret: map["oauthClientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"oauthClientId": @oauth_client_id,
|
|
37
|
+
"oauthClientSecret": @oauth_client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Oidc
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
attr_reader :well_known_url
|
|
11
|
+
attr_reader :authorization_url
|
|
12
|
+
attr_reader :token_url
|
|
13
|
+
attr_reader :user_info_url
|
|
14
|
+
|
|
15
|
+
def initialize(
|
|
16
|
+
id:,
|
|
17
|
+
enabled:,
|
|
18
|
+
client_id:,
|
|
19
|
+
client_secret:,
|
|
20
|
+
well_known_url:,
|
|
21
|
+
authorization_url:,
|
|
22
|
+
token_url:,
|
|
23
|
+
user_info_url:
|
|
24
|
+
)
|
|
25
|
+
@id = id
|
|
26
|
+
@enabled = enabled
|
|
27
|
+
@client_id = client_id
|
|
28
|
+
@client_secret = client_secret
|
|
29
|
+
@well_known_url = well_known_url
|
|
30
|
+
@authorization_url = authorization_url
|
|
31
|
+
@token_url = token_url
|
|
32
|
+
@user_info_url = user_info_url
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.from(map:)
|
|
36
|
+
OAuth2Oidc.new(
|
|
37
|
+
id: map["$id"],
|
|
38
|
+
enabled: map["enabled"],
|
|
39
|
+
client_id: map["clientId"],
|
|
40
|
+
client_secret: map["clientSecret"],
|
|
41
|
+
well_known_url: map["wellKnownURL"],
|
|
42
|
+
authorization_url: map["authorizationURL"],
|
|
43
|
+
token_url: map["tokenURL"],
|
|
44
|
+
user_info_url: map["userInfoURL"]
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def to_map
|
|
49
|
+
{
|
|
50
|
+
"$id": @id,
|
|
51
|
+
"enabled": @enabled,
|
|
52
|
+
"clientId": @client_id,
|
|
53
|
+
"clientSecret": @client_secret,
|
|
54
|
+
"wellKnownURL": @well_known_url,
|
|
55
|
+
"authorizationURL": @authorization_url,
|
|
56
|
+
"tokenURL": @token_url,
|
|
57
|
+
"userInfoURL": @user_info_url
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Okta
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
attr_reader :domain
|
|
11
|
+
attr_reader :authorization_server_id
|
|
12
|
+
|
|
13
|
+
def initialize(
|
|
14
|
+
id:,
|
|
15
|
+
enabled:,
|
|
16
|
+
client_id:,
|
|
17
|
+
client_secret:,
|
|
18
|
+
domain:,
|
|
19
|
+
authorization_server_id:
|
|
20
|
+
)
|
|
21
|
+
@id = id
|
|
22
|
+
@enabled = enabled
|
|
23
|
+
@client_id = client_id
|
|
24
|
+
@client_secret = client_secret
|
|
25
|
+
@domain = domain
|
|
26
|
+
@authorization_server_id = authorization_server_id
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from(map:)
|
|
30
|
+
OAuth2Okta.new(
|
|
31
|
+
id: map["$id"],
|
|
32
|
+
enabled: map["enabled"],
|
|
33
|
+
client_id: map["clientId"],
|
|
34
|
+
client_secret: map["clientSecret"],
|
|
35
|
+
domain: map["domain"],
|
|
36
|
+
authorization_server_id: map["authorizationServerId"]
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_map
|
|
41
|
+
{
|
|
42
|
+
"$id": @id,
|
|
43
|
+
"enabled": @enabled,
|
|
44
|
+
"clientId": @client_id,
|
|
45
|
+
"clientSecret": @client_secret,
|
|
46
|
+
"domain": @domain,
|
|
47
|
+
"authorizationServerId": @authorization_server_id
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Paypal
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :secret_key
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
secret_key:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@secret_key = secret_key
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Paypal.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
secret_key: map["secretKey"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"secretKey": @secret_key
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Podio
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@client_secret = client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
OAuth2Podio.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
enabled: map["enabled"],
|
|
27
|
+
client_id: map["clientId"],
|
|
28
|
+
client_secret: map["clientSecret"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"enabled": @enabled,
|
|
36
|
+
"clientId": @client_id,
|
|
37
|
+
"clientSecret": @client_secret
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2ProviderList
|
|
6
|
+
attr_reader :total
|
|
7
|
+
attr_reader :providers
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
total:,
|
|
11
|
+
providers:
|
|
12
|
+
)
|
|
13
|
+
@total = total
|
|
14
|
+
@providers = providers
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
OAuth2ProviderList.new(
|
|
19
|
+
total: map["total"],
|
|
20
|
+
providers: map["providers"]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def to_map
|
|
25
|
+
{
|
|
26
|
+
"total": @total,
|
|
27
|
+
"providers": @providers
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|