@nebulr-group/bridge-cli 0.6.5 → 1.0.0-alpha.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 +93 -460
- package/dist/api/accounts.d.ts +69 -0
- package/dist/api/accounts.d.ts.map +1 -0
- package/dist/api/accounts.js +42 -0
- package/dist/api/accounts.js.map +1 -0
- package/dist/api/apps.d.ts +50 -0
- package/dist/api/apps.d.ts.map +1 -0
- package/dist/api/apps.js +62 -0
- package/dist/api/apps.js.map +1 -0
- package/dist/api/billing.d.ts +131 -0
- package/dist/api/billing.d.ts.map +1 -0
- package/dist/api/billing.js +42 -0
- package/dist/api/billing.js.map +1 -0
- package/dist/api/flags.d.ts +73 -0
- package/dist/api/flags.d.ts.map +1 -0
- package/dist/api/flags.js +108 -0
- package/dist/api/flags.js.map +1 -0
- package/dist/api/keys.d.ts +48 -0
- package/dist/api/keys.d.ts.map +1 -0
- package/dist/api/keys.js +87 -0
- package/dist/api/keys.js.map +1 -0
- package/dist/auth/browser-open.d.ts +21 -4
- package/dist/auth/browser-open.d.ts.map +1 -1
- package/dist/auth/browser-open.js +45 -65
- package/dist/auth/browser-open.js.map +1 -1
- package/dist/auth/lock.d.ts +8 -0
- package/dist/auth/lock.d.ts.map +1 -0
- package/dist/auth/lock.js +43 -0
- package/dist/auth/lock.js.map +1 -0
- package/dist/auth/loopback.d.ts +8 -12
- package/dist/auth/loopback.d.ts.map +1 -1
- package/dist/auth/loopback.js +40 -45
- package/dist/auth/loopback.js.map +1 -1
- package/dist/auth/session.d.ts +61 -0
- package/dist/auth/session.d.ts.map +1 -0
- package/dist/auth/session.js +142 -0
- package/dist/auth/session.js.map +1 -0
- package/dist/auth/sign-in.d.ts +67 -0
- package/dist/auth/sign-in.d.ts.map +1 -0
- package/dist/auth/sign-in.js +113 -0
- package/dist/auth/sign-in.js.map +1 -0
- package/dist/auth/store.d.ts +89 -0
- package/dist/auth/store.d.ts.map +1 -0
- package/dist/auth/store.js +214 -0
- package/dist/auth/store.js.map +1 -0
- package/dist/bin.js +0 -2
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts +1 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -17
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +31 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +67 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/accounts.command.d.ts +4 -0
- package/dist/commands/accounts.command.d.ts.map +1 -0
- package/dist/commands/accounts.command.js +116 -0
- package/dist/commands/accounts.command.js.map +1 -0
- package/dist/commands/app.command.d.ts +3 -2
- package/dist/commands/app.command.d.ts.map +1 -1
- package/dist/commands/app.command.js +132 -233
- package/dist/commands/app.command.js.map +1 -1
- package/dist/commands/auth.command.d.ts +2 -12
- package/dist/commands/auth.command.d.ts.map +1 -1
- package/dist/commands/auth.command.js +147 -20
- package/dist/commands/auth.command.js.map +1 -1
- package/dist/commands/billing.command.d.ts +4 -0
- package/dist/commands/billing.command.d.ts.map +1 -0
- package/dist/commands/billing.command.js +185 -0
- package/dist/commands/billing.command.js.map +1 -0
- package/dist/commands/check.command.d.ts +2 -1
- package/dist/commands/check.command.d.ts.map +1 -1
- package/dist/commands/check.command.js +11 -14
- package/dist/commands/check.command.js.map +1 -1
- package/dist/commands/context.d.ts +58 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +78 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/flag.command.d.ts +3 -62
- package/dist/commands/flag.command.d.ts.map +1 -1
- package/dist/commands/flag.command.js +181 -864
- package/dist/commands/flag.command.js.map +1 -1
- package/dist/commands/key.command.d.ts +4 -0
- package/dist/commands/key.command.d.ts.map +1 -0
- package/dist/commands/key.command.js +44 -0
- package/dist/commands/key.command.js.map +1 -0
- package/dist/commands/plan.command.d.ts +3 -203
- package/dist/commands/plan.command.d.ts.map +1 -1
- package/dist/commands/plan.command.js +200 -759
- package/dist/commands/plan.command.js.map +1 -1
- package/dist/config.d.ts +19 -101
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +51 -364
- package/dist/config.js.map +1 -1
- package/dist/core/discovery.d.ts +27 -0
- package/dist/core/discovery.d.ts.map +1 -0
- package/dist/core/discovery.js +97 -0
- package/dist/core/discovery.js.map +1 -0
- package/dist/core/errors.d.ts +26 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +33 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/http.d.ts +23 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +153 -0
- package/dist/core/http.js.map +1 -0
- package/dist/core/private-files.d.ts +6 -0
- package/dist/core/private-files.d.ts.map +1 -0
- package/dist/core/private-files.js +96 -0
- package/dist/core/private-files.js.map +1 -0
- package/dist/core/routes.d.ts +94 -0
- package/dist/core/routes.d.ts.map +1 -0
- package/dist/core/routes.js +91 -0
- package/dist/core/routes.js.map +1 -0
- package/dist/core/urls.d.ts +15 -0
- package/dist/core/urls.d.ts.map +1 -0
- package/dist/core/urls.js +55 -0
- package/dist/core/urls.js.map +1 -0
- package/dist/gate-rules.d.ts +1 -2
- package/dist/gate-rules.d.ts.map +1 -1
- package/dist/gate-rules.js +4 -5
- package/dist/gate-rules.js.map +1 -1
- package/dist/index.d.ts +23 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/io.d.ts +21 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +59 -0
- package/dist/io.js.map +1 -0
- package/dist/money.d.ts +42 -0
- package/dist/money.d.ts.map +1 -0
- package/dist/money.js +112 -0
- package/dist/money.js.map +1 -0
- package/dist/program.d.ts +5 -24
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +25 -113
- package/dist/program.js.map +1 -1
- package/package.json +7 -8
- package/dist/auth/api-client.d.ts +0 -50
- package/dist/auth/api-client.d.ts.map +0 -1
- package/dist/auth/api-client.js +0 -109
- package/dist/auth/api-client.js.map +0 -1
- package/dist/auth/relative-time.d.ts +0 -2
- package/dist/auth/relative-time.d.ts.map +0 -1
- package/dist/auth/relative-time.js +0 -27
- package/dist/auth/relative-time.js.map +0 -1
- package/dist/auth/scopes.d.ts +0 -30
- package/dist/auth/scopes.d.ts.map +0 -1
- package/dist/auth/scopes.js +0 -39
- package/dist/auth/scopes.js.map +0 -1
- package/dist/auth/workspace-client.d.ts +0 -70
- package/dist/auth/workspace-client.d.ts.map +0 -1
- package/dist/auth/workspace-client.js +0 -105
- package/dist/auth/workspace-client.js.map +0 -1
- package/dist/commands/auth/config.command.d.ts +0 -8
- package/dist/commands/auth/config.command.d.ts.map +0 -1
- package/dist/commands/auth/config.command.js +0 -60
- package/dist/commands/auth/config.command.js.map +0 -1
- package/dist/commands/auth/login.command.d.ts +0 -46
- package/dist/commands/auth/login.command.d.ts.map +0 -1
- package/dist/commands/auth/login.command.js +0 -166
- package/dist/commands/auth/login.command.js.map +0 -1
- package/dist/commands/auth/logout.command.d.ts +0 -21
- package/dist/commands/auth/logout.command.d.ts.map +0 -1
- package/dist/commands/auth/logout.command.js +0 -97
- package/dist/commands/auth/logout.command.js.map +0 -1
- package/dist/commands/auth/methods.command.d.ts +0 -68
- package/dist/commands/auth/methods.command.d.ts.map +0 -1
- package/dist/commands/auth/methods.command.js +0 -91
- package/dist/commands/auth/methods.command.js.map +0 -1
- package/dist/commands/auth/status.command.d.ts +0 -18
- package/dist/commands/auth/status.command.d.ts.map +0 -1
- package/dist/commands/auth/status.command.js +0 -104
- package/dist/commands/auth/status.command.js.map +0 -1
- package/dist/commands/auth/use.command.d.ts +0 -17
- package/dist/commands/auth/use.command.d.ts.map +0 -1
- package/dist/commands/auth/use.command.js +0 -47
- package/dist/commands/auth/use.command.js.map +0 -1
- package/dist/commands/branding.command.d.ts +0 -3
- package/dist/commands/branding.command.d.ts.map +0 -1
- package/dist/commands/branding.command.js +0 -42
- package/dist/commands/branding.command.js.map +0 -1
- package/dist/commands/event.command.d.ts +0 -3
- package/dist/commands/event.command.d.ts.map +0 -1
- package/dist/commands/event.command.js +0 -27
- package/dist/commands/event.command.js.map +0 -1
- package/dist/commands/flag-init.command.d.ts +0 -13
- package/dist/commands/flag-init.command.d.ts.map +0 -1
- package/dist/commands/flag-init.command.js +0 -463
- package/dist/commands/flag-init.command.js.map +0 -1
- package/dist/commands/guide.command.d.ts +0 -61
- package/dist/commands/guide.command.d.ts.map +0 -1
- package/dist/commands/guide.command.js +0 -655
- package/dist/commands/guide.command.js.map +0 -1
- package/dist/commands/info.command.d.ts +0 -3
- package/dist/commands/info.command.d.ts.map +0 -1
- package/dist/commands/info.command.js +0 -70
- package/dist/commands/info.command.js.map +0 -1
- package/dist/commands/integration.command.d.ts +0 -35
- package/dist/commands/integration.command.d.ts.map +0 -1
- package/dist/commands/integration.command.js +0 -290
- package/dist/commands/integration.command.js.map +0 -1
- package/dist/commands/journeys.d.ts +0 -43
- package/dist/commands/journeys.d.ts.map +0 -1
- package/dist/commands/journeys.js +0 -221
- package/dist/commands/journeys.js.map +0 -1
- package/dist/commands/ops.command.d.ts +0 -17
- package/dist/commands/ops.command.d.ts.map +0 -1
- package/dist/commands/ops.command.js +0 -129
- package/dist/commands/ops.command.js.map +0 -1
- package/dist/commands/privilege.command.d.ts +0 -16
- package/dist/commands/privilege.command.d.ts.map +0 -1
- package/dist/commands/privilege.command.js +0 -86
- package/dist/commands/privilege.command.js.map +0 -1
- package/dist/commands/role.command.d.ts +0 -3
- package/dist/commands/role.command.d.ts.map +0 -1
- package/dist/commands/role.command.js +0 -101
- package/dist/commands/role.command.js.map +0 -1
- package/dist/commands/runtime-dir.d.ts +0 -16
- package/dist/commands/runtime-dir.d.ts.map +0 -1
- package/dist/commands/runtime-dir.js +0 -18
- package/dist/commands/runtime-dir.js.map +0 -1
- package/dist/commands/setup.command.d.ts +0 -63
- package/dist/commands/setup.command.d.ts.map +0 -1
- package/dist/commands/setup.command.js +0 -148
- package/dist/commands/setup.command.js.map +0 -1
- package/dist/commands/stripe.command.d.ts +0 -29
- package/dist/commands/stripe.command.d.ts.map +0 -1
- package/dist/commands/stripe.command.js +0 -99
- package/dist/commands/stripe.command.js.map +0 -1
- package/dist/commands/tenant.command.d.ts +0 -3
- package/dist/commands/tenant.command.d.ts.map +0 -1
- package/dist/commands/tenant.command.js +0 -135
- package/dist/commands/tenant.command.js.map +0 -1
- package/dist/commands/token.command.d.ts +0 -3
- package/dist/commands/token.command.d.ts.map +0 -1
- package/dist/commands/token.command.js +0 -54
- package/dist/commands/token.command.js.map +0 -1
- package/dist/commands/user.command.d.ts +0 -3
- package/dist/commands/user.command.d.ts.map +0 -1
- package/dist/commands/user.command.js +0 -117
- package/dist/commands/user.command.js.map +0 -1
- package/dist/credentials.d.ts +0 -141
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js +0 -348
- package/dist/credentials.js.map +0 -1
- package/dist/flag-coherence.d.ts +0 -42
- package/dist/flag-coherence.d.ts.map +0 -1
- package/dist/flag-coherence.js +0 -103
- package/dist/flag-coherence.js.map +0 -1
- package/dist/output.d.ts +0 -17
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -107
- package/dist/output.js.map +0 -1
- package/dist/preview.d.ts +0 -9
- package/dist/preview.d.ts.map +0 -1
- package/dist/preview.js +0 -63
- package/dist/preview.js.map +0 -1
- package/dist/product-decisions.d.ts +0 -40
- package/dist/product-decisions.d.ts.map +0 -1
- package/dist/product-decisions.js +0 -52
- package/dist/product-decisions.js.map +0 -1
- package/dist/prompt-urls.d.ts +0 -31
- package/dist/prompt-urls.d.ts.map +0 -1
- package/dist/prompt-urls.js +0 -35
- package/dist/prompt-urls.js.map +0 -1
- package/dist/prompts/auth-master-integration-prompt.md +0 -255
- package/dist/prompts/billing/master.md +0 -332
- package/dist/prompts/decisions/feature-control.md +0 -131
- package/dist/prompts/decisions/going-live.md +0 -60
- package/dist/prompts/decisions/login.md +0 -71
- package/dist/prompts/decisions/look-and-feel.md +0 -68
- package/dist/prompts/decisions/payments.md +0 -97
- package/dist/prompts/decisions/roles.md +0 -78
- package/dist/prompts/decisions/teams.md +0 -61
- package/dist/prompts/fit-together.md +0 -97
- package/dist/prompts/flags/master.md +0 -220
- package/dist/prompts/guide-coverage.json +0 -17
- package/dist/prompts/integration-success.md +0 -106
- package/dist/prompts/mcp-tools.json +0 -90
- package/dist/prompts/mechanisms.md +0 -298
- package/dist/prompts/orientation.md +0 -42
- package/dist/prompts/product-decisions.json +0 -338
- package/dist/resolve.d.ts +0 -110
- package/dist/resolve.d.ts.map +0 -1
- package/dist/resolve.js +0 -260
- package/dist/resolve.js.map +0 -1
- package/dist/shape.d.ts +0 -25
- package/dist/shape.d.ts.map +0 -1
- package/dist/shape.js +0 -74
- package/dist/shape.js.map +0 -1
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": [
|
|
3
|
-
"The product decisions Bridge tools and commands never make for the developer (TBP-713).",
|
|
4
|
-
"\"ask\": refused with DECISION_NEEDED, naming the question, and nothing changes. \"only-when-given\": never set unless passed.",
|
|
5
|
-
"Source: PRODUCT_DECISIONS in bridge-api, microservices/account/nebulr-api/mcp/tools/product-decisions.ts.",
|
|
6
|
-
"Generated, never edited by hand: in bridge-api run `bun scripts/generate-product-decisions-json.ts > <bridge-cli>/bridge-cli/prompts/product-decisions.json` (in the bridge-api container). guide-currency.spec.ts fails when the two disagree."
|
|
7
|
-
],
|
|
8
|
-
"source": "bridge-api feature/mcp-journey e9762f2",
|
|
9
|
-
"decisions": [
|
|
10
|
-
{
|
|
11
|
-
"tool": "create_plan",
|
|
12
|
-
"cli": "bridge plan create",
|
|
13
|
-
"field": "amount",
|
|
14
|
-
"guide": "payments",
|
|
15
|
-
"enforcement": "ask",
|
|
16
|
-
"question": "What does this plan cost per billing period? (0 for a free or contact-sales plan)",
|
|
17
|
-
"type": "number"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"tool": "create_plan",
|
|
21
|
-
"cli": "bridge plan create",
|
|
22
|
-
"field": "interval",
|
|
23
|
-
"guide": "payments",
|
|
24
|
-
"enforcement": "ask",
|
|
25
|
-
"question": "Is it billed monthly, yearly, weekly or daily?",
|
|
26
|
-
"type": "enum",
|
|
27
|
-
"options": [
|
|
28
|
-
"day",
|
|
29
|
-
"week",
|
|
30
|
-
"month",
|
|
31
|
-
"year"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"tool": "create_plan",
|
|
36
|
-
"cli": "bridge plan create",
|
|
37
|
-
"field": "currency",
|
|
38
|
-
"guide": "payments",
|
|
39
|
-
"enforcement": "ask",
|
|
40
|
-
"question": "In which currency is it charged? (ISO code, e.g. USD, EUR, SEK)",
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"tool": "create_plan",
|
|
45
|
-
"cli": "bridge plan create",
|
|
46
|
-
"field": "trial",
|
|
47
|
-
"guide": "payments",
|
|
48
|
-
"enforcement": "ask",
|
|
49
|
-
"question": "Is there a free trial on this plan?",
|
|
50
|
-
"type": "boolean"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"tool": "create_plan",
|
|
54
|
-
"cli": "bridge plan create",
|
|
55
|
-
"field": "trialDays",
|
|
56
|
-
"guide": "payments",
|
|
57
|
-
"enforcement": "ask",
|
|
58
|
-
"question": "How many days does the free trial last?",
|
|
59
|
-
"type": "number"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"tool": "apply_plan",
|
|
63
|
-
"cli": "bridge plan apply",
|
|
64
|
-
"field": "name",
|
|
65
|
-
"guide": "payments",
|
|
66
|
-
"enforcement": "ask",
|
|
67
|
-
"question": "What is this plan called?",
|
|
68
|
-
"type": "string"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"tool": "apply_plan",
|
|
72
|
-
"cli": "bridge plan apply",
|
|
73
|
-
"field": "prices.amount",
|
|
74
|
-
"guide": "payments",
|
|
75
|
-
"enforcement": "ask",
|
|
76
|
-
"question": "What does this plan cost per billing period? (0 for a free or contact-sales plan)",
|
|
77
|
-
"type": "number"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"tool": "apply_plan",
|
|
81
|
-
"cli": "bridge plan apply",
|
|
82
|
-
"field": "prices.interval",
|
|
83
|
-
"guide": "payments",
|
|
84
|
-
"enforcement": "ask",
|
|
85
|
-
"question": "Is it billed monthly, yearly, weekly or daily?",
|
|
86
|
-
"type": "enum",
|
|
87
|
-
"options": [
|
|
88
|
-
"day",
|
|
89
|
-
"week",
|
|
90
|
-
"month",
|
|
91
|
-
"year"
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"tool": "apply_plan",
|
|
96
|
-
"cli": "bridge plan apply",
|
|
97
|
-
"field": "prices.currency",
|
|
98
|
-
"guide": "payments",
|
|
99
|
-
"enforcement": "ask",
|
|
100
|
-
"question": "In which currency is it charged? (ISO code, e.g. USD, EUR, SEK)",
|
|
101
|
-
"type": "string"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"tool": "apply_plan",
|
|
105
|
-
"cli": "bridge plan apply",
|
|
106
|
-
"field": "trial",
|
|
107
|
-
"guide": "payments",
|
|
108
|
-
"enforcement": "ask",
|
|
109
|
-
"question": "Is there a free trial on this plan?",
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"tool": "apply_plan",
|
|
114
|
-
"cli": "bridge plan apply",
|
|
115
|
-
"field": "trialDays",
|
|
116
|
-
"guide": "payments",
|
|
117
|
-
"enforcement": "ask",
|
|
118
|
-
"question": "How many days does the free trial last?",
|
|
119
|
-
"type": "number"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"tool": "set_plan_price",
|
|
123
|
-
"cli": "bridge plan price set",
|
|
124
|
-
"field": "currency",
|
|
125
|
-
"guide": "payments",
|
|
126
|
-
"enforcement": "ask",
|
|
127
|
-
"question": "In which currency is it charged? (ISO code, e.g. USD, EUR, SEK)",
|
|
128
|
-
"type": "string"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"tool": "update_app",
|
|
132
|
-
"cli": "bridge app update",
|
|
133
|
-
"field": "paymentsAutoRedirect",
|
|
134
|
-
"guide": "payments",
|
|
135
|
-
"enforcement": "only-when-given",
|
|
136
|
-
"question": "Must a new customer pick a plan before they can use the app?",
|
|
137
|
-
"type": "boolean"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"tool": "invite_user",
|
|
141
|
-
"cli": "bridge user invite",
|
|
142
|
-
"field": "role",
|
|
143
|
-
"guide": "teams",
|
|
144
|
-
"enforcement": "ask",
|
|
145
|
-
"question": "Which role should this person get? (a role key from list_roles; the default role is only a starting suggestion)",
|
|
146
|
-
"type": "string"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"tool": "update_app",
|
|
150
|
-
"cli": "bridge app update",
|
|
151
|
-
"field": "tenantSelfSignup",
|
|
152
|
-
"guide": "teams",
|
|
153
|
-
"enforcement": "only-when-given",
|
|
154
|
-
"question": "Can anyone sign up and get a workspace of their own, or only people who are invited?",
|
|
155
|
-
"type": "boolean"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"tool": "update_auth_methods",
|
|
159
|
-
"cli": "bridge app update",
|
|
160
|
-
"field": "mfaEnabled",
|
|
161
|
-
"guide": "login",
|
|
162
|
-
"enforcement": "only-when-given",
|
|
163
|
-
"question": "Should two-factor sign-in be available?",
|
|
164
|
-
"type": "boolean"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"tool": "update_auth_methods",
|
|
168
|
-
"cli": "bridge app update",
|
|
169
|
-
"field": "passkeysEnabled",
|
|
170
|
-
"guide": "login",
|
|
171
|
-
"enforcement": "only-when-given",
|
|
172
|
-
"question": "Should people be able to sign in with a passkey?",
|
|
173
|
-
"type": "boolean"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"tool": "update_auth_methods",
|
|
177
|
-
"cli": "bridge app update",
|
|
178
|
-
"field": "magicLinkEnabled",
|
|
179
|
-
"guide": "login",
|
|
180
|
-
"enforcement": "only-when-given",
|
|
181
|
-
"question": "Should people be able to sign in with an emailed link?",
|
|
182
|
-
"type": "boolean"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"tool": "update_auth_methods",
|
|
186
|
-
"cli": "bridge app update",
|
|
187
|
-
"field": "googleSsoEnabled",
|
|
188
|
-
"guide": "login",
|
|
189
|
-
"enforcement": "only-when-given",
|
|
190
|
-
"question": "Should people be able to sign in with Google?",
|
|
191
|
-
"type": "boolean"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"tool": "update_auth_methods",
|
|
195
|
-
"cli": "bridge app update",
|
|
196
|
-
"field": "linkedinSsoEnabled",
|
|
197
|
-
"guide": "login",
|
|
198
|
-
"enforcement": "only-when-given",
|
|
199
|
-
"question": "Should people be able to sign in with LinkedIn?",
|
|
200
|
-
"type": "boolean"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"tool": "update_auth_methods",
|
|
204
|
-
"cli": "bridge app update",
|
|
205
|
-
"field": "azureAdSsoEnabled",
|
|
206
|
-
"guide": "login",
|
|
207
|
-
"enforcement": "only-when-given",
|
|
208
|
-
"question": "Should people be able to sign in with Microsoft (Azure AD)?",
|
|
209
|
-
"type": "boolean"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"tool": "update_auth_methods",
|
|
213
|
-
"cli": "bridge app update",
|
|
214
|
-
"field": "appleSsoEnabled",
|
|
215
|
-
"guide": "login",
|
|
216
|
-
"enforcement": "only-when-given",
|
|
217
|
-
"question": "Should people be able to sign in with Apple?",
|
|
218
|
-
"type": "boolean"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"tool": "update_auth_methods",
|
|
222
|
-
"cli": "bridge app update",
|
|
223
|
-
"field": "githubSsoEnabled",
|
|
224
|
-
"guide": "login",
|
|
225
|
-
"enforcement": "only-when-given",
|
|
226
|
-
"question": "Should people be able to sign in with GitHub?",
|
|
227
|
-
"type": "boolean"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"tool": "update_auth_methods",
|
|
231
|
-
"cli": "bridge app update",
|
|
232
|
-
"field": "facebookSsoEnabled",
|
|
233
|
-
"guide": "login",
|
|
234
|
-
"enforcement": "only-when-given",
|
|
235
|
-
"question": "Should people be able to sign in with Facebook?",
|
|
236
|
-
"type": "boolean"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"tool": "update_branding",
|
|
240
|
-
"cli": "bridge branding update",
|
|
241
|
-
"field": "bgColor",
|
|
242
|
-
"guide": "look-and-feel",
|
|
243
|
-
"enforcement": "only-when-given",
|
|
244
|
-
"question": "Which page background colour?",
|
|
245
|
-
"type": "string"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"tool": "update_branding",
|
|
249
|
-
"cli": "bridge branding update",
|
|
250
|
-
"field": "textColor",
|
|
251
|
-
"guide": "look-and-feel",
|
|
252
|
-
"enforcement": "only-when-given",
|
|
253
|
-
"question": "Which text colour?",
|
|
254
|
-
"type": "string"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"tool": "update_branding",
|
|
258
|
-
"cli": "bridge branding update",
|
|
259
|
-
"field": "linkColor",
|
|
260
|
-
"guide": "look-and-feel",
|
|
261
|
-
"enforcement": "only-when-given",
|
|
262
|
-
"question": "Which link colour?",
|
|
263
|
-
"type": "string"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"tool": "update_branding",
|
|
267
|
-
"cli": "bridge branding update",
|
|
268
|
-
"field": "primaryButtonBgColor",
|
|
269
|
-
"guide": "look-and-feel",
|
|
270
|
-
"enforcement": "only-when-given",
|
|
271
|
-
"question": "Which colour for the main button?",
|
|
272
|
-
"type": "string"
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
"tool": "update_branding",
|
|
276
|
-
"cli": "bridge branding update",
|
|
277
|
-
"field": "primaryButtonTextColor",
|
|
278
|
-
"guide": "look-and-feel",
|
|
279
|
-
"enforcement": "only-when-given",
|
|
280
|
-
"question": "Which text colour on the main button?",
|
|
281
|
-
"type": "string"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"tool": "update_branding",
|
|
285
|
-
"cli": "bridge branding update",
|
|
286
|
-
"field": "fontFamily",
|
|
287
|
-
"guide": "look-and-feel",
|
|
288
|
-
"enforcement": "only-when-given",
|
|
289
|
-
"question": "Which font?",
|
|
290
|
-
"type": "string"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
"tool": "update_branding",
|
|
294
|
-
"cli": "bridge branding update",
|
|
295
|
-
"field": "borderRadius",
|
|
296
|
-
"guide": "look-and-feel",
|
|
297
|
-
"enforcement": "only-when-given",
|
|
298
|
-
"question": "How rounded should corners be?",
|
|
299
|
-
"type": "string"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"tool": "update_app",
|
|
303
|
-
"cli": "bridge app update",
|
|
304
|
-
"field": "uiUrl",
|
|
305
|
-
"guide": "going-live",
|
|
306
|
-
"enforcement": "only-when-given",
|
|
307
|
-
"question": "What is the production address of the frontend?",
|
|
308
|
-
"type": "string"
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
"tool": "update_app",
|
|
312
|
-
"cli": "bridge app update",
|
|
313
|
-
"field": "defaultCallbackUri",
|
|
314
|
-
"guide": "going-live",
|
|
315
|
-
"enforcement": "only-when-given",
|
|
316
|
-
"question": "Which production address should sign-in return to?",
|
|
317
|
-
"type": "string"
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
"tool": "setup_communication",
|
|
321
|
-
"cli": "bridge setup communication",
|
|
322
|
-
"field": "fromAddress",
|
|
323
|
-
"guide": "going-live",
|
|
324
|
-
"enforcement": "only-when-given",
|
|
325
|
-
"question": "Which address should emails come from?",
|
|
326
|
-
"type": "string"
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
"tool": "setup_communication",
|
|
330
|
-
"cli": "bridge setup communication",
|
|
331
|
-
"field": "fromName",
|
|
332
|
-
"guide": "going-live",
|
|
333
|
-
"enforcement": "only-when-given",
|
|
334
|
-
"question": "Which sender name should emails show?",
|
|
335
|
-
"type": "string"
|
|
336
|
-
}
|
|
337
|
-
]
|
|
338
|
-
}
|
package/dist/resolve.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { FlagResponse } from '@nebulr-group/bridge-auth-core';
|
|
2
|
-
/**
|
|
3
|
-
* Error carrying a stable machine-readable `code`, so `outputError` can emit
|
|
4
|
-
* something better than UNKNOWN_ERROR for resolution failures.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ResolveError extends Error {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(code: string, message: string);
|
|
9
|
-
}
|
|
10
|
-
export interface ResolveSpec<T> {
|
|
11
|
-
/** Capitalised singular noun used in messages, e.g. `'Flag'`. */
|
|
12
|
-
noun: string;
|
|
13
|
-
/** Flag the user types to address by id, e.g. `'--id'` or `'--user-id'`. */
|
|
14
|
-
idOption: string;
|
|
15
|
-
/** Flag the user types to address by key, e.g. `'--key'`, `'--email'`. */
|
|
16
|
-
keyOption: string;
|
|
17
|
-
/** What the key option holds, in prose: `'key'`, `'name'`, `'email'`. */
|
|
18
|
-
keyLabel: string;
|
|
19
|
-
/** Command that lists the candidates, e.g. `'bridge flag list'`. */
|
|
20
|
-
listCommand: string;
|
|
21
|
-
/** Fetches every candidate. Only called when resolving by key. */
|
|
22
|
-
list: () => Promise<T[]>;
|
|
23
|
-
idOf: (item: T) => string;
|
|
24
|
-
/** The item's key; `undefined` when the item has none (skipped in matching). */
|
|
25
|
-
keyOf: (item: T) => string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Comparison normaliser. Defaults to identity (exact, case-sensitive).
|
|
28
|
-
* Emails pass `(s) => s.toLowerCase()`.
|
|
29
|
-
*/
|
|
30
|
-
normalize?: (value: string) => string;
|
|
31
|
-
/** One-line rendering of a candidate, used in the ambiguity error. */
|
|
32
|
-
describe?: (item: T) => string;
|
|
33
|
-
}
|
|
34
|
-
export interface ResolveTarget {
|
|
35
|
-
id?: string;
|
|
36
|
-
key?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Turn `{ id }` or `{ key }` into an id.
|
|
40
|
-
*
|
|
41
|
-
* - both supplied → INVALID_OPTIONS
|
|
42
|
-
* - neither → INVALID_OPTIONS, naming both options
|
|
43
|
-
* - id supplied → returned as-is (no network call)
|
|
44
|
-
* - key supplied → one `list()` call, then exact-match on the key
|
|
45
|
-
* - 0 matches → `<NOUN>_NOT_FOUND`, naming the list command
|
|
46
|
-
* - >1 matches → `<NOUN>_AMBIGUOUS`, listing every candidate. Nothing acts.
|
|
47
|
-
*/
|
|
48
|
-
export declare function resolveResourceId<T>(target: ResolveTarget, spec: ResolveSpec<T>): Promise<string>;
|
|
49
|
-
/** `bridge flag …` — flag keys are unique. */
|
|
50
|
-
export declare function resolveFlagId(target: ResolveTarget): Promise<string>;
|
|
51
|
-
/**
|
|
52
|
-
* Resolve to the whole flag record rather than just its id.
|
|
53
|
-
*
|
|
54
|
-
* TBP-548. `flag toggle` has to read the flag's current `state` before it
|
|
55
|
-
* writes: turning a `state: "on-with-rule"` flag fully on would widen it from
|
|
56
|
-
* the rule's audience to everyone, which is not what a switch labelled
|
|
57
|
-
* "toggle" is understood to do. One `list()` serves both the resolution and
|
|
58
|
-
* that check, and it costs the `--id` path its previous no-network property —
|
|
59
|
-
* deliberately, since an `--id` that matches nothing now fails here by name
|
|
60
|
-
* instead of as an opaque server 404.
|
|
61
|
-
*/
|
|
62
|
-
export declare function resolveFlag(target: ResolveTarget): Promise<FlagResponse>;
|
|
63
|
-
/** `bridge role …` — role keys are unique (e.g. ADMIN). */
|
|
64
|
-
export declare function resolveRoleId(target: ResolveTarget): Promise<string>;
|
|
65
|
-
/**
|
|
66
|
-
* `bridge tenant …` — tenants have NO key field. `name` is optional and the
|
|
67
|
-
* platform does not enforce uniqueness on it, so a duplicate name is a real
|
|
68
|
-
* possibility and always fails loudly rather than picking one.
|
|
69
|
-
*/
|
|
70
|
-
export declare function resolveTenantIdByName(target: ResolveTarget): Promise<string>;
|
|
71
|
-
/**
|
|
72
|
-
* `bridge user …` — users have no key either; email is the natural
|
|
73
|
-
* human-readable identifier and is unique within a tenant. Matched
|
|
74
|
-
* case-insensitively, as email addresses are.
|
|
75
|
-
*/
|
|
76
|
-
export declare function resolveUserId(target: ResolveTarget, tenantId: string): Promise<string>;
|
|
77
|
-
/**
|
|
78
|
-
* TBP-592 — turn privilege KEYS into the ids `POST/PUT /account/role` stores.
|
|
79
|
-
*
|
|
80
|
-
* `--privileges` is documented as taking keys, and keys are the only form a
|
|
81
|
-
* human or agent has: they are what `bridge role list` prints and what the app
|
|
82
|
-
* is designed around. But `role.model.ts` types `privileges` as
|
|
83
|
-
* `Types.ObjectId[]` and resolves them with `findByIdsAndApp`, so a key
|
|
84
|
-
* resolved to nothing, the array came back empty, and the model's pre-save
|
|
85
|
-
* hook threw "A role needs at least one privilege".
|
|
86
|
-
*
|
|
87
|
-
* That error is the real cost. It reads as "you passed none" when the truth is
|
|
88
|
-
* "the ones you passed were dropped", and nothing in it points at keys-vs-ids —
|
|
89
|
-
* the only way to find out was to read the model.
|
|
90
|
-
*
|
|
91
|
-
* So: resolve here, and make an unknown identifier a hard failure that NAMES
|
|
92
|
-
* the offenders. Silently dropping one privilege out of ten would create a role
|
|
93
|
-
* that looks right and under-permits, which is worse than any error.
|
|
94
|
-
*
|
|
95
|
-
* Ids are still accepted and passed through untouched. Mixed input works. That
|
|
96
|
-
* keeps `--privileges` honest for scripts that already pass ids, and means no
|
|
97
|
-
* caller has to know which form the API wants.
|
|
98
|
-
*/
|
|
99
|
-
export declare function resolvePrivilegeIds(identifiers: string[]): Promise<string[]>;
|
|
100
|
-
/**
|
|
101
|
-
* `bridge privilege …` — privilege keys are unique within an app, so a key
|
|
102
|
-
* addresses exactly one. Same shape as `resolveRoleId`.
|
|
103
|
-
*/
|
|
104
|
-
export declare function resolvePrivilegeId(target: ResolveTarget): Promise<string>;
|
|
105
|
-
/**
|
|
106
|
-
* `bridge token …` — API tokens have no key; `name` is free text and is NOT
|
|
107
|
-
* enforced unique, so two tokens can legitimately share one.
|
|
108
|
-
*/
|
|
109
|
-
export declare function resolveTokenIdByName(target: ResolveTarget): Promise<string>;
|
|
110
|
-
//# sourceMappingURL=resolve.d.ts.map
|
package/dist/resolve.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAGnE;;;GAGG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAK1C;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC1B,gFAAgF;IAChF,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC;IACvC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAQD;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAqBD,8CAA8C;AAC9C,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAEpE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAgB9E;AAED,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAYpE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAe5E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CActF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAmClF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAYzE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAa3E"}
|