lockally 0.3.1 → 0.3.3

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -5
  3. data/docs/AdminApi.md +3 -3
  4. data/docs/AdminsApi.md +1 -1
  5. data/docs/AgentSendResult.md +6 -2
  6. data/docs/AgentsApi.md +2 -2
  7. data/docs/AiApi.md +1 -1
  8. data/docs/AliasesApi.md +1 -1
  9. data/docs/ApiKeysApi.md +3 -3
  10. data/docs/DomainsApi.md +3 -3
  11. data/docs/MailboxGrant.md +7 -3
  12. data/docs/MailboxGrantList.md +2 -2
  13. data/docs/MailboxesApi.md +6 -6
  14. data/docs/MarkReadResult.md +2 -0
  15. data/docs/SendApi.md +4 -4
  16. data/docs/SimulatedInbound.md +6 -0
  17. data/docs/TenantApi.md +1 -1
  18. data/docs/TestApi.md +1 -1
  19. data/docs/ThreadClassification.md +2 -0
  20. data/docs/ThreadMessageBody.md +10 -26
  21. data/docs/{ThreadMessageBodyAllOfBody.md → ThreadMessageBodyBody.md} +2 -2
  22. data/docs/WebhooksApi.md +3 -3
  23. data/docs/Whoami.md +7 -7
  24. data/docs/WhoamiKey.md +20 -0
  25. data/docs/WhoamiTenant.md +22 -0
  26. data/lib/lockally/api/admin_api.rb +6 -6
  27. data/lib/lockally/api/admins_api.rb +2 -2
  28. data/lib/lockally/api/agents_api.rb +4 -4
  29. data/lib/lockally/api/ai_api.rb +2 -2
  30. data/lib/lockally/api/aliases_api.rb +2 -2
  31. data/lib/lockally/api/api_keys_api.rb +6 -6
  32. data/lib/lockally/api/domains_api.rb +6 -6
  33. data/lib/lockally/api/mailboxes_api.rb +12 -12
  34. data/lib/lockally/api/send_api.rb +8 -8
  35. data/lib/lockally/api/tenant_api.rb +2 -2
  36. data/lib/lockally/api/test_api.rb +2 -2
  37. data/lib/lockally/api/webhooks_api.rb +6 -6
  38. data/lib/lockally/models/agent_send_result.rb +72 -1
  39. data/lib/lockally/models/mailbox_grant.rb +28 -10
  40. data/lib/lockally/models/mailbox_grant_list.rb +17 -17
  41. data/lib/lockally/models/mark_read_result.rb +10 -1
  42. data/lib/lockally/models/simulated_inbound.rb +29 -1
  43. data/lib/lockally/models/thread_classification.rb +11 -1
  44. data/lib/lockally/models/thread_message_body.rb +58 -233
  45. data/lib/lockally/models/{thread_message_body_all_of_body.rb → thread_message_body_body.rb} +4 -3
  46. data/lib/lockally/models/whoami.rb +98 -24
  47. data/lib/lockally/models/whoami_key.rb +157 -0
  48. data/lib/lockally/models/whoami_tenant.rb +166 -0
  49. data/lib/lockally/version.rb +1 -1
  50. data/lib/lockally.rb +3 -1
  51. data/spec/api/admin_api_spec.rb +3 -3
  52. data/spec/api/admins_api_spec.rb +1 -1
  53. data/spec/api/agents_api_spec.rb +2 -2
  54. data/spec/api/ai_api_spec.rb +1 -1
  55. data/spec/api/aliases_api_spec.rb +1 -1
  56. data/spec/api/api_keys_api_spec.rb +3 -3
  57. data/spec/api/domains_api_spec.rb +3 -3
  58. data/spec/api/mailboxes_api_spec.rb +6 -6
  59. data/spec/api/send_api_spec.rb +4 -4
  60. data/spec/api/tenant_api_spec.rb +1 -1
  61. data/spec/api/test_api_spec.rb +1 -1
  62. data/spec/api/webhooks_api_spec.rb +3 -3
  63. data/spec/models/agent_send_result_spec.rb +12 -0
  64. data/spec/models/mailbox_grant_list_spec.rb +1 -1
  65. data/spec/models/mailbox_grant_spec.rb +13 -1
  66. data/spec/models/mark_read_result_spec.rb +6 -0
  67. data/spec/models/simulated_inbound_spec.rb +18 -0
  68. data/spec/models/thread_classification_spec.rb +6 -0
  69. data/spec/models/{thread_message_body_all_of_body_spec.rb → thread_message_body_body_spec.rb} +6 -6
  70. data/spec/models/thread_message_body_spec.rb +5 -57
  71. data/spec/models/whoami_key_spec.rb +42 -0
  72. data/spec/models/whoami_spec.rb +8 -4
  73. data/spec/models/whoami_tenant_spec.rb +48 -0
  74. metadata +14 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3095a5e6f5c8257afb5ba49d4a692fbf4e5bed572e6b841b8231a0be60868f48
