losant_rest 2.1.1 → 2.2.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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +2158 -55
  3. data/docs/flow.md +1 -0
  4. data/docs/flowVersions.md +1 -0
  5. data/docs/flows.md +1 -0
  6. data/docs/userOauthClient.md +125 -0
  7. data/docs/userOauthClients.md +87 -0
  8. data/lib/platform_rest/client.rb +10 -2
  9. data/lib/platform_rest/flow.rb +2 -0
  10. data/lib/platform_rest/flow_versions.rb +2 -0
  11. data/lib/platform_rest/flows.rb +2 -0
  12. data/lib/platform_rest/user_oauth_client.rb +170 -0
  13. data/lib/platform_rest/user_oauth_clients.rb +132 -0
  14. data/lib/platform_rest/version.rb +1 -1
  15. data/lib/platform_rest.rb +2 -0
  16. data/schemas/apiTokenPost.json +11 -0
  17. data/schemas/applicationDashboardPost.json +142 -11
  18. data/schemas/dashboard.json +142 -11
  19. data/schemas/dashboardPatch.json +142 -11
  20. data/schemas/dashboardPost.json +142 -11
  21. data/schemas/dashboards.json +142 -11
  22. data/schemas/githubLogin.json +11 -0
  23. data/schemas/instance.json +6 -0
  24. data/schemas/instanceOrg.json +12 -0
  25. data/schemas/instanceOrgEntitlement.json +182 -0
  26. data/schemas/instanceOrgEntitlementSync.json +64 -0
  27. data/schemas/instanceOrgs.json +12 -0
  28. data/schemas/instanceSandbox.json +6 -0
  29. data/schemas/instanceSandboxes.json +6 -0
  30. data/schemas/instances.json +6 -0
  31. data/schemas/me.json +15 -0
  32. data/schemas/meEntitlements.json +194 -0
  33. data/schemas/mePatch.json +9 -0
  34. data/schemas/org.json +16 -0
  35. data/schemas/orgPost.json +4 -0
  36. data/schemas/orgs.json +16 -0
  37. data/schemas/samlResponse.json +11 -0
  38. data/schemas/userCredentials.json +11 -0
  39. data/schemas/userOauthClient.json +125 -0
  40. data/schemas/userOauthClientPatch.json +113 -0
  41. data/schemas/userOauthClientPost.json +117 -0
  42. data/schemas/userOauthClients.json +166 -0
  43. data/schemas/userPost.json +20 -0
  44. data/schemas/validateContextError.json +28 -0
  45. data/schemas/validateContextSuccess.json +28 -0
  46. metadata +12 -1
