smplkit 3.0.20 → 3.0.21
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38771e2469f7abb018b9c57b1a841a8a9da9a350b47be1206254ee60aad6df17
|
|
4
|
+
data.tar.gz: d19aedd7e56e0fec286c70640d9268ad8502003da974c1fa65fe7ec511335146
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d320d1ddd09c4ce053cd67e209f9515e712021737f4e6b10b13bbb3a513296596eeafe68048cdf1911705d3f7ed55bbf12eda73d62417a962bc8722abeeaff5c
|
|
7
|
+
data.tar.gz: e5bb79dd560c8109c75ad76d20047add2746b421c2891435560268b97ef12ed1a82c7849713bcb87ecd75adee8c53781b21e37821cc07f14d4cb512b98fe3be2
|
|
@@ -16,10 +16,10 @@ require 'time'
|
|
|
16
16
|
module SmplkitGeneratedClient::Audit
|
|
17
17
|
# An audit event — a record that something happened, attributed to an actor and a resource. When recording a snapshot of the resource at the time of the event, place it inside `data`. smplkit's own integrations nest it under `data.snapshot`, but the slot is yours to use however you like.
|
|
18
18
|
class Event < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# What happened, e.g. `user.created`. Any non-empty string.
|
|
20
20
|
attr_accessor :action
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Kind of resource the event is about, e.g. `user`. Any non-empty string.
|
|
23
23
|
attr_accessor :resource_type
|
|
24
24
|
|
|
25
25
|
# Identifier of the specific resource the event is about.
|
|
@@ -31,6 +31,15 @@ module SmplkitGeneratedClient::Audit
|
|
|
31
31
|
# When the event actually happened. Defaults to the server receipt time (`created_at`).
|
|
32
32
|
attr_accessor :occurred_at
|
|
33
33
|
|
|
34
|
+
# Kind of actor that caused the event, e.g. `USER`, `API_KEY`, `SYSTEM`, or any other label you choose. Free-form string; the API does not constrain or interpret it.
|
|
35
|
+
attr_accessor :actor_type
|
|
36
|
+
|
|
37
|
+
# Identifier of the actor that caused the event. Free-form string — any identifier scheme is accepted.
|
|
38
|
+
attr_accessor :actor_id
|
|
39
|
+
|
|
40
|
+
# Human-readable label for the actor (e.g. an email address or API key name) at the time the event was recorded.
|
|
41
|
+
attr_accessor :actor_label
|
|
42
|
+
|
|
34
43
|
# Free-form payload attached to the event. Use it for resource snapshots (by convention under `data.snapshot`), request identifiers, or any other context the event needs to carry.
|
|
35
44
|
attr_accessor :data
|
|
36
45
|
|
|
@@ -40,15 +49,6 @@ module SmplkitGeneratedClient::Audit
|
|
|
40
49
|
# When the event was received and recorded.
|
|
41
50
|
attr_accessor :created_at
|
|
42
51
|
|
|
43
|
-
# Kind of credential that emitted the event, e.g. `USER` or `API_KEY`. Resolved server-side from the request credential.
|
|
44
|
-
attr_accessor :actor_type
|
|
45
|
-
|
|
46
|
-
# Identifier of the actor that emitted the event.
|
|
47
|
-
attr_accessor :actor_id
|
|
48
|
-
|
|
49
|
-
# Human-readable label for the actor (e.g. the user's email address or the API key name) at the time the event was recorded.
|
|
50
|
-
attr_accessor :actor_label
|
|
51
|
-
|
|
52
52
|
# The idempotency key used to deduplicate the record. Echoes the `Idempotency-Key` header if one was supplied, otherwise a key derived from the event's content.
|
|
53
53
|
attr_accessor :idempotency_key
|
|
54
54
|
|
|
@@ -60,12 +60,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
60
60
|
:'resource_id' => :'resource_id',
|
|
61
61
|
:'description' => :'description',
|
|
62
62
|
:'occurred_at' => :'occurred_at',
|
|
63
|
-
:'data' => :'data',
|
|
64
|
-
:'do_not_forward' => :'do_not_forward',
|
|
65
|
-
:'created_at' => :'created_at',
|
|
66
63
|
:'actor_type' => :'actor_type',
|
|
67
64
|
:'actor_id' => :'actor_id',
|
|
68
65
|
:'actor_label' => :'actor_label',
|
|
66
|
+
:'data' => :'data',
|
|
67
|
+
:'do_not_forward' => :'do_not_forward',
|
|
68
|
+
:'created_at' => :'created_at',
|
|
69
69
|
:'idempotency_key' => :'idempotency_key'
|
|
70
70
|
}
|
|
71
71
|
end
|
|
@@ -88,12 +88,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
88
88
|
:'resource_id' => :'String',
|
|
89
89
|
:'description' => :'String',
|
|
90
90
|
:'occurred_at' => :'Time',
|
|
91
|
-
:'data' => :'Hash<String, Object>',
|
|
92
|
-
:'do_not_forward' => :'Boolean',
|
|
93
|
-
:'created_at' => :'Time',
|
|
94
91
|
:'actor_type' => :'String',
|
|
95
92
|
:'actor_id' => :'String',
|
|
96
93
|
:'actor_label' => :'String',
|
|
94
|
+
:'data' => :'Hash<String, Object>',
|
|
95
|
+
:'do_not_forward' => :'Boolean',
|
|
96
|
+
:'created_at' => :'Time',
|
|
97
97
|
:'idempotency_key' => :'String'
|
|
98
98
|
}
|
|
99
99
|
end
|
|
@@ -103,10 +103,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
103
103
|
Set.new([
|
|
104
104
|
:'description',
|
|
105
105
|
:'occurred_at',
|
|
106
|
-
:'created_at',
|
|
107
106
|
:'actor_type',
|
|
108
107
|
:'actor_id',
|
|
109
108
|
:'actor_label',
|
|
109
|
+
:'created_at',
|
|
110
110
|
:'idempotency_key'
|
|
111
111
|
])
|
|
112
112
|
end
|
|
@@ -153,6 +153,18 @@ module SmplkitGeneratedClient::Audit
|
|
|
153
153
|
self.occurred_at = attributes[:'occurred_at']
|
|
154
154
|
end
|
|
155
155
|
|
|
156
|
+
if attributes.key?(:'actor_type')
|
|
157
|
+
self.actor_type = attributes[:'actor_type']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'actor_id')
|
|
161
|
+
self.actor_id = attributes[:'actor_id']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'actor_label')
|
|
165
|
+
self.actor_label = attributes[:'actor_label']
|
|
166
|
+
end
|
|
167
|
+
|
|
156
168
|
if attributes.key?(:'data')
|
|
157
169
|
if (value = attributes[:'data']).is_a?(Hash)
|
|
158
170
|
self.data = value
|
|
@@ -169,18 +181,6 @@ module SmplkitGeneratedClient::Audit
|
|
|
169
181
|
self.created_at = attributes[:'created_at']
|
|
170
182
|
end
|
|
171
183
|
|
|
172
|
-
if attributes.key?(:'actor_type')
|
|
173
|
-
self.actor_type = attributes[:'actor_type']
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
if attributes.key?(:'actor_id')
|
|
177
|
-
self.actor_id = attributes[:'actor_id']
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
if attributes.key?(:'actor_label')
|
|
181
|
-
self.actor_label = attributes[:'actor_label']
|
|
182
|
-
end
|
|
183
|
-
|
|
184
184
|
if attributes.key?(:'idempotency_key')
|
|
185
185
|
self.idempotency_key = attributes[:'idempotency_key']
|
|
186
186
|
end
|
|
@@ -283,12 +283,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
283
283
|
resource_id == o.resource_id &&
|
|
284
284
|
description == o.description &&
|
|
285
285
|
occurred_at == o.occurred_at &&
|
|
286
|
-
data == o.data &&
|
|
287
|
-
do_not_forward == o.do_not_forward &&
|
|
288
|
-
created_at == o.created_at &&
|
|
289
286
|
actor_type == o.actor_type &&
|
|
290
287
|
actor_id == o.actor_id &&
|
|
291
288
|
actor_label == o.actor_label &&
|
|
289
|
+
data == o.data &&
|
|
290
|
+
do_not_forward == o.do_not_forward &&
|
|
291
|
+
created_at == o.created_at &&
|
|
292
292
|
idempotency_key == o.idempotency_key
|
|
293
293
|
end
|
|
294
294
|
|
|
@@ -301,7 +301,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
301
301
|
# Calculates hash code according to all attributes.
|
|
302
302
|
# @return [Integer] Hash code
|
|
303
303
|
def hash
|
|
304
|
-
[action, resource_type, resource_id, description, occurred_at,
|
|
304
|
+
[action, resource_type, resource_id, description, occurred_at, actor_type, actor_id, actor_label, data, do_not_forward, created_at, idempotency_key].hash
|
|
305
305
|
end
|
|
306
306
|
|
|
307
307
|
# Builds the object from hash
|
|
@@ -57,37 +57,37 @@ describe SmplkitGeneratedClient::Audit::Event do
|
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
describe 'test attribute "
|
|
60
|
+
describe 'test attribute "actor_type"' do
|
|
61
61
|
it 'should work' do
|
|
62
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
describe 'test attribute "
|
|
66
|
+
describe 'test attribute "actor_id"' do
|
|
67
67
|
it 'should work' do
|
|
68
68
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
describe 'test attribute "
|
|
72
|
+
describe 'test attribute "actor_label"' do
|
|
73
73
|
it 'should work' do
|
|
74
74
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
describe 'test attribute "
|
|
78
|
+
describe 'test attribute "data"' do
|
|
79
79
|
it 'should work' do
|
|
80
80
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
describe 'test attribute "
|
|
84
|
+
describe 'test attribute "do_not_forward"' do
|
|
85
85
|
it 'should work' do
|
|
86
86
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
describe 'test attribute "
|
|
90
|
+
describe 'test attribute "created_at"' do
|
|
91
91
|
it 'should work' do
|
|
92
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
93
|
end
|