@modrinth/api-client 0.84.0 → 0.86.0

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/dist/index.d.ts CHANGED
@@ -3170,18 +3170,19 @@ export declare namespace Labrinth {
3170
3170
  username: string;
3171
3171
  password: string;
3172
3172
  challenge: string;
3173
+ app_session?: boolean;
3173
3174
  };
3174
3175
  export type LoginResponse = {
3175
3176
  session?: string;
3177
+ app_session?: string;
3176
3178
  flow?: string;
3177
3179
  };
3178
3180
  export type Login2FARequest = {
3179
3181
  code: string;
3180
3182
  flow: string;
3183
+ app_session?: boolean;
3181
3184
  };
3182
- export type Login2FAResponse = {
3183
- session: string;
3184
- };
3185
+ export type Login2FAResponse = AuthSessionResponse;
3185
3186
  export type CreateAccountRequest = {
3186
3187
  username: string;
3187
3188
  password: string;
@@ -3189,10 +3190,9 @@ export declare namespace Labrinth {
3189
3190
  challenge: string;
3190
3191
  sign_up_newsletter?: boolean;
3191
3192
  account_consent?: boolean;
3193
+ app_session?: boolean;
3192
3194
  };
3193
- export type CreateAccountResponse = {
3194
- session: string;
3195
- };
3195
+ export type CreateAccountResponse = AuthSessionResponse;
3196
3196
  export type ValidateCreateAccountRequest = {
3197
3197
  username: string;
3198
3198
  password: string;
@@ -3204,9 +3204,12 @@ export declare namespace Labrinth {
3204
3204
  challenge: string;
3205
3205
  sign_up_newsletter: boolean;
3206
3206
  account_consent?: boolean;
3207
+ app_session?: boolean;
3207
3208
  };
3208
- export type CreateOAuthAccountResponse = {
3209
+ export type CreateOAuthAccountResponse = AuthSessionResponse;
3210
+ export type AuthSessionResponse = Omit<Sessions.v2.Session, 'session'> & {
3209
3211
  session: string;
3212
+ app_session?: string;
3210
3213
  };
3211
3214
  export type ResetPasswordRequest = {
3212
3215
  username: string;
@@ -3239,6 +3242,7 @@ export declare namespace Labrinth {
3239
3242
  export type PasskeyAuthenticateFinishRequest = {
3240
3243
  flow: string;
3241
3244
  credential: unknown;
3245
+ app_session?: boolean;
3242
3246
  };
3243
3247
  export type PasskeyRenameRequest = {
3244
3248
  name: string;
@@ -5191,7 +5195,7 @@ declare class LabrinthAuthV2Module extends AbstractModule {
5191
5195
  * @param data The credential data and flow to complete authentication with
5192
5196
  * @returns A promise that resolves to the new session
5193
5197
  */
5194
- authenticatePasskeyFinish(data: Labrinth.Auth.v2.PasskeyAuthenticateFinishRequest): Promise<Labrinth.Sessions.v2.Session>;
5198
+ authenticatePasskeyFinish(data: Labrinth.Auth.v2.PasskeyAuthenticateFinishRequest): Promise<Labrinth.Auth.v2.AuthSessionResponse>;
5195
5199
  /**
5196
5200
  * Rename a passkey
5197
5201
  *
@@ -7008,6 +7012,10 @@ export declare class ModrinthApiError extends Error {
7008
7012
  * Error context (e.g., module name, operation being performed)
7009
7013
  */
7010
7014
  readonly context?: string;
7015
+ /**
7016
+ * Full URL of the request that failed (if available)
7017
+ */
7018
+ url?: string;
7011
7019
  constructor(message: string, data?: ApiErrorData);
7012
7020
  /**
7013
7021
  * Create a ModrinthApiError from an unknown error