@remit/api-openapi-types 0.0.85 → 0.0.87

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 +312 -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.87",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -101,6 +101,18 @@ 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
+ * Why a People operation was refused. Wire values stay snake_case.
110
+ */
111
+ export type PeopleErrorCode = "sign_in_disabled" | "caller_disabled" | "foreign_origin" | "step_up_required" | "wrong_password" | "step_up_locked" | "cannot_disable_self";
112
+ /**
113
+ * The operation a step-up token is spent on. `updatePerson` maps `Disabled` to `Disable` and `Active` to `Enable`.
114
+ */
115
+ export type StepUpAction = "SignOut" | "Disable" | "Enable" | "ResetPassword";
104
116
  /**
105
117
  * IMAP namespace types per RFC 9051 Section 6.3.10
106
118
  */
@@ -1922,6 +1934,147 @@ with `onExisting: merge` to upsert instead.
1922
1934
  */
1923
1935
  targetVersion: string;
1924
1936
  }
1937
+ /**
1938
+ * Everyone who signs in to this instance, ordered by email.
1939
+ */
1940
+ export interface PeopleListResponse {
1941
+ people: Person[];
1942
+ }
1943
+ /**
1944
+ * One person who signs in to this self-hosted instance.
1945
+ */
1946
+ export interface Person {
1947
+ /**
1948
+ * The person's user id.
1949
+ */
1950
+ userId: string;
1951
+ /**
1952
+ * The address the person signs in with.
1953
+ */
1954
+ email: string;
1955
+ /**
1956
+ * When the account was created, epoch milliseconds.
1957
+ */
1958
+ createdAt: number;
1959
+ /**
1960
+ * When the person last signed in, epoch milliseconds.
1961
+ */
1962
+ lastSignInAt: number;
1963
+ /**
1964
+ * Unexpired browser sessions the person holds.
1965
+ */
1966
+ sessionCount: number;
1967
+ /**
1968
+ * Whether the person may sign in.
1969
+ */
1970
+ status: PersonStatus;
1971
+ /**
1972
+ * Whether this row is the caller.
1973
+ */
1974
+ isCaller: boolean;
1975
+ }
1976
+ /**
1977
+ * The People operation is refused for the caller.
1978
+ */
1979
+ export interface PeopleForbiddenError {
1980
+ statusCode: 403;
1981
+ /**
1982
+ * Human-readable error message
1983
+ */
1984
+ message: string;
1985
+ /**
1986
+ * Additional error details
1987
+ */
1988
+ details?: Record;
1989
+ code: any | any | any | any | any;
1990
+ }
1991
+ /**
1992
+ * The caller's current password, and the one action on one person the token will allow.
1993
+ */
1994
+ export interface StepUpInput {
1995
+ /**
1996
+ * The caller's own current password.
1997
+ */
1998
+ password: string;
1999
+ action: StepUpAction;
2000
+ /**
2001
+ * The person the token will act on.
2002
+ */
2003
+ userId: string;
2004
+ }
2005
+ /**
2006
+ * A single-use token for one action on one person. Spend it at once; it is never stored by the client.
2007
+ */
2008
+ export interface StepUpResponse {
2009
+ stepUpToken: string;
2010
+ /**
2011
+ * When the token stops working, epoch milliseconds.
2012
+ */
2013
+ expiresAt: number;
2014
+ }
2015
+ /**
2016
+ * Too many wrong step-up passwords.
2017
+ */
2018
+ export interface StepUpLockedError {
2019
+ statusCode: 429;
2020
+ /**
2021
+ * Human-readable error message
2022
+ */
2023
+ message: string;
2024
+ /**
2025
+ * Additional error details
2026
+ */
2027
+ details?: Record;
2028
+ code: any;
2029
+ }
2030
+ /**
2031
+ * Sign the person out of every browser session and MCP connection.
2032
+ */
2033
+ export interface SignOutPersonInput {
2034
+ stepUpToken: string;
2035
+ }
2036
+ /**
2037
+ * Disable or enable the person. Disabling also revokes their sessions, MCP grants and calendar feeds.
2038
+ */
2039
+ export interface UpdatePersonInput {
2040
+ status: PersonStatus;
2041
+ stepUpToken: string;
2042
+ }
2043
+ /**
2044
+ * The caller tried to disable their own account.
2045
+ */
2046
+ export interface CannotDisableSelfError {
2047
+ statusCode: 409;
2048
+ /**
2049
+ * Human-readable error message
2050
+ */
2051
+ message: string;
2052
+ /**
2053
+ * Additional error details
2054
+ */
2055
+ details?: Record;
2056
+ code: any;
2057
+ }
2058
+ /**
2059
+ * Issue a password reset link for the person. Their old password stops working and their sessions are revoked.
2060
+ */
2061
+ export interface CreatePasswordResetInput {
2062
+ stepUpToken: string;
2063
+ }
2064
+ /**
2065
+ * The person, and the reset link to hand them. The link is shown once and works once.
2066
+ */
2067
+ export interface PasswordResetResponse {
2068
+ person: Person;
2069
+ /**
2070
+ * The single-use reset link. It exists only in this response.
2071
+ */
2072
+ resetUrl: string;
2073
+ /**
2074
+ * When the link stops working, epoch milliseconds: issue time plus 24 hours.
2075
+ */
2076
+ expiresAt: number;
2077
+ }
1925
2078
  /**
1926
2079
  * Represents an IMAP mailbox (folder). Contains IMAP-specific identifiers for message synchronization.
1927
2080
  */