4
- data.tar.gz: 13e3f26e3281db298bfb641378730aec7eb42edf880ca3d3f9ca2eb29f20d529
3
+ metadata.gz: 6bceffb53f9911996a34e7ec90909f0b411b470417a6e7bc1b83915fc98bde18
4
+ data.tar.gz: 43417dce1867c643b299072ffe07ff9109c763ec72d240011cc25ce0ceea8b09
5
5
  SHA512:
6
- metadata.gz: 073a3603ffc0d7c4ce9113c4161ade6eb059c036f20e13bb1f9a4b2163e5881f44e10639943eee2a749b793003531c5601a832d394be0d3a0069a763a8264205
7
- data.tar.gz: 2f1f55e2304ff060f34d9b037728ccec12d31946101eded533880b63d4837083a9ac5e86ee382b9f181a3dadf5157528d22cb418a3a92cff89f6865d1fcb07f8
6
+ metadata.gz: cef9ac94498466f846d907d93778968d2d151974162ccc891746f707a77799b3e2562a75bf7b22504763e5d90d92e5ae3a0a4d6069d286c33f0fa137d700efb9
7
+ data.tar.gz: 255404b54ec8dfc336a3c2d794e376d4ea0f21cc73cf996860a15043058b94cb65e00d26fd79dd81c3594456c041cae90080280c8a25ab853edbdebbf845f26e
data/README.md CHANGED
@@ -35,7 +35,7 @@ Insufficient scope returns `403` with the required scope name in `detail`.
35
35
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
36
36
 
37
37
  - API version: 0.1.0
38
- - Package version: 0.3.1
38
+ - Package version: 0.3.3
39
39
  - Generator version: 7.23.0
40
40
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
41
41
 
@@ -52,16 +52,16 @@ gem build lockally.gemspec
52
52
  Then either install the gem locally:
53
53
 
54
54
  ```shell
55
- gem install ./lockally-0.3.1.gem
55
+ gem install ./lockally-0.3.3.gem
56
56
  ```
57
57
 
58
- (for development, run `gem install --dev ./lockally-0.3.1.gem` to install the development dependencies)
58
+ (for development, run `gem install --dev ./lockally-0.3.3.gem` to install the development dependencies)
59
59
 
60
60
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
61
61
 
62
62
  Finally add this to the Gemfile:
63
63
 
64
- gem 'lockally', '~> 0.3.1'
64
+ gem 'lockally', '~> 0.3.3'
65
65
 
66
66
  ### Install from Git
67
67
 
@@ -488,7 +488,7 @@ Class | Method | HTTP request | Description
488
488
  - [Lockally::ThreadList](docs/ThreadList.md)
489
489
  - [Lockally::ThreadMessage](docs/ThreadMessage.md)
490
490
  - [Lockally::ThreadMessageBody](docs/ThreadMessageBody.md)
491
- - [Lockally::ThreadMessageBodyAllOfBody](docs/ThreadMessageBodyAllOfBody.md)
491
+ - [Lockally::ThreadMessageBodyBody](docs/ThreadMessageBodyBody.md)
492
492
  - [Lockally::ThreadSummary](docs/ThreadSummary.md)
493
493
  - [Lockally::UnitBundle](docs/UnitBundle.md)
494
494
  - [Lockally::UpdateAdminRequest](docs/UpdateAdminRequest.md)
@@ -513,6 +513,8 @@ Class | Method | HTTP request | Description
513
513
  - [Lockally::VacationResponder](docs/VacationResponder.md)
514
514
  - [Lockally::Webhook](docs/Webhook.md)
515
515
  - [Lockally::Whoami](docs/Whoami.md)
516
+ - [Lockally::WhoamiKey](docs/WhoamiKey.md)
517
+ - [Lockally::WhoamiTenant](docs/WhoamiTenant.md)
516
518
 
517
519
 
518
520
  ## Documentation for Authorization
data/docs/AdminApi.md CHANGED
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.lockally.com*
15
15
 
16
16
  Tenant-admin email+password login
17
17
 
18
- Exchanges an admin's email + password for a session token. The web console at `app.lockally.com` posts this on form submission and stores the returned token in an httpOnly cookie. **No enumeration leak.** Wrong-email and wrong-password both return the same 401 with title \"Invalid credentials\". The argon2id verify runs even on lookup miss (well, structurally — the lookup fails fast but the response shape is constant) so timing leaks are bounded. Tokens are prefixed `adm_sess_` and valid for 7 days. Use as the `Authorization: Bearer` value on all subsequent calls.
18
+ Exchanges an admin's email + password for a session token. The web console at `app.lockally.com` posts this on form submission and stores the returned token in an httpOnly cookie. **No enumeration leak.** Wrong-email and wrong-password both return the same 401 with title \"Invalid credentials\". The argon2id verify runs even on lookup miss (well, structurally, the lookup fails fast but the response shape is constant) so timing leaks are bounded. Tokens are prefixed `adm_sess_` and valid for 7 days. Use as the `Authorization: Bearer` value on all subsequent calls.
19
19
 
