@remit/api-openapi-spec 0.0.74 → 0.0.75

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 (2) hide show
  1. package/openapi.json +156 -1
  2. package/package.json +1 -1
package/openapi.json CHANGED
@@ -492,7 +492,7 @@
492
492
  "content": {
493
493
  "application/json": {
494
494
  "schema": {
495
- "$ref": "#/components/schemas/RemitImap.FilterResponse"
495
+ "$ref": "#/components/schemas/RemitImap.CreateFilterResponse"
496
496
  }
497
497
  }
498
498
  }
@@ -8765,6 +8765,146 @@
8765
8765
  },
8766
8766
  "description": "Input for creating a filter (RFC 034). `ttl` is omitted — it is derived\nserver-side from `expiresAt` when `scope` is `Temporary` (RFC 034 Decision\n1.3), never client-supplied. `state`, `hasAnchor`, `ruleChangedAt`, and\n`filterId` are all server-derived and excluded by their Read-only visibility.\n\nWhen `anchorMessageId` is set, the server builds and persists the filter's\nsemantic anchor from that message's indexed vectors (RFC 034 Decision 2) and\nsets `hasAnchor`. Absent for a purely-literal filter."
8767
8767
  },
8768
+ "RemitImap.CreateFilterResponse": {
8769
+ "type": "object",
8770
+ "required": [
8771
+ "filterId",
8772
+ "accountConfigId",
8773
+ "name",
8774
+ "scope",
8775
+ "state",
8776
+ "disabledReason",
8777
+ "hasAnchor",
8778
+ "ruleChangedAt",
8779
+ "actionChangedAt",
8780
+ "matchOperator",
8781
+ "literalClauses",
8782
+ "actionLabelId",
8783
+ "actionMailboxId",
8784
+ "createdAt",
8785
+ "updatedAt",
8786
+ "organizeJobId"
8787
+ ],
8788
+ "properties": {
8789
+ "filterId": {
8790
+ "allOf": [
8791
+ {
8792
+ "$ref": "#/components/schemas/UUID"
8793
+ }
8794
+ ],
8795
+ "description": "Primary identifier. Stable id — the human name is a separate mutable overlay, never the key.",
8796
+ "readOnly": true
8797
+ },
8798
+ "accountConfigId": {
8799
+ "allOf": [
8800
+ {
8801
+ "$ref": "#/components/schemas/UUID"
8802
+ }
8803
+ ],
8804
+ "description": "Owning account configuration",
8805
+ "readOnly": true
8806
+ },
8807
+ "name": {
8808
+ "allOf": [
8809
+ {
8810
+ "$ref": "#/components/schemas/String256"
8811
+ }
8812
+ ],
8813
+ "description": "Plain-language name or editable label for this filter"
8814
+ },
8815
+ "scope": {
8816
+ "allOf": [
8817
+ {
8818
+ "$ref": "#/components/schemas/RemitImap.FilterScope"
8819
+ }
8820
+ ],
8821
+ "description": "Standing (permanent) or Temporary (expires). Governs whether expiresAt/ttl are present (RFC 034 Decision 1). Mutable on update (reader #266): switching scope re-derives ttl and re-evaluates state from expiresAt, and bumps ruleChangedAt so a lapsed filter's back-application can be offered again. The semantic anchor stays immutable regardless — repointing it would silently change what a saved filter matches with nothing visible changing, which deserves a new filter instead."
8822
+ },
8823
+ "expiresAt": {
8824
+ "type": "string",
8825
+ "description": "ISO 8601 date-time with zone offset, present only when scope is Temporary (RFC 034 Decision 1.1) — a business date, not an epoch instant. Every evaluation compares `now` against this value directly; it is the source of truth for whether a Temporary filter is still active, independent of `state` or row existence. Mutable on update (reader #266), alongside scope — moving the date bumps ruleChangedAt the same way a scope change does."
8826
+ },
8827
+ "state": {
8828
+ "allOf": [
8829
+ {
8830
+ "$ref": "#/components/schemas/RemitImap.FilterState"
8831
+ }
8832
+ ],
8833
+ "description": "Whether this filter runs, backing byAccountAndState (RFC 034 Decision 1.2). Starts Active. The user sets Active or Disabled on update; the system sets Disabled when the filter cannot work as designed, and records why in disabledReason. Expired is lazily patched the first time something reads a Temporary filter past its expiresAt, which stays the correctness source for expiry.",
8834
+ "default": "Active"
8835
+ },
8836
+ "disabledReason": {
8837
+ "allOf": [
8838
+ {
8839
+ "$ref": "#/components/schemas/RemitImap.FilterDisabledReason"
8840
+ }
8841
+ ],
8842
+ "description": "Why this filter is Disabled; `None` whenever state is not Disabled. Written together with state, never on its own: turning a filter on clears it.",
8843
+ "default": "None",
8844
+ "readOnly": true
8845
+ },
8846
+ "hasAnchor": {
8847
+ "type": "boolean",
8848
+ "description": "Whether a sibling FilterAnchor row exists for this filter (RFC 034 Decision 2.3). Lets the index-time worker skip the FilterAnchor `get` entirely for purely-literal filters instead of probing for a row that may not exist.",
8849
+ "default": false,
8850
+ "readOnly": true
8851
+ },
8852
+ "ruleChangedAt": {
8853
+ "type": "integer",
8854
+ "format": "int64",
8855
+ "description": "Epoch seconds, written whenever the predicate, the action, the scope, or the expiry changes (reader #266) — never on a cosmetic rename. This is the broad \"the user asserted something new about this rule\" signal the settings UI uses to decide whether to re-offer a lapsed filter's back-application. It is deliberately NOT the precedence signal for the exclusive move action — see actionChangedAt for that (RFC 034 Decision 3.2, reader #384). Distinct from ElectroDB's own updatedAt, which bumps on any write.",
8856
+ "readOnly": true
8857
+ },
8858
+ "actionChangedAt": {
8859
+ "type": "integer",
8860
+ "format": "int64",
8861
+ "description": "Epoch seconds, written only when the predicate (literalClauses, hasAnchor) or the action (actionLabelId, actionMailboxId) changes — never on scope, expiresAt, or a cosmetic rename. Backs most-recently-changed-filter-wins precedence for the exclusive move action (RFC 034 Decision 3.2). Split out from ruleChangedAt (reader #384): extending a filter's expiry or flipping its scope changes its lifecycle, not what it matches or does, so it must not promote the filter to move-winner.",
8862
+ "readOnly": true
8863
+ },
8864
+ "matchOperator": {
8865
+ "allOf": [
8866
+ {
8867
+ "$ref": "#/components/schemas/RemitImap.FilterMatchOperator"
8868
+ }
8869
+ ],
8870
+ "description": "How literalClauses combine. Meaningless when literalClauses is empty.",
8871
+ "default": "And"
8872
+ },
8873
+ "literalClauses": {
8874
+ "type": "array",
8875
+ "items": {
8876
+ "$ref": "#/components/schemas/RemitImap.FilterClause"
8877
+ },
8878
+ "description": "Literal from/subject/has-words predicate clauses (RFC 031). Empty when the filter relies solely on its semantic anchor (see hasAnchor).",
8879
+ "default": []
8880
+ },
8881
+ "actionLabelId": {
8882
+ "type": "string",
8883
+ "description": "Label applied when this filter matches — additive action, any number of filters can independently apply their own label (RFC 034 Decision 3.1). The named sentinel `\"None\"` means no label action; never an empty/optional field.",
8884
+ "default": "None"
8885
+ },
8886
+ "actionMailboxId": {
8887
+ "type": "string",
8888
+ "description": "Mailbox matched messages are moved into — exclusive action, since a message lives in exactly one mailbox (RFC 034 Decision 3.1). On conflict between filters, the one with the latest actionChangedAt wins. `\"None\"` means no move action.",
8889
+ "default": "None"
8890
+ },
8891
+ "createdAt": {
8892
+ "type": "integer",
8893
+ "format": "int64",
8894
+ "readOnly": true
8895
+ },
8896
+ "updatedAt": {
8897
+ "type": "integer",
8898
+ "format": "int64",
8899
+ "readOnly": true
8900
+ },
8901
+ "organizeJobId": {
8902
+ "type": "string",
8903
+ "description": "The organize job queued to run the new filter over the inbox. Poll GET /accounts/{accountId}/organize/{organizeJobId}; a filter with nothing to run reports Failed with the reason."
8904
+ }
8905
+ },
8906
+ "description": "Response body for POST /accounts/{accountId}/filters: the created filter, plus the back-apply job that runs it over the inbox."
8907
+ },
8768
8908
  "RemitImap.CreateLabelInput": {
8769
8909
  "type": "object",
8770
8910
  "required": [
@@ -10410,6 +10550,14 @@
10410
10550
  "actionMailboxId"
10411
10551
  ],
10412
10552
  "properties": {
10553
+ "filterId": {
10554
+ "allOf": [
10555
+ {
10556
+ "$ref": "#/components/schemas/UUID"
10557
+ }
10558
+ ],
10559
+ "description": "Back-apply this standing filter instead of the predicate in this body. The server reads the filter's persisted predicate, action and FilterAnchor, runs the pass over the inbox, and skips a move another active filter outranks, as index time does. The predicate and action fields of this body are ignored when it is set."
10560
+ },
10413
10561
  "anchorMessageId": {
10414
10562
  "allOf": [
10415
10563
  {
@@ -10460,6 +10608,7 @@
10460
10608
  "accountConfigId",
10461
10609
  "userId",
10462
10610
  "state",
10611
+ "filterId",
10463
10612
  "anchorMessageId",
10464
10613
  "matchOperator",
10465
10614
  "literalClauses",
@@ -10507,6 +10656,12 @@
10507
10656
  "default": "Pending",
10508
10657
  "readOnly": true
10509
10658
  },
10659
+ "filterId": {
10660
+ "type": "string",
10661
+ "description": "The standing filter this job back-applies, or the `\"None\"` sentinel for an \"all like these\" pass. A sentinel, not an optional field, so the persisted entity has no optional attributes (RFC 032).",
10662
+ "default": "None",
10663
+ "readOnly": true
10664
+ },
10510
10665
  "anchorMessageId": {
10511
10666
  "type": "string",
10512
10667
  "description": "Snapshot of the anchor message id, or the `\"None\"` sentinel for a purely-literal back-apply. A sentinel, not an optional field, so the persisted entity has no optional attributes (RFC 032).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-spec",
3
- "version": "0.0.74",
3
+ "version": "0.0.75",
4
4
  "description": "Remit API OpenAPI 3 document, generated from TypeSpec.",
5
5
  "exports": {
6
6
  ".": "./openapi.json",