@@ -0,0 +1,117 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "client_name": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "maxLength": 32767
13
+ },
14
+ "client_uri": {
15
+ "oneOf": [
16
+ {
17
+ "type": "string",
18
+ "format": "uri",
19
+ "maxLength": 1024
20
+ },
21
+ {
22
+ "type": "null"
23
+ }
24
+ ]
25
+ },
26
+ "logo_uri": {
27
+ "oneOf": [
28
+ {
29
+ "type": "string",
30
+ "format": "uri",
31
+ "maxLength": 32768,
32
+ "description": "URL of the client's logo. May be an http(s) URL or a data:image/* URI."
33
+ },
34
+ {
35
+ "type": "null"
36
+ }
37
+ ]
38
+ },
39
+ "redirect_uris": {
40
+ "type": "array",
41
+ "minItems": 1,
42
+ "maxItems": 25,
43
+ "items": {
44
+ "type": "string",
45
+ "format": "uri",
46
+ "maxLength": 1024
47
+ },
48
+ "description": "Array of redirect URIs for use in redirect-based flows"
49
+ },
50
+ "token_endpoint_auth_method": {
51
+ "type": "string",
52
+ "description": "Authentication method for the token endpoint",
53
+ "enum": [
54
+ "client_secret_basic",
55
+ "client_secret_post",
56
+ "none"
57
+ ]
58
+ },
59
+ "scope": {
60
+ "type": "array",
61
+ "uniqueItems": true,
62
+ "items": {
63
+ "type": "string",
64
+ "description": "OAuth-supported user-context API scope. See the `scopes_supported` field of the OAuth authorization server metadata document at /.well-known/oauth-authorization-server for the authoritative list.",
65
+ "enum": [
66
+ "all.Application.read",
67
+ "all.Application.bounded",
68
+ "only.Organization.read",
69
+ "only.Organization.bounded",
70
+ "all.Organization.read",
71
+ "all.Organization.bounded",
72
+ "only.User.read"
73
+ ]
74
+ },
75
+ "description": "API scopes this client may request"
76
+ },
77
+ "contacts": {
78
+ "type": "array",
79
+ "maxItems": 10,
80
+ "items": {
81
+ "type": "string",
82
+ "format": "email",
83
+ "maxLength": 1024
84
+ },
85
+ "description": "Contact email addresses for this client"
86
+ },
87
+ "tos_uri": {
88
+ "oneOf": [
89
+ {
90
+ "type": "string",
91
+ "format": "uri",
92
+ "maxLength": 1024
93
+ },
94
+ {
95
+ "type": "null"
96
+ }
97
+ ]
98
+ },
99
+ "policy_uri": {
100
+ "oneOf": [
101
+ {
102
+ "type": "string",
103
+ "format": "uri",
104
+ "maxLength": 1024
105
+ },
106
+ {
107
+ "type": "null"
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "client_name",
115
+ "redirect_uris"
116
+ ]
117
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "User OAuth Client",
9
+ "description": "Schema for a single private OAuth client",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "creationDate": {
17
+ "type": "string",
18
+ "format": "date-time"
19
+ },
20
+ "lastUpdated": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ },
24
+ "client_id": {
25
+ "type": "string",
26
+ "description": "Unique client identifier"
27
+ },
28
+ "client_secret": {
29
+ "type": "string",
30
+ "description": "Client secret. Only ever included in the response to the initial creation request."
31
+ },
32
+ "client_name": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 255
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "maxLength": 32767
40
+ },
41
+ "client_uri": {
42
+ "type": "string",
43
+ "format": "uri",
44
+ "maxLength": 1024
45
+ },
46
+ "logo_uri": {
47
+ "type": "string",
48
+ "format": "uri",
49
+ "maxLength": 32768,
50
+ "description": "URL of the client's logo. May be an http(s) URL or a data:image/* URI."
51
+ },
52
+ "redirect_uris": {
53
+ "type": "array",
54
+ "minItems": 1,
55
+ "maxItems": 25,
56
+ "items": {
57
+ "type": "string",
58
+ "format": "uri",
59
+ "maxLength": 1024
60
+ },
61
+ "description": "Array of redirect URIs for use in redirect-based flows"
62
+ },
63
+ "grant_types": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "enum": [
68
+ "authorization_code",
69
+ "refresh_token"
70
+ ]
71
+ },
72
+ "description": "Array of OAuth 2.0 grant types"
73
+ },
74
+ "response_types": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "string",
78
+ "enum": [
79
+ "code"
80
+ ]
81
+ },
82
+ "description": "Array of OAuth 2.0 response types"
83
+ },
84
+ "token_endpoint_auth_method": {
85
+ "type": "string",
86
+ "description": "Authentication method for the token endpoint",
87
+ "enum": [
88
+ "client_secret_basic",
89
+ "client_secret_post",
90
+ "none"
91
+ ]
92
+ },
93
+ "scope": {
94
+ "type": "array",
95
+ "uniqueItems": true,
96
+ "items": {
97
+ "type": "string",
98
+ "description": "OAuth-supported user-context API scope. See the `scopes_supported` field of the OAuth authorization server metadata document at /.well-known/oauth-authorization-server for the authoritative list.",
99
+ "enum": [
100
+ "all.Application.read",
101
+ "all.Application.bounded",
102
+ "only.Organization.read",
103
+ "only.Organization.bounded",
104
+ "all.Organization.read",
105
+ "all.Organization.bounded",
106
+ "only.User.read"
107
+ ]
108
+ },
109
+ "description": "API scopes this client may request"
110
+ },
111
+ "contacts": {
112
+ "type": "array",
113
+ "maxItems": 10,
114
+ "items": {
115
+ "type": "string",
116
+ "format": "email",
117
+ "maxLength": 1024
118
+ },
119
+ "description": "Contact email addresses for this client"
120
+ },
121
+ "tos_uri": {
122
+ "type": "string",
123
+ "format": "uri",
124
+ "maxLength": 1024
125
+ },
126
+ "policy_uri": {
127
+ "type": "string",
128
+ "format": "uri",
129
+ "maxLength": 1024
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "count": {
135
+ "type": "integer"
136
+ },
137
+ "totalCount": {
138
+ "type": "integer"
139
+ },
140
+ "perPage": {
141
+ "type": "integer"
142
+ },
143
+ "page": {
144
+ "type": "integer"
145
+ },
146
+ "filter": {
147
+ "type": "string"
148
+ },
149
+ "filterField": {
150
+ "type": "string"
151
+ },
152
+ "sortField": {
153
+ "type": "string"
154
+ },
155
+ "sortDirection": {
156
+ "type": "string",
157
+ "enum": [
158
+ "asc",
159
+ "desc",
160
+ "ASC",
161
+ "DESC",
162
+ ""
163
+ ]
164
+ }
165
+ }
166
+ }
@@ -36,6 +36,15 @@
36
36
  "type": "string",