20
20
  ### Examples
21
21
 
@@ -79,7 +79,7 @@ No authorization required
79
79
 
80
80
  Invalidate the current admin session
81
81
 
82
- Deletes the session row from the database. Idempotent — calling logout on an already-invalid token returns 204 anyway.
82
+ Deletes the session row from the database. Idempotent, calling logout on an already-invalid token returns 204 anyway.
83
83
 
84
84
  ### Examples
85
85
 
@@ -144,7 +144,7 @@ nil (empty response body)
144
144
 
145
145
  Get the current admin + tenant
146
146
 
147
- Returns the admin profile + tenant for the session token presented in `Authorization: Bearer`. Used by the web console's layout load function to populate the sidebar. Returns 403 if called with an API key (lk_live_*) bearer — admin context only exists for session tokens.
147
+ Returns the admin profile + tenant for the session token presented in `Authorization: Bearer`. Used by the web console's layout load function to populate the sidebar. Returns 403 if called with an API key (lk_live_*) bearer, admin context only exists for session tokens.
148
148
 
149
149
  ### Examples
150
150
 
data/docs/AdminsApi.md CHANGED
@@ -217,7 +217,7 @@ This endpoint does not need any parameter.
217
217
 
218
218
  Update an admin
219
219
 
220
- Supply at least one of `password`, `display_name`, `role`, `disabled`. **Safety rails.** A session bearer (adm_sess_*) cannot disable itself — use another admin or an API key (which bypasses the self-rail). Disabling the last active admin returns 409 to prevent orphaning the tenant from its console.
220
+ Supply at least one of `password`, `display_name`, `role`, `disabled`. **Safety rails.** A session bearer (adm_sess_*) cannot disable itself, use another admin or an API key (which bypasses the self-rail). Disabling the last active admin returns 409 to prevent orphaning the tenant from its console.
221
221
 
222
222
  ### Examples
223
223
 
@@ -4,8 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | The Lockally message id. | [optional] |
8
- | **status** | **String** | | [optional] |
7
+ | **id** | **String** | The Lockally message id. | |
8
+ | **message_id** | **String** | The Internet Message-ID. | |
9
+ | **status** | **String** | | |
10
+ | **warning** | **String** | Set when the send is accepted but worth noting | [optional] |
9
11
  | **thread_id** | **String** | The conversation the message joined. | |
10
12
 
11
13
  ## Example
@@ -15,7 +17,9 @@ require 'lockally'
15
17
 
16
18
  instance = Lockally::AgentSendResult.new(
17
19
  id: null,
20
+ message_id: null,
18
21
  status: null,
22
+ warning: null,
19
23
  thread_id: null
20
24
  )
