@remit/api-openapi-types 0.0.85 → 0.0.86

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 +321 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.85",
3
+ "version": "0.0.86",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -101,6 +101,14 @@ writer can reach is a vocabulary that lies about what the field means.
101
101
  * Terminal outcome of an update run. `null` while a run is in flight; `succeeded` when the new version committed, `rolledBack` when it did not and the previous version was restored, `rollbackFailed` when the restore itself failed and an operator shell is needed, `abandoned` when the run ended having changed nothing (RFC 037 R11).
102
102
  */
103
103
  export type SystemUpdateOutcome = "succeeded" | "rolledBack" | "rollbackFailed" | "abandoned";
104
+ /**
105
+ * Whether a person may sign in. A disabled person's sessions, MCP grants and calendar feeds are revoked, and every sign-in is refused.
106
+ */
107
+ export type PersonStatus = "Active" | "Disabled";
108
+ /**
109
+ * The operation a step-up token is spent on. `updatePerson` maps `Disabled` to `Disable` and `Active` to `Enable`.
110
+ */
111
+ export type StepUpAction = "SignOut" | "Disable" | "Enable" | "ResetPassword";
104
112
  /**
105
113
  * IMAP namespace types per RFC 9051 Section 6.3.10
106
114
  */
@@ -1922,6 +1930,161 @@ with `onExisting: merge` to upsert instead.
1922
1930
  */
1923
1931
  targetVersion: string;
1924
1932
  }
1933
+ /**
1934
+ * Everyone who signs in to this instance, ordered by email.
1935
+ */
1936
+ export interface PeopleListResponse {
1937
+ people: Person[];
1938
+ }
1939
+ /**
1940
+ * One person who signs in to this self-hosted instance.
1941
+ */
1942
+ export interface Person {
1943
+ /**
1944
+ * The person's user id.
1945
+ */
1946
+ userId: string;
1947
+ /**
1948
+ * The address the person signs in with.
1949
+ */
1950
+ email: string;
1951
+ /**
1952
+ * When the account was created, epoch milliseconds.
1953
+ */
1954
+ createdAt: number;
1955
+ /**
1956
+ * When the person last signed in, epoch milliseconds.
1957
+ */
1958
+ lastSignInAt: number;
1959
+ /**
1960
+ * Unexpired browser sessions the person holds.
1961
+ */
1962
+ sessionCount: number;
1963
+ /**
1964
+ * Whether the person may sign in.
1965
+ */
1966
+ status: PersonStatus;
1967
+ /**
1968
+ * Whether this row is the caller.
1969
+ */
1970
+ isCaller: boolean;
1971
+ }
1972
+ /**
1973
+ * The People operation is refused for the caller. `code` is one of
1974
+ `sign_in_disabled` (the kill switch is on), `caller_disabled` (the caller's
1975
+ account is disabled or gone), `foreign_origin` (an unsafe request from an
1976
+ origin this instance does not serve), `step_up_required` (the step-up token
1977
+ is missing, spent, expired, or bound to another caller, action or person) and
1978
+ `wrong_password` (the step-up password is wrong).
1979
+ */
1980
+ export interface PeopleForbiddenError {
1981
+ statusCode: 403;
1982
+ /**
1983
+ * Stable token naming the refusal. Branch on this, never on `message`.
1984
+ */
1985
+ code: string;
1986
+ /**
1987
+ * Human-readable error message
1988
+ */
1989
+ message: string;
1990
+ /**
1991
+ * Additional error details
1992
+ */
1993
+ details?: Record;
1994
+ }
1995
+ /**
1996
+ * The caller's current password, and the one action on one person the token will allow.
1997
+ */
1998
+ export interface StepUpInput {
1999
+ /**
2000
+ * The caller's own current password.
2001
+ */
2002
+ password: string;
2003
+ action: StepUpAction;
2004
+ /**
2005
+ * The person the token will act on.
2006
+ */
2007
+ userId: string;
2008
+ }
2009
+ /**
2010
+ * A single-use token for one action on one person. Spend it at once; it is never stored by the client.
2011
+ */
2012
+ export interface StepUpResponse {
2013
+ stepUpToken: string;
2014
+ /**
2015
+ * When the token stops working, epoch milliseconds.
2016
+ */
2017
+ expiresAt: number;
2018
+ }
2019
+ /**
2020
+ * Five wrong step-up passwords in 15 minutes. `code` is `step_up_locked`.
2021
+ */
2022
+ export interface StepUpLockedError {
2023
+ statusCode: 429;
2024
+ /**
2025
+ * Stable token naming the refusal. Branch on this, never on `message`.
2026
+ */
2027
+ code: string;
2028
+ /**
2029
+ * Human-readable error message
2030
+ */
2031
+ message: string;
2032
+ /**
2033
+ * Additional error details
2034
+ */
2035
+ details?: Record;
2036
+ }
2037
+ /**
2038
+ * Sign the person out of every browser session and MCP connection.
2039
+ */
2040
+ export interface SignOutPersonInput {
2041
+ stepUpToken: string;
2042
+ }
2043
+ /**
2044
+ * Disable or enable the person. Disabling also revokes their sessions, MCP grants and calendar feeds.
2045
+ */
2046
+ export interface UpdatePersonInput {
2047
+ status: PersonStatus;
2048
+ stepUpToken: string;
2049
+ }
2050
+ /**
2051
+ * A person cannot disable themselves. `code` is `cannot_disable_self`.
2052
+ */
2053
+ export interface CannotDisableSelfError {
2054
+ statusCode: 409;
2055
+ /**
2056
+ * Stable token naming the refusal. Branch on this, never on `message`.
2057
+ */
2058
+ code: string;
2059
+ /**
2060
+ * Human-readable error message
2061
+ */
2062
+ message: string;
2063
+ /**
2064
+ * Additional error details
2065
+ */
2066
+ details?: Record;
2067
+ }
2068
+ /**
2069
+ * Issue a password reset link for the person. Their old password stops working and their sessions are revoked.
2070
+ */
2071
+ export interface CreatePasswordResetInput {
2072
+ stepUpToken: string;
2073
+ }
2074
+ /**
2075
+ * The person, and the reset link to hand them. The link is shown once and works once.
2076
+ */
2077
+ export interface PasswordResetResponse {
2078
+ person: Person;
2079
+ /**
2080
+ * The single-use reset link. It exists only in this response.
2081
+ */
2082
+ resetUrl: string;
2083
+ /**
2084
+ * When the link stops working, epoch milliseconds: issue time plus 24 hours.
2085
+ */
2086
+ expiresAt: number;
2087
+ }
1925
2088
  /**
1926
2089
  * Represents an IMAP mailbox (folder). Contains IMAP-specific identifiers for message synchronization.
1927
2090
  */
