jobcelis 1.4.0 → 1.5.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 +3 -3
- data/lib/jobcelis/client.rb +52 -45
- data/lib/jobcelis.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a21b1ca304d86aced2c245cc6ca3c52e24f688b61546c06fec662eafd023957a
|
|
4
|
+
data.tar.gz: 22422005d32aff7d4328e243249c859e064be83e4391bb1b4a2d9c9e67f3b448
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c955a39bd541a9c9a822876325779d8b4c1a4ad19192b318cbfeb0b84da2a80348aa242c7adb7c4639fe2ca4ed022aa8e6a44ecc5f5321bffd66ef11f3e7721
|
|
7
|
+
data.tar.gz: 8d4c665919ceae1f40be73c3c5b5ee3931a14adeb92c169c029b56e1d0d5eba6461b0c1a5d64b15ff1a15e67547f8091df78a17aca5250a101d62387cd4132fa
|
data/README.md
CHANGED
|
@@ -186,7 +186,7 @@ client.update_pipeline("pipe_abc123", name: "order-processing-v2")
|
|
|
186
186
|
client.delete_pipeline("pipe_abc123")
|
|
187
187
|
|
|
188
188
|
# Test a pipeline with a sample payload
|
|
189
|
-
result = client.test_pipeline("pipe_abc123", { topic: "order.created",
|
|
189
|
+
result = client.test_pipeline("pipe_abc123", { topic: "order.created", id: "1" })
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
## Event Schemas
|
|
@@ -319,7 +319,7 @@ client.accept_consent("marketing")
|
|
|
319
319
|
my_data = client.export_my_data
|
|
320
320
|
|
|
321
321
|
# Processing restrictions
|
|
322
|
-
client.restrict_processing
|
|
322
|
+
client.restrict_processing(password: "your-account-password")
|
|
323
323
|
client.lift_restriction
|
|
324
324
|
|
|
325
325
|
# Right to object
|
|
@@ -331,7 +331,7 @@ client.restore_consent
|
|
|
331
331
|
|
|
332
332
|
```ruby
|
|
333
333
|
health = client.health
|
|
334
|
-
status = client.status
|
|
334
|
+
status = client.status # same JSON as health
|
|
335
335
|
```
|
|
336
336
|
|
|
337
337
|
## Error Handling
|
data/lib/jobcelis/client.rb
CHANGED
|
@@ -97,7 +97,7 @@ module Jobcelis
|
|
|
97
97
|
|
|
98
98
|
# Get event details.
|
|
99
99
|
def get_event(event_id)
|
|
100
|
-
get("/api/v1/events/#{event_id}")
|
|
100
|
+
get("/api/v1/events/#{seg(event_id)}")
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
# List events with cursor pagination.
|
|
@@ -107,7 +107,7 @@ module Jobcelis
|
|
|
107
107
|
|
|
108
108
|
# Deactivate an event.
|
|
109
109
|
def delete_event(event_id)
|
|
110
|
-
do_delete("/api/v1/events/#{event_id}")
|
|
110
|
+
do_delete("/api/v1/events/#{seg(event_id)}")
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
# ------------------------------------------------------------------
|
|
@@ -132,7 +132,7 @@ module Jobcelis
|
|
|
132
132
|
|
|
133
133
|
# Get webhook details.
|
|
134
134
|
def get_webhook(webhook_id)
|
|
135
|
-
get("/api/v1/webhooks/#{webhook_id}")
|
|
135
|
+
get("/api/v1/webhooks/#{seg(webhook_id)}")
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
# List webhooks.
|
|
@@ -144,17 +144,17 @@ module Jobcelis
|
|
|
144
144
|
def update_webhook(webhook_id, rate_limit: nil, **kwargs)
|
|
145
145
|
body = { **kwargs }
|
|
146
146
|
body[:rate_limit] = rate_limit if rate_limit
|
|
147
|
-
patch("/api/v1/webhooks/#{webhook_id}", body)
|
|
147
|
+
patch("/api/v1/webhooks/#{seg(webhook_id)}", body)
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
# Deactivate a webhook.
|
|
151
151
|
def delete_webhook(webhook_id)
|
|
152
|
-
do_delete("/api/v1/webhooks/#{webhook_id}")
|
|
152
|
+
do_delete("/api/v1/webhooks/#{seg(webhook_id)}")
|
|
153
153
|
end
|
|
154
154
|
|
|
155
155
|
# Get health status for a webhook.
|
|
156
156
|
def webhook_health(webhook_id)
|
|
157
|
-
get("/api/v1/webhooks/#{webhook_id}/health")
|
|
157
|
+
get("/api/v1/webhooks/#{seg(webhook_id)}/health")
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
# List available webhook templates.
|
|
@@ -164,7 +164,7 @@ module Jobcelis
|
|
|
164
164
|
|
|
165
165
|
# Send a test delivery to a webhook.
|
|
166
166
|
def test_webhook(webhook_id)
|
|
167
|
-
post("/api/v1/webhooks/#{webhook_id}/test", {})
|
|
167
|
+
post("/api/v1/webhooks/#{seg(webhook_id)}/test", {})
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
# ------------------------------------------------------------------
|
|
@@ -178,7 +178,7 @@ module Jobcelis
|
|
|
178
178
|
|
|
179
179
|
# Retry a failed delivery.
|
|
180
180
|
def retry_delivery(delivery_id)
|
|
181
|
-
post("/api/v1/deliveries/#{delivery_id}/retry", {})
|
|
181
|
+
post("/api/v1/deliveries/#{seg(delivery_id)}/retry", {})
|
|
182
182
|
end
|
|
183
183
|
|
|
184
184
|
# ------------------------------------------------------------------
|
|
@@ -192,17 +192,17 @@ module Jobcelis
|
|
|
192
192
|
|
|
193
193
|
# Get dead letter details.
|
|
194
194
|
def get_dead_letter(dead_letter_id)
|
|
195
|
-
get("/api/v1/dead-letters/#{dead_letter_id}")
|
|
195
|
+
get("/api/v1/dead-letters/#{seg(dead_letter_id)}")
|
|
196
196
|
end
|
|
197
197
|
|
|
198
198
|
# Retry a dead letter.
|
|
199
199
|
def retry_dead_letter(dead_letter_id)
|
|
200
|
-
post("/api/v1/dead-letters/#{dead_letter_id}/retry", {})
|
|
200
|
+
post("/api/v1/dead-letters/#{seg(dead_letter_id)}/retry", {})
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
# Mark a dead letter as resolved.
|
|
204
204
|
def resolve_dead_letter(dead_letter_id)
|
|
205
|
-
patch("/api/v1/dead-letters/#{dead_letter_id}/resolve", {})
|
|
205
|
+
patch("/api/v1/dead-letters/#{seg(dead_letter_id)}/resolve", {})
|
|
206
206
|
end
|
|
207
207
|
|
|
208
208
|
# ------------------------------------------------------------------
|
|
@@ -223,12 +223,12 @@ module Jobcelis
|
|
|
223
223
|
|
|
224
224
|
# Get replay details.
|
|
225
225
|
def get_replay(replay_id)
|
|
226
|
-
get("/api/v1/replays/#{replay_id}")
|
|
226
|
+
get("/api/v1/replays/#{seg(replay_id)}")
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
# Cancel a replay.
|
|
230
230
|
def cancel_replay(replay_id)
|
|
231
|
-
do_delete("/api/v1/replays/#{replay_id}")
|
|
231
|
+
do_delete("/api/v1/replays/#{seg(replay_id)}")
|
|
232
232
|
end
|
|
233
233
|
|
|
234
234
|
# ------------------------------------------------------------------
|
|
@@ -247,22 +247,22 @@ module Jobcelis
|
|
|
247
247
|
|
|
248
248
|
# Get job details.
|
|
249
249
|
def get_job(job_id)
|
|
250
|
-
get("/api/v1/jobs/#{job_id}")
|
|
250
|
+
get("/api/v1/jobs/#{seg(job_id)}")
|
|
251
251
|
end
|
|
252
252
|
|
|
253
253
|
# Update a scheduled job.
|
|
254
254
|
def update_job(job_id, **kwargs)
|
|
255
|
-
patch("/api/v1/jobs/#{job_id}", kwargs)
|
|
255
|
+
patch("/api/v1/jobs/#{seg(job_id)}", kwargs)
|
|
256
256
|
end
|
|
257
257
|
|
|
258
258
|
# Delete a scheduled job.
|
|
259
259
|
def delete_job(job_id)
|
|
260
|
-
do_delete("/api/v1/jobs/#{job_id}")
|
|
260
|
+
do_delete("/api/v1/jobs/#{seg(job_id)}")
|
|
261
261
|
end
|
|
262
262
|
|
|
263
263
|
# List runs for a scheduled job.
|
|
264
264
|
def list_job_runs(job_id, limit: 50)
|
|
265
|
-
get("/api/v1/jobs/#{job_id}/runs", { limit: limit })
|
|
265
|
+
get("/api/v1/jobs/#{seg(job_id)}/runs", { limit: limit })
|
|
266
266
|
end
|
|
267
267
|
|
|
268
268
|
# Preview next occurrences for a cron expression.
|
|
@@ -286,22 +286,22 @@ module Jobcelis
|
|
|
286
286
|
|
|
287
287
|
# Get pipeline details.
|
|
288
288
|
def get_pipeline(pipeline_id)
|
|
289
|
-
get("/api/v1/pipelines/#{pipeline_id}")
|
|
289
|
+
get("/api/v1/pipelines/#{seg(pipeline_id)}")
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
# Update a pipeline.
|
|
293
293
|
def update_pipeline(pipeline_id, **kwargs)
|
|
294
|
-
patch("/api/v1/pipelines/#{pipeline_id}", kwargs)
|
|
294
|
+
patch("/api/v1/pipelines/#{seg(pipeline_id)}", kwargs)
|
|
295
295
|
end
|
|
296
296
|
|
|
297
297
|
# Delete a pipeline.
|
|
298
298
|
def delete_pipeline(pipeline_id)
|
|
299
|
-
do_delete("/api/v1/pipelines/#{pipeline_id}")
|
|
299
|
+
do_delete("/api/v1/pipelines/#{seg(pipeline_id)}")
|
|
300
300
|
end
|
|
301
301
|
|
|
302
302
|
# Test a pipeline with a sample payload.
|
|
303
303
|
def test_pipeline(pipeline_id, payload)
|
|
304
|
-
post("/api/v1/pipelines/#{pipeline_id}/test", payload)
|
|
304
|
+
post("/api/v1/pipelines/#{seg(pipeline_id)}/test", { payload: payload })
|
|
305
305
|
end
|
|
306
306
|
|
|
307
307
|
# ------------------------------------------------------------------
|
|
@@ -320,17 +320,17 @@ module Jobcelis
|
|
|
320
320
|
|
|
321
321
|
# Get event schema details.
|
|
322
322
|
def get_event_schema(schema_id)
|
|
323
|
-
get("/api/v1/event-schemas/#{schema_id}")
|
|
323
|
+
get("/api/v1/event-schemas/#{seg(schema_id)}")
|
|
324
324
|
end
|
|
325
325
|
|
|
326
326
|
# Update an event schema.
|
|
327
327
|
def update_event_schema(schema_id, **kwargs)
|
|
328
|
-
patch("/api/v1/event-schemas/#{schema_id}", kwargs)
|
|
328
|
+
patch("/api/v1/event-schemas/#{seg(schema_id)}", kwargs)
|
|
329
329
|
end
|
|
330
330
|
|
|
331
331
|
# Delete an event schema.
|
|
332
332
|
def delete_event_schema(schema_id)
|
|
333
|
-
do_delete("/api/v1/event-schemas/#{schema_id}")
|
|
333
|
+
do_delete("/api/v1/event-schemas/#{seg(schema_id)}")
|
|
334
334
|
end
|
|
335
335
|
|
|
336
336
|
# Validate a payload against the schema for a topic.
|
|
@@ -356,12 +356,12 @@ module Jobcelis
|
|
|
356
356
|
|
|
357
357
|
# Delete a sandbox endpoint.
|
|
358
358
|
def delete_sandbox_endpoint(endpoint_id)
|
|
359
|
-
do_delete("/api/v1/sandbox-endpoints/#{endpoint_id}")
|
|
359
|
+
do_delete("/api/v1/sandbox-endpoints/#{seg(endpoint_id)}")
|
|
360
360
|
end
|
|
361
361
|
|
|
362
362
|
# List requests received by a sandbox endpoint.
|
|
363
363
|
def list_sandbox_requests(endpoint_id, limit: 50)
|
|
364
|
-
get("/api/v1/sandbox-endpoints/#{endpoint_id}/requests", { limit: limit })
|
|
364
|
+
get("/api/v1/sandbox-endpoints/#{seg(endpoint_id)}/requests", { limit: limit })
|
|
365
365
|
end
|
|
366
366
|
|
|
367
367
|
# ------------------------------------------------------------------
|
|
@@ -439,22 +439,22 @@ module Jobcelis
|
|
|
439
439
|
|
|
440
440
|
# Get project by ID.
|
|
441
441
|
def get_project_by_id(project_id)
|
|
442
|
-
get("/api/v1/projects/#{project_id}")
|
|
442
|
+
get("/api/v1/projects/#{seg(project_id)}")
|
|
443
443
|
end
|
|
444
444
|
|
|
445
445
|
# Update a project by ID.
|
|
446
446
|
def update_project_by_id(project_id, **kwargs)
|
|
447
|
-
patch("/api/v1/projects/#{project_id}", kwargs)
|
|
447
|
+
patch("/api/v1/projects/#{seg(project_id)}", kwargs)
|
|
448
448
|
end
|
|
449
449
|
|
|
450
450
|
# Delete a project.
|
|
451
451
|
def delete_project(project_id)
|
|
452
|
-
do_delete("/api/v1/projects/#{project_id}")
|
|
452
|
+
do_delete("/api/v1/projects/#{seg(project_id)}")
|
|
453
453
|
end
|
|
454
454
|
|
|
455
455
|
# Set a project as the default.
|
|
456
456
|
def set_default_project(project_id)
|
|
457
|
-
patch("/api/v1/projects/#{project_id}/default", {})
|
|
457
|
+
patch("/api/v1/projects/#{seg(project_id)}/default", {})
|
|
458
458
|
end
|
|
459
459
|
|
|
460
460
|
# ------------------------------------------------------------------
|
|
@@ -463,22 +463,22 @@ module Jobcelis
|
|
|
463
463
|
|
|
464
464
|
# List members of a project.
|
|
465
465
|
def list_members(project_id)
|
|
466
|
-
get("/api/v1/projects/#{project_id}/members")
|
|
466
|
+
get("/api/v1/projects/#{seg(project_id)}/members")
|
|
467
467
|
end
|
|
468
468
|
|
|
469
469
|
# Add a member to a project.
|
|
470
|
-
def add_member(project_id, email:, role: "
|
|
471
|
-
post("/api/v1/projects/#{project_id}/members", { email: email, role: role })
|
|
470
|
+
def add_member(project_id, email:, role: "viewer")
|
|
471
|
+
post("/api/v1/projects/#{seg(project_id)}/members", { email: email, role: role })
|
|
472
472
|
end
|
|
473
473
|
|
|
474
474
|
# Update a member's role.
|
|
475
475
|
def update_member(project_id, member_id, role:)
|
|
476
|
-
patch("/api/v1/projects/#{project_id}/members/#{member_id}", { role: role })
|
|
476
|
+
patch("/api/v1/projects/#{seg(project_id)}/members/#{seg(member_id)}", { role: role })
|
|
477
477
|
end
|
|
478
478
|
|
|
479
479
|
# Remove a member from a project.
|
|
480
480
|
def remove_member(project_id, member_id)
|
|
481
|
-
do_delete("/api/v1/projects/#{project_id}/members/#{member_id}")
|
|
481
|
+
do_delete("/api/v1/projects/#{seg(project_id)}/members/#{seg(member_id)}")
|
|
482
482
|
end
|
|
483
483
|
|
|
484
484
|
# ------------------------------------------------------------------
|
|
@@ -492,12 +492,12 @@ module Jobcelis
|
|
|
492
492
|
|
|
493
493
|
# Accept an invitation.
|
|
494
494
|
def accept_invitation(invitation_id)
|
|
495
|
-
post("/api/v1/invitations/#{invitation_id}/accept", {})
|
|
495
|
+
post("/api/v1/invitations/#{seg(invitation_id)}/accept", {})
|
|
496
496
|
end
|
|
497
497
|
|
|
498
498
|
# Reject an invitation.
|
|
499
499
|
def reject_invitation(invitation_id)
|
|
500
|
-
post("/api/v1/invitations/#{invitation_id}/reject", {})
|
|
500
|
+
post("/api/v1/invitations/#{seg(invitation_id)}/reject", {})
|
|
501
501
|
end
|
|
502
502
|
|
|
503
503
|
# ------------------------------------------------------------------
|
|
@@ -544,7 +544,7 @@ module Jobcelis
|
|
|
544
544
|
|
|
545
545
|
# Accept consent for a specific purpose.
|
|
546
546
|
def accept_consent(purpose)
|
|
547
|
-
post("/api/v1/me/consents/#{purpose}/accept", {})
|
|
547
|
+
post("/api/v1/me/consents/#{seg(purpose)}/accept", {})
|
|
548
548
|
end
|
|
549
549
|
|
|
550
550
|
# Export all personal data (GDPR data portability).
|
|
@@ -552,9 +552,10 @@ module Jobcelis
|
|
|
552
552
|
get("/api/v1/me/data")
|
|
553
553
|
end
|
|
554
554
|
|
|
555
|
-
# Request restriction of data processing.
|
|
556
|
-
|
|
557
|
-
|
|
555
|
+
# Request restriction of data processing. The API asks for the account
|
|
556
|
+
# password to confirm it.
|
|
557
|
+
def restrict_processing(password:)
|
|
558
|
+
post("/api/v1/me/restrict", { password: password })
|
|
558
559
|
end
|
|
559
560
|
|
|
560
561
|
# Lift restriction on data processing.
|
|
@@ -588,7 +589,7 @@ module Jobcelis
|
|
|
588
589
|
|
|
589
590
|
# Revoke an embed token.
|
|
590
591
|
def revoke_embed_token(id)
|
|
591
|
-
do_delete("/api/v1/embed/tokens/#{id}")
|
|
592
|
+
do_delete("/api/v1/embed/tokens/#{seg(id)}")
|
|
592
593
|
end
|
|
593
594
|
|
|
594
595
|
# ------------------------------------------------------------------
|
|
@@ -626,7 +627,7 @@ module Jobcelis
|
|
|
626
627
|
|
|
627
628
|
# Update retention policy.
|
|
628
629
|
def update_retention_policy(policy)
|
|
629
|
-
patch("/api/v1/retention", policy)
|
|
630
|
+
patch("/api/v1/retention", { retention_policy: policy })
|
|
630
631
|
end
|
|
631
632
|
|
|
632
633
|
# Preview a purge operation.
|
|
@@ -648,9 +649,10 @@ module Jobcelis
|
|
|
648
649
|
get("/health")
|
|
649
650
|
end
|
|
650
651
|
|
|
651
|
-
# Get platform status page
|
|
652
|
+
# Get platform status. Same as #health: /status is an HTML page, so this
|
|
653
|
+
# reads the JSON /health endpoint.
|
|
652
654
|
def status
|
|
653
|
-
get("/
|
|
655
|
+
get("/health")
|
|
654
656
|
end
|
|
655
657
|
|
|
656
658
|
private
|
|
@@ -695,6 +697,11 @@ module Jobcelis
|
|
|
695
697
|
resp.body
|
|
696
698
|
end
|
|
697
699
|
|
|
700
|
+
# Percent-encodes a value used as one path segment.
|
|
701
|
+
def seg(value)
|
|
702
|
+
URI.encode_www_form_component(value.to_s).gsub("+", "%20")
|
|
703
|
+
end
|
|
704
|
+
|
|
698
705
|
# Sends the request, retrying network errors and 429/502/503/504 responses
|
|
699
706
|
# with exponential backoff. POST requests are only retried after a network
|
|
700
707
|
# error when they carry an idempotency key, so they can never be applied twice.
|
data/lib/jobcelis.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jobcelis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jobcelis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|