21
25
  ```
data/docs/AgentsApi.md CHANGED
@@ -235,7 +235,7 @@ end
235
235
 
236
236
  Grant a mailbox to a key
237
237
 
238
- Body: {\"mailbox\": \"email or id\"}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
238
+ Body: {\"mailbox\": \"email or id\"}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key, the server cannot read E2E mailboxes.
239
239
 
240
240
  ### Examples
241
241
 
@@ -654,7 +654,7 @@ end
654
654
 
655
655
  Reply in-thread (agent stream)
656
656
 
657
- The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\"text\": \"...\"}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
657
+ The server builds In-Reply-To/References and defaults recipients + subject from the conversation, a minimal call is {\"text\": \"...\"}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
658
658
 
659
659
  ### Examples
660
660
 
data/docs/AiApi.md CHANGED
@@ -16,7 +16,7 @@ All URIs are relative to *https://api.lockally.com*
16
16
 
17
17
  LLM-classify a thread
18
18
 
19
- Returns {intent, urgency, summary, suggested_action} via the tenant's AI tier (BYOK or prepaid units — see /v1/ai-config). Cached per thread state: unchanged threads return the cache free; ?refresh=true forces a re-run. A failed model call charges nothing. 402 when the AI tier is off.
19
+ Returns {intent, urgency, summary, suggested_action} via the tenant's AI tier (BYOK or prepaid units, see /v1/ai-config). Cached per thread state: unchanged threads return the cache free; ?refresh=true forces a re-run. A failed model call charges nothing. 402 when the AI tier is off.
20
20
 
21
21
  ### Examples
22
22
 
data/docs/AliasesApi.md CHANGED
@@ -84,7 +84,7 @@ end
84
84
 
85
85
  Delete an alias
86
86
 
87
- Hard-delete (no soft-delete window — aliases are cheap to recreate).
87
+ Hard-delete (no soft-delete window, aliases are cheap to recreate).
88
88
 
89
89
  ### Examples
90
90
 
data/docs/ApiKeysApi.md CHANGED
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.lockally.com*
15
15
 
16
16
  Create an API key
17
17
 
18
- Provisions a fresh API key for the calling tenant. **The full `secret` is included in this response ONLY** — store it immediately. The cleartext secret is not recoverable from the argon2id hash kept server-side; rotate by creating a new key and revoking the old one.
18
+ Provisions a fresh API key for the calling tenant. **The full `secret` is included in this response ONLY**, store it immediately. The cleartext secret is not recoverable from the argon2id hash kept server-side; rotate by creating a new key and revoking the old one.
19
19
 
20
20
  ### Examples
21
21
 
@@ -84,7 +84,7 @@ end
84
84
 
85
85
  List API keys
86
86
 
87
- Returns all API keys (active and revoked) belonging to the calling tenant. The `secret` is **never** returned — only prefix + metadata.
87
+ Returns all API keys (active and revoked) belonging to the calling tenant. The `secret` is **never** returned, only prefix + metadata.
88
88
 
89
89
  ### Examples
90
90
 
@@ -150,7 +150,7 @@ This endpoint does not need any parameter.
150
150
 
151
151
  Revoke an API key
152
152
 
153
- Soft-deletes (sets `revoked_at`) on the named key. The row stays for audit purposes; the key no longer authenticates. You **cannot revoke the key currently being used** to make this call — that would lock you out. Use a different `tenant:admin` key.
153
+ Soft-deletes (sets `revoked_at`) on the named key. The row stays for audit purposes; the key no longer authenticates. You **cannot revoke the key currently being used** to make this call, that would lock you out. Use a different `tenant:admin` key.
154
154
 
155
155
  ### Examples
156
156
 
data/docs/DomainsApi.md CHANGED
@@ -21,7 +21,7 @@ All URIs are relative to *https://api.lockally.com*
21
21
 
22
22
  Register a domain
23
23
 
24
- Registers a new domain for the calling tenant. Generates a DKIM keypair and verification token. Returns DNS instructions the tenant must publish under their own DNS (verification TXT, SPF include, DKIM TXT, MX records to `mx1`/`mx2.lockally.com`, DMARC seed). **Idempotent** — re-posting the same domain returns the existing record with the same DKIM keys and token (regenerating would break the tenant's published DNS). Returns 200 on idempotent hit, 201 on first create. Returns 409 if the domain is already claimed by a different tenant.
24
+ Registers a new domain for the calling tenant. Generates a DKIM keypair and verification token. Returns DNS instructions the tenant must publish under their own DNS (verification TXT, SPF include, DKIM TXT, MX records to `mx1`/`mx2.lockally.com`, DMARC seed). **Idempotent**, re-posting the same domain returns the existing record with the same DKIM keys and token (regenerating would break the tenant's published DNS). Returns 200 on idempotent hit, 201 on first create. Returns 409 if the domain is already claimed by a different tenant.
25
25
 
26
26
  ### Examples
27
27
 
@@ -90,7 +90,7 @@ end
90
90
 
91
91
  Delete a domain
92
92
 
93
- Removes the domain registration. Refuses with 409 if any mailbox is still attached — delete the mailboxes first.
93
+ Removes the domain registration. Refuses with 409 if any mailbox is still attached, delete the mailboxes first.
94
94
 
95
95
  ### Examples
96
96
 
@@ -497,7 +497,7 @@ This endpoint does not need any parameter.
497
497
 
498
498
  Force-poll DNS verification
499
499
 
500
- Synchronously checks the `_lockally-verify.<domain>` TXT record against the stored verification token. Returns 200 either way: the returned `verified` boolean tells you whether DNS now confirms. Caller polls until `verified: true`. In v2 a background worker auto-polls and fires a `domain.verified` webhook.
500
+ Synchronously checks the `_lockally-verify.<domain>` TXT record against the stored verification token. Returns 200 either way: the returned `verified` boolean tells you whether DNS now confirms. Caller polls until `verified: true`. A later version may have the platform auto-polls and fires a `domain.verified` webhook.
501
501
 
502
502
  ### Examples
503
503
 
data/docs/MailboxGrant.md CHANGED
@@ -4,8 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional] |
7
+ | **api_key_id** | **String** | | [optional] |
8
+ | **mailbox_id** | **String** | | [optional] |
8
9
  | **mailbox** | **String** | | [optional] |
10
+ | **created_at** | **Time** | | [optional] |
9
11
 
10
12
  ## Example
11
13
 
@@ -13,8 +15,10 @@
13
15
  require 'lockally'
14
16
 
15
17
  instance = Lockally::MailboxGrant.new(
16
- id: null,
17
- mailbox: null
18
+ api_key_id: null,
19
+ mailbox_id: null,
20
+ mailbox: null,
21
+ created_at: null
18
22
  )
19
23
  ```
20
24
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **mailboxes** | [**Array&lt;MailboxGrant&gt;**](MailboxGrant.md) | | |
7
+ | **grants** | [**Array&lt;MailboxGrant&gt;**](MailboxGrant.md) | | |
8
8
 
9
9
  ## Example
10
10
 
