@remit/api-openapi-types 0.0.100 → 0.0.101

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/package.json +1 -1
  2. package/types.d.ts +90 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.100",
3
+ "version": "0.0.101",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -153,6 +153,18 @@ current enum emitter anyway, so the wire contract uses the bare form.
153
153
  * Message attribute a FilterClause matches against — RFC 031's Tier 0 literal predicates plus the RFC 038 D2 additions (list membership and sender domain). Every member is matched at index time and in the back-apply corpus projection.
154
154
  */
155
155
  export type FilterClauseField = "From" | "Subject" | "HasWords" | "ListId" | "FromDomain";
156
+ /**
157
+ * How a FilterRule header or address test compares its key (RFC 040, after Sieve's `:is` and `:contains`). Both fold case.
158
+ */
159
+ export type FilterRuleMatch = "Is" | "Contains";
160
+ /**
161
+ * The header a FilterRule header test reads (RFC 040). `ListId` is normalized as a `List-Id` filter clause is.
162
+ */
163
+ export type FilterRuleHeader = "From" | "Subject" | "ListId";
164
+ /**
165
+ * The part of the From address a FilterRule address test reads (RFC 040). `RegistrableDomain` is the public-suffix aware domain.
166
+ */
167
+ export type FilterRuleAddressPart = "All" | "Localpart" | "Domain" | "RegistrableDomain";
156
168
  /**
157
169
  * Display color for a user-defined Label (RFC 030).
158
170
  */
@@ -2389,6 +2401,10 @@ create one (RFC 034 recap).
2389
2401
  * Literal from/subject/has-words predicate clauses (RFC 031). A filter carries at least one.
2390
2402
  */
2391
2403
  literalClauses: FilterClause[];
2404
+ /**
2405
+ * The stored rule. A version 0 row predates rules and its literalClauses are the truth. Not surfaced on the API yet.
2406
+ */
2407
+ rule: FilterRuleV0 | FilterRuleV1;
2392
2408
  /**
2393
2409
  * 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.
2394
2410
  */
@@ -2413,6 +2429,65 @@ create one (RFC 034 recap).
2413
2429
  */
2414
2430
  value: String256;
2415
2431
  }
2432
+ /**
2433
+ * A row written before rules existed: the filter's literal clauses are the truth.
2434
+ */
2435
+ export interface FilterRuleV0 {
2436
+ version: 0;
2437
+ }
2438
+ /**
2439
+ * A rule whose test is the truth; the row's literal clauses are empty.
2440
+ */
2441
+ export interface FilterRuleV1 {
2442
+ version: 1;
2443
+ test: FilterAllOfTest | FilterAnyOfTest | FilterNotTest | FilterHeaderTest | FilterAddressTest | FilterHasWordsTest;
2444
+ }
2445
+ /**
2446
+ * Matches when every test in `tests` matches (Sieve `allof`).
2447
+ */
2448
+ export interface FilterAllOfTest {
2449
+ test: "allof";
2450
+ tests: FilterAllOfTest | FilterAnyOfTest | FilterNotTest | FilterHeaderTest | FilterAddressTest | FilterHasWordsTest[];
2451
+ }
2452
+ /**
2453
+ * Matches when any test in `tests` matches (Sieve `anyof`).
2454
+ */
2455
+ export interface FilterAnyOfTest {
2456
+ test: "anyof";
2457
+ tests: FilterAllOfTest | FilterAnyOfTest | FilterNotTest | FilterHeaderTest | FilterAddressTest | FilterHasWordsTest[];
2458
+ }
2459
+ /**
2460
+ * Matches when `operand` does not (Sieve `not`).
2461
+ */
2462
+ export interface FilterNotTest {
2463
+ test: "not";
2464
+ operand: FilterAllOfTest | FilterAnyOfTest | FilterNotTest | FilterHeaderTest | FilterAddressTest | FilterHasWordsTest;
2465
+ }
2466
+ /**
2467
+ * Compares one header against one key (Sieve `header`).
2468
+ */
2469
+ export interface FilterHeaderTest {
2470
+ test: "header";
2471
+ match: FilterRuleMatch;
2472
+ header: FilterRuleHeader;
2473
+ key: String256;
2474
+ }
2475
+ /**
2476
+ * Compares one part of the From address against one key (Sieve `address`). Reads `from` only.
2477
+ */
2478
+ export interface FilterAddressTest {
2479
+ test: "address";
2480
+ match: FilterRuleMatch;
2481
+ part: FilterRuleAddressPart;
2482
+ key: String256;
2483
+ }
2484
+ /**
2485
+ * Matches when every word occurs in the sender, the subject or the body.
2486
+ */
2487
+ export interface FilterHasWordsTest {
2488
+ test: "hasWords";
2489
+ words: String256[];
2490
+ }
2416
2491
  /**
2417
2492
  * Filter item returned by list/get/create/update operations. `ttl` is internal bookkeeping (RFC 034 Decision 1.3) and not surfaced.
2418
2493
  */
