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: 4fd326702343cd2c8f212f2964214c6c5b12eaf3d38747207a3aa26642b68af8
4
- data.tar.gz: 1a298755b3fb4d87ec58d09664720ea078595bd77ce11cd7bef20184b4e20f0a
3
+ metadata.gz: 38771e2469f7abb018b9c57b1a841a8a9da9a350b47be1206254ee60aad6df17
4
+ data.tar.gz: d19aedd7e56e0fec286c70640d9268ad8502003da974c1fa65fe7ec511335146
5
5
  SHA512:
6
- metadata.gz: fffd9940159bb8e141024235be5a3c0d9992a7ee23cc1bc454e1baca7d286bc19be8ee7114bd36fbff599f9ea05ed71853891fff43a98dcf97c94c7bc9065b3c
7
- data.tar.gz: 500a7b954f794cd50c59e4d56e4354e9e5908f8f9e27a09c662d64c74aa64f90a9f1c3d8962314c8d312a5c1d80947db823eab2f859b0d87025caee78a3bddce
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
- # Slug for what happened, e.g. `user.created`. Lowercase, dot-separated.
19
+ # What happened, e.g. `user.created`. Any non-empty string.
20
20
  attr_accessor :action
21
21
 
22
- # Slug for the kind of resource the event is about, e.g. `user`. Lowercase, dot-separated.
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, data, do_not_forward, created_at, actor_type, actor_id, actor_label, idempotency_key].hash
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 "data"' do
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 "do_not_forward"' do
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 "created_at"' do
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 "actor_type"' do
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 "actor_id"' do
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 "actor_label"' do
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smplkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.20
4
+ version: 3.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smpl Solutions LLC