@@ -12,7 +12,7 @@
12
12
  require 'lockally'
13
13
 
14
14
  instance = Lockally::MailboxGrantList.new(
15
- mailboxes: null
15
+ grants: null
16
16
  )
17
17
  ```
18
18
 
data/docs/MailboxesApi.md CHANGED
@@ -95,7 +95,7 @@ end
95
95
 
96
96
  Create a mailbox
97
97
 
98
- Creates a mailbox on a tenant-verified domain. If `password` is omitted, lockally generates a 16-char password and returns it in the response — shown once. **Gate.** The mailbox's domain must already be registered AND verified for this tenant (via `/v1/domains` + `/v1/domains/{domain}/verify`). **Idempotent.** Re-posting the same email returns the existing mailbox UNTOUCHED — password is NOT regenerated. To change a password, use PATCH instead.
98
+ Creates a mailbox on a tenant-verified domain. If `password` is omitted, lockally generates a 16-char password and returns it in the response, shown once. **Gate.** The mailbox's domain must already be registered AND verified for this tenant (via `/v1/domains` + `/v1/domains/{domain}/verify`). **Idempotent.** Re-posting the same email returns the existing mailbox UNTOUCHED, password is NOT regenerated. To change a password, use PATCH instead.
99
99
 
100
100
  ### Examples
101
101
 
@@ -232,7 +232,7 @@ nil (empty response body)
232
232
 
233
233
  Remove the vacation responder
234
234
 
235
- Idempotent — 204 whether or not a row existed.
235
+ Idempotent, 204 whether or not a row existed.
236
236
 
237
237
  ### Examples
238
238
 
@@ -300,7 +300,7 @@ nil (empty response body)
300
300
 
301
301
  Download a previously-issued mailbox export
302
302
 
303
- Public endpoint (no Authorization header). Validates the one-shot token from the URL, marks it used, and streams an mbox file. Second GET with the same token returns 404 — tokens are single-use.
303
+ Public endpoint (no Authorization header). Validates the one-shot token from the URL, marks it used, and streams an mbox file. Second GET with the same token returns 404, tokens are single-use.
304
304
 
305
305
  ### Examples
306
306
 
@@ -366,7 +366,7 @@ No authorization required
366
366
 
367
367
  Request a mailbox export
368
368
 
369
- Issues a one-shot \"presigned\" download URL for the mailbox's content in mbox format. The URL works without an Authorization header — the token in the query string is the authz. TTL is 5 minutes; the token is consumed on first GET. **v1 caveat:** the synthesized mbox only contains outbound mail (from `lockally.messages`). v2 swaps in Stalwart's export primitive for full inbox + folder structure + flags. The endpoint contract stays unchanged. **Scope changed:** this used to accept `mailboxes:read`. It takes any mailbox in the tenant and returns that mailbox's mail, so it now requires `tenant:admin`, matching `POST /v1/ediscovery/export`. A key scoped `mailboxes:read` gets 403 and has to be reissued; admin console sessions are unaffected.
369
+ Issues a one-shot \"presigned\" download URL for the mailbox's content in mbox format. The URL works without an Authorization header, the token in the query string is the authz. TTL is 5 minutes; the token is consumed on first GET. **v1 caveat:** the synthesized mbox only contains outbound mail (sent mail only). A later version will cover received mail for full inbox + folder structure + flags. The endpoint contract stays unchanged. **Scope changed:** this used to accept `mailboxes:read`. It takes any mailbox in the tenant and returns that mailbox's mail, so it now requires `tenant:admin`, matching `POST /v1/ediscovery/export`. A key scoped `mailboxes:read` gets 403 and has to be reissued; admin console sessions are unaffected.
370
370
 
371
371
  ### Examples
372
372
 
@@ -571,7 +571,7 @@ end
571
571
 
572
572
  List mailboxes
573
573
 
574
- Returns mailboxes under the calling tenant — active and soft-deleted. `?limit=N` between 1 and 200 (default 50).
574
+ Returns mailboxes under the calling tenant, active and soft-deleted. `?limit=N` between 1 and 200 (default 50).
575
575
 
576
576
  ### Examples
577
577
 
@@ -843,7 +843,7 @@ nil (empty response body)
843
843
 
844
844
  Set the vacation responder
845
845
 
846
- Upsert — same endpoint creates or replaces the rule. Clears `synced_at`; the rule is staged on lockally until a sync worker pushes it to the mail server.
846
+ Upsert, same endpoint creates or replaces the rule. Clears `synced_at`; the rule is staged until a later sync pushes it to the mail server.
847
847
 
848
848
  ### Examples
849
849
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **message_id** | **String** | | [optional] |
7
8
  | **read** | **Boolean** | | [optional] |
8
9
 
9
10
  ## Example
@@ -12,6 +13,7 @@
12
13
  require 'lockally'
13
14
 
14
15
  instance = Lockally::MarkReadResult.new(
16
+ message_id: null,
15
17
  read: null
16
18
  )
17
19
  ```