@@ -7025,6 +7178,61 @@ declare namespace Paths {
7025
7178
  export type $422 = void;
7026
7179
  }
7027
7180
  }
7181
+ namespace ListPeople {
7182
+ namespace Responses {
7183
+ export type $200 = void;
7184
+ export type $401 = void;
7185
+ export type $403 = void;
7186
+ export type $404 = void;
7187
+ }
7188
+ }
7189
+ namespace CreateStepUp {
7190
+ export type RequestBody = Components.Schemas.StepUpInput;
7191
+ namespace Responses {
7192
+ export type $200 = void;
7193
+ export type $401 = void;
7194
+ export type $403 = void;
7195
+ export type $404 = void;
7196
+ export type $429 = void;
7197
+ }
7198
+ }
7199
+ namespace SignOutPerson {
7200
+ export interface PathParameters {
7201
+ userId: string;
7202
+ }
7203
+ export type RequestBody = Components.Schemas.SignOutPersonInput;
7204
+ namespace Responses {
7205
+ export type $200 = void;
7206
+ export type $401 = void;
7207
+ export type $403 = void;
7208
+ export type $404 = void;
7209
+ }
7210
+ }
7211
+ namespace UpdatePerson {
7212
+ export interface PathParameters {
7213
+ userId: string;
7214
+ }
7215
+ export type RequestBody = Components.Schemas.UpdatePersonInput;
7216
+ namespace Responses {
7217
+ export type $200 = void;
7218
+ export type $401 = void;
7219
+ export type $403 = void;
7220
+ export type $404 = void;
7221
+ export type $409 = void;
7222
+ }
7223
+ }
7224
+ namespace CreatePasswordReset {
7225
+ export interface PathParameters {
7226
+ userId: string;
7227
+ }
7228
+ export type RequestBody = Components.Schemas.CreatePasswordResetInput;
7229
+ namespace Responses {
7230
+ export type $200 = void;
7231
+ export type $401 = void;
7232
+ export type $403 = void;
7233
+ export type $404 = void;
7234
+ }
7235
+ }
7028
7236
  namespace ListMailboxes {
7029
7237
  export interface PathParameters {
7030
7238
  accountId: Components.Schemas.UUID;
@@ -8071,6 +8279,46 @@ export interface OperationMethods {
8071
8279
  data?: Paths.ApplySystemUpdate.RequestBody,
8072
8280
  config?: AxiosRequestConfig
8073
8281
  ): OperationResponse<Paths.ApplySystemUpdate.Responses.$200>;
8282
+ /**
8283
+ * listPeople - List everyone who signs in to this instance, ordered by email. Self-host only, and absent (404) while self sign-up is open.
8284
+ */
8285
+ 'listPeople'(
8286
+ parameters?: Parameters<UnknownParamsObject> | null,
8287
+ data?: any,
8288
+ config?: AxiosRequestConfig
8289
+ ): OperationResponse<Paths.ListPeople.Responses.$200>;
8290
+ /**
8291
+ * 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.
8292
+ */
8293
+ 'createStepUp'(
8294
+ parameters?: Parameters<UnknownParamsObject> | null,
8295
+ data?: Paths.CreateStepUp.RequestBody,
8296
+ config?: AxiosRequestConfig
8297
+ ): OperationResponse<Paths.CreateStepUp.Responses.$200>;
8298
+ /**
8299
+ * 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.
8300
+ */
8301
+ 'signOutPerson'(
8302
+ parameters?: Parameters<Paths.SignOutPerson.PathParameters> | null,
8303
+ data?: Paths.SignOutPerson.RequestBody,
8304
+ config?: AxiosRequestConfig
8305
+ ): OperationResponse<Paths.SignOutPerson.Responses.$200>;
8306
+ /**
8307
+ * 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.
8308
+ */
8309
+ 'updatePerson'(
8310
+ parameters?: Parameters<Paths.UpdatePerson.PathParameters> | null,
8311
+ data?: Paths.UpdatePerson.RequestBody,
8312
+ config?: AxiosRequestConfig
8313
+ ): OperationResponse<Paths.UpdatePerson.Responses.$200>;
8314
+ /**
8315
+ * 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.
8316
+ */
8317
+ 'createPasswordReset'(
8318
+ parameters?: Parameters<Paths.CreatePasswordReset.PathParameters> | null,
8319
+ data?: Paths.CreatePasswordReset.RequestBody,
8320
+ config?: AxiosRequestConfig
8321
+ ): OperationResponse<Paths.CreatePasswordReset.Responses.$200>;
8074
8322
  /**
8075
8323
  * listMailboxes
8076
8324
  */
@@ -8942,6 +9190,56 @@ export interface PathsDictionary {
8942
9190
  config?: AxiosRequestConfig
8943
9191
  ): OperationResponse<Paths.ApplySystemUpdate.Responses.$200>;
8944
9192
  };
9193
+ ['/people']: {
9194
+ /**
9195
+ * listPeople - List everyone who signs in to this instance, ordered by email. Self-host only, and absent (404) while self sign-up is open.
9196
+ */
9197
+ 'get'(
9198
+ parameters?: Parameters<UnknownParamsObject> | null,
9199
+ data?: any,
9200
+ config?: AxiosRequestConfig
9201
+ ): OperationResponse<Paths.ListPeople.Responses.$200>;
9202
+ };
9203
+ ['/people/step-up']: {
9204
+ /**
9205
+ * 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.
9206
+ */
9207
+ 'post'(
9208
+ parameters?: Parameters<UnknownParamsObject> | null,
9209
+ data?: Paths.CreateStepUp.RequestBody,
9210
+ config?: AxiosRequestConfig
9211
+ ): OperationResponse<Paths.CreateStepUp.Responses.$200>;
9212
+ };
9213
+ ['/people/{userId}/sign-out']: {
9214
+ /**
9215
+ * 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.
9216
+ */
9217
+ 'post'(
9218
+ parameters?: Parameters<Paths.SignOutPerson.PathParameters> | null,
9219
+ data?: Paths.SignOutPerson.RequestBody,
9220
+ config?: AxiosRequestConfig
9221
+ ): OperationResponse<Paths.SignOutPerson.Responses.$200>;
9222
+ };
9223
+ ['/people/{userId}']: {
9224
+ /**
9225
+ * 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.
9226
+ */
9227
+ 'patch'(
9228
+ parameters?: Parameters<Paths.UpdatePerson.PathParameters> | null,
9229
+ data?: Paths.UpdatePerson.RequestBody,
9230
+ config?: AxiosRequestConfig
9231
+ ): OperationResponse<Paths.UpdatePerson.Responses.$200>;
9232
+ };
9233
+ ['/people/{userId}/password-reset']: {
9234
+ /**
9235
+ * 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.
9236
+ */
9237
+ 'post'(
9238
+ parameters?: Parameters<Paths.CreatePasswordReset.PathParameters> | null,
9239
+ data?: Paths.CreatePasswordReset.RequestBody,
9240
+ config?: AxiosRequestConfig
9241
+ ): OperationResponse<Paths.CreatePasswordReset.Responses.$200>;
9242
+ };
8945
9243
  ['/accounts/{accountId}/mailboxes']: {
8946
9244
  /**
8947
9245
  * listMailboxes
@@ -9880,6 +10178,17 @@ export type SystemUpdateResponse = Components.Schemas.SystemUpdateResponse;
9880
10178
  export type SystemUpdateCheck = Components.Schemas.SystemUpdateCheck;
9881
10179
  export type SystemUpdateRun = Components.Schemas.SystemUpdateRun;
9882
10180
  export type ApplyUpdateInput = Components.Schemas.ApplyUpdateInput;
10181
+ export type PeopleListResponse = Components.Schemas.PeopleListResponse;
10182
+ export type Person = Components.Schemas.Person;
10183
+ export type PeopleForbiddenError = Components.Schemas.PeopleForbiddenError;
10184
+ export type StepUpInput = Components.Schemas.StepUpInput;
10185
+ export type StepUpResponse = Components.Schemas.StepUpResponse;
10186
+ export type StepUpLockedError = Components.Schemas.StepUpLockedError;
10187
+ export type SignOutPersonInput = Components.Schemas.SignOutPersonInput;
10188
+ export type UpdatePersonInput = Components.Schemas.UpdatePersonInput;
10189
+ export type CannotDisableSelfError = Components.Schemas.CannotDisableSelfError;
10190
+ export type CreatePasswordResetInput = Components.Schemas.CreatePasswordResetInput;
10191
+ export type PasswordResetResponse = Components.Schemas.PasswordResetResponse;
9883
10192
  export type Mailbox = Components.Schemas.Mailbox;
9884
10193
  export type MailboxResponse = Components.Schemas.MailboxResponse;
9885
10194
  export type MailboxListResponse = Components.Schemas.MailboxListResponse;
@@ -10050,6 +10359,9 @@ export type ConfigImportOnExisting = Components.Schemas.ConfigImportOnExisting;
10050
10359
  export type SystemUpdateCheckStatus = Components.Schemas.SystemUpdateCheckStatus;
10051
10360
  export type SystemUpdatePhase = Components.Schemas.SystemUpdatePhase;
10052
10361
  export type SystemUpdateOutcome = Components.Schemas.SystemUpdateOutcome;
10362
+ export type PersonStatus = Components.Schemas.PersonStatus;
10363
+ export type PeopleErrorCode = Components.Schemas.PeopleErrorCode;
10364
+ export type StepUpAction = Components.Schemas.StepUpAction;
10053
10365
  export type NamespaceType = Components.Schemas.NamespaceType;
10054
10366
  export type MailboxSyncStatus = Components.Schemas.MailboxSyncStatus;
10055
10367
  export type MailboxCursorState = Components.Schemas.MailboxCursorState;