37
37
  "maxLength": 1024
38
38
  },
39
+ "state": {
40
+ "type": "string",
41
+ "maxLength": 1024
42
+ },
43
+ "country": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 1024
47
+ },
39
48
  "oauth": {
40
49
  "type": "object",
41
50
  "properties": {
@@ -470,6 +479,7 @@
470
479
  "instance.payloadCountsBreakdown",
471
480
  "instance.deviceCounts",
472
481
  "instance.notebookMinuteCounts",
482
+ "instance.entitlements",
473
483
  "instanceOrg.*",
474
484
  "instanceOrg.get",
475
485
  "instanceOrg.patch",
@@ -478,6 +488,8 @@
478
488
  "instanceOrg.payloadCountsBreakdown",
479
489
  "instanceOrg.deviceCounts",
480
490
  "instanceOrg.notebookMinuteCounts",
491
+ "instanceOrg.entitlement",
492
+ "instanceOrg.entitlementSync",
481
493
  "instanceOrg.convertToEnterprise",
482
494
  "instanceOrgs.*",
483
495
  "instanceOrgs.get",
@@ -568,6 +580,13 @@
568
580
  "userOauthTokens.*",
569
581
  "userOauthTokens.get",
570
582
  "userOauthTokens.post",
583
+ "userOauthClient.*",
584
+ "userOauthClient.get",
585
+ "userOauthClient.patch",
586
+ "userOauthClient.delete",
587
+ "userOauthClients.*",
588
+ "userOauthClients.get",
589
+ "userOauthClients.post",
571
590
  "applicationTemplate.*",
572
591
  "applicationTemplate.get",
573
592
  "applicationTemplates.*",
@@ -598,6 +617,7 @@
598
617
  "me.invites",
599
618
  "me.respondToInvite",
600
619
  "me.refreshToken",
620
+ "me.entitlements",
601
621
  "orgs.*",
602
622
  "orgs.get",
603
623
  "orgs.post"
@@ -151,6 +151,34 @@
151
151
  }
152
152
  },
153
153
  "additionalProperties": false
