@eide/foir-cli 0.50.0 → 0.52.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/cli.js +573 -108
- package/dist/lib/config-helpers.d.ts +63 -1
- package/dist/lib/config-helpers.js +4 -0
- package/package.json +2 -2
|
@@ -304,6 +304,65 @@ interface ApplyConfigAuthProviderInput {
|
|
|
304
304
|
isDefault?: boolean;
|
|
305
305
|
priority?: number;
|
|
306
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Login-with-Foir customer-lane relying party. Each entry registers a
|
|
309
|
+
* storefront or third-party app that can launch the hosted customer
|
|
310
|
+
* login at auth.foir.dev/authorize?client_id=… and exchange the auth
|
|
311
|
+
* code at /customer/oauth/token.
|
|
312
|
+
*
|
|
313
|
+
* The reconciler is project-scoped (tenant + project come from the
|
|
314
|
+
* push context), so consumers only declare the per-RP fields. Pass to
|
|
315
|
+
* `relyingParties` on the manifest.
|
|
316
|
+
*/
|
|
317
|
+
/**
|
|
318
|
+
* Per-RP login method config (login-with-foir-full-workstream-plan.md
|
|
319
|
+
* §Per-RP login method toggle). All fields optional — missing keys
|
|
320
|
+
* default to enabled. Lets a project's storefront opt to only Sign in
|
|
321
|
+
* with Shopify (disable password/OTP + don't list Apple) without
|
|
322
|
+
* touching the project-level provider catalogue.
|
|
323
|
+
*/
|
|
324
|
+
interface ApplyConfigRelyingPartyLoginMethods {
|
|
325
|
+
/** Show the password tab on the hosted login? Defaults to true. */
|
|
326
|
+
password?: boolean;
|
|
327
|
+
/** Show the OTP tab on the hosted login? Defaults to true. */
|
|
328
|
+
otp?: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Provider keys to HIDE on this RP's login page. Empty/missing = show
|
|
331
|
+
* every provider configured at the project level. List a key (e.g.
|
|
332
|
+
* "google") to omit it from this RP only.
|
|
333
|
+
*/
|
|
334
|
+
disabledProviders?: string[];
|
|
335
|
+
}
|
|
336
|
+
interface ApplyConfigRelyingPartyInput {
|
|
337
|
+
/**
|
|
338
|
+
* Which lane this RP authenticates. `foir push` is project-scoped, so
|
|
339
|
+
* RPs declared in config are customer-lane (the default); admin RPs are
|
|
340
|
+
* platform-managed and not part of project config.
|
|
341
|
+
*/
|
|
342
|
+
kind?: 'customer' | 'admin';
|
|
343
|
+
/** Public RP slug, unique per project (e.g. `eide-clothing-storefront`). */
|
|
344
|
+
clientId: string;
|
|
345
|
+
/** Display name shown on the hosted login. */
|
|
346
|
+
name: string;
|
|
347
|
+
/** Allow-listed exact redirect URIs the platform will 302 to with the code. */
|
|
348
|
+
redirectUris: string[];
|
|
349
|
+
/** OAuth scopes the RP can request (intersection with caller scopes wins). */
|
|
350
|
+
allowedScopes?: string[];
|
|
351
|
+
/**
|
|
352
|
+
* Per-RP login method filter (customer-lane). Combines with the project-
|
|
353
|
+
* level customer auth settings (project may have password OFF entirely; an
|
|
354
|
+
* RP can't override-up, only override-down).
|
|
355
|
+
*/
|
|
356
|
+
loginMethods?: ApplyConfigRelyingPartyLoginMethods;
|
|
357
|
+
/**
|
|
358
|
+
* White-label custom login domains for this RP (EID-46), e.g.
|
|
359
|
+
* `['login.eide.clothing']`. `foir push` registers each (creating a pending
|
|
360
|
+
* row + a DNS-TXT challenge) and prunes any not listed. Verification is a
|
|
361
|
+
* separate step — add the CNAME + `_foir-challenge` TXT records the push
|
|
362
|
+
* output prints, then verify. Customer-lane only.
|
|
363
|
+
*/
|
|
364
|
+
customDomains?: string[];
|
|
365
|
+
}
|
|
307
366
|
interface ApplyConfigPlacementInput {
|
|
308
367
|
type: string;
|
|
309
368
|
url: string;
|
|
@@ -494,6 +553,7 @@ interface ApplyConfigInput {
|
|
|
494
553
|
schedules?: ApplyConfigScheduleInput[];
|
|
495
554
|
hooks?: ApplyConfigHookInput[];
|
|
496
555
|
authProviders?: ApplyConfigAuthProviderInput[];
|
|
556
|
+
relyingParties?: ApplyConfigRelyingPartyInput[];
|
|
497
557
|
placements?: ApplyConfigPlacementInput[];
|
|
498
558
|
apiKeys?: ApplyConfigApiKeyInput[];
|
|
499
559
|
/** Per-project app declarations, keyed by app name. */
|
|
@@ -531,6 +591,8 @@ declare function defineSegment(segment: ApplyConfigSegmentInput): ApplyConfigSeg
|
|
|
531
591
|
declare function defineSchedule(schedule: ApplyConfigScheduleInput): ApplyConfigScheduleInput;
|
|
532
592
|
/** Define an auth provider. */
|
|
533
593
|
declare function defineAuthProvider(provider: ApplyConfigAuthProviderInput): ApplyConfigAuthProviderInput;
|
|
594
|
+
/** Define a Login-with-Foir relying party (storefront / external app). */
|
|
595
|
+
declare function defineRelyingParty(client: ApplyConfigRelyingPartyInput): ApplyConfigRelyingPartyInput;
|
|
534
596
|
/** Define a lifecycle hook. */
|
|
535
597
|
declare function defineHook(hook: ApplyConfigHookInput): ApplyConfigHookInput;
|
|
536
598
|
/** Define an editor placement (sidebar or main-editor tab). */
|
|
@@ -569,4 +631,4 @@ interface FoirSecretsConfig {
|
|
|
569
631
|
*/
|
|
570
632
|
declare function defineSecrets(config: FoirSecretsConfig): FoirSecretsConfig;
|
|
571
633
|
|
|
572
|
-
export { type AppInput, type AppPlacementFieldChoiceInput, type AppSinkMappingInput, type AppSourceMappingInput, type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigDesignTokensInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigProjectInput, type ApplyConfigProjectSettingsInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type EnumFieldConfig, type EnumFieldDefinitionInput, type EnumFieldOption, type FieldAccessInput, type FieldDefinitionInput, type FoirSecretsConfig, type LookupDefinitionInput, type QuotaRule, type SecretDeclaration, type SecretOwnerKind, type SelectFieldConfig, type SelectFieldDefinitionInput, defineAuthProvider, defineConfig, defineDesignTokens, defineEnumField, defineField, defineHook, defineModel, defineOperation, definePlacement, defineSchedule, defineSecrets, defineSegment, defineSelectField };
|
|
634
|
+
export { type AppInput, type AppPlacementFieldChoiceInput, type AppSinkMappingInput, type AppSourceMappingInput, type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigDesignTokensInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigProjectInput, type ApplyConfigProjectSettingsInput, type ApplyConfigRelyingPartyInput, type ApplyConfigRelyingPartyLoginMethods, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type EnumFieldConfig, type EnumFieldDefinitionInput, type EnumFieldOption, type FieldAccessInput, type FieldDefinitionInput, type FoirSecretsConfig, type LookupDefinitionInput, type QuotaRule, type SecretDeclaration, type SecretOwnerKind, type SelectFieldConfig, type SelectFieldDefinitionInput, defineAuthProvider, defineConfig, defineDesignTokens, defineEnumField, defineField, defineHook, defineModel, defineOperation, definePlacement, defineRelyingParty, defineSchedule, defineSecrets, defineSegment, defineSelectField };
|
|
@@ -29,6 +29,9 @@ function defineSchedule(schedule) {
|
|
|
29
29
|
function defineAuthProvider(provider) {
|
|
30
30
|
return provider;
|
|
31
31
|
}
|
|
32
|
+
function defineRelyingParty(client) {
|
|
33
|
+
return client;
|
|
34
|
+
}
|
|
32
35
|
function defineHook(hook) {
|
|
33
36
|
return hook;
|
|
34
37
|
}
|
|
@@ -48,6 +51,7 @@ export {
|
|
|
48
51
|
defineModel,
|
|
49
52
|
defineOperation,
|
|
50
53
|
definePlacement,
|
|
54
|
+
defineRelyingParty,
|
|
51
55
|
defineSchedule,
|
|
52
56
|
defineSecrets,
|
|
53
57
|
defineSegment,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "Universal platform CLI for Foir platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tsx": "^4.20.0",
|
|
56
56
|
"typescript": "5.9.2",
|
|
57
57
|
"vitest": "^3.2.4",
|
|
58
|
-
"@
|
|
58
|
+
"@foir/proto-ts": "0.106.0",
|
|
59
59
|
"@foir/rpc-node": "0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|