@sangria-sdk/cli 0.2.4 → 0.2.5
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 +2 -0
- package/dist/commands/settings.js +59 -56
- package/dist/commands/settings.js.map +1 -1
- package/dist/lib/help.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ sangria settings show
|
|
|
34
34
|
sangria settings set-phone "(415) 555-2671"
|
|
35
35
|
sangria settings update --country US --postal-code 94105
|
|
36
36
|
sangria settings update --country US --line1 "123 Market St" --city "San Francisco" --state CA --postal-code 94105
|
|
37
|
+
sangria settings update --line2 "Apt 4B" # any subset: omitted fields keep their saved value
|
|
38
|
+
sangria settings update --line2 "" # empty clears
|
|
37
39
|
sangria discover "decaf espresso pods" --reasoning "nespresso-compatible, caffeine-sensitive user" --max-price 30
|
|
38
40
|
sangria discover --url https://www.amazon.com/dp/B0XXXXXXXX
|
|
39
41
|
sangria discover --url https://a.co/d/XXXXXXXX
|
|
@@ -22,26 +22,28 @@ async function updatePhone(phone, ctx) {
|
|
|
22
22
|
process.stdout.write(`Phone: ${result.phone}\n`);
|
|
23
23
|
return EXIT.success;
|
|
24
24
|
}
|
|
25
|
-
// updateShipping
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
25
|
+
// updateShipping sends whatever flags were given. Any subset is valid: what you
|
|
26
|
+
// pass replaces, what you leave out keeps its saved value, so correcting one
|
|
27
|
+
// line costs one flag. Passing an empty value clears the field — `--line2 ""`
|
|
28
|
+
// removes an apartment — which the API allows only where losing the value still
|
|
29
|
+
// leaves a deliverable address: the second line always, and the state in markets
|
|
30
|
+
// that have none. Everything else it refuses to blank rather than store an
|
|
31
|
+
// address that cannot ship.
|
|
32
|
+
//
|
|
33
|
+
// The result is the whole stored address rather than a summary of what was sent:
|
|
34
|
+
// the API normalizes (whitespace, casing, the country from your pinned market),
|
|
35
|
+
// so reading back the request would show what you typed instead of what is now
|
|
36
|
+
// saved.
|
|
30
37
|
async function updateShipping(flags, ctx) {
|
|
31
38
|
const shipping = buildShippingUpdate(flags);
|
|
32
39
|
const client = new SangriaAgentClient(ctx.config);
|
|
33
40
|
const result = await client.updateShippingAddress(shipping);
|
|
34
|
-
if (ctx.json)
|
|
41
|
+
if (ctx.json) {
|
|
35
42
|
printJson(result);
|
|
36
|
-
|
|
37
|
-
process.stdout.write(`Shipping address saved. You can now discover and buy products.\n`);
|
|
38
|
-
}
|
|
39
|
-
else if (shipping.postal_code) {
|
|
40
|
-
process.stdout.write(`Postal code set. You can now run 'sangria discover "<what to find>" --reasoning "<why>"'.\n`);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
process.stdout.write(`Country set to ${shipping.country}. Add a postal code to start discovering: sangria settings update --postal-code <code>.\n`);
|
|
43
|
+
return EXIT.success;
|
|
44
44
|
}
|
|
45
|
+
process.stdout.write("Saved.\n");
|
|
46
|
+
printShipping(result.shipping);
|
|
45
47
|
return EXIT.success;
|
|
46
48
|
}
|
|
47
49
|
async function showSettings(ctx) {
|
|
@@ -53,10 +55,20 @@ async function showSettings(ctx) {
|
|
|
53
55
|
}
|
|
54
56
|
const phoneSet = result.phone != null;
|
|
55
57
|
process.stdout.write(`Phone: ${phoneSet ? result.phone : "(not set) — run 'sangria settings set-phone <phone>'"}\n`);
|
|
56
|
-
|
|
58
|
+
printShipping(result.shipping);
|
|
59
|
+
return EXIT.success;
|
|
60
|
+
}
|
|
61
|
+
// printShipping renders what is saved and, when the account isn't ready yet,
|
|
62
|
+
// the one command that moves it forward.
|
|
63
|
+
//
|
|
64
|
+
// The "still needed" line matters most for the account that has a country and
|
|
65
|
+
// nothing else. That account IS set up — it has a pinned market and can top up
|
|
66
|
+
// — so calling it "(not set)" is both wrong and unhelpful, since the person
|
|
67
|
+
// earliest in setup is the one who most needs the next command.
|
|
68
|
+
function printShipping(s) {
|
|
57
69
|
if (!s || !(s.line1 || s.city || s.state || s.postal_code || s.country)) {
|
|
58
70
|
process.stdout.write("Shipping: (not set) — run 'sangria settings update --country <US|SG> --postal-code <code>'\n");
|
|
59
|
-
return
|
|
71
|
+
return;
|
|
60
72
|
}
|
|
61
73
|
process.stdout.write("Shipping:\n");
|
|
62
74
|
process.stdout.write(` line1: ${s.line1 || "(not set)"}\n`);
|
|
@@ -66,50 +78,41 @@ async function showSettings(ctx) {
|
|
|
66
78
|
process.stdout.write(` state: ${s.state || "(not set)"}\n`);
|
|
67
79
|
process.stdout.write(` postal_code: ${s.postal_code || "(not set)"}\n`);
|
|
68
80
|
process.stdout.write(` country: ${s.country || "(not set)"}\n`);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const hasLine1 = has(flags.line1);
|
|
74
|
-
const hasLine2 = has(flags.line2);
|
|
75
|
-
const hasCity = has(flags.city);
|
|
76
|
-
const hasState = has(flags.state);
|
|
77
|
-
const hasPostal = has(flags.postalCode);
|
|
78
|
-
const hasCountry = has(flags.country);
|
|
79
|
-
// Full address (buy-ready). state is required only where the market requires
|
|
80
|
-
// it (US), so the CLI doesn't force --state — the backend validates per market.
|
|
81
|
-
const fullAddress = hasLine1 && hasCity && hasPostal && hasCountry;
|
|
82
|
-
if (fullAddress) {
|
|
83
|
-
return {
|
|
84
|
-
line1: flags.line1,
|
|
85
|
-
...(flags.line2 === undefined ? {} : { line2: flags.line2 }),
|
|
86
|
-
city: flags.city,
|
|
87
|
-
...(hasState ? { state: flags.state } : {}),
|
|
88
|
-
postal_code: flags.postalCode,
|
|
89
|
-
country: flags.country,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
// Any street-level flag signals intent to set a full address. If the full set
|
|
93
|
-
// isn't present, reject — otherwise the request would reduce to a postal-only
|
|
94
|
-
// update and silently drop line1/city/state (mirrors the backend guard).
|
|
95
|
-
if (hasLine1 || hasLine2 || hasCity || hasState) {
|
|
96
|
-
throw new CliError("A full address needs --country --line1 --city --postal-code together (plus --state where required). Provide the complete address, or pass only --country and/or --postal-code.", EXIT.usage);
|
|
81
|
+
// In dependency order, so the hint is always the immediate next step rather
|
|
82
|
+
// than a list of everything still outstanding.
|
|
83
|
+
if (!s.postal_code) {
|
|
84
|
+
process.stdout.write(" → add a postal code to start discovering: sangria settings update --postal-code <code>\n");
|
|
97
85
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return { country: flags.country, ...(hasPostal ? { postal_code: flags.postalCode } : {}) };
|
|
86
|
+
else if (!s.line1 || !s.city) {
|
|
87
|
+
process.stdout.write(" → add a delivery address before buying: sangria settings update --line1 <line1> --city <city> [--state <state>]\n");
|
|
101
88
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
else if (s.country === "US" && !s.state) {
|
|
90
|
+
// The one field the API accepts now and refuses at the buy. Saving is no
|
|
91
|
+
// longer the moment it is checked — completeness is the buy gate's business
|
|
92
|
+
// — so without this the gap surfaces after a search, a quote and an
|
|
93
|
+
// approval. Naming the country rather than asking the server keeps it a
|
|
94
|
+
// hint: the API stays the authority on whether an address can ship.
|
|
95
|
+
process.stdout.write(" → US addresses need a state before buying: sangria settings update --state <state>\n");
|
|
105
96
|
}
|
|
106
|
-
throw new CliError("Provide --country to get started, --postal-code, or a complete address (--country --line1 --city --postal-code [--state]).", EXIT.usage);
|
|
107
97
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
98
|
+
// buildShippingUpdate forwards exactly the flags that were given. A flag that
|
|
99
|
+
// was not passed is absent from the payload and keeps its saved value; a flag
|
|
100
|
+
// passed empty is sent as empty, which clears it. The parser preserves that
|
|
101
|
+
// distinction (`--line2 ""` is not the same as omitting --line2), and the API
|
|
102
|
+
// is what decides which fields may be cleared, so there are no shape rules here
|
|
103
|
+
// to drift out of step with it.
|
|
104
|
+
function buildShippingUpdate(flags) {
|
|
105
|
+
const update = {
|
|
106
|
+
...(flags.line1 === undefined ? {} : { line1: flags.line1 }),
|
|
107
|
+
...(flags.line2 === undefined ? {} : { line2: flags.line2 }),
|
|
108
|
+
...(flags.city === undefined ? {} : { city: flags.city }),
|
|
109
|
+
...(flags.state === undefined ? {} : { state: flags.state }),
|
|
110
|
+
...(flags.postalCode === undefined ? {} : { postal_code: flags.postalCode }),
|
|
111
|
+
...(flags.country === undefined ? {} : { country: flags.country }),
|
|
112
|
+
};
|
|
113
|
+
if (Object.keys(update).length === 0) {
|
|
114
|
+
throw new CliError("Nothing to update. Pass any of --country --line1 --line2 --city --state --postal-code; only the ones you pass change.", EXIT.usage);
|
|
112
115
|
}
|
|
113
|
-
return
|
|
116
|
+
return update;
|
|
114
117
|
}
|
|
115
118
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/commands/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAa7C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,UAA8B,EAC9B,IAAc,EACd,KAAoB,EACpB,GAAmB;IAEnB,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACjE,IAAI,UAAU,KAAK,QAAQ;QAAE,OAAO,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC/D,IAAI,UAAU,KAAK,MAAM;QAAE,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,IAAI,QAAQ,CAAC,iDAAiD,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AACpF,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,KAAyB,EAAE,GAAmB;IACvE,MAAM,eAA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AAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC5D,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC5D,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;QACzD,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC5D,GAAG,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;QAC5E,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;KACnE,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,QAAQ,CAChB,uHAAuH,EACvH,IAAI,CAAC,KAAK,CACX,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/lib/help.js
CHANGED
|
@@ -13,9 +13,9 @@ Usage:
|
|
|
13
13
|
sangria balance [--json]
|
|
14
14
|
sangria settings show [--json]
|
|
15
15
|
sangria settings set-phone <phone> [--json]
|
|
16
|
-
sangria settings update --country <US|SG> [--postal-code <code>] [--json]
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
sangria settings update [--country <US|SG>] [--line1 <line1>] [--line2 <line2>] [--city <city>] [--state <state>] [--postal-code <code>] [--json]
|
|
17
|
+
Pass any subset: flags you send replace, flags you omit keep their saved value.
|
|
18
|
+
Pass an empty value to clear a field, e.g. --line2 "" to remove an apartment.
|
|
19
19
|
sangria discover <intent> --reasoning <text> [--context <json>] [--min-price <amount>] [--max-price <amount>] [--json]
|
|
20
20
|
sangria discover --url <product_url> [--context <json>] [--json]
|
|
21
21
|
sangria buy <discovery_id> <sku> [--json]
|