@passflow/core 0.22.0 → 0.23.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/README.md +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -1
- package/dist/index.d.ts +53 -1
- package/dist/index.mjs +653 -649
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1419,12 +1419,64 @@ export type AppSettings = {
|
|
|
1419
1419
|
create_tenant_on_registration: 'never' | 'always' | 'optional';
|
|
1420
1420
|
fim_merge_by_email_allowed: boolean;
|
|
1421
1421
|
debug_otp_code_allowed: boolean;
|
|
1422
|
-
|
|
1422
|
+
/**
|
|
1423
|
+
* WRITE-ONLY. Every read and write answer returns it as an empty string; the stored code is
|
|
1424
|
+
* never echoed. On write, a blank or absent value keeps the stored code and a non-blank value
|
|
1425
|
+
* replaces it. The only way to clear it is
|
|
1426
|
+
* `DELETE /admin/apps/{id}/secrets/debug_otp_code_for_registration` (see `AppSecretName`).
|
|
1427
|
+
* Use `debug_otp_code_set` to tell whether a code is stored.
|
|
1428
|
+
*/
|
|
1429
|
+
debug_otp_code_for_registration?: string;
|
|
1430
|
+
/** READ-ONLY. `true` when a `debug_otp_code_for_registration` is stored. Ignored on write. */
|
|
1431
|
+
debug_otp_code_set?: boolean;
|
|
1423
1432
|
defaults: DefaultAppSettings;
|
|
1424
1433
|
login_app_theme: LoginWebAppTheme;
|
|
1425
1434
|
login_app_settings?: unknown;
|
|
1426
1435
|
token_delivery_method?: TokenDeliveryMethod;
|
|
1427
1436
|
};
|
|
1437
|
+
/**
|
|
1438
|
+
* A write-only app secret that the admin API clears by name with
|
|
1439
|
+
* `DELETE /admin/apps/{id}/secrets/{name}`. The SDK has no admin client, so this route is not
|
|
1440
|
+
* wrapped; the names are exported for admin UIs that call it themselves.
|
|
1441
|
+
*
|
|
1442
|
+
* - `debug_otp_code_for_registration`: an `AppSettings` field. Answers return it as an empty
|
|
1443
|
+
* string; `AppSettings.debug_otp_code_set` tells whether one is stored.
|
|
1444
|
+
* - `fcm_server_key`, `webpush_vapid_private_key`: push settings in the app's
|
|
1445
|
+
* `two_factor_settings`. Both are absent from every answer; `webpush_vapid_public_key` is
|
|
1446
|
+
* still returned.
|
|
1447
|
+
*
|
|
1448
|
+
* On write, a blank or absent value keeps the stored secret and a non-blank value replaces it.
|
|
1449
|
+
* DELETE is the only way to clear one. See docs/admin-secrets.md.
|
|
1450
|
+
*/
|
|
1451
|
+
export type AppSecretName = 'debug_otp_code_for_registration' | 'fcm_server_key' | 'webpush_vapid_private_key';
|
|
1452
|
+
/** Every `AppSecretName`, in the order the type lists them. */
|
|
1453
|
+
export declare const APP_SECRET_NAMES: readonly AppSecretName[];
|
|
1454
|
+
/**
|
|
1455
|
+
* A secret in the server settings (`GET`/`PUT /admin/settings`) as the admin API returns it.
|
|
1456
|
+
*
|
|
1457
|
+
* - Secrets come back as `mask://********`.
|
|
1458
|
+
* - Connection strings, dynamo/s3/ssm endpoints, plugin address/cmd, activity-logger endpoints
|
|
1459
|
+
* and management_keys come back as `mask://********` followed by `/` and 16 lowercase
|
|
1460
|
+
* hex characters (e.g. a `/0123456789abcdef` suffix); the suffix tells values apart without
|
|
1461
|
+
* revealing them. (Written in two parts because the full form would end this comment.)
|
|
1462
|
+
*
|
|
1463
|
+
* On `PUT`: echo the masked value unchanged to keep the stored one, send a plain value to
|
|
1464
|
+
* replace it, send an empty string to clear it. A stale or edited masked value fails with
|
|
1465
|
+
* HTTP 400 and id `SETTINGS_MASKED_VALUE_UNKNOWN_ERROR_ID`. See docs/admin-secrets.md.
|
|
1466
|
+
*/
|
|
1467
|
+
export type MaskedSecret = string;
|
|
1468
|
+
/** The prefix every `MaskedSecret` starts with. */
|
|
1469
|
+
export declare const MASKED_SECRET_PREFIX = "mask://";
|
|
1470
|
+
/**
|
|
1471
|
+
* Error id of the HTTP 400 that `PUT /admin/settings` returns for a masked value the server did
|
|
1472
|
+
* not issue for the stored one (stale or edited).
|
|
1473
|
+
*/
|
|
1474
|
+
export declare const SETTINGS_MASKED_VALUE_UNKNOWN_ERROR_ID = "error.server.update.settings.masked.value.unknown";
|
|
1475
|
+
/**
|
|
1476
|
+
* Whether a server settings value is a masked secret rather than a plain value: any string that
|
|
1477
|
+
* starts with `MASKED_SECRET_PREFIX`. It does not check that the server would accept it.
|
|
1478
|
+
*/
|
|
1479
|
+
export declare const isMaskedSecret: (value: unknown) => value is MaskedSecret;
|
|
1428
1480
|
export type DefaultAppSettings = {
|
|
1429
1481
|
app_id: string;
|
|
1430
1482
|
redirect: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1419,12 +1419,64 @@ export type AppSettings = {
|
|
|
1419
1419
|
create_tenant_on_registration: 'never' | 'always' | 'optional';
|
|
1420
1420
|
fim_merge_by_email_allowed: boolean;
|
|
1421
1421
|
debug_otp_code_allowed: boolean;
|
|
1422
|
-
|
|
1422
|
+
/**
|
|
1423
|
+
* WRITE-ONLY. Every read and write answer returns it as an empty string; the stored code is
|
|
1424
|
+
* never echoed. On write, a blank or absent value keeps the stored code and a non-blank value
|
|
1425
|
+
* replaces it. The only way to clear it is
|
|
1426
|
+
* `DELETE /admin/apps/{id}/secrets/debug_otp_code_for_registration` (see `AppSecretName`).
|
|
1427
|
+
* Use `debug_otp_code_set` to tell whether a code is stored.
|
|
1428
|
+
*/
|
|
1429
|
+
debug_otp_code_for_registration?: string;
|
|
1430
|
+
/** READ-ONLY. `true` when a `debug_otp_code_for_registration` is stored. Ignored on write. */
|
|
1431
|
+
debug_otp_code_set?: boolean;
|
|
1423
1432
|
defaults: DefaultAppSettings;
|
|
1424
1433
|
login_app_theme: LoginWebAppTheme;
|
|
1425
1434
|
login_app_settings?: unknown;
|
|
1426
1435
|
token_delivery_method?: TokenDeliveryMethod;
|
|
1427
1436
|
};
|
|
1437
|
+
/**
|
|
1438
|
+
* A write-only app secret that the admin API clears by name with
|
|
1439
|
+
* `DELETE /admin/apps/{id}/secrets/{name}`. The SDK has no admin client, so this route is not
|
|
1440
|
+
* wrapped; the names are exported for admin UIs that call it themselves.
|
|
1441
|
+
*
|
|
1442
|
+
* - `debug_otp_code_for_registration`: an `AppSettings` field. Answers return it as an empty
|
|
1443
|
+
* string; `AppSettings.debug_otp_code_set` tells whether one is stored.
|
|
1444
|
+
* - `fcm_server_key`, `webpush_vapid_private_key`: push settings in the app's
|
|
1445
|
+
* `two_factor_settings`. Both are absent from every answer; `webpush_vapid_public_key` is
|
|
1446
|
+
* still returned.
|
|
1447
|
+
*
|
|
1448
|
+
* On write, a blank or absent value keeps the stored secret and a non-blank value replaces it.
|
|
1449
|
+
* DELETE is the only way to clear one. See docs/admin-secrets.md.
|
|
1450
|
+
*/
|
|
1451
|
+
export type AppSecretName = 'debug_otp_code_for_registration' | 'fcm_server_key' | 'webpush_vapid_private_key';
|
|
1452
|
+
/** Every `AppSecretName`, in the order the type lists them. */
|
|
1453
|
+
export declare const APP_SECRET_NAMES: readonly AppSecretName[];
|
|
1454
|
+
/**
|
|
1455
|
+
* A secret in the server settings (`GET`/`PUT /admin/settings`) as the admin API returns it.
|
|
1456
|
+
*
|
|
1457
|
+
* - Secrets come back as `mask://********`.
|
|
1458
|
+
* - Connection strings, dynamo/s3/ssm endpoints, plugin address/cmd, activity-logger endpoints
|
|
1459
|
+
* and management_keys come back as `mask://********` followed by `/` and 16 lowercase
|
|
1460
|
+
* hex characters (e.g. a `/0123456789abcdef` suffix); the suffix tells values apart without
|
|
1461
|
+
* revealing them. (Written in two parts because the full form would end this comment.)
|
|
1462
|
+
*
|
|
1463
|
+
* On `PUT`: echo the masked value unchanged to keep the stored one, send a plain value to
|
|
1464
|
+
* replace it, send an empty string to clear it. A stale or edited masked value fails with
|
|
1465
|
+
* HTTP 400 and id `SETTINGS_MASKED_VALUE_UNKNOWN_ERROR_ID`. See docs/admin-secrets.md.
|
|
1466
|
+
*/
|
|
1467
|
+
export type MaskedSecret = string;
|
|
1468
|
+
/** The prefix every `MaskedSecret` starts with. */
|
|
1469
|
+
export declare const MASKED_SECRET_PREFIX = "mask://";
|
|
1470
|
+
/**
|
|
1471
|
+
* Error id of the HTTP 400 that `PUT /admin/settings` returns for a masked value the server did
|
|
1472
|
+
* not issue for the stored one (stale or edited).
|
|
1473
|
+
*/
|
|
1474
|
+
export declare const SETTINGS_MASKED_VALUE_UNKNOWN_ERROR_ID = "error.server.update.settings.masked.value.unknown";
|
|
1475
|
+
/**
|
|
1476
|
+
* Whether a server settings value is a masked secret rather than a plain value: any string that
|
|
1477
|
+
* starts with `MASKED_SECRET_PREFIX`. It does not check that the server would accept it.
|
|
1478
|
+
*/
|
|
1479
|
+
export declare const isMaskedSecret: (value: unknown) => value is MaskedSecret;
|
|
1428
1480
|
export type DefaultAppSettings = {
|
|
1429
1481
|
app_id: string;
|
|
1430
1482
|
redirect: string;
|