@engini/cli 0.24.0 → 0.27.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.
Files changed (3) hide show
  1. package/README.md +30 -1
  2. package/dist/cli.js +650 -120
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -37,6 +37,7 @@ engini connect [<app>] # create a connection (interactive / a
37
37
  engini connections list | get # inspect connections
38
38
  engini connections create | delete | check | refresh | objects | select-objects # primitives
39
39
  engini connections sign-in-url | oauth-complete # OAuth2 start / finish primitives
40
+ engini connections auth-providers list | get | create | update | delete | redirect-uri | sources | usable
40
41
  engini triggers types | types get # the catalog of what can be triggered
41
42
  engini triggers list | get | create | enable | disable | delete # trigger instances
42
43
  engini triggers events | events get | events replay # the event LOG (real delivery state)
@@ -99,7 +100,7 @@ engini connect monday --auth 0 --field ApiKey=<key> # creates → checks → r
99
100
  engini connect outlook --json # → {need:"oauth", sign_in_url, state, state_expires_in_seconds, resume:"engini connect outlook --auth 0 --oauth-state <state>"}
100
101
  # show sign_in_url to the user - they must sign in within state_expires_in_seconds of
101
102
  # minting; past that the server has purged the state and the resume below fails fast, not hangs:
102
- engini connect outlook --auth 0 --oauth-state <state> # polls token → creates → checks → refreshes
103
+ engini connect outlook --auth 0 --oauth-state <state> # polls sign-in status → creates → checks → refreshes
103
104
 
104
105
  # re-authenticate an EXISTING OAuth2 connection in place — same sign-in flow,
105
106
  # but --oauth-state alone (no --field/--name/--metadata) is a valid edit and
@@ -111,6 +112,34 @@ engini connect <app> --json # → {need:"objects", connection_
111
112
  engini connect <app> --connection <id> --object 5 --object 9
112
113
  ```
113
114
 
115
+ ### Signing in through your own OAuth app (auth providers)
116
+
117
+ An **auth provider** is your account's own credentials for one authentication method of an
118
+ app, filled once and used by every connection signed in through it. It is a name plus
119
+ values for the connector's "Set on provider" fields, addressed by slot (`Key1`..`Key10`,
120
+ `ApiUser`, `ApiPassword`, `BaseUrl`). There is no `--client-id` / `--client-secret`: the
121
+ server rejects both, so every value is a `--field`.
122
+
123
+ ```bash
124
+ engini connections auth-providers sources # which apps/methods, which slots
125
+ engini connections auth-providers redirect-uri --app salesforce # register THIS in your OAuth app first
126
+ engini connections auth-providers create --app salesforce --name "Acme prod" \
127
+ --field Key1=<client-id> --field Key2 # a bare slot prompts, hidden (TTY)
128
+ printf %s "$SECRET" | engini connections auth-providers create --app salesforce \
129
+ --name "Acme prod" --field Key1=<client-id> --field-stdin Key2 # or pipe the secret in
130
+ engini connections auth-providers update 7 --field Key3= # empty value CLEARS that slot
131
+ engini connect salesforce --provider "Acme prod" # sign in through it
132
+ engini connect salesforce --provider none # the connector's own OAuth client
133
+ ```
134
+
135
+ A secret slot is write-only: reads show `has_value: true` and a null `value`. `--field-stdin`
136
+ and the hidden prompt keep a secret out of `ps` and shell history; a blank value aborts rather
137
+ than clearing (use `--field Slot=` to clear on purpose). `list` and `get` need permission to
138
+ manage providers; `usable` (ids and names) and `--provider <name>` need only view access. A
139
+ numeric `--provider` is an id. `--provider` is also accepted by `connections create` and
140
+ `connections sign-in-url`, and `connect` keeps the resolved id in its `resume` strings.
141
+ Provider 409s `AUTH_PROVIDER_IN_USE` / `_NOT_SUPPORTED` / `_NAME_TAKEN` and `CONNECTOR_REMOVED` exit `5`.
142
+
114
143
  The same steps are available as standalone primitives: `connections sign-in-url`
115
144
  / `oauth-complete` (OAuth), `connections update` (re-authenticate in place), and
116
145
  `connections create` / `check` / `refresh` / `objects` / `select-objects`.