licensekit-ruby 0.1.0.alpha.1 → 1.0.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/README.md +4 -2
- data/lib/licensekit/client.rb +2 -0
- data/lib/licensekit/generated/clients.rb +120 -0
- data/lib/licensekit/generated/metadata.rb +85 -1
- data/lib/licensekit/generated/operation_scopes.rb +61 -1
- data/lib/licensekit/version.rb +1 -1
- data/openapi/openapi.yaml +713 -0
- data/scripts/generate_from_openapi.rb +4 -0
- data/test/test_client.rb +43 -0
- data/test/test_scopes.rb +4 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7197d5610c64e0ae704778531d5204f6a4a30d37124a2e72875485791785d673
|
|
4
|
+
data.tar.gz: '0158e589ab261ead8b7df75cc9359bba3973e9cab5a7f2100bce7ae15ff2badf'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 565219d12865a2b77304eb6d05b272e05796031a91eb29a87eed8edff9f60444565ba904db7f35cd6662537e77e08751d3c556965af75a2280d722825e723f29
|
|
7
|
+
data.tar.gz: 3b0dd091a7165582d5b80340610df428da27ab022f491485c9a7182527de1309bb524a92ed067a5ef9b2beb088b7223f104c2a35ee57eb79f2d1ace1c2006a80
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
First-party Ruby SDK for `licensekit.dev`.
|
|
4
4
|
|
|
5
|
-
It provides Management, Runtime, and System clients for the LicenseKit licensing API, plus least-privilege scope metadata and Ed25519 runtime-signature verification helpers for activation, validation, metering, and offline-aware license flows.
|
|
5
|
+
It provides Management, Runtime, and System clients for the LicenseKit licensing API, including reporting and frozen export operations, plus least-privilege scope metadata and Ed25519 runtime-signature verification helpers for activation, validation, metering, and offline-aware license flows.
|
|
6
6
|
|
|
7
7
|
## Why use it
|
|
8
8
|
|
|
@@ -71,7 +71,7 @@ puts [product["data"]["id"], verified.ok].join(" ")
|
|
|
71
71
|
## Package Shape
|
|
72
72
|
|
|
73
73
|
- `LicenseKit::ManagementClient`
|
|
74
|
-
Uses `Authorization: Bearer <token>` for `/api/v1/...` management operations
|
|
74
|
+
Uses `Authorization: Bearer <token>` for `/api/v1/...` management operations, including `/api/v1/activities` and `/api/v1/reports/...`.
|
|
75
75
|
- `LicenseKit::RuntimeClient`
|
|
76
76
|
Uses `Authorization: License <license-key>` for `/api/v1/license/...` runtime operations.
|
|
77
77
|
- `LicenseKit::SystemClient`
|
|
@@ -98,6 +98,8 @@ ready = system.raw.readyz
|
|
|
98
98
|
puts [ready.status, ready.data["data"]["status"]].join(" ")
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
`management.download_report_export` returns the raw snapshot body as a binary Ruby string so JSON, CSV, and PDF exports can all be handled without assuming one response shape. Use `management.raw.download_report_export` when you also need the response headers to branch on `Content-Type`.
|
|
102
|
+
|
|
101
103
|
## Development
|
|
102
104
|
|
|
103
105
|
```bash
|
data/lib/licensekit/client.rb
CHANGED
|
@@ -62,6 +62,11 @@ module LicenseKit
|
|
|
62
62
|
@client.send(:perform_request_raw, "createProductVersion", request, options: options, **kwargs)
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
+
# Create a frozen report export
|
|
66
|
+
def create_report_export(request = nil, options: nil, **kwargs)
|
|
67
|
+
@client.send(:perform_request_raw, "createReportExport", request, options: options, **kwargs)
|
|
68
|
+
end
|
|
69
|
+
|
|
65
70
|
# Create a subscription record for a product
|
|
66
71
|
def create_subscription(request = nil, options: nil, **kwargs)
|
|
67
72
|
@client.send(:perform_request_raw, "createSubscription", request, options: options, **kwargs)
|
|
@@ -97,11 +102,21 @@ module LicenseKit
|
|
|
97
102
|
@client.send(:perform_request_raw, "deleteWebhookEndpoint", request, options: options, **kwargs)
|
|
98
103
|
end
|
|
99
104
|
|
|
105
|
+
# Download a frozen report export snapshot
|
|
106
|
+
def download_report_export(request = nil, options: nil, **kwargs)
|
|
107
|
+
@client.send(:perform_request_raw, "downloadReportExport", request, options: options, **kwargs)
|
|
108
|
+
end
|
|
109
|
+
|
|
100
110
|
# Get a customer
|
|
101
111
|
def get_customer(request = nil, options: nil, **kwargs)
|
|
102
112
|
@client.send(:perform_request_raw, "getCustomer", request, options: options, **kwargs)
|
|
103
113
|
end
|
|
104
114
|
|
|
115
|
+
# Get customer-level reporting summary
|
|
116
|
+
def get_customer_summary(request = nil, options: nil, **kwargs)
|
|
117
|
+
@client.send(:perform_request_raw, "getCustomerSummary", request, options: options, **kwargs)
|
|
118
|
+
end
|
|
119
|
+
|
|
105
120
|
# Get a feature
|
|
106
121
|
def get_feature(request = nil, options: nil, **kwargs)
|
|
107
122
|
@client.send(:perform_request_raw, "getFeature", request, options: options, **kwargs)
|
|
@@ -112,11 +127,21 @@ module LicenseKit
|
|
|
112
127
|
@client.send(:perform_request_raw, "getLicense", request, options: options, **kwargs)
|
|
113
128
|
end
|
|
114
129
|
|
|
130
|
+
# Get a license audit report
|
|
131
|
+
def get_license_audit_report(request = nil, options: nil, **kwargs)
|
|
132
|
+
@client.send(:perform_request_raw, "getLicenseAuditReport", request, options: options, **kwargs)
|
|
133
|
+
end
|
|
134
|
+
|
|
115
135
|
# Get a device for a license
|
|
116
136
|
def get_license_device(request = nil, options: nil, **kwargs)
|
|
117
137
|
@client.send(:perform_request_raw, "getLicenseDevice", request, options: options, **kwargs)
|
|
118
138
|
end
|
|
119
139
|
|
|
140
|
+
# Get operational summary cards
|
|
141
|
+
def get_ops_summary(request = nil, options: nil, **kwargs)
|
|
142
|
+
@client.send(:perform_request_raw, "getOpsSummary", request, options: options, **kwargs)
|
|
143
|
+
end
|
|
144
|
+
|
|
120
145
|
# Get an order record
|
|
121
146
|
def get_order(request = nil, options: nil, **kwargs)
|
|
122
147
|
@client.send(:perform_request_raw, "getOrder", request, options: options, **kwargs)
|
|
@@ -137,21 +162,46 @@ module LicenseKit
|
|
|
137
162
|
@client.send(:perform_request_raw, "getProductCustomFieldDefinition", request, options: options, **kwargs)
|
|
138
163
|
end
|
|
139
164
|
|
|
165
|
+
# Get report export metadata
|
|
166
|
+
def get_report_export(request = nil, options: nil, **kwargs)
|
|
167
|
+
@client.send(:perform_request_raw, "getReportExport", request, options: options, **kwargs)
|
|
168
|
+
end
|
|
169
|
+
|
|
140
170
|
# Get a subscription record
|
|
141
171
|
def get_subscription(request = nil, options: nil, **kwargs)
|
|
142
172
|
@client.send(:perform_request_raw, "getSubscription", request, options: options, **kwargs)
|
|
143
173
|
end
|
|
144
174
|
|
|
175
|
+
# Get subscription or order settlement summary
|
|
176
|
+
def get_subscription_settlement(request = nil, options: nil, **kwargs)
|
|
177
|
+
@client.send(:perform_request_raw, "getSubscriptionSettlement", request, options: options, **kwargs)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Get grouped usage totals
|
|
181
|
+
def get_usage_summary(request = nil, options: nil, **kwargs)
|
|
182
|
+
@client.send(:perform_request_raw, "getUsageSummary", request, options: options, **kwargs)
|
|
183
|
+
end
|
|
184
|
+
|
|
145
185
|
# Get a webhook endpoint
|
|
146
186
|
def get_webhook_endpoint(request = nil, options: nil, **kwargs)
|
|
147
187
|
@client.send(:perform_request_raw, "getWebhookEndpoint", request, options: options, **kwargs)
|
|
148
188
|
end
|
|
149
189
|
|
|
190
|
+
# Get webhook queue and failure health
|
|
191
|
+
def get_webhook_health(request = nil, options: nil, **kwargs)
|
|
192
|
+
@client.send(:perform_request_raw, "getWebhookHealth", request, options: options, **kwargs)
|
|
193
|
+
end
|
|
194
|
+
|
|
150
195
|
# List management API keys
|
|
151
196
|
def list_api_keys(request = nil, options: nil, **kwargs)
|
|
152
197
|
@client.send(:perform_request_raw, "listAPIKeys", request, options: options, **kwargs)
|
|
153
198
|
end
|
|
154
199
|
|
|
200
|
+
# List normalized reporting activities
|
|
201
|
+
def list_activities(request = nil, options: nil, **kwargs)
|
|
202
|
+
@client.send(:perform_request_raw, "listActivities", request, options: options, **kwargs)
|
|
203
|
+
end
|
|
204
|
+
|
|
155
205
|
# List customer custom field values
|
|
156
206
|
def list_customer_custom_field_values(request = nil, options: nil, **kwargs)
|
|
157
207
|
@client.send(:perform_request_raw, "listCustomerCustomFieldValues", request, options: options, **kwargs)
|
|
@@ -222,6 +272,16 @@ module LicenseKit
|
|
|
222
272
|
@client.send(:perform_request_raw, "listProducts", request, options: options, **kwargs)
|
|
223
273
|
end
|
|
224
274
|
|
|
275
|
+
# List grouped runtime error counts
|
|
276
|
+
def list_runtime_error_groups(request = nil, options: nil, **kwargs)
|
|
277
|
+
@client.send(:perform_request_raw, "listRuntimeErrorGroups", request, options: options, **kwargs)
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# List row-level usage ledger entries
|
|
281
|
+
def list_usage_ledger(request = nil, options: nil, **kwargs)
|
|
282
|
+
@client.send(:perform_request_raw, "listUsageLedger", request, options: options, **kwargs)
|
|
283
|
+
end
|
|
284
|
+
|
|
225
285
|
# List webhook endpoints
|
|
226
286
|
def list_webhook_endpoints(request = nil, options: nil, **kwargs)
|
|
227
287
|
@client.send(:perform_request_raw, "listWebhookEndpoints", request, options: options, **kwargs)
|
|
@@ -386,6 +446,11 @@ module LicenseKit
|
|
|
386
446
|
perform_request("createProductVersion", request, options: options, **kwargs)
|
|
387
447
|
end
|
|
388
448
|
|
|
449
|
+
# Create a frozen report export
|
|
450
|
+
def create_report_export(request = nil, options: nil, **kwargs)
|
|
451
|
+
perform_request("createReportExport", request, options: options, **kwargs)
|
|
452
|
+
end
|
|
453
|
+
|
|
389
454
|
# Create a subscription record for a product
|
|
390
455
|
def create_subscription(request = nil, options: nil, **kwargs)
|
|
391
456
|
perform_request("createSubscription", request, options: options, **kwargs)
|
|
@@ -421,11 +486,21 @@ module LicenseKit
|
|
|
421
486
|
perform_request("deleteWebhookEndpoint", request, options: options, **kwargs)
|
|
422
487
|
end
|
|
423
488
|
|
|
489
|
+
# Download a frozen report export snapshot
|
|
490
|
+
def download_report_export(request = nil, options: nil, **kwargs)
|
|
491
|
+
perform_request("downloadReportExport", request, options: options, **kwargs)
|
|
492
|
+
end
|
|
493
|
+
|
|
424
494
|
# Get a customer
|
|
425
495
|
def get_customer(request = nil, options: nil, **kwargs)
|
|
426
496
|
perform_request("getCustomer", request, options: options, **kwargs)
|
|
427
497
|
end
|
|
428
498
|
|
|
499
|
+
# Get customer-level reporting summary
|
|
500
|
+
def get_customer_summary(request = nil, options: nil, **kwargs)
|
|
501
|
+
perform_request("getCustomerSummary", request, options: options, **kwargs)
|
|
502
|
+
end
|
|
503
|
+
|
|
429
504
|
# Get a feature
|
|
430
505
|
def get_feature(request = nil, options: nil, **kwargs)
|
|
431
506
|
perform_request("getFeature", request, options: options, **kwargs)
|
|
@@ -436,11 +511,21 @@ module LicenseKit
|
|
|
436
511
|
perform_request("getLicense", request, options: options, **kwargs)
|
|
437
512
|
end
|
|
438
513
|
|
|
514
|
+
# Get a license audit report
|
|
515
|
+
def get_license_audit_report(request = nil, options: nil, **kwargs)
|
|
516
|
+
perform_request("getLicenseAuditReport", request, options: options, **kwargs)
|
|
517
|
+
end
|
|
518
|
+
|
|
439
519
|
# Get a device for a license
|
|
440
520
|
def get_license_device(request = nil, options: nil, **kwargs)
|
|
441
521
|
perform_request("getLicenseDevice", request, options: options, **kwargs)
|
|
442
522
|
end
|
|
443
523
|
|
|
524
|
+
# Get operational summary cards
|
|
525
|
+
def get_ops_summary(request = nil, options: nil, **kwargs)
|
|
526
|
+
perform_request("getOpsSummary", request, options: options, **kwargs)
|
|
527
|
+
end
|
|
528
|
+
|
|
444
529
|
# Get an order record
|
|
445
530
|
def get_order(request = nil, options: nil, **kwargs)
|
|
446
531
|
perform_request("getOrder", request, options: options, **kwargs)
|
|
@@ -461,21 +546,46 @@ module LicenseKit
|
|
|
461
546
|
perform_request("getProductCustomFieldDefinition", request, options: options, **kwargs)
|
|
462
547
|
end
|
|
463
548
|
|
|
549
|
+
# Get report export metadata
|
|
550
|
+
def get_report_export(request = nil, options: nil, **kwargs)
|
|
551
|
+
perform_request("getReportExport", request, options: options, **kwargs)
|
|
552
|
+
end
|
|
553
|
+
|
|
464
554
|
# Get a subscription record
|
|
465
555
|
def get_subscription(request = nil, options: nil, **kwargs)
|
|
466
556
|
perform_request("getSubscription", request, options: options, **kwargs)
|
|
467
557
|
end
|
|
468
558
|
|
|
559
|
+
# Get subscription or order settlement summary
|
|
560
|
+
def get_subscription_settlement(request = nil, options: nil, **kwargs)
|
|
561
|
+
perform_request("getSubscriptionSettlement", request, options: options, **kwargs)
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
# Get grouped usage totals
|
|
565
|
+
def get_usage_summary(request = nil, options: nil, **kwargs)
|
|
566
|
+
perform_request("getUsageSummary", request, options: options, **kwargs)
|
|
567
|
+
end
|
|
568
|
+
|
|
469
569
|
# Get a webhook endpoint
|
|
470
570
|
def get_webhook_endpoint(request = nil, options: nil, **kwargs)
|
|
471
571
|
perform_request("getWebhookEndpoint", request, options: options, **kwargs)
|
|
472
572
|
end
|
|
473
573
|
|
|
574
|
+
# Get webhook queue and failure health
|
|
575
|
+
def get_webhook_health(request = nil, options: nil, **kwargs)
|
|
576
|
+
perform_request("getWebhookHealth", request, options: options, **kwargs)
|
|
577
|
+
end
|
|
578
|
+
|
|
474
579
|
# List management API keys
|
|
475
580
|
def list_api_keys(request = nil, options: nil, **kwargs)
|
|
476
581
|
perform_request("listAPIKeys", request, options: options, **kwargs)
|
|
477
582
|
end
|
|
478
583
|
|
|
584
|
+
# List normalized reporting activities
|
|
585
|
+
def list_activities(request = nil, options: nil, **kwargs)
|
|
586
|
+
perform_request("listActivities", request, options: options, **kwargs)
|
|
587
|
+
end
|
|
588
|
+
|
|
479
589
|
# List customer custom field values
|
|
480
590
|
def list_customer_custom_field_values(request = nil, options: nil, **kwargs)
|
|
481
591
|
perform_request("listCustomerCustomFieldValues", request, options: options, **kwargs)
|
|
@@ -546,6 +656,16 @@ module LicenseKit
|
|
|
546
656
|
perform_request("listProducts", request, options: options, **kwargs)
|
|
547
657
|
end
|
|
548
658
|
|
|
659
|
+
# List grouped runtime error counts
|
|
660
|
+
def list_runtime_error_groups(request = nil, options: nil, **kwargs)
|
|
661
|
+
perform_request("listRuntimeErrorGroups", request, options: options, **kwargs)
|
|
662
|
+
end
|
|
663
|
+
|
|
664
|
+
# List row-level usage ledger entries
|
|
665
|
+
def list_usage_ledger(request = nil, options: nil, **kwargs)
|
|
666
|
+
perform_request("listUsageLedger", request, options: options, **kwargs)
|
|
667
|
+
end
|
|
668
|
+
|
|
549
669
|
# List webhook endpoints
|
|
550
670
|
def list_webhook_endpoints(request = nil, options: nil, **kwargs)
|
|
551
671
|
perform_request("listWebhookEndpoints", request, options: options, **kwargs)
|
|
@@ -115,6 +115,13 @@ module LicenseKit
|
|
|
115
115
|
summary: "Create a product version",
|
|
116
116
|
success: { 201 => "json" }
|
|
117
117
|
},
|
|
118
|
+
"createReportExport" => {
|
|
119
|
+
method: "POST",
|
|
120
|
+
path: "/api/v1/reports/exports",
|
|
121
|
+
auth: "bearer",
|
|
122
|
+
summary: "Create a frozen report export",
|
|
123
|
+
success: { 201 => "json" }
|
|
124
|
+
},
|
|
118
125
|
"createSubscription" => {
|
|
119
126
|
method: "POST",
|
|
120
127
|
path: "/api/v1/products/{id}/subscriptions",
|
|
@@ -171,6 +178,13 @@ module LicenseKit
|
|
|
171
178
|
summary: "Delete a webhook endpoint",
|
|
172
179
|
success: { 204 => "empty" }
|
|
173
180
|
},
|
|
181
|
+
"downloadReportExport" => {
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: "/api/v1/reports/exports/{id}/download",
|
|
184
|
+
auth: "bearer",
|
|
185
|
+
summary: "Download a frozen report export snapshot",
|
|
186
|
+
success: { 200 => "bytes" }
|
|
187
|
+
},
|
|
174
188
|
"getCustomer" => {
|
|
175
189
|
method: "GET",
|
|
176
190
|
path: "/api/v1/customers/{id}",
|
|
@@ -178,6 +192,13 @@ module LicenseKit
|
|
|
178
192
|
summary: "Get a customer",
|
|
179
193
|
success: { 200 => "json" }
|
|
180
194
|
},
|
|
195
|
+
"getCustomerSummary" => {
|
|
196
|
+
method: "GET",
|
|
197
|
+
path: "/api/v1/reports/customer-summary",
|
|
198
|
+
auth: "bearer",
|
|
199
|
+
summary: "Get customer-level reporting summary",
|
|
200
|
+
success: { 200 => "json" }
|
|
201
|
+
},
|
|
181
202
|
"getFeature" => {
|
|
182
203
|
method: "GET",
|
|
183
204
|
path: "/api/v1/features/{id}",
|
|
@@ -192,6 +213,13 @@ module LicenseKit
|
|
|
192
213
|
summary: "Get a license",
|
|
193
214
|
success: { 200 => "json" }
|
|
194
215
|
},
|
|
216
|
+
"getLicenseAuditReport" => {
|
|
217
|
+
method: "GET",
|
|
218
|
+
path: "/api/v1/reports/license-audit",
|
|
219
|
+
auth: "bearer",
|
|
220
|
+
summary: "Get a license audit report",
|
|
221
|
+
success: { 200 => "json" }
|
|
222
|
+
},
|
|
195
223
|
"getLicenseDevice" => {
|
|
196
224
|
method: "GET",
|
|
197
225
|
path: "/api/v1/licenses/{id}/devices/{device_id}",
|
|
@@ -206,6 +234,13 @@ module LicenseKit
|
|
|
206
234
|
summary: "Prometheus metrics",
|
|
207
235
|
success: { 200 => "text" }
|
|
208
236
|
},
|
|
237
|
+
"getOpsSummary" => {
|
|
238
|
+
method: "GET",
|
|
239
|
+
path: "/api/v1/ops/summary",
|
|
240
|
+
auth: "bearer",
|
|
241
|
+
summary: "Get operational summary cards",
|
|
242
|
+
success: { 200 => "json" }
|
|
243
|
+
},
|
|
209
244
|
"getOrder" => {
|
|
210
245
|
method: "GET",
|
|
211
246
|
path: "/api/v1/orders/{id}",
|
|
@@ -234,6 +269,13 @@ module LicenseKit
|
|
|
234
269
|
summary: "Get a product custom field definition",
|
|
235
270
|
success: { 200 => "json" }
|
|
236
271
|
},
|
|
272
|
+
"getReportExport" => {
|
|
273
|
+
method: "GET",
|
|
274
|
+
path: "/api/v1/reports/exports/{id}",
|
|
275
|
+
auth: "bearer",
|
|
276
|
+
summary: "Get report export metadata",
|
|
277
|
+
success: { 200 => "json" }
|
|
278
|
+
},
|
|
237
279
|
"getSubscription" => {
|
|
238
280
|
method: "GET",
|
|
239
281
|
path: "/api/v1/subscriptions/{id}",
|
|
@@ -241,6 +283,20 @@ module LicenseKit
|
|
|
241
283
|
summary: "Get a subscription record",
|
|
242
284
|
success: { 200 => "json" }
|
|
243
285
|
},
|
|
286
|
+
"getSubscriptionSettlement" => {
|
|
287
|
+
method: "GET",
|
|
288
|
+
path: "/api/v1/reports/subscription-settlement",
|
|
289
|
+
auth: "bearer",
|
|
290
|
+
summary: "Get subscription or order settlement summary",
|
|
291
|
+
success: { 200 => "json" }
|
|
292
|
+
},
|
|
293
|
+
"getUsageSummary" => {
|
|
294
|
+
method: "GET",
|
|
295
|
+
path: "/api/v1/reports/usage-summary",
|
|
296
|
+
auth: "bearer",
|
|
297
|
+
summary: "Get grouped usage totals",
|
|
298
|
+
success: { 200 => "json" }
|
|
299
|
+
},
|
|
244
300
|
"getWebhookEndpoint" => {
|
|
245
301
|
method: "GET",
|
|
246
302
|
path: "/api/v1/webhooks/{id}",
|
|
@@ -248,6 +304,13 @@ module LicenseKit
|
|
|
248
304
|
summary: "Get a webhook endpoint",
|
|
249
305
|
success: { 200 => "json" }
|
|
250
306
|
},
|
|
307
|
+
"getWebhookHealth" => {
|
|
308
|
+
method: "GET",
|
|
309
|
+
path: "/api/v1/ops/webhook-health",
|
|
310
|
+
auth: "bearer",
|
|
311
|
+
summary: "Get webhook queue and failure health",
|
|
312
|
+
success: { 200 => "json" }
|
|
313
|
+
},
|
|
251
314
|
"health" => {
|
|
252
315
|
method: "GET",
|
|
253
316
|
path: "/health",
|
|
@@ -283,6 +346,13 @@ module LicenseKit
|
|
|
283
346
|
summary: "List management API keys",
|
|
284
347
|
success: { 200 => "json" }
|
|
285
348
|
},
|
|
349
|
+
"listActivities" => {
|
|
350
|
+
method: "GET",
|
|
351
|
+
path: "/api/v1/activities",
|
|
352
|
+
auth: "bearer",
|
|
353
|
+
summary: "List normalized reporting activities",
|
|
354
|
+
success: { 200 => "json" }
|
|
355
|
+
},
|
|
286
356
|
"listCustomerCustomFieldValues" => {
|
|
287
357
|
method: "GET",
|
|
288
358
|
path: "/api/v1/customers/{id}/custom-fields",
|
|
@@ -388,6 +458,20 @@ module LicenseKit
|
|
|
388
458
|
summary: "List public signing keys",
|
|
389
459
|
success: { 200 => "json" }
|
|
390
460
|
},
|
|
461
|
+
"listRuntimeErrorGroups" => {
|
|
462
|
+
method: "GET",
|
|
463
|
+
path: "/api/v1/ops/runtime-errors",
|
|
464
|
+
auth: "bearer",
|
|
465
|
+
summary: "List grouped runtime error counts",
|
|
466
|
+
success: { 200 => "json" }
|
|
467
|
+
},
|
|
468
|
+
"listUsageLedger" => {
|
|
469
|
+
method: "GET",
|
|
470
|
+
path: "/api/v1/reports/usage-ledger",
|
|
471
|
+
auth: "bearer",
|
|
472
|
+
summary: "List row-level usage ledger entries",
|
|
473
|
+
success: { 200 => "json" }
|
|
474
|
+
},
|
|
391
475
|
"listWebhookEndpoints" => {
|
|
392
476
|
method: "GET",
|
|
393
477
|
path: "/api/v1/webhooks",
|
|
@@ -529,7 +613,7 @@ module LicenseKit
|
|
|
529
613
|
success: { 200 => "json" }
|
|
530
614
|
},
|
|
531
615
|
}.freeze
|
|
532
|
-
MANAGEMENT_OPERATION_IDS = ["assignLicenseFeature", "blacklistLicenseDevice", "createAPIKey", "createCustomer", "createFeature", "createLicense", "createOrder", "createPolicy", "createProduct", "createProductCustomFieldDefinition", "createProductVersion", "createSubscription", "createWebhookEndpoint", "deleteCustomer", "deletePolicy", "deleteProduct", "deleteProductCustomFieldDefinition", "deleteWebhookEndpoint", "getCustomer", "getFeature", "getLicense", "getLicenseDevice", "getOrder", "getPolicy", "getProduct", "getProductCustomFieldDefinition", "getSubscription", "getWebhookEndpoint", "listAPIKeys", "listCustomerCustomFieldValues", "listCustomers", "listEvents", "listFeaturesByProduct", "listLicenseCustomFieldValues", "listLicenseDevices", "listLicenseFeatures", "listLicenses", "listPoliciesByProduct", "listProductCustomFieldDefinitions", "listProductOrders", "listProductSubscriptions", "listProductVersions", "listProducts", "listWebhookEndpoints", "reinstateLicense", "removeLicenseFeature", "renewLicense", "resetLicenseDevice", "resetLicenseUsage", "revokeLicense", "suspendLicense", "transferLicense", "updateCustomer", "updateOrder", "updatePolicy", "updateProduct", "updateProductCustomFieldDefinition", "updateSubscription", "updateWebhookEndpoint", "upsertCustomerCustomFieldValue", "upsertLicenseCustomFieldValue"].freeze
|
|
616
|
+
MANAGEMENT_OPERATION_IDS = ["assignLicenseFeature", "blacklistLicenseDevice", "createAPIKey", "createCustomer", "createFeature", "createLicense", "createOrder", "createPolicy", "createProduct", "createProductCustomFieldDefinition", "createProductVersion", "createReportExport", "createSubscription", "createWebhookEndpoint", "deleteCustomer", "deletePolicy", "deleteProduct", "deleteProductCustomFieldDefinition", "deleteWebhookEndpoint", "downloadReportExport", "getCustomer", "getCustomerSummary", "getFeature", "getLicense", "getLicenseAuditReport", "getLicenseDevice", "getOpsSummary", "getOrder", "getPolicy", "getProduct", "getProductCustomFieldDefinition", "getReportExport", "getSubscription", "getSubscriptionSettlement", "getUsageSummary", "getWebhookEndpoint", "getWebhookHealth", "listAPIKeys", "listActivities", "listCustomerCustomFieldValues", "listCustomers", "listEvents", "listFeaturesByProduct", "listLicenseCustomFieldValues", "listLicenseDevices", "listLicenseFeatures", "listLicenses", "listPoliciesByProduct", "listProductCustomFieldDefinitions", "listProductOrders", "listProductSubscriptions", "listProductVersions", "listProducts", "listRuntimeErrorGroups", "listUsageLedger", "listWebhookEndpoints", "reinstateLicense", "removeLicenseFeature", "renewLicense", "resetLicenseDevice", "resetLicenseUsage", "revokeLicense", "suspendLicense", "transferLicense", "updateCustomer", "updateOrder", "updatePolicy", "updateProduct", "updateProductCustomFieldDefinition", "updateSubscription", "updateWebhookEndpoint", "upsertCustomerCustomFieldValue", "upsertLicenseCustomFieldValue"].freeze
|
|
533
617
|
RUNTIME_OPERATION_IDS = ["activateLicense", "checkLicense", "checkinFloatingLicense", "checkoutFloatingLicense", "consumeLicense", "deactivateLicense", "heartbeatFloatingLicense", "issueOfflineLicense", "validateLicense"].freeze
|
|
534
618
|
SYSTEM_OPERATION_IDS = ["getMetrics", "health", "healthz", "listPublicKeys", "readyz"].freeze
|
|
535
619
|
end
|
|
@@ -58,6 +58,11 @@ module LicenseKit
|
|
|
58
58
|
path: "/api/v1/products/{id}/versions",
|
|
59
59
|
scopes: ["product:write"].freeze
|
|
60
60
|
},
|
|
61
|
+
"createReportExport" => {
|
|
62
|
+
method: "POST",
|
|
63
|
+
path: "/api/v1/reports/exports",
|
|
64
|
+
scopes: ["report:export"].freeze
|
|
65
|
+
},
|
|
61
66
|
"createSubscription" => {
|
|
62
67
|
method: "POST",
|
|
63
68
|
path: "/api/v1/products/{id}/subscriptions",
|
|
@@ -93,11 +98,21 @@ module LicenseKit
|
|
|
93
98
|
path: "/api/v1/webhooks/{id}",
|
|
94
99
|
scopes: ["webhook:write"].freeze
|
|
95
100
|
},
|
|
101
|
+
"downloadReportExport" => {
|
|
102
|
+
method: "GET",
|
|
103
|
+
path: "/api/v1/reports/exports/{id}/download",
|
|
104
|
+
scopes: ["report:export"].freeze
|
|
105
|
+
},
|
|
96
106
|
"getCustomer" => {
|
|
97
107
|
method: "GET",
|
|
98
108
|
path: "/api/v1/customers/{id}",
|
|
99
109
|
scopes: ["admin"].freeze
|
|
100
110
|
},
|
|
111
|
+
"getCustomerSummary" => {
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: "/api/v1/reports/customer-summary",
|
|
114
|
+
scopes: ["report:read"].freeze
|
|
115
|
+
},
|
|
101
116
|
"getFeature" => {
|
|
102
117
|
method: "GET",
|
|
103
118
|
path: "/api/v1/features/{id}",
|
|
@@ -108,11 +123,21 @@ module LicenseKit
|
|
|
108
123
|
path: "/api/v1/licenses/{id}",
|
|
109
124
|
scopes: ["license:read"].freeze
|
|
110
125
|
},
|
|
126
|
+
"getLicenseAuditReport" => {
|
|
127
|
+
method: "GET",
|
|
128
|
+
path: "/api/v1/reports/license-audit",
|
|
129
|
+
scopes: ["report:read"].freeze
|
|
130
|
+
},
|
|
111
131
|
"getLicenseDevice" => {
|
|
112
132
|
method: "GET",
|
|
113
133
|
path: "/api/v1/licenses/{id}/devices/{device_id}",
|
|
114
134
|
scopes: ["license:read"].freeze
|
|
115
135
|
},
|
|
136
|
+
"getOpsSummary" => {
|
|
137
|
+
method: "GET",
|
|
138
|
+
path: "/api/v1/ops/summary",
|
|
139
|
+
scopes: ["ops:read"].freeze
|
|
140
|
+
},
|
|
116
141
|
"getOrder" => {
|
|
117
142
|
method: "GET",
|
|
118
143
|
path: "/api/v1/orders/{id}",
|
|
@@ -133,21 +158,46 @@ module LicenseKit
|
|
|
133
158
|
path: "/api/v1/products/{id}/custom-fields/{field_id}",
|
|
134
159
|
scopes: ["product:read"].freeze
|
|
135
160
|
},
|
|
161
|
+
"getReportExport" => {
|
|
162
|
+
method: "GET",
|
|
163
|
+
path: "/api/v1/reports/exports/{id}",
|
|
164
|
+
scopes: ["report:export"].freeze
|
|
165
|
+
},
|
|
136
166
|
"getSubscription" => {
|
|
137
167
|
method: "GET",
|
|
138
168
|
path: "/api/v1/subscriptions/{id}",
|
|
139
169
|
scopes: ["product:read"].freeze
|
|
140
170
|
},
|
|
171
|
+
"getSubscriptionSettlement" => {
|
|
172
|
+
method: "GET",
|
|
173
|
+
path: "/api/v1/reports/subscription-settlement",
|
|
174
|
+
scopes: ["report:read"].freeze
|
|
175
|
+
},
|
|
176
|
+
"getUsageSummary" => {
|
|
177
|
+
method: "GET",
|
|
178
|
+
path: "/api/v1/reports/usage-summary",
|
|
179
|
+
scopes: ["report:read"].freeze
|
|
180
|
+
},
|
|
141
181
|
"getWebhookEndpoint" => {
|
|
142
182
|
method: "GET",
|
|
143
183
|
path: "/api/v1/webhooks/{id}",
|
|
144
184
|
scopes: ["webhook:write"].freeze
|
|
145
185
|
},
|
|
186
|
+
"getWebhookHealth" => {
|
|
187
|
+
method: "GET",
|
|
188
|
+
path: "/api/v1/ops/webhook-health",
|
|
189
|
+
scopes: ["ops:read"].freeze
|
|
190
|
+
},
|
|
146
191
|
"listAPIKeys" => {
|
|
147
192
|
method: "GET",
|
|
148
193
|
path: "/api/v1/api-keys",
|
|
149
194
|
scopes: ["admin"].freeze
|
|
150
195
|
},
|
|
196
|
+
"listActivities" => {
|
|
197
|
+
method: "GET",
|
|
198
|
+
path: "/api/v1/activities",
|
|
199
|
+
scopes: ["report:read"].freeze
|
|
200
|
+
},
|
|
151
201
|
"listCustomerCustomFieldValues" => {
|
|
152
202
|
method: "GET",
|
|
153
203
|
path: "/api/v1/customers/{id}/custom-fields",
|
|
@@ -218,6 +268,16 @@ module LicenseKit
|
|
|
218
268
|
path: "/api/v1/products",
|
|
219
269
|
scopes: ["product:read"].freeze
|
|
220
270
|
},
|
|
271
|
+
"listRuntimeErrorGroups" => {
|
|
272
|
+
method: "GET",
|
|
273
|
+
path: "/api/v1/ops/runtime-errors",
|
|
274
|
+
scopes: ["ops:read"].freeze
|
|
275
|
+
},
|
|
276
|
+
"listUsageLedger" => {
|
|
277
|
+
method: "GET",
|
|
278
|
+
path: "/api/v1/reports/usage-ledger",
|
|
279
|
+
scopes: ["report:read"].freeze
|
|
280
|
+
},
|
|
221
281
|
"listWebhookEndpoints" => {
|
|
222
282
|
method: "GET",
|
|
223
283
|
path: "/api/v1/webhooks",
|
|
@@ -309,6 +369,6 @@ module LicenseKit
|
|
|
309
369
|
scopes: ["license:write"].freeze
|
|
310
370
|
},
|
|
311
371
|
}.freeze
|
|
312
|
-
MANAGEMENT_SCOPES = ["admin", "device:write", "event:read", "license:read", "license:write", "product:read", "product:write", "webhook:write"].freeze
|
|
372
|
+
MANAGEMENT_SCOPES = ["admin", "device:write", "event:read", "license:read", "license:write", "ops:read", "product:read", "product:write", "report:export", "report:read", "webhook:write"].freeze
|
|
313
373
|
end
|
|
314
374
|
end
|
data/lib/licensekit/version.rb
CHANGED