@fluid-app/fluid-cli-channels 0.0.0-stage → 0.1.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 +48 -2
- package/dist/index.d.mts +30 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1125 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +82 -3
package/README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @fluid-app/fluid-cli-channels
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Fluid CLI plugin for sales channels: connect TikTok Shop, Meta (Facebook and
|
|
4
|
+
Instagram catalogs), or Google Merchant Center to a Fluid company, choose which
|
|
5
|
+
products to list, check how they synced, and disconnect.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-channels
|
|
9
|
+
fluid login
|
|
10
|
+
|
|
11
|
+
fluid channels walk tiktok # interactive: connect, pick products, fix issues
|
|
12
|
+
fluid channels list # which channels are connected
|
|
13
|
+
fluid channels connect tiktok --open # print (and open) the sign-in URL
|
|
14
|
+
fluid channels status tiktok # connection + listing counts
|
|
15
|
+
fluid channels warehouse tiktok 7301234567 --yes # TikTok only: the warehouse to publish from
|
|
16
|
+
fluid channels catalog tiktok --all --yes # every active product not already listed
|
|
17
|
+
fluid channels catalog tiktok --all --collection 12 --yes
|
|
18
|
+
fluid channels catalog tiktok --add 101,102 --yes # only these products
|
|
19
|
+
fluid channels catalog tiktok --remove 102 --yes
|
|
20
|
+
fluid channels catalog tiktok # list the listings
|
|
21
|
+
fluid channels issues tiktok # failed or rejected listings, with fixes
|
|
22
|
+
fluid channels issues tiktok --retry --yes # retry the failed publishes
|
|
23
|
+
fluid channels catalog tiktok --remove-all --yes # take every product off the channel
|
|
24
|
+
fluid channels disconnect tiktok --yes
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Channels: `tiktok`, `meta`, `google`.
|
|
28
|
+
|
|
29
|
+
`walk` is the interactive way through a whole setup in a terminal. It picks
|
|
30
|
+
the channel (showing which are connected), prints and opens the sign-in link
|
|
31
|
+
and checks the connection once you've approved, sets TikTok's warehouse,
|
|
32
|
+
offers the whole catalog, whole collections, or products picked from a
|
|
33
|
+
searchable list, and retries failed publishes. Type `<` to go back, `>` to
|
|
34
|
+
skip a stage, and `?` for the menu; every change asks before it runs. Scripts
|
|
35
|
+
and agents use the other commands instead.
|
|
36
|
+
|
|
37
|
+
- Connecting needs a person in a browser: `connect` prints the channel's
|
|
38
|
+
sign-in URL (`--open` opens it). After they approve, the channel sends them
|
|
39
|
+
back to Fluid, which saves the connection. Check it with `status`.
|
|
40
|
+
- `--all` adds the active products that exist now. Products you create later
|
|
41
|
+
aren't added automatically; run it again to add them. It skips products you
|
|
42
|
+
removed earlier unless you pass `--include-removed`.
|
|
43
|
+
- Disconnecting doesn't take products off the channel. Run
|
|
44
|
+
`catalog <channel> --remove-all --yes` first if you want them gone.
|
|
45
|
+
|
|
46
|
+
Every command prints JSON; failures print a JSON `error` on stderr and exit
|
|
47
|
+
non-zero. Commands that change live configuration ask for confirmation unless
|
|
48
|
+
you pass `--yes`. The walkthroughs are the guided setups at
|
|
49
|
+
https://docs.fluid.app/setup/overview.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommandContext, FluidPlugin } from "@fluid-app/fluid-cli";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Changes to a live channel need an explicit yes. Scripts and agents pass
|
|
7
|
+
* `--yes`; an interactive terminal is asked. With neither, nothing runs.
|
|
8
|
+
*/
|
|
9
|
+
declare function confirmChange(question: string, yes: boolean, interactive?: boolean): Promise<void>;
|
|
10
|
+
/** Print a failure as JSON on stderr and exit non-zero, so scripts and
|
|
11
|
+
* agents can read it the same way as a success. */
|
|
12
|
+
declare function fail(err: unknown): void;
|
|
13
|
+
/** Product, listing, or collection IDs from repeatable, comma-separated flags. */
|
|
14
|
+
declare function parseIds(values: string[], flag: string): number[];
|
|
15
|
+
interface CatalogOptions {
|
|
16
|
+
all: boolean;
|
|
17
|
+
collection: string[];
|
|
18
|
+
includeRemoved: boolean;
|
|
19
|
+
add: string[];
|
|
20
|
+
remove: string[];
|
|
21
|
+
removeAll: boolean;
|
|
22
|
+
yes: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Exactly one catalog change per run, or none to list the listings. */
|
|
25
|
+
declare function catalogMode(opts: CatalogOptions): "list" | "all" | "add" | "remove" | "remove-all";
|
|
26
|
+
declare function registerChannelCommands(parent: Command, ctx: CommandContext): void;
|
|
27
|
+
declare const plugin: FluidPlugin;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { catalogMode, confirmChange, plugin as default, fail, parseIds, registerChannelCommands };
|
|
30
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;AA6CA;;iBAAsB,aAAA,CACpB,QAAA,UACA,GAAA,WACA,WAAA,aACC,OAAA;;;iBAwCa,IAAA,CAAK,GAAA;;iBA0BL,QAAA,CAAS,MAAA,YAAkB,IAAA;AAAA,UAiBjC,cAAA;EACR,GAAA;EACA,UAAA;EACA,cAAA;EACA,GAAA;EACA,MAAA;EACA,SAAA;EACA,GAAA;AAAA;;iBAIc,WAAA,CACd,IAAA,EAAM,cAAA;AAAA,iBA+DQ,uBAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;AAAA,cAgTD,MAAA,EAAQ,WAAA"}
|