data/docs/SendApi.md CHANGED
@@ -153,7 +153,7 @@ end
153
153
 
154
154
  Aggregate delivery stats
155
155
 
156
- Counts by delivery outcome (delivered/bounced/deferred/complaint) plus rates over a window, from the delivery-event store. Privacy-first: this reflects what receiving servers reported, NOT whether a human opened the mail — Lockally does no open/click tracking.
156
+ Counts by delivery outcome (delivered/bounced/deferred/complaint) plus rates over a window, from the delivery-event store. Privacy-first: this reflects what receiving servers reported, NOT whether a human opened the mail, Lockally does no open/click tracking.
157
157
 
158
158
  ### Examples
159
159
 
@@ -228,7 +228,7 @@ end
228
228
 
229
229
  List outbound messages
230
230
 
231
- Returns recent outbound messages for the calling tenant, sorted newest first. Backs the send-status pill in the SvelteKit /sends view and the outbound search box.
231
+ Returns recent outbound messages for the calling tenant, sorted newest first.
232
232
 
233
233
  ### Examples
234
234
 
@@ -309,7 +309,7 @@ end
309
309
 
310
310
  Send an email
311
311
 
312
- Submits an email for delivery via lockally. Returns 202 immediately once the message is accepted into lockally's queue; the actual SMTP submission to the recipient is async. Track delivery via `GET /v1/messages/{id}` or webhook subscriptions for `delivery.delivered` / `delivery.bounced` / `delivery.complaint`. **Idempotency-Key required.** Per design L7 — any unique string per send, 24-hour dedupe window. Repeated calls with the same key return byte-exact the original response and do NOT create a duplicate message. **Sender authorisation.** `from` must be an address the calling tenant owns on a verified domain. A mailbox always qualifies. On business and combined accounts an **alias** qualifies too, so a send-only address such as `no-reply@` need not be a billed seat. An alias on an unverified domain, or one belonging to another account, is refused with `403`. A catch-all creates no aliases and so grants no sending rights. **Rate cap.** Per-tenant `rate_cap_per_min` (returned on `/v1/tenant`) is enforced — 429 with `Retry-After: 60` once tripped. **Recipient warning.** Over 25 total recipients (To+Cc+Bcc) sets a `warning` field in the response — large fan-outs queue noticeably at scale. Hard cap is 100/send. **Not every success is a 202.** Check the status code, not just the body. A `200` means nothing was queued: either every recipient was already suppressed, or the call used a test key and the send was simulated. Both are successes, and neither produces a real delivery. See the `200` response below. **Warm-up headers.** While the platform is in its outbound warm-up ramp, accepted sends carry `X-Warmup-Day`, `X-Warmup-Daily-Cap` and `X-Warmup-Used-Today`. They describe a platform-wide cap shared by every tenant, not your own allowance, and they disappear once the ramp finishes. Hitting the cap returns 429.
312
+ Submits an email for delivery via lockally. Returns 202 immediately once the message is accepted into lockally's queue; the actual SMTP submission to the recipient is async. Track delivery via `GET /v1/messages/{id}` or webhook subscriptions for `delivery.delivered` / `delivery.bounced` / `delivery.complaint`. **Idempotency-Key required.** Any unique string per send, 24-hour dedupe window. Repeated calls with the same key return byte-exact the original response and do NOT create a duplicate message. **Sender authorisation.** `from` must be an address the calling tenant owns on a verified domain. A mailbox always qualifies. On business and combined accounts an **alias** qualifies too, so a send-only address such as `no-reply@` need not be a billed seat. An alias on an unverified domain, or one belonging to another account, is refused with `403`. A catch-all creates no aliases and so grants no sending rights. **Rate cap.** Per-tenant `rate_cap_per_min` (returned on `/v1/tenant`) is enforced, 429 with `Retry-After: 60` once tripped. **Recipient warning.** Over 25 total recipients (To+Cc+Bcc) sets a `warning` field in the response, large fan-outs queue noticeably at scale. Hard cap is 100/send. **Not every success is a 202.** Check the status code, not just the body. A `200` means nothing was queued: either every recipient was already suppressed, or the call used a test key and the send was simulated. Both are successes, and neither produces a real delivery. See the `200` response below. **Warm-up headers.** While the platform is in its outbound warm-up ramp, accepted sends carry `X-Warmup-Day`, `X-Warmup-Daily-Cap` and `X-Warmup-Used-Today`. They describe a platform-wide cap shared by every tenant, not your own allowance, and they disappear once the ramp finishes. Hitting the cap returns 429.
313
313
 
314
314
  ### Examples
315
315
 
@@ -380,7 +380,7 @@ end
380
380
 
381
381
  Send a batch of emails
382
382
 
383
- Sends up to 500 messages in one call. Each is validated and enqueued independently — a bad message fails only its own slot (partial success, HTTP 200). One `Idempotency-Key` header covers the batch; per-message keys are derived as `<key>:<index>`.
383
+ Sends up to 500 messages in one call. Each is validated and enqueued independently, a bad message fails only its own slot (partial success, HTTP 200). One `Idempotency-Key` header covers the batch; per-message keys are derived as `<key>:<index>`.
384
384
 