@@ -2793,6 +2868,10 @@ standing to persist.
2793
2868
  * Snapshot of the literal predicate clauses
2794
2869
  */
2795
2870
  literalClauses: FilterClause[];
2871
+ /**
2872
+ * Snapshot of the rule. A version 0 row predates rules and its literalClauses are the truth.
2873
+ */
2874
+ rule: FilterRuleV0 | FilterRuleV1;
2796
2875
  /**
2797
2876
  * Snapshot of the additive label action, or `"None"`
2798
2877
  */
@@ -10509,6 +10588,14 @@ export type RenameMailboxInput = Components.Schemas.RenameMailboxInput;
10509
10588
  export type AppointFolderRoleInput = Components.Schemas.AppointFolderRoleInput;
10510
10589
  export type Filter = Components.Schemas.Filter;
10511
10590
  export type FilterClause = Components.Schemas.FilterClause;
10591
+ export type FilterRuleV0 = Components.Schemas.FilterRuleV0;
10592
+ export type FilterRuleV1 = Components.Schemas.FilterRuleV1;
10593
+ export type FilterAllOfTest = Components.Schemas.FilterAllOfTest;
10594
+ export type FilterAnyOfTest = Components.Schemas.FilterAnyOfTest;
10595
+ export type FilterNotTest = Components.Schemas.FilterNotTest;
10596
+ export type FilterHeaderTest = Components.Schemas.FilterHeaderTest;
10597
+ export type FilterAddressTest = Components.Schemas.FilterAddressTest;
10598
+ export type FilterHasWordsTest = Components.Schemas.FilterHasWordsTest;
10512
10599
  export type FilterResponse = Components.Schemas.FilterResponse;
10513
10600
  export type CreateFilterInput = Components.Schemas.CreateFilterInput;
10514
10601
  export type CreateFilterResponse = Components.Schemas.CreateFilterResponse;
@@ -10697,6 +10784,9 @@ export type FilterState = Components.Schemas.FilterState;
10697
10784
  export type FilterDisabledReason = Components.Schemas.FilterDisabledReason;
10698
10785
  export type FilterMatchOperator = Components.Schemas.FilterMatchOperator;
10699
10786
  export type FilterClauseField = Components.Schemas.FilterClauseField;
10787
+ export type FilterRuleMatch = Components.Schemas.FilterRuleMatch;
10788
+ export type FilterRuleHeader = Components.Schemas.FilterRuleHeader;
10789
+ export type FilterRuleAddressPart = Components.Schemas.FilterRuleAddressPart;
10700
10790
  export type LabelColor = Components.Schemas.LabelColor;
10701
10791
  export type OrganizeJobState = Components.Schemas.OrganizeJobState;
10702
10792
  export type CalendarColor = Components.Schemas.CalendarColor;