alula-ruby 0.60.0 → 0.61.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION.md +1 -0
- data/lib/alula/resources/user.rb +11 -0
- data/lib/alula/version.rb +1 -1
- data/lib/alula.rb +0 -1
- metadata +2 -3
- data/lib/alula/resources/admin_user.rb +0 -207
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1ede6cdbfb53c529ab1304e84f394710e6992929620377bf3195aed80a1bc56
|
4
|
+
data.tar.gz: 942d3e61791f29b62f3b6129dfcbc71ec62718204db7fd3ae2763660bbbdbd31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d8bc08cee3bd717877b0816d4d21007ac34439ba6b64264f263bcc82889a95c0bdc7bc3e2cb334b530474d01337c4e58663311acf0a3d57d39a06a68e2a6f18
|
7
|
+
data.tar.gz: 62b5b93a4de3d71a4ab0f0df03798e0a0b526149f18bdf5822532bc593da6f1f5c9e6bff03e3c8908d5eeb01bfecdc5651ddd2cd943e064c24868e5cb7bf3eb0
|
data/VERSION.md
CHANGED
data/lib/alula/resources/user.rb
CHANGED
@@ -198,6 +198,17 @@ module Alula
|
|
198
198
|
creatable_by: %i[system station dealer technician user],
|
199
199
|
patchable_by: %i[system station dealer technician user sub_user]
|
200
200
|
|
201
|
+
field :hidden,
|
202
|
+
type: :string,
|
203
|
+
sortable: false,
|
204
|
+
filterable: true,
|
205
|
+
creatable_by: [],
|
206
|
+
patchable_by: %i[system]
|
207
|
+
|
208
|
+
def hidden?
|
209
|
+
hidden == '1'
|
210
|
+
end
|
211
|
+
|
201
212
|
def user_role
|
202
213
|
# pre-alula api users will be u_type 32, newer ones are 96. need to differentiate
|
203
214
|
# between account users and account owners by checking if they own themselves
|
data/lib/alula/version.rb
CHANGED
data/lib/alula.rb
CHANGED
@@ -44,7 +44,6 @@ require_relative 'alula/resources/event_trigger'
|
|
44
44
|
require_relative 'alula/resources/event_webhook'
|
45
45
|
require_relative 'alula/resources/self'
|
46
46
|
require_relative 'alula/resources/user'
|
47
|
-
require_relative 'alula/resources/admin_user'
|
48
47
|
require_relative 'alula/resources/user_phone'
|
49
48
|
require_relative 'alula/resources/user_address'
|
50
49
|
require_relative 'alula/resources/user_pushtoken'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alula-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.61.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -235,7 +235,6 @@ files:
|
|
235
235
|
- lib/alula/rate_limit.rb
|
236
236
|
- lib/alula/relationship_attributes.rb
|
237
237
|
- lib/alula/resource_attributes.rb
|
238
|
-
- lib/alula/resources/admin_user.rb
|
239
238
|
- lib/alula/resources/billing_program.rb
|
240
239
|
- lib/alula/resources/dealer.rb
|
241
240
|
- lib/alula/resources/dealer_account_transfer.rb
|
@@ -1,207 +0,0 @@
|
|
1
|
-
module Alula
|
2
|
-
class AdminUser < Alula::User
|
3
|
-
extend Alula::ResourceAttributes
|
4
|
-
extend Alula::RelationshipAttributes
|
5
|
-
extend Alula::ApiOperations::Request
|
6
|
-
extend Alula::ApiOperations::List
|
7
|
-
extend Alula::ApiOperations::Save
|
8
|
-
|
9
|
-
resource_path 'admins/users'
|
10
|
-
type 'admins-users'
|
11
|
-
|
12
|
-
relationship :devices, type: 'devices', cardinality: 'To-many'
|
13
|
-
relationship :dealer, type: 'dealers', cardinality: 'To-one'
|
14
|
-
relationship :phone, type: 'users-phones', cardinality: 'To-one'
|
15
|
-
relationship :address, type: 'users-addresses', cardinality: 'To-one'
|
16
|
-
relationship :pushtokens, type: 'users-pushtokens', cardinality: 'To-many'
|
17
|
-
relationship :preferences, type: 'users-preferences', cardinality: 'To-one'
|
18
|
-
relationship :videoprofiles, type: 'users-videoprofiles', cardinality: 'To-many'
|
19
|
-
|
20
|
-
# Resource Fields
|
21
|
-
# Not all params are used at the moment. See Alula::ResourceAttributes for details
|
22
|
-
# on how params are parsed,
|
23
|
-
field :id,
|
24
|
-
type: :string,
|
25
|
-
sortable: false,
|
26
|
-
filterable: false,
|
27
|
-
creatable_by: [],
|
28
|
-
patchable_by: []
|
29
|
-
|
30
|
-
field :username,
|
31
|
-
type: :string,
|
32
|
-
sortable: true,
|
33
|
-
filterable: true,
|
34
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
35
|
-
patchable_by: [:system, :station, :dealer, :technician, :user, :sub_user]
|
36
|
-
|
37
|
-
field :password,
|
38
|
-
type: :string,
|
39
|
-
sortable: false,
|
40
|
-
filterable: false,
|
41
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
42
|
-
patchable_by: []
|
43
|
-
|
44
|
-
field :u_type,
|
45
|
-
type: :string,
|
46
|
-
sortable: false,
|
47
|
-
filterable: true,
|
48
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
49
|
-
patchable_by: []
|
50
|
-
|
51
|
-
field :user_type,
|
52
|
-
type: :string,
|
53
|
-
sortable: false,
|
54
|
-
filterable: true,
|
55
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
56
|
-
patchable_by: [],
|
57
|
-
symbolize: true
|
58
|
-
|
59
|
-
field :u_level,
|
60
|
-
type: :string,
|
61
|
-
sortable: false,
|
62
|
-
filterable: false,
|
63
|
-
creatable_by: [],
|
64
|
-
patchable_by: []
|
65
|
-
|
66
|
-
field :parent_id,
|
67
|
-
type: :string,
|
68
|
-
sortable: false,
|
69
|
-
filterable: true,
|
70
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
71
|
-
patchable_by: []
|
72
|
-
|
73
|
-
field :dealer_id,
|
74
|
-
type: :string,
|
75
|
-
sortable: false,
|
76
|
-
filterable: true,
|
77
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
78
|
-
patchable_by: []
|
79
|
-
|
80
|
-
field :station_id,
|
81
|
-
type: :string,
|
82
|
-
sortable: false,
|
83
|
-
filterable: true,
|
84
|
-
creatable_by: [],
|
85
|
-
patchable_by: []
|
86
|
-
|
87
|
-
field :last_login,
|
88
|
-
type: :string,
|
89
|
-
sortable: false,
|
90
|
-
filterable: false,
|
91
|
-
creatable_by: [],
|
92
|
-
patchable_by: []
|
93
|
-
|
94
|
-
field :date_entered,
|
95
|
-
type: :date,
|
96
|
-
sortable: true,
|
97
|
-
filterable: true,
|
98
|
-
creatable_by: [],
|
99
|
-
patchable_by: []
|
100
|
-
|
101
|
-
field :date_modified,
|
102
|
-
type: :date,
|
103
|
-
sortable: true,
|
104
|
-
filterable: true,
|
105
|
-
creatable_by: [],
|
106
|
-
patchable_by: []
|
107
|
-
|
108
|
-
field :entered_by,
|
109
|
-
type: :string,
|
110
|
-
sortable: false,
|
111
|
-
filterable: false,
|
112
|
-
creatable_by: [],
|
113
|
-
patchable_by: []
|
114
|
-
|
115
|
-
field :modified_by,
|
116
|
-
type: :string,
|
117
|
-
sortable: false,
|
118
|
-
filterable: false,
|
119
|
-
creatable_by: [],
|
120
|
-
patchable_by: []
|
121
|
-
|
122
|
-
field :pwch,
|
123
|
-
type: :string,
|
124
|
-
sortable: false,
|
125
|
-
filterable: false,
|
126
|
-
creatable_by: [],
|
127
|
-
patchable_by: []
|
128
|
-
|
129
|
-
field :features_selected,
|
130
|
-
type: :object,
|
131
|
-
sortable: false,
|
132
|
-
filterable: false,
|
133
|
-
creatable_by: [:system, :station, :dealer, :technician],
|
134
|
-
patchable_by: [:system, :station, :dealer, :technician]
|
135
|
-
|
136
|
-
field :eula,
|
137
|
-
type: :string,
|
138
|
-
sortable: false,
|
139
|
-
filterable: false,
|
140
|
-
creatable_by: [],
|
141
|
-
patchable_by: [:system, :station, :dealer, :technician, :user, :sub_user]
|
142
|
-
|
143
|
-
field :def_mod,
|
144
|
-
type: :string,
|
145
|
-
sortable: false,
|
146
|
-
filterable: false,
|
147
|
-
creatable_by: [],
|
148
|
-
patchable_by: []
|
149
|
-
|
150
|
-
field :rg_activated,
|
151
|
-
type: :string,
|
152
|
-
sortable: false,
|
153
|
-
filterable: false,
|
154
|
-
creatable_by: [],
|
155
|
-
patchable_by: []
|
156
|
-
|
157
|
-
field :company_name,
|
158
|
-
type: :string,
|
159
|
-
sortable: false,
|
160
|
-
filterable: false,
|
161
|
-
creatable_by: [],
|
162
|
-
patchable_by: []
|
163
|
-
|
164
|
-
field :name_first,
|
165
|
-
type: :string,
|
166
|
-
sortable: true,
|
167
|
-
filterable: true,
|
168
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
169
|
-
patchable_by: [:system, :station, :dealer, :technician, :user, :sub_user]
|
170
|
-
|
171
|
-
field :name_last,
|
172
|
-
type: :string,
|
173
|
-
sortable: true,
|
174
|
-
filterable: true,
|
175
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
176
|
-
patchable_by: [:system, :station, :dealer, :technician, :user, :sub_user]
|
177
|
-
|
178
|
-
field :email,
|
179
|
-
type: :string,
|
180
|
-
sortable: true,
|
181
|
-
filterable: true,
|
182
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
183
|
-
patchable_by: [:system, :station, :dealer, :technician, :user, :sub_user]
|
184
|
-
|
185
|
-
field :time_offset,
|
186
|
-
type: :string,
|
187
|
-
sortable: false,
|
188
|
-
filterable: false,
|
189
|
-
creatable_by: [],
|
190
|
-
patchable_by: []
|
191
|
-
|
192
|
-
field :timezone,
|
193
|
-
type: :string,
|
194
|
-
sortable: false,
|
195
|
-
filterable: false,
|
196
|
-
creatable_by: [:system, :station, :dealer, :technician, :user],
|
197
|
-
patchable_by: [:system, :station, :dealer, :technician, :user, :sub_user]
|
198
|
-
|
199
|
-
field :hidden,
|
200
|
-
type: :boolean,
|
201
|
-
sortable: true,
|
202
|
-
filterable: true,
|
203
|
-
creatable_by: [:system],
|
204
|
-
patchable_by: [:system]
|
205
|
-
|
206
|
-
end
|
207
|
-
end
|