385
385
  ### Examples
386
386
 
@@ -4,8 +4,11 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **simulated** | **Boolean** | | [optional] |
8
+ | **indexed** | **Boolean** | True when the message was adopted into a thread. | [optional] |
7
9
  | **thread_id** | **String** | | [optional] |
8
10
  | **message_id** | **String** | | [optional] |
11
+ | **rfc_message_id** | **String** | | [optional] |
9
12
  | **annotations** | [**Annotations**](Annotations.md) | | [optional] |
10
13
 
11
14
  ## Example
@@ -14,8 +17,11 @@
14
17
  require 'lockally'
15
18
 
16
19
  instance = Lockally::SimulatedInbound.new(
20
+ simulated: null,
21
+ indexed: null,
17
22
  thread_id: null,
18
23
  message_id: null,
24
+ rfc_message_id: null,
19
25
  annotations: null
20
26
  )
21
27
  ```
data/docs/TenantApi.md CHANGED
@@ -80,7 +80,7 @@ This endpoint does not need any parameter.
80
80
 
81
81
  Usage snapshot
82
82
 
83
- Returns the tenant's current usage + cap consumption. Designed for poll-based alerting on the integrator side (e.g. \"warn when daily quota is 80% used\"). Refreshed live from Postgres — there is no cache, so callers should poll at most once per minute.
83
+ Returns the tenant's current usage + cap consumption. Designed for poll-based alerting on the integrator side (e.g. \"warn when daily quota is 80% used\"). Computed live on request, so there is no cache, so callers should poll at most once per minute.
84
84
 
85
85
  ### Examples
86
86
 
data/docs/TestApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://api.lockally.com*
13
13
 
14
14
  Simulate an inbound email (test keys only)
15
15
 
16
- Runs a synthetic message through the REAL indexing pipeline — thread adoption, deterministic extraction (incl. injection_risk), and the message.received webhook — so the whole agent loop is testable without a real domain or MTA. Requires an lk_test_* key (create with {\"test\": true} on POST /v1/api-keys). Body: {mailbox, from, subject, text, in_reply_to?, references?}.
16
+ Runs a synthetic message through the REAL indexing pipeline, thread adoption, deterministic extraction (incl. injection_risk), and the message.received webhook, so the whole agent loop is testable without a real domain or MTA. Requires an lk_test_* key (create with {\"test\": true} on POST /v1/api-keys). Body: {mailbox, from, subject, text, in_reply_to?, references?}.
17
17
 
18
18
  ### Examples
19
19
 
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **thread_id** | **String** | | |
8
8
  | **cached** | **Boolean** | True when a previous classification was reused. | [optional] |
9
+ | **billed** | **Boolean** | True when this call consumed an AI unit. | [optional] |
9
10
  | **classification** | [**Classification**](Classification.md) | | [optional] |
10
11
 
11
12
  ## Example
@@ -16,6 +17,7 @@ require 'lockally'
16
17
  instance = Lockally::ThreadClassification.new(
17
18
  thread_id: null,
18
19
  cached: null,
20
+ billed: null,
19
21
  classification: null
20
22
  )
21
23
  ```
@@ -4,19 +4,11 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | |
8
- | **direction** | **String** | | |
9
- | **rfc_message_id** | **String** | The Internet Message-ID | |
10
- | **in_reply_to** | **String** | | [optional] |
11
- | **subject** | **String** | | [optional] |
12
- | **from** | **String** | | |
13
- | **to** | **Array&lt;String&gt;** | | |
14
- | **snippet** | **String** | | [optional] |
15
- | **has_attachments** | **Boolean** | | |
16
- | **attachments** | [**Array&lt;Attachment&gt;**](Attachment.md) | | [optional] |
17
- | **annotations** | [**Annotations**](Annotations.md) | | [optional] |
18
- | **received_at** | **Time** | | |
19
- | **body** | [**ThreadMessageBodyAllOfBody**](ThreadMessageBodyAllOfBody.md) | | [optional] |
7
+ | **thread_id** | **String** | | |
8
+ | **mailbox** | **String** | | |
9
+ | **message** | [**ThreadMessage**](ThreadMessage.md) | | |
10
+ | **body** | [**ThreadMessageBodyBody**](ThreadMessageBodyBody.md) | | [optional] |
11
+ | **body_unavailable** | **String** | Present instead of body when the message could not be located in the mailbox. | [optional] |
20
12
 
21
13
  ## Example
22
14
 
@@ -24,19 +16,11 @@
24
16
  require 'lockally'
25
17
 
