safetykit 0.8.0 → 0.10.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/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/safety_kit/models/beta/event_create_params.rb +4 -200
- data/lib/safety_kit/models/client_session_create_session_params.rb +74 -13
- data/lib/safety_kit/resources/client_sessions.rb +11 -7
- data/lib/safety_kit/version.rb +1 -1
- data/rbi/safety_kit/models/beta/event_create_params.rbi +0 -396
- data/rbi/safety_kit/models/client_session_create_session_params.rbi +157 -20
- data/rbi/safety_kit/resources/client_sessions.rbi +14 -8
- data/sig/safety_kit/models/beta/event_create_params.rbs +0 -196
- data/sig/safety_kit/models/client_session_create_session_params.rbs +59 -11
- data/sig/safety_kit/resources/client_sessions.rbs +1 -2
- metadata +1 -1
|
@@ -14,32 +14,47 @@ module SafetyKit
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
# Request body for creating a browser-safe webapp SDK session token from
|
|
18
|
+
# server-side code. Provide at least one of customer_user_id or
|
|
19
|
+
# customer_session_hash.
|
|
20
|
+
sig do
|
|
21
|
+
returns(
|
|
22
|
+
T.nilable(
|
|
23
|
+
T.any(
|
|
24
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0,
|
|
25
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
attr_reader :body
|
|
27
31
|
|
|
28
|
-
sig
|
|
29
|
-
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
body:
|
|
35
|
+
T.any(
|
|
36
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0::OrHash,
|
|
37
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1::OrHash
|
|
38
|
+
)
|
|
39
|
+
).void
|
|
40
|
+
end
|
|
41
|
+
attr_writer :body
|
|
30
42
|
|
|
31
43
|
sig do
|
|
32
44
|
params(
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
body:
|
|
46
|
+
T.any(
|
|
47
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0::OrHash,
|
|
48
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1::OrHash
|
|
49
|
+
),
|
|
35
50
|
request_options: SafetyKit::RequestOptions::OrHash
|
|
36
51
|
).returns(T.attached_class)
|
|
37
52
|
end
|
|
38
53
|
def self.new(
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
|
|
54
|
+
# Request body for creating a browser-safe webapp SDK session token from
|
|
55
|
+
# server-side code. Provide at least one of customer_user_id or
|
|
56
|
+
# customer_session_hash.
|
|
57
|
+
body: nil,
|
|
43
58
|
request_options: {}
|
|
44
59
|
)
|
|
45
60
|
end
|
|
@@ -47,14 +62,136 @@ module SafetyKit
|
|
|
47
62
|
sig do
|
|
48
63
|
override.returns(
|
|
49
64
|
{
|
|
50
|
-
|
|
51
|
-
|
|
65
|
+
body:
|
|
66
|
+
T.any(
|
|
67
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0,
|
|
68
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1
|
|
69
|
+
),
|
|
52
70
|
request_options: SafetyKit::RequestOptions
|
|
53
71
|
}
|
|
54
72
|
)
|
|
55
73
|
end
|
|
56
74
|
def to_hash
|
|
57
75
|
end
|
|
76
|
+
|
|
77
|
+
# Request body for creating a browser-safe webapp SDK session token from
|
|
78
|
+
# server-side code. Provide at least one of customer_user_id or
|
|
79
|
+
# customer_session_hash.
|
|
80
|
+
module Body
|
|
81
|
+
extend SafetyKit::Internal::Type::Union
|
|
82
|
+
|
|
83
|
+
Variants =
|
|
84
|
+
T.type_alias do
|
|
85
|
+
T.any(
|
|
86
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0,
|
|
87
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
class UnionMember0 < SafetyKit::Internal::Type::BaseModel
|
|
92
|
+
OrHash =
|
|
93
|
+
T.type_alias do
|
|
94
|
+
T.any(
|
|
95
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0,
|
|
96
|
+
SafetyKit::Internal::AnyHash
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Customer user identifier associated with the browser SDK session. Use the same
|
|
101
|
+
# canonical user ID string that you send as user_id in SafetyKit server-to-server
|
|
102
|
+
# events.
|
|
103
|
+
sig { returns(String) }
|
|
104
|
+
attr_accessor :customer_user_id
|
|
105
|
+
|
|
106
|
+
# Stable opaque customer session hash associated with the browser SDK session.
|
|
107
|
+
sig { returns(T.nilable(String)) }
|
|
108
|
+
attr_reader :customer_session_hash
|
|
109
|
+
|
|
110
|
+
sig { params(customer_session_hash: String).void }
|
|
111
|
+
attr_writer :customer_session_hash
|
|
112
|
+
|
|
113
|
+
sig do
|
|
114
|
+
params(
|
|
115
|
+
customer_user_id: String,
|
|
116
|
+
customer_session_hash: String
|
|
117
|
+
).returns(T.attached_class)
|
|
118
|
+
end
|
|
119
|
+
def self.new(
|
|
120
|
+
# Customer user identifier associated with the browser SDK session. Use the same
|
|
121
|
+
# canonical user ID string that you send as user_id in SafetyKit server-to-server
|
|
122
|
+
# events.
|
|
123
|
+
customer_user_id:,
|
|
124
|
+
# Stable opaque customer session hash associated with the browser SDK session.
|
|
125
|
+
customer_session_hash: nil
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
sig do
|
|
130
|
+
override.returns(
|
|
131
|
+
{ customer_user_id: String, customer_session_hash: String }
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
def to_hash
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
class UnionMember1 < SafetyKit::Internal::Type::BaseModel
|
|
139
|
+
OrHash =
|
|
140
|
+
T.type_alias do
|
|
141
|
+
T.any(
|
|
142
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1,
|
|
143
|
+
SafetyKit::Internal::AnyHash
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Stable opaque customer session hash associated with the browser SDK session.
|
|
148
|
+
sig { returns(String) }
|
|
149
|
+
attr_accessor :customer_session_hash
|
|
150
|
+
|
|
151
|
+
# Customer user identifier associated with the browser SDK session. Use the same
|
|
152
|
+
# canonical user ID string that you send as user_id in SafetyKit server-to-server
|
|
153
|
+
# events.
|
|
154
|
+
sig { returns(T.nilable(String)) }
|
|
155
|
+
attr_reader :customer_user_id
|
|
156
|
+
|
|
157
|
+
sig { params(customer_user_id: String).void }
|
|
158
|
+
attr_writer :customer_user_id
|
|
159
|
+
|
|
160
|
+
sig do
|
|
161
|
+
params(
|
|
162
|
+
customer_session_hash: String,
|
|
163
|
+
customer_user_id: String
|
|
164
|
+
).returns(T.attached_class)
|
|
165
|
+
end
|
|
166
|
+
def self.new(
|
|
167
|
+
# Stable opaque customer session hash associated with the browser SDK session.
|
|
168
|
+
customer_session_hash:,
|
|
169
|
+
# Customer user identifier associated with the browser SDK session. Use the same
|
|
170
|
+
# canonical user ID string that you send as user_id in SafetyKit server-to-server
|
|
171
|
+
# events.
|
|
172
|
+
customer_user_id: nil
|
|
173
|
+
)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
sig do
|
|
177
|
+
override.returns(
|
|
178
|
+
{ customer_session_hash: String, customer_user_id: String }
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
def to_hash
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
sig do
|
|
186
|
+
override.returns(
|
|
187
|
+
T::Array[
|
|
188
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::Variants
|
|
189
|
+
]
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
def self.variants
|
|
193
|
+
end
|
|
194
|
+
end
|
|
58
195
|
end
|
|
59
196
|
end
|
|
60
197
|
end
|
|
@@ -6,20 +6,26 @@ module SafetyKit
|
|
|
6
6
|
# code.
|
|
7
7
|
class ClientSessions
|
|
8
8
|
# Create a browser-safe SafetyKit webapp SDK session token from server-side code
|
|
9
|
-
# before rendering pages that load the browser SDK.
|
|
10
|
-
#
|
|
9
|
+
# before rendering pages that load the browser SDK. Provide at least one of
|
|
10
|
+
# customer_user_id or customer_session_hash. When customer_user_id is present, use
|
|
11
|
+
# the same canonical user ID string that you send as user_id in SafetyKit
|
|
12
|
+
# server-to-server events. The request must be authenticated with a valid Bearer
|
|
13
|
+
# token.
|
|
11
14
|
sig do
|
|
12
15
|
params(
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
body:
|
|
17
|
+
T.any(
|
|
18
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0::OrHash,
|
|
19
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1::OrHash
|
|
20
|
+
),
|
|
15
21
|
request_options: SafetyKit::RequestOptions::OrHash
|
|
16
22
|
).returns(SafetyKit::Models::ClientSessionCreateSessionResponse)
|
|
17
23
|
end
|
|
18
24
|
def create_session(
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
#
|
|
22
|
-
|
|
25
|
+
# Request body for creating a browser-safe webapp SDK session token from
|
|
26
|
+
# server-side code. Provide at least one of customer_user_id or
|
|
27
|
+
# customer_session_hash.
|
|
28
|
+
body: nil,
|
|
23
29
|
request_options: {}
|
|
24
30
|
)
|
|
25
31
|
end
|
|
@@ -486,7 +486,6 @@ module SafetyKit
|
|
|
486
486
|
user_id: String,
|
|
487
487
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::content],
|
|
488
488
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::metadata],
|
|
489
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties,
|
|
490
489
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed]
|
|
491
490
|
}
|
|
492
491
|
|
|
@@ -511,12 +510,6 @@ module SafetyKit
|
|
|
511
510
|
::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::metadata]
|
|
512
511
|
) -> ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::metadata]
|
|
513
512
|
|
|
514
|
-
attr_reader properties: SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties?
|
|
515
|
-
|
|
516
|
-
def properties=: (
|
|
517
|
-
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties
|
|
518
|
-
) -> SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties
|
|
519
|
-
|
|
520
513
|
attr_reader resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed]?
|
|
521
514
|
|
|
522
515
|
def resources_used=: (
|
|
@@ -530,7 +523,6 @@ module SafetyKit
|
|
|
530
523
|
user_id: String,
|
|
531
524
|
?content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::content],
|
|
532
525
|
?metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::metadata],
|
|
533
|
-
?properties: SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties,
|
|
534
526
|
?resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed]
|
|
535
527
|
) -> void
|
|
536
528
|
|
|
@@ -541,7 +533,6 @@ module SafetyKit
|
|
|
541
533
|
user_id: String,
|
|
542
534
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::content],
|
|
543
535
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::metadata],
|
|
544
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties,
|
|
545
536
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed]
|
|
546
537
|
}
|
|
547
538
|
|
|
@@ -697,46 +688,6 @@ module SafetyKit
|
|
|
697
688
|
UnionMember3Array: SafetyKit::Internal::Type::Converter
|
|
698
689
|
end
|
|
699
690
|
|
|
700
|
-
type properties =
|
|
701
|
-
{
|
|
702
|
-
account_state: String,
|
|
703
|
-
account_types: ::Array[String],
|
|
704
|
-
country: String,
|
|
705
|
-
email_verified: bool
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
709
|
-
attr_reader account_state: String?
|
|
710
|
-
|
|
711
|
-
def account_state=: (String) -> String
|
|
712
|
-
|
|
713
|
-
attr_reader account_types: ::Array[String]?
|
|
714
|
-
|
|
715
|
-
def account_types=: (::Array[String]) -> ::Array[String]
|
|
716
|
-
|
|
717
|
-
attr_reader country: String?
|
|
718
|
-
|
|
719
|
-
def country=: (String) -> String
|
|
720
|
-
|
|
721
|
-
attr_reader email_verified: bool?
|
|
722
|
-
|
|
723
|
-
def email_verified=: (bool) -> bool
|
|
724
|
-
|
|
725
|
-
def initialize: (
|
|
726
|
-
?account_state: String,
|
|
727
|
-
?account_types: ::Array[String],
|
|
728
|
-
?country: String,
|
|
729
|
-
?email_verified: bool
|
|
730
|
-
) -> void
|
|
731
|
-
|
|
732
|
-
def to_hash: -> {
|
|
733
|
-
account_state: String,
|
|
734
|
-
account_types: ::Array[String],
|
|
735
|
-
country: String,
|
|
736
|
-
email_verified: bool
|
|
737
|
-
}
|
|
738
|
-
end
|
|
739
|
-
|
|
740
691
|
type resources_used = { type: String, value: String }
|
|
741
692
|
|
|
742
693
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -758,7 +709,6 @@ module SafetyKit
|
|
|
758
709
|
user_id: String,
|
|
759
710
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::content],
|
|
760
711
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::metadata],
|
|
761
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties,
|
|
762
712
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed]
|
|
763
713
|
}
|
|
764
714
|
|
|
@@ -783,12 +733,6 @@ module SafetyKit
|
|
|
783
733
|
::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::metadata]
|
|
784
734
|
) -> ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::metadata]
|
|
785
735
|
|
|
786
|
-
attr_reader properties: SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties?
|
|
787
|
-
|
|
788
|
-
def properties=: (
|
|
789
|
-
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties
|
|
790
|
-
) -> SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties
|
|
791
|
-
|
|
792
736
|
attr_reader resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed]?
|
|
793
737
|
|
|
794
738
|
def resources_used=: (
|
|
@@ -802,7 +746,6 @@ module SafetyKit
|
|
|
802
746
|
user_id: String,
|
|
803
747
|
?content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::content],
|
|
804
748
|
?metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::metadata],
|
|
805
|
-
?properties: SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties,
|
|
806
749
|
?resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed]
|
|
807
750
|
) -> void
|
|
808
751
|
|
|
@@ -813,7 +756,6 @@ module SafetyKit
|
|
|
813
756
|
user_id: String,
|
|
814
757
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::content],
|
|
815
758
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::metadata],
|
|
816
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties,
|
|
817
759
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed]
|
|
818
760
|
}
|
|
819
761
|
|
|
@@ -969,46 +911,6 @@ module SafetyKit
|
|
|
969
911
|
UnionMember3Array: SafetyKit::Internal::Type::Converter
|
|
970
912
|
end
|
|
971
913
|
|
|
972
|
-
type properties =
|
|
973
|
-
{
|
|
974
|
-
account_state: String,
|
|
975
|
-
account_types: ::Array[String],
|
|
976
|
-
country: String,
|
|
977
|
-
email_verified: bool
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
981
|
-
attr_reader account_state: String?
|
|
982
|
-
|
|
983
|
-
def account_state=: (String) -> String
|
|
984
|
-
|
|
985
|
-
attr_reader account_types: ::Array[String]?
|
|
986
|
-
|
|
987
|
-
def account_types=: (::Array[String]) -> ::Array[String]
|
|
988
|
-
|
|
989
|
-
attr_reader country: String?
|
|
990
|
-
|
|
991
|
-
def country=: (String) -> String
|
|
992
|
-
|
|
993
|
-
attr_reader email_verified: bool?
|
|
994
|
-
|
|
995
|
-
def email_verified=: (bool) -> bool
|
|
996
|
-
|
|
997
|
-
def initialize: (
|
|
998
|
-
?account_state: String,
|
|
999
|
-
?account_types: ::Array[String],
|
|
1000
|
-
?country: String,
|
|
1001
|
-
?email_verified: bool
|
|
1002
|
-
) -> void
|
|
1003
|
-
|
|
1004
|
-
def to_hash: -> {
|
|
1005
|
-
account_state: String,
|
|
1006
|
-
account_types: ::Array[String],
|
|
1007
|
-
country: String,
|
|
1008
|
-
email_verified: bool
|
|
1009
|
-
}
|
|
1010
|
-
end
|
|
1011
|
-
|
|
1012
914
|
type resources_used = { type: String, value: String }
|
|
1013
915
|
|
|
1014
916
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -1466,7 +1368,6 @@ module SafetyKit
|
|
|
1466
1368
|
user_id: String,
|
|
1467
1369
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::content],
|
|
1468
1370
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::metadata],
|
|
1469
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties,
|
|
1470
1371
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed]
|
|
1471
1372
|
}
|
|
1472
1373
|
|
|
@@ -1491,12 +1392,6 @@ module SafetyKit
|
|
|
1491
1392
|
::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::metadata]
|
|
1492
1393
|
) -> ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::metadata]
|
|
1493
1394
|
|
|
1494
|
-
attr_reader properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties?
|
|
1495
|
-
|
|
1496
|
-
def properties=: (
|
|
1497
|
-
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties
|
|
1498
|
-
) -> SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties
|
|
1499
|
-
|
|
1500
1395
|
attr_reader resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed]?
|
|
1501
1396
|
|
|
1502
1397
|
def resources_used=: (
|
|
@@ -1509,7 +1404,6 @@ module SafetyKit
|
|
|
1509
1404
|
user_id: String,
|
|
1510
1405
|
?content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::content],
|
|
1511
1406
|
?metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::metadata],
|
|
1512
|
-
?properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties,
|
|
1513
1407
|
?resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed],
|
|
1514
1408
|
?type: :create_account
|
|
1515
1409
|
) -> void
|
|
@@ -1521,7 +1415,6 @@ module SafetyKit
|
|
|
1521
1415
|
user_id: String,
|
|
1522
1416
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::content],
|
|
1523
1417
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::metadata],
|
|
1524
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties,
|
|
1525
1418
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed]
|
|
1526
1419
|
}
|
|
1527
1420
|
|
|
@@ -1667,46 +1560,6 @@ module SafetyKit
|
|
|
1667
1560
|
UnionMember3Array: SafetyKit::Internal::Type::Converter
|
|
1668
1561
|
end
|
|
1669
1562
|
|
|
1670
|
-
type properties =
|
|
1671
|
-
{
|
|
1672
|
-
account_state: String,
|
|
1673
|
-
account_types: ::Array[String],
|
|
1674
|
-
country: String,
|
|
1675
|
-
email_verified: bool
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
1679
|
-
attr_reader account_state: String?
|
|
1680
|
-
|
|
1681
|
-
def account_state=: (String) -> String
|
|
1682
|
-
|
|
1683
|
-
attr_reader account_types: ::Array[String]?
|
|
1684
|
-
|
|
1685
|
-
def account_types=: (::Array[String]) -> ::Array[String]
|
|
1686
|
-
|
|
1687
|
-
attr_reader country: String?
|
|
1688
|
-
|
|
1689
|
-
def country=: (String) -> String
|
|
1690
|
-
|
|
1691
|
-
attr_reader email_verified: bool?
|
|
1692
|
-
|
|
1693
|
-
def email_verified=: (bool) -> bool
|
|
1694
|
-
|
|
1695
|
-
def initialize: (
|
|
1696
|
-
?account_state: String,
|
|
1697
|
-
?account_types: ::Array[String],
|
|
1698
|
-
?country: String,
|
|
1699
|
-
?email_verified: bool
|
|
1700
|
-
) -> void
|
|
1701
|
-
|
|
1702
|
-
def to_hash: -> {
|
|
1703
|
-
account_state: String,
|
|
1704
|
-
account_types: ::Array[String],
|
|
1705
|
-
country: String,
|
|
1706
|
-
email_verified: bool
|
|
1707
|
-
}
|
|
1708
|
-
end
|
|
1709
|
-
|
|
1710
1563
|
type resources_used = { type: String, value: String }
|
|
1711
1564
|
|
|
1712
1565
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -1728,7 +1581,6 @@ module SafetyKit
|
|
|
1728
1581
|
user_id: String,
|
|
1729
1582
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::content],
|
|
1730
1583
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::metadata],
|
|
1731
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties,
|
|
1732
1584
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed]
|
|
1733
1585
|
}
|
|
1734
1586
|
|
|
@@ -1753,12 +1605,6 @@ module SafetyKit
|
|
|
1753
1605
|
::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::metadata]
|
|
1754
1606
|
) -> ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::metadata]
|
|
1755
1607
|
|
|
1756
|
-
attr_reader properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties?
|
|
1757
|
-
|
|
1758
|
-
def properties=: (
|
|
1759
|
-
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties
|
|
1760
|
-
) -> SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties
|
|
1761
|
-
|
|
1762
1608
|
attr_reader resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed]?
|
|
1763
1609
|
|
|
1764
1610
|
def resources_used=: (
|
|
@@ -1771,7 +1617,6 @@ module SafetyKit
|
|
|
1771
1617
|
user_id: String,
|
|
1772
1618
|
?content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::content],
|
|
1773
1619
|
?metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::metadata],
|
|
1774
|
-
?properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties,
|
|
1775
1620
|
?resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed],
|
|
1776
1621
|
?type: :update_account
|
|
1777
1622
|
) -> void
|
|
@@ -1783,7 +1628,6 @@ module SafetyKit
|
|
|
1783
1628
|
user_id: String,
|
|
1784
1629
|
content: ::Array[SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::content],
|
|
1785
1630
|
metadata: ::Hash[Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::metadata],
|
|
1786
|
-
properties: SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties,
|
|
1787
1631
|
resources_used: ::Array[SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed]
|
|
1788
1632
|
}
|
|
1789
1633
|
|
|
@@ -1929,46 +1773,6 @@ module SafetyKit
|
|
|
1929
1773
|
UnionMember3Array: SafetyKit::Internal::Type::Converter
|
|
1930
1774
|
end
|
|
1931
1775
|
|
|
1932
|
-
type properties =
|
|
1933
|
-
{
|
|
1934
|
-
account_state: String,
|
|
1935
|
-
account_types: ::Array[String],
|
|
1936
|
-
country: String,
|
|
1937
|
-
email_verified: bool
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
1941
|
-
attr_reader account_state: String?
|
|
1942
|
-
|
|
1943
|
-
def account_state=: (String) -> String
|
|
1944
|
-
|
|
1945
|
-
attr_reader account_types: ::Array[String]?
|
|
1946
|
-
|
|
1947
|
-
def account_types=: (::Array[String]) -> ::Array[String]
|
|
1948
|
-
|
|
1949
|
-
attr_reader country: String?
|
|
1950
|
-
|
|
1951
|
-
def country=: (String) -> String
|
|
1952
|
-
|
|
1953
|
-
attr_reader email_verified: bool?
|
|
1954
|
-
|
|
1955
|
-
def email_verified=: (bool) -> bool
|
|
1956
|
-
|
|
1957
|
-
def initialize: (
|
|
1958
|
-
?account_state: String,
|
|
1959
|
-
?account_types: ::Array[String],
|
|
1960
|
-
?country: String,
|
|
1961
|
-
?email_verified: bool
|
|
1962
|
-
) -> void
|
|
1963
|
-
|
|
1964
|
-
def to_hash: -> {
|
|
1965
|
-
account_state: String,
|
|
1966
|
-
account_types: ::Array[String],
|
|
1967
|
-
country: String,
|
|
1968
|
-
email_verified: bool
|
|
1969
|
-
}
|
|
1970
|
-
end
|
|
1971
|
-
|
|
1972
1776
|
type resources_used = { type: String, value: String }
|
|
1973
1777
|
|
|
1974
1778
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -1,32 +1,80 @@
|
|
|
1
1
|
module SafetyKit
|
|
2
2
|
module Models
|
|
3
3
|
type client_session_create_session_params =
|
|
4
|
-
{
|
|
4
|
+
{ body: SafetyKit::Models::ClientSessionCreateSessionParams::body }
|
|
5
5
|
& SafetyKit::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
7
|
class ClientSessionCreateSessionParams < SafetyKit::Internal::Type::BaseModel
|
|
8
8
|
extend SafetyKit::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include SafetyKit::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
attr_reader
|
|
11
|
+
attr_reader body: SafetyKit::Models::ClientSessionCreateSessionParams::body?
|
|
12
12
|
|
|
13
|
-
def
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def customer_user_id=: (String) -> String
|
|
13
|
+
def body=: (
|
|
14
|
+
SafetyKit::Models::ClientSessionCreateSessionParams::body
|
|
15
|
+
) -> SafetyKit::Models::ClientSessionCreateSessionParams::body
|
|
18
16
|
|
|
19
17
|
def initialize: (
|
|
20
|
-
?
|
|
21
|
-
?customer_user_id: String,
|
|
18
|
+
?body: SafetyKit::Models::ClientSessionCreateSessionParams::body,
|
|
22
19
|
?request_options: SafetyKit::request_opts
|
|
23
20
|
) -> void
|
|
24
21
|
|
|
25
22
|
def to_hash: -> {
|
|
26
|
-
|
|
27
|
-
customer_user_id: String,
|
|
23
|
+
body: SafetyKit::Models::ClientSessionCreateSessionParams::body,
|
|
28
24
|
request_options: SafetyKit::RequestOptions
|
|
29
25
|
}
|
|
26
|
+
|
|
27
|
+
type body =
|
|
28
|
+
SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember0
|
|
29
|
+
| SafetyKit::ClientSessionCreateSessionParams::Body::UnionMember1
|
|
30
|
+
|
|
31
|
+
module Body
|
|
32
|
+
extend SafetyKit::Internal::Type::Union
|
|
33
|
+
|
|
34
|
+
type union_member0 =
|
|
35
|
+
{ customer_user_id: String, customer_session_hash: String }
|
|
36
|
+
|
|
37
|
+
class UnionMember0 < SafetyKit::Internal::Type::BaseModel
|
|
38
|
+
attr_accessor customer_user_id: String
|
|
39
|
+
|
|
40
|
+
attr_reader customer_session_hash: String?
|
|
41
|
+
|
|
42
|
+
def customer_session_hash=: (String) -> String
|
|
43
|
+
|
|
44
|
+
def initialize: (
|
|
45
|
+
customer_user_id: String,
|
|
46
|
+
?customer_session_hash: String
|
|
47
|
+
) -> void
|
|
48
|
+
|
|
49
|
+
def to_hash: -> {
|
|
50
|
+
customer_user_id: String,
|
|
51
|
+
customer_session_hash: String
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
type union_member1 =
|
|
56
|
+
{ customer_session_hash: String, customer_user_id: String }
|
|
57
|
+
|
|
58
|
+
class UnionMember1 < SafetyKit::Internal::Type::BaseModel
|
|
59
|
+
attr_accessor customer_session_hash: String
|
|
60
|
+
|
|
61
|
+
attr_reader customer_user_id: String?
|
|
62
|
+
|
|
63
|
+
def customer_user_id=: (String) -> String
|
|
64
|
+
|
|
65
|
+
def initialize: (
|
|
66
|
+
customer_session_hash: String,
|
|
67
|
+
?customer_user_id: String
|
|
68
|
+
) -> void
|
|
69
|
+
|
|
70
|
+
def to_hash: -> {
|
|
71
|
+
customer_session_hash: String,
|
|
72
|
+
customer_user_id: String
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def self?.variants: -> ::Array[SafetyKit::Models::ClientSessionCreateSessionParams::body]
|
|
77
|
+
end
|
|
30
78
|
end
|
|
31
79
|
end
|
|
32
80
|
end
|
|
@@ -2,8 +2,7 @@ module SafetyKit
|
|
|
2
2
|
module Resources
|
|
3
3
|
class ClientSessions
|
|
4
4
|
def create_session: (
|
|
5
|
-
?
|
|
6
|
-
?customer_user_id: String,
|
|
5
|
+
?body: SafetyKit::Models::ClientSessionCreateSessionParams::body,
|
|
7
6
|
?request_options: SafetyKit::request_opts
|
|
8
7
|
) -> SafetyKit::Models::ClientSessionCreateSessionResponse
|
|
9
8
|
|