154
+ },
155
+ "experienceGroups": {
156
+ "type": "array",
157
+ "items": {
158
+ "type": "object",
159
+ "properties": {
160
+ "name": {
161
+ "type": "string",
162
+ "minLength": 1,
163
+ "maxLength": 255
164
+ },
165
+ "id": {
166
+ "type": "string",
167
+ "pattern": "^[A-Fa-f\\d]{24}$"
168
+ },
169
+ "parentId": {
170
+ "oneOf": [
171
+ {
172
+ "type": "string",
173
+ "pattern": "^[A-Fa-f\\d]{24}$"
174
+ },
175
+ {
176
+ "type": "null"
177
+ }
178
+ ]
179
+ }
180
+ }
181
+ }
154
182
  }
155
183
  }
156
184
  }
@@ -147,6 +147,34 @@
147
147
  }
148
148
  },
149
149
  "additionalProperties": false
150
+ },
151
+ "experienceGroups": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "object",
155
+ "properties": {
156
+ "name": {
157
+ "type": "string",
158
+ "minLength": 1,
159
+ "maxLength": 255
160
+ },
161
+ "id": {
162
+ "type": "string",
163
+ "pattern": "^[A-Fa-f\\d]{24}$"
164
+ },
165
+ "parentId": {
166
+ "oneOf": [
167
+ {
168
+ "type": "string",
169
+ "pattern": "^[A-Fa-f\\d]{24}$"
170
+ },
171
+ {
172
+ "type": "null"
173
+ }
174
+ ]
175
+ }
176
+ }
177
+ }
150
178
  }
151
179
  }
152
180
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: losant_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
@@ -190,6 +190,8 @@ files:
190
190
  - docs/resourceJobs.md
191
191
  - docs/userApiToken.md
192
192
  - docs/userApiTokens.md
193
+ - docs/userOauthClient.md
194
+ - docs/userOauthClients.md
193
195
  - docs/userOauthToken.md
194
196
  - docs/userOauthTokens.md
195
197
  - docs/webhook.md
@@ -294,6 +296,8 @@ files:
294
296
  - lib/platform_rest/resource_jobs.rb
295
297
  - lib/platform_rest/user_api_token.rb
296
298
  - lib/platform_rest/user_api_tokens.rb
299
+ - lib/platform_rest/user_oauth_client.rb
300
+ - lib/platform_rest/user_oauth_clients.rb
297
301
  - lib/platform_rest/user_oauth_token.rb
298
302
  - lib/platform_rest/user_oauth_tokens.rb
299
303
  - lib/platform_rest/utils.rb
@@ -537,6 +541,8 @@ files:
537
541
  - schemas/instanceMemberPost.json
538
542
  - schemas/instanceMembers.json
539
543
  - schemas/instanceOrg.json
544
+ - schemas/instanceOrgEntitlement.json
545
+ - schemas/instanceOrgEntitlementSync.json
540
546
  - schemas/instanceOrgInvite.json
541
547
  - schemas/instanceOrgInviteSent.json
542
548
  - schemas/instanceOrgInvites.json
@@ -560,6 +566,7 @@ files:
560
566
  - schemas/lastValueData.json
561
567
  - schemas/lastValueQuery.json
562
568
  - schemas/me.json
569
+ - schemas/meEntitlements.json
563
570
  - schemas/mePatch.json
564
571
  - schemas/mqttPublishBody.json
565
572
  - schemas/multiDeviceCommand.json
@@ -632,6 +639,10 @@ files:
632
639
  - schemas/timeSeriesQuery.json
633
640
  - schemas/twoFactorAuthInfo.json
634
641
  - schemas/userCredentials.json
642
+ - schemas/userOauthClient.json
643
+ - schemas/userOauthClientPatch.json
644
+ - schemas/userOauthClientPost.json
645
+ - schemas/userOauthClients.json
635
646
  - schemas/userOauthToken.json
636
647
  - schemas/userOauthTokenPatch.json
637
648
  - schemas/userOauthTokenPost.json