26
18
  instance = Lockally::ThreadMessageBody.new(
27
- id: null,
28
- direction: null,
29
- rfc_message_id: null,
30
- in_reply_to: null,
31
- subject: null,
32
- from: null,
33
- to: null,
34
- snippet: null,
35
- has_attachments: null,
36
- attachments: null,
37
- annotations: null,
38
- received_at: null,
39
- body: null
19
+ thread_id: null,
20
+ mailbox: null,
21
+ message: null,
22
+ body: null,
23
+ body_unavailable: null
40
24
  )
41
25
  ```
42
26
 
@@ -1,4 +1,4 @@
1
- # Lockally::ThreadMessageBodyAllOfBody
1
+ # Lockally::ThreadMessageBodyBody
2
2
 
3
3
  ## Properties
4
4
 
@@ -13,7 +13,7 @@
13
13
  ```ruby
14
14
  require 'lockally'
15
15
 
16
- instance = Lockally::ThreadMessageBodyAllOfBody.new(
16
+ instance = Lockally::ThreadMessageBodyBody.new(
17
17
  text: null,
18
18
  html: null,
19
19
  truncated: null
data/docs/WebhooksApi.md CHANGED
@@ -16,7 +16,7 @@ All URIs are relative to *https://api.lockally.com*
16
16
 
17
17
  Create a webhook
18
18
 
19
- Subscribes a URL to one or more event types. Returns the `signing_secret` ONCE in the response — store it immediately. The dispatcher signs every outbound POST per design L3: X-Lockally-Signature: t=<unix>,v1=<hex(hmac_sha256(secret, t + \".\" + body))> Verify on your end using HMAC-SHA256 with a 5-minute timestamp window (replay protection). A reference verifier ships in [internal/webhook](https://github.com/ucheigwedinma/lockally/blob/main/internal/webhook/sign.go). Event names: see the [event catalogue](https://github.com/ucheigwedinma/lockally/blob/main/docs/v1-design.md#64-webhook-event-catalogue-v1).
19
+ Subscribes a URL to one or more event types. Returns the `signing_secret` ONCE in the response, store it immediately. Every outbound POST is signed: X-Lockally-Signature: t=<unix>,v1=<hex(hmac_sha256(secret, t + \".\" + body))> Verify on your end using HMAC-SHA256 with a 5-minute timestamp window (replay protection). A reference verifier ships in [Signature verification](https://developers.lockally.com/webhooks/verification/). Event names: see the [event catalogue](https://developers.lockally.com/webhooks/events/).
20
20
 
21
21
  ### Examples
22
22
 
@@ -153,7 +153,7 @@ nil (empty response body)
153
153
 
154
154
  List webhooks
155
155
 
156
- Returns the calling tenant's webhook subscriptions. Never returns the signing secret — only metadata.
156
+ Returns the calling tenant's webhook subscriptions. Never returns the signing secret, only metadata.
157
157
 
158
158
  ### Examples
159
159
 
@@ -219,7 +219,7 @@ This endpoint does not need any parameter.
219
219
 
220
220
  Update a webhook
221
221
 
222
- Supply at least one of `url`, `events`, `paused`. Setting `paused` to `false` ALSO resets `consecutive_failures` to 0 — re-arms the 50-failure auto-pause counter.
222
+ Supply at least one of `url`, `events`, `paused`. Setting `paused` to `false` ALSO resets `consecutive_failures` to 0, re-arms the 50-failure auto-pause counter.
223
223
 
224
224
  ### Examples
225
225
 
data/docs/Whoami.md CHANGED
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **tenant_id** | **String** | | [optional] |
8
- | **tenant** | **String** | | [optional] |
9
- | **label** | **String** | The API key&#39;s label. | [optional] |
10
- | **scopes** | **Array&lt;String&gt;** | | [optional] |
7
+ | **tenant** | [**WhoamiTenant**](WhoamiTenant.md) | | |
8
+ | **scopes** | **Array&lt;String&gt;** | | |
9
+ | **auth** | **String** | | |
10
+ | **key** | [**WhoamiKey**](WhoamiKey.md) | | [optional] |
11
11
 
12
12
  ## Example
13
13
 
@@ -15,10 +15,10 @@
15
15
  require 'lockally'
16
16
 
17
17
  instance = Lockally::Whoami.new(
18
- tenant_id: null,
19
18
  tenant: null,
20
- label: null,
21
- scopes: null
19
+ scopes: null,
20
+ auth: null,
21
+ key: null
22
22
  )
23
23
  ```
24
24
 
data/docs/WhoamiKey.md ADDED
@@ -0,0 +1,20 @@
1
+ # Lockally::WhoamiKey
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **label** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'lockally'
14
+
15
+ instance = Lockally::WhoamiKey.new(
16
+ id: null,
17
+ label: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # Lockally::WhoamiTenant
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **slug** | **String** | | [optional] |
8
+ | **name** | **String** | What the account calls itself. | [optional] |
9
+ | **plan** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'lockally'
15
+
16
+ instance = Lockally::WhoamiTenant.new(
17
+ slug: null,
18
+ name: null,
19
+ plan: null
20
+ )
21
+ ```
22
+