@remit/api-openapi-types 0.0.77 → 0.0.78
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.
- package/package.json +1 -1
- package/types.d.ts +80 -0
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -2201,6 +2201,73 @@ sets `hasAnchor`. Absent for a purely-literal filter.
|
|
|
2201
2201
|
*/
|
|
2202
2202
|
anchorMessageId?: UUID;
|
|
2203
2203
|
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Response body for POST /accounts/{accountId}/filters: the created filter, plus the back-apply job that runs it over the inbox.
|
|
2206
|
+
*/
|
|
2207
|
+
export interface CreateFilterResponse {
|
|
2208
|
+
/**
|
|
2209
|
+
* Primary identifier. Stable id — the human name is a separate mutable overlay, never the key.
|
|
2210
|
+
*/
|
|
2211
|
+
filterId: UUID;
|
|
2212
|
+
/**
|
|
2213
|
+
* Owning account configuration
|
|
2214
|
+
*/
|
|
2215
|
+
accountConfigId: UUID;
|
|
2216
|
+
/**
|
|
2217
|
+
* Plain-language name or editable label for this filter
|
|
2218
|
+
*/
|
|
2219
|
+
name: String256;
|
|
2220
|
+
/**
|
|
2221
|
+
* 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.
|
|
2222
|
+
*/
|
|
2223
|
+
scope: FilterScope;
|
|
2224
|
+
/**
|
|
2225
|
+
* 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.
|
|
2226
|
+
*/
|
|
2227
|
+
expiresAt?: string;
|
|
2228
|
+
/**
|
|
2229
|
+
* 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.
|
|
2230
|
+
*/
|
|
2231
|
+
state: FilterState;
|
|
2232
|
+
/**
|
|
2233
|
+
* 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.
|
|
2234
|
+
*/
|
|
2235
|
+
disabledReason: FilterDisabledReason;
|
|
2236
|
+
/**
|
|
2237
|
+
* 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.
|
|
2238
|
+
*/
|
|
2239
|
+
hasAnchor: boolean;
|
|
2240
|
+
/**
|
|
2241
|
+
* 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.
|
|
2242
|
+
*/
|
|
2243
|
+
ruleChangedAt: number;
|
|
2244
|
+
/**
|
|
2245
|
+
* 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.
|
|
2246
|
+
*/
|
|
2247
|
+
actionChangedAt: number;
|
|
2248
|
+
/**
|
|
2249
|
+
* How literalClauses combine. Meaningless when literalClauses is empty.
|
|
2250
|
+
*/
|
|
2251
|
+
matchOperator: FilterMatchOperator;
|
|
2252
|
+
/**
|
|
2253
|
+
* Literal from/subject/has-words predicate clauses (RFC 031). Empty when the filter relies solely on its semantic anchor (see hasAnchor).
|
|
2254
|
+
*/
|
|
2255
|
+
literalClauses: FilterClause[];
|
|
2256
|
+
/**
|
|
2257
|
+
* 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.
|
|
2258
|
+
*/
|
|
2259
|
+
actionLabelId: string;
|
|
2260
|
+
/**
|
|
2261
|
+
* 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.
|
|
2262
|
+
*/
|
|
2263
|
+
actionMailboxId: string;
|
|
2264
|
+
createdAt: number;
|
|
2265
|
+
updatedAt: number;
|
|
2266
|
+
/**
|
|
2267
|
+
* 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.
|
|
2268
|
+
*/
|
|
2269
|
+
organizeJobId: string;
|
|
2270
|
+
}
|
|
2204
2271
|
/**
|
|
2205
2272
|
* Input for updating a filter (RFC 034, reader #266). The name, predicate,
|
|
2206
2273
|
action, scope, and expiresAt are all updatable; `ttl` is always
|
|
@@ -2343,6 +2410,10 @@ rule. The anchor is derived transiently from `anchorMessageId`'s existing chunk
|
|
|
2343
2410
|
vectors at match time and never persisted as a FilterAnchor row.
|
|
2344
2411
|
*/
|
|
2345
2412
|
export interface OrganizeInput {
|
|
2413
|
+
/**
|
|
2414
|
+
* 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.
|
|
2415
|
+
*/
|
|
2416
|
+
filterId?: UUID;
|
|
2346
2417
|
/**
|
|
2347
2418
|
* Anchor message for the semantic half — "all like this one". Absent for a purely-literal back-apply. The anchor vector is pooled transiently from this message's indexed chunk vectors and never written to a FilterAnchor row.
|
|
2348
2419
|
*/
|
|
@@ -2430,6 +2501,10 @@ standing to persist.
|
|
|
2430
2501
|
* Current lifecycle state of the job
|
|
2431
2502
|
*/
|
|
2432
2503
|
state: OrganizeJobState;
|
|
2504
|
+
/**
|
|
2505
|
+
* 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).
|
|
2506
|
+
*/
|
|
2507
|
+
filterId: string;
|
|
2433
2508
|
/**
|
|
2434
2509
|
* 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).
|
|
2435
2510
|
*/
|
|
@@ -2503,6 +2578,10 @@ standing to persist.
|
|
|
2503
2578
|
* Current lifecycle state of the job
|
|
2504
2579
|
*/
|
|
2505
2580
|
state: OrganizeJobState;
|
|
2581
|
+
/**
|
|
2582
|
+
* 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).
|
|
2583
|
+
*/
|
|
2584
|
+
filterId: string;
|
|
2506
2585
|
/**
|
|
2507
2586
|
* 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).
|
|
2508
2587
|
*/
|
|
@@ -9177,6 +9256,7 @@ export type Filter = Components.Schemas.Filter;
|
|
|
9177
9256
|
export type FilterClause = Components.Schemas.FilterClause;
|
|
9178
9257
|
export type FilterResponse = Components.Schemas.FilterResponse;
|
|
9179
9258
|
export type CreateFilterInput = Components.Schemas.CreateFilterInput;
|
|
9259
|
+
export type CreateFilterResponse = Components.Schemas.CreateFilterResponse;
|
|
9180
9260
|
export type UpdateFilterInput = Components.Schemas.UpdateFilterInput;
|
|
9181
9261
|
export type Label = Components.Schemas.Label;
|
|
9182
9262
|
export type LabelResponse = Components.Schemas.LabelResponse;
|