@@ -7025,6 +7188,61 @@ declare namespace Paths {
7025
7188
  export type $422 = void;
7026
7189
  }
7027
7190
  }
7191
+ namespace ListPeople {
7192
+ namespace Responses {
7193
+ export type $200 = void;
7194
+ export type $401 = void;
7195
+ export type $403 = void;
7196
+ export type $404 = void;
7197
+ }
7198
+ }
7199
+ namespace CreateStepUp {
7200
+ export type RequestBody = Components.Schemas.StepUpInput;
7201
+ namespace Responses {
7202
+ export type $200 = void;
7203
+ export type $401 = void;
7204
+ export type $403 = void;
7205
+ export type $404 = void;
7206
+ export type $429 = void;
7207
+ }
7208
+ }
7209
+ namespace SignOutPerson {
7210
+ export interface PathParameters {
7211
+ userId: string;
7212
+ }
7213
+ export type RequestBody = Components.Schemas.SignOutPersonInput;
7214
+ namespace Responses {
7215
+ export type $200 = void;
7216
+ export type $401 = void;
7217
+ export type $403 = void;
7218
+ export type $404 = void;
7219
+ }
7220
+ }
7221
+ namespace UpdatePerson {
7222
+ export interface PathParameters {
7223
+ userId: string;
7224
+ }
7225
+ export type RequestBody = Components.Schemas.UpdatePersonInput;
7226
+ namespace Responses {
7227
+ export type $200 = void;
7228
+ export type $401 = void;
7229
+ export type $403 = void;
7230
+ export type $404 = void;
7231
+ export type $409 = void;
7232
+ }
7233
+ }
7234
+ namespace CreatePasswordReset {
7235
+ export interface PathParameters {
7236
+ userId: string;
7237
+ }
7238
+ export type RequestBody = Components.Schemas.CreatePasswordResetInput;
7239
+ namespace Responses {
7240
+ export type $200 = void;
7241
+ export type $401 = void;
7242
+ export type $403 = void;
7243
+ export type $404 = void;
7244
+ }
7245
+ }
7028
7246
  namespace ListMailboxes {
7029
7247
  export interface PathParameters {
7030
7248
  accountId: Components.Schemas.UUID;
@@ -8071,6 +8289,46 @@ export interface OperationMethods {
8071
8289
  data?: Paths.ApplySystemUpdate.RequestBody,
8072
8290
  config?: AxiosRequestConfig
8073
8291
  ): OperationResponse<Paths.ApplySystemUpdate.Responses.$200>;
8292
+ /**
8293
+ * listPeople - List everyone who signs in to this instance, ordered by email. Self-host only, and absent (404) while self sign-up is open.
8294
+ */
8295
+ 'listPeople'(
8296
+ parameters?: Parameters<UnknownParamsObject> | null,
8297
+ data?: any,
8298
+ config?: AxiosRequestConfig
8299
+ ): OperationResponse<Paths.ListPeople.Responses.$200>;
8300
+ /**
8301
+ * createStepUp - Trade the caller's current password for a single-use token that allows one action on one person for five minutes. Five wrong passwords in 15 minutes refuse further step-ups with 429. Absent (404) while self sign-up is open, or when the person does not exist.
8302
+ */
8303
+ 'createStepUp'(
8304
+ parameters?: Parameters<UnknownParamsObject> | null,
8305
+ data?: Paths.CreateStepUp.RequestBody,
8306
+ config?: AxiosRequestConfig
8307
+ ): OperationResponse<Paths.CreateStepUp.Responses.$200>;
8308
+ /**
8309
+ * signOutPerson - Sign the person out of every browser session and MCP connection. Needs a `SignOut` step-up for this person. A JWT already minted works until it expires, at most 15 minutes.
8310
+ */
8311
+ 'signOutPerson'(
8312
+ parameters?: Parameters<Paths.SignOutPerson.PathParameters> | null,
8313
+ data?: Paths.SignOutPerson.RequestBody,
8314
+ config?: AxiosRequestConfig
8315
+ ): OperationResponse<Paths.SignOutPerson.Responses.$200>;
8316
+ /**
8317
+ * updatePerson - Disable or enable the person. Needs a `Disable` or `Enable` step-up for this person. Refused with 409 `cannot_disable_self` when the caller disables themselves.
8318
+ */
8319
+ 'updatePerson'(
8320
+ parameters?: Parameters<Paths.UpdatePerson.PathParameters> | null,
8321
+ data?: Paths.UpdatePerson.RequestBody,
8322
+ config?: AxiosRequestConfig
8323
+ ): OperationResponse<Paths.UpdatePerson.Responses.$200>;
8324
+ /**
8325
+ * createPasswordReset - Issue a single-use password reset link for the person, valid 24 hours. Needs a `ResetPassword` step-up for this person. The person's old password stops working and their sessions are revoked.
8326
+ */
8327
+ 'createPasswordReset'(
8328
+ parameters?: Parameters<Paths.CreatePasswordReset.PathParameters> | null,
8329
+ data?: Paths.CreatePasswordReset.RequestBody,
8330
+ config?: AxiosRequestConfig
8331
+ ): OperationResponse<Paths.CreatePasswordReset.Responses.$200>;
8074
8332
  /**
8075
8333
  * listMailboxes
8076
8334
  */
@@ -8942,6 +9200,56 @@ export interface PathsDictionary {
8942
9200
  config?: AxiosRequestConfig
8943
9201
  ): OperationResponse<Paths.ApplySystemUpdate.Responses.$200>;
8944
9202
  };
9203
+ ['/people']: {
9204
+ /**
9205
+ * listPeople - List everyone who signs in to this instance, ordered by email. Self-host only, and absent (404) while self sign-up is open.
9206
+ */
9207
+ 'get'(
9208
+ parameters?: Parameters<UnknownParamsObject> | null,
9209
+ data?: any,
9210
+ config?: AxiosRequestConfig
9211
+ ): OperationResponse<Paths.ListPeople.Responses.$200>;
9212
+ };
9213
+ ['/people/step-up']: {
9214
+ /**
9215
+ * createStepUp - Trade the caller's current password for a single-use token that allows one action on one person for five minutes. Five wrong passwords in 15 minutes refuse further step-ups with 429. Absent (404) while self sign-up is open, or when the person does not exist.
9216
+ */
9217
+ 'post'(
9218
+ parameters?: Parameters<UnknownParamsObject> | null,
9219
+ data?: Paths.CreateStepUp.RequestBody,
9220
+ config?: AxiosRequestConfig
9221
+ ): OperationResponse<Paths.CreateStepUp.Responses.$200>;
9222
+ };
9223
+ ['/people/{userId}/sign-out']: {
9224
+ /**
9225
+ * signOutPerson - Sign the person out of every browser session and MCP connection. Needs a `SignOut` step-up for this person. A JWT already minted works until it expires, at most 15 minutes.
9226
+ */
9227
+ 'post'(
9228
+ parameters?: Parameters<Paths.SignOutPerson.PathParameters> | null,
9229
+ data?: Paths.SignOutPerson.RequestBody,
9230
+ config?: AxiosRequestConfig
9231
+ ): OperationResponse<Paths.SignOutPerson.Responses.$200>;
9232
+ };
9233
+ ['/people/{userId}']: {
9234
+ /**
9235
+ * updatePerson - Disable or enable the person. Needs a `Disable` or `Enable` step-up for this person. Refused with 409 `cannot_disable_self` when the caller disables themselves.
9236
+ */
9237
+ 'patch'(
9238
+ parameters?: Parameters<Paths.UpdatePerson.PathParameters> | null,
9239
+ data?: Paths.UpdatePerson.RequestBody,
9240
+ config?: AxiosRequestConfig
9241
+ ): OperationResponse<Paths.UpdatePerson.Responses.$200>;
9242
+ };
9243
+ ['/people/{userId}/password-reset']: {
9244
+ /**
9245
+ * createPasswordReset - Issue a single-use password reset link for the person, valid 24 hours. Needs a `ResetPassword` step-up for this person. The person's old password stops working and their sessions are revoked.
9246
+ */
9247
+ 'post'(
9248
+ parameters?: Parameters<Paths.CreatePasswordReset.PathParameters> | null,
9249
+ data?: Paths.CreatePasswordReset.RequestBody,
9250
+ config?: AxiosRequestConfig
9251
+ ): OperationResponse<Paths.CreatePasswordReset.Responses.$200>;
9252
+ };
8945
9253
  ['/accounts/{accountId}/mailboxes']: {
8946
9254
  /**
8947
9255
  * listMailboxes
@@ -9880,6 +10188,17 @@ export type SystemUpdateResponse = Components.Schemas.SystemUpdateResponse;
9880
10188
  export type SystemUpdateCheck = Components.Schemas.SystemUpdateCheck;
9881
10189
  export type SystemUpdateRun = Components.Schemas.SystemUpdateRun;
9882
10190
  export type ApplyUpdateInput = Components.Schemas.ApplyUpdateInput;
10191
+ export type PeopleListResponse = Components.Schemas.PeopleListResponse;
10192
+ export type Person = Components.Schemas.Person;
10193
+ export type PeopleForbiddenError = Components.Schemas.PeopleForbiddenError;
10194
+ export type StepUpInput = Components.Schemas.StepUpInput;
10195
+ export type StepUpResponse = Components.Schemas.StepUpResponse;
10196
+ export type StepUpLockedError = Components.Schemas.StepUpLockedError;
10197
+ export type SignOutPersonInput = Components.Schemas.SignOutPersonInput;
10198
+ export type UpdatePersonInput = Components.Schemas.UpdatePersonInput;
10199
+ export type CannotDisableSelfError = Components.Schemas.CannotDisableSelfError;
10200
+ export type CreatePasswordResetInput = Components.Schemas.CreatePasswordResetInput;
10201
+ export type PasswordResetResponse = Components.Schemas.PasswordResetResponse;
9883
10202
  export type Mailbox = Components.Schemas.Mailbox;
9884
10203
  export type MailboxResponse = Components.Schemas.MailboxResponse;
9885
10204
  export type MailboxListResponse = Components.Schemas.MailboxListResponse;
@@ -10050,6 +10369,8 @@ export type ConfigImportOnExisting = Components.Schemas.ConfigImportOnExisting;
10050
10369
  export type SystemUpdateCheckStatus = Components.Schemas.SystemUpdateCheckStatus;
10051
10370
  export type SystemUpdatePhase = Components.Schemas.SystemUpdatePhase;
10052
10371
  export type SystemUpdateOutcome = Components.Schemas.SystemUpdateOutcome;
10372
+ export type PersonStatus = Components.Schemas.PersonStatus;
10373
+ export type StepUpAction = Components.Schemas.StepUpAction;
10053
10374
  export type NamespaceType = Components.Schemas.NamespaceType;
10054
10375
  export type MailboxSyncStatus = Components.Schemas.MailboxSyncStatus;
10055
10376
  export type MailboxCursorState = Components.Schemas.MailboxCursorState;