@withpica/mcp-server 2.95.3 → 2.96.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/CHANGELOG.md +72 -0
- package/README.intro.md +115 -0
- package/README.md +188 -204
- package/dist/lib/changelog.generated.d.ts +2 -2
- package/dist/lib/changelog.generated.d.ts.map +1 -1
- package/dist/lib/changelog.generated.js +2 -2
- package/dist/lib/changelog.generated.js.map +1 -1
- package/dist/prompts/creator-question-atlas.d.ts.map +1 -1
- package/dist/prompts/creator-question-atlas.js +11 -0
- package/dist/prompts/creator-question-atlas.js.map +1 -1
- package/dist/prompts/index.js +2 -2
- package/dist/resources/agent-guide.d.ts +50 -4
- package/dist/resources/agent-guide.d.ts.map +1 -1
- package/dist/resources/agent-guide.js +109 -18
- package/dist/resources/agent-guide.js.map +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +81 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/llms-primer.d.ts +1 -1
- package/dist/resources/llms-primer.d.ts.map +1 -1
- package/dist/resources/llms-primer.js +1 -1
- package/dist/resources/required-schemas.generated.d.ts +3 -12
- package/dist/resources/required-schemas.generated.d.ts.map +1 -1
- package/dist/resources/required-schemas.generated.js +3 -18
- package/dist/resources/required-schemas.generated.js.map +1 -1
- package/dist/resources/required-schemas.source.d.ts.map +1 -1
- package/dist/resources/required-schemas.source.js +13 -15
- package/dist/resources/required-schemas.source.js.map +1 -1
- package/dist/server-instructions.d.ts +2 -2
- package/dist/server-instructions.d.ts.map +1 -1
- package/dist/server-instructions.js +3 -3
- package/dist/skills/skills.generated.d.ts.map +1 -1
- package/dist/skills/skills.generated.js +18 -9
- package/dist/skills/skills.generated.js.map +1 -1
- package/dist/tools/agent-identity.d.ts.map +1 -1
- package/dist/tools/agent-identity.js +2 -1
- package/dist/tools/agent-identity.js.map +1 -1
- package/dist/tools/agreement-types.d.ts.map +1 -1
- package/dist/tools/agreement-types.js +23 -11
- package/dist/tools/agreement-types.js.map +1 -1
- package/dist/tools/agreements.d.ts.map +1 -1
- package/dist/tools/agreements.js +17 -9
- package/dist/tools/agreements.js.map +1 -1
- package/dist/tools/analytics.d.ts.map +1 -1
- package/dist/tools/analytics.js +6 -3
- package/dist/tools/analytics.js.map +1 -1
- package/dist/tools/assets.d.ts.map +1 -1
- package/dist/tools/assets.js +20 -13
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/audio-files.d.ts.map +1 -1
- package/dist/tools/audio-files.js +5 -3
- package/dist/tools/audio-files.js.map +1 -1
- package/dist/tools/bulk.d.ts.map +1 -1
- package/dist/tools/bulk.js +15 -9
- package/dist/tools/bulk.js.map +1 -1
- package/dist/tools/collaborators.d.ts.map +1 -1
- package/dist/tools/collaborators.js +41 -16
- package/dist/tools/collaborators.js.map +1 -1
- package/dist/tools/comparisons.d.ts.map +1 -1
- package/dist/tools/comparisons.js +2 -1
- package/dist/tools/comparisons.js.map +1 -1
- package/dist/tools/credits.d.ts +4 -3
- package/dist/tools/credits.d.ts.map +1 -1
- package/dist/tools/credits.js +16 -88
- package/dist/tools/credits.js.map +1 -1
- package/dist/tools/custody.d.ts.map +1 -1
- package/dist/tools/custody.js +43 -10
- package/dist/tools/custody.js.map +1 -1
- package/dist/tools/dashboard.d.ts.map +1 -1
- package/dist/tools/dashboard.js +24 -20
- package/dist/tools/dashboard.js.map +1 -1
- package/dist/tools/deprecations.d.ts +14 -7
- package/dist/tools/deprecations.d.ts.map +1 -1
- package/dist/tools/deprecations.js +24 -17
- package/dist/tools/deprecations.js.map +1 -1
- package/dist/tools/directory.d.ts.map +1 -1
- package/dist/tools/directory.js +7 -4
- package/dist/tools/directory.js.map +1 -1
- package/dist/tools/discovery.d.ts +120 -11
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +414 -38
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/disputes.d.ts.map +1 -1
- package/dist/tools/disputes.js +3 -0
- package/dist/tools/disputes.js.map +1 -1
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +9 -6
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +92 -14
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/error-envelope.d.ts +44 -0
- package/dist/tools/error-envelope.d.ts.map +1 -0
- package/dist/tools/error-envelope.js +17 -0
- package/dist/tools/error-envelope.js.map +1 -0
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/exports.js +24 -9
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/groups.d.ts.map +1 -1
- package/dist/tools/groups.js +1 -0
- package/dist/tools/groups.js.map +1 -1
- package/dist/tools/import-documents.d.ts.map +1 -1
- package/dist/tools/import-documents.js +3 -2
- package/dist/tools/import-documents.js.map +1 -1
- package/dist/tools/import.d.ts.map +1 -1
- package/dist/tools/import.js +71 -38
- package/dist/tools/import.js.map +1 -1
- package/dist/tools/index.d.ts +71 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +160 -41
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/licensing.d.ts.map +1 -1
- package/dist/tools/licensing.js +6 -2
- package/dist/tools/licensing.js.map +1 -1
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +8 -4
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/metadata.d.ts +7 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +61 -12
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/multimedia.d.ts.map +1 -1
- package/dist/tools/multimedia.js +7 -3
- package/dist/tools/multimedia.js.map +1 -1
- package/dist/tools/notes.d.ts.map +1 -1
- package/dist/tools/notes.js +9 -6
- package/dist/tools/notes.js.map +1 -1
- package/dist/tools/notifications.d.ts.map +1 -1
- package/dist/tools/notifications.js +16 -27
- package/dist/tools/notifications.js.map +1 -1
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +8 -5
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +16 -12
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/recording-custody.d.ts.map +1 -1
- package/dist/tools/recording-custody.js +9 -5
- package/dist/tools/recording-custody.js.map +1 -1
- package/dist/tools/recording-samples.d.ts.map +1 -1
- package/dist/tools/recording-samples.js +25 -6
- package/dist/tools/recording-samples.js.map +1 -1
- package/dist/tools/recordings.d.ts +10 -0
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +32 -19
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +58 -18
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/release-rich.js +5 -5
- package/dist/tools/release-rich.js.map +1 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +21 -12
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/royalties.d.ts.map +1 -1
- package/dist/tools/royalties.js +12 -6
- package/dist/tools/royalties.js.map +1 -1
- package/dist/tools/send.d.ts.map +1 -1
- package/dist/tools/send.js +7 -4
- package/dist/tools/send.js.map +1 -1
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +8 -4
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +13 -6
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/share-links.d.ts.map +1 -1
- package/dist/tools/share-links.js +7 -3
- package/dist/tools/share-links.js.map +1 -1
- package/dist/tools/share-send.d.ts.map +1 -1
- package/dist/tools/share-send.js +15 -5
- package/dist/tools/share-send.js.map +1 -1
- package/dist/tools/shows.d.ts +31 -0
- package/dist/tools/shows.d.ts.map +1 -0
- package/dist/tools/shows.js +307 -0
- package/dist/tools/shows.js.map +1 -0
- package/dist/tools/skills.d.ts.map +1 -1
- package/dist/tools/skills.js +7 -0
- package/dist/tools/skills.js.map +1 -1
- package/dist/tools/split-sheets.d.ts.map +1 -1
- package/dist/tools/split-sheets.js +19 -12
- package/dist/tools/split-sheets.js.map +1 -1
- package/dist/tools/statements.js +2 -2
- package/dist/tools/statements.js.map +1 -1
- package/dist/tools/storage-config.d.ts.map +1 -1
- package/dist/tools/storage-config.js +5 -3
- package/dist/tools/storage-config.js.map +1 -1
- package/dist/tools/subscription.d.ts +162 -26
- package/dist/tools/subscription.d.ts.map +1 -1
- package/dist/tools/subscription.js +479 -241
- package/dist/tools/subscription.js.map +1 -1
- package/dist/tools/sync-placements.d.ts.map +1 -1
- package/dist/tools/sync-placements.js +10 -5
- package/dist/tools/sync-placements.js.map +1 -1
- package/dist/tools/telegram.d.ts.map +1 -1
- package/dist/tools/telegram.js +16 -24
- package/dist/tools/telegram.js.map +1 -1
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +12 -6
- package/dist/tools/users.js.map +1 -1
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +13 -10
- package/dist/tools/works.js.map +1 -1
- package/package.json +8 -4
- package/server.json +2 -2
- package/.claude/settings.local.json +0 -5
|
@@ -1,41 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Subscription + billing tools — ADR-210 Phase 2, extended by the MPP pay
|
|
3
|
+
* rail (spec 2026-08-24 WS-B).
|
|
4
|
+
*
|
|
5
|
+
* Three MCP tools that surface the explicit billing read + action layer
|
|
6
|
+
* complementing the ambient `_meta.session_state.billing_slice` shipped
|
|
7
|
+
* in Phase 1:
|
|
8
|
+
*
|
|
9
|
+
* - pica_subscription_status (read; readOnlyHint=true)
|
|
10
|
+
* Wraps `GET /api/admin/subscription` and flattens it into the card
|
|
11
|
+
* below (`SubscriptionStatusFlat`), composing a templated `summary`
|
|
12
|
+
* line the agent uses verbatim. It is no longer the 9 fields ADR-210
|
|
13
|
+
* § Phase 2 specified: two trial fields came off on 2026-08-21, and
|
|
14
|
+
* WS-B added `pricing` + `held`, each present only when the route
|
|
15
|
+
* measured it. Read the interface, not a count.
|
|
16
|
+
*
|
|
17
|
+
* - pica_subscription_manage (action; readOnlyHint=false)
|
|
18
|
+
* Single-verb dispatcher over the existing
|
|
19
|
+
* `POST /api/admin/subscription` (subscribe / upgrade) and
|
|
20
|
+
* `POST /api/admin/subscription/portal` (manage / cancel) routes.
|
|
21
|
+
* Returns a `resource_link` content block (universal MCP floor)
|
|
22
|
+
* and uses `elicitation/create url` only when the client
|
|
23
|
+
* advertises `capabilities.elicitation.url` per ADR-200 Phase 1
|
|
24
|
+
* (capability-gated; `feedback_mcp_sdk_capability_gates_elicitation.md`).
|
|
25
|
+
*
|
|
26
|
+
* - pica_billing_pay (read; readOnlyHint=true)
|
|
27
|
+
* Wraps `POST /api/admin/billing/pay-link`. Mints a link for one
|
|
28
|
+
* offer — resident_month / unlock / settle — and never charges: an
|
|
29
|
+
* agent POSTs the link with a Machine Payments credential, or a
|
|
30
|
+
* person opens it and pays by card. The refusals the ROUTE itself
|
|
31
|
+
* composes — billing disabled, nothing held, offer moved — come back
|
|
32
|
+
* as structured results rather than thrown ApiErrors. A 4xx from the
|
|
33
|
+
* auth wrapper in front of it is quoted, never re-interpreted; a 4xx
|
|
34
|
+
* carrying nothing quotable, and everything from 500 up, is re-thrown
|
|
35
|
+
* (`payRefusal` below is the single place that decides which).
|
|
36
|
+
*
|
|
37
|
+
* No new Stripe SDK calls — every route here is reused as-is.
|
|
38
|
+
*/
|
|
39
|
+
import { ApiError, PicaClient, type BillingTier, type HeldSummary, type PayOffer, type PricingSummary, type SubscriptionStatusResponse } from "@withpica/mcp-sdk";
|
|
40
|
+
import { ToolDefinition, ToolExecutor, ToolResult } from "./index.js";
|
|
41
|
+
/**
|
|
42
|
+
* ⚠️ ADR-276 REMOVED THE TRIAL AND THE TIER LADDER. This tool described both to
|
|
43
|
+
* agents until 2026-08-21.
|
|
44
|
+
*
|
|
45
|
+
* `billing_state` is the STORED value and keeps its three legacy names because
|
|
46
|
+
* that is what `organisations.billing_state` holds — renaming it here would make
|
|
47
|
+
* the wire disagree with the database. `plan` is the same fact in the vocabulary
|
|
48
|
+
* that is actually true, and it is what an agent should say out loud:
|
|
49
|
+
*
|
|
50
|
+
* billing_state plan what it means under ADR-276
|
|
51
|
+
* ────────────── ─────────────── ──────────────────────────────────────────
|
|
52
|
+
* trial free_runway walked in, never charged. no clock, no card.
|
|
53
|
+
* active resident paying one flat fee per 30-day cycle
|
|
54
|
+
* hibernated paused a cycle lapsed; deep-processing is off
|
|
55
|
+
*
|
|
56
|
+
* `trial_days_remaining` and `trial_ends_at` are GONE. They were null for 100%
|
|
57
|
+
* of production organisations (`billing_trial_ends_at` is NULL on all 241), so
|
|
58
|
+
* removing them drops two fields that could only ever say "null" — the cheapest
|
|
59
|
+
* possible moment to take a concept off the wire. Codes for arguments, labels
|
|
60
|
+
* for prose (`.claude/rules/canonical-model.md`).
|
|
61
|
+
*/
|
|
3
62
|
interface SubscriptionStatusFlat {
|
|
4
63
|
billing_state: "trial" | "active" | "hibernated";
|
|
5
|
-
|
|
6
|
-
trial_ends_at: string | null;
|
|
64
|
+
plan: "free_runway" | "resident" | "paused";
|
|
7
65
|
current_tier: BillingTier | null;
|
|
8
66
|
capacity_used: number;
|
|
9
67
|
capacity_limit: number | null;
|
|
10
68
|
capacity_pct: number;
|
|
11
69
|
recommended_tier: BillingTier | null;
|
|
12
70
|
summary: string;
|
|
71
|
+
/**
|
|
72
|
+
* The org's price card and what is being withheld. Both are OMITTED rather
|
|
73
|
+
* than set to null when the route has none — `null` on a flat card reads to
|
|
74
|
+
* an agent as "pica measured this and the answer is nothing", which for a
|
|
75
|
+
* price would mean free. Absence says "pica did not answer", which is true.
|
|
76
|
+
*/
|
|
77
|
+
pricing?: PricingSummary;
|
|
78
|
+
held?: HeldSummary;
|
|
13
79
|
}
|
|
80
|
+
/** The stored billing state in the vocabulary ADR-276 actually uses. */
|
|
81
|
+
export declare function planFor(billingState: "trial" | "active" | "hibernated"): "free_runway" | "resident" | "paused";
|
|
14
82
|
/**
|
|
15
|
-
* Compose
|
|
16
|
-
*
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
83
|
+
* Compose `SubscriptionStatusFlat` from the GET admin route's shape: eight
|
|
84
|
+
* fields that are always present (`billing_state`, `plan`, `current_tier`,
|
|
85
|
+
* `capacity_used`, `capacity_limit`, `capacity_pct`, `recommended_tier`,
|
|
86
|
+
* `summary`) plus `pricing` and `held`, each emitted ONLY when the route
|
|
87
|
+
* measured it.
|
|
88
|
+
*
|
|
89
|
+
* ⚠️ This opened by quoting a FIELD COUNT until 2026-08-26, and that count had
|
|
90
|
+
* been wrong since 08-21 — `trial_days_remaining` and `trial_ends_at` came off
|
|
91
|
+
* then, and WS-B added the two optional keys. A count is the one thing a
|
|
92
|
+
* docstring cannot keep true across a field change, and it rots silently
|
|
93
|
+
* because nothing compiles against it. Do not reintroduce one: name the fields
|
|
94
|
+
* (above) or point at the interface, which the compiler keeps honest.
|
|
95
|
+
*
|
|
96
|
+
* Mirrors `getOrgBillingSlice`'s "no meaningful cap" rule for `capacity_pct`
|
|
97
|
+
* (0 whenever current_tier is null OR enterprise) and carries through
|
|
98
|
+
* `overflow.recommendedTier` (already `inferTierFromCount`-derived) per
|
|
99
|
+
* Stage 1 Q2.
|
|
20
100
|
*
|
|
21
101
|
* Exported for unit tests.
|
|
22
102
|
*/
|
|
23
103
|
export declare function flattenStatus(status: SubscriptionStatusResponse): SubscriptionStatusFlat;
|
|
24
104
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
105
|
+
* The price half of the summary, built ENTIRELY from the figures the route
|
|
106
|
+
* sent. No amount of money appears here on purpose: the money is worded once,
|
|
107
|
+
* by the pay-link route's offer labels (`formatMoney` over the org's own
|
|
108
|
+
* currency, whose minor-unit conventions differ from ICU's for four of the
|
|
109
|
+
* ten supported currencies). A second wording here would be a second home for
|
|
110
|
+
* the price — the defect FIX_LOG 2026-08-20 records as having had ten.
|
|
111
|
+
*
|
|
112
|
+
* Returns `null` when there is nothing measured to say, so the caller appends
|
|
113
|
+
* nothing rather than a sentence about absence.
|
|
114
|
+
*
|
|
115
|
+
* Exported for unit tests.
|
|
116
|
+
*/
|
|
117
|
+
export declare function composePriceLine(pricing?: PricingSummary, held?: HeldSummary): string | null;
|
|
118
|
+
/**
|
|
119
|
+
* The sentence an agent says out loud. Server-side template (Stage 1 Q1 option
|
|
120
|
+
* A) so wording does not vary across connectors.
|
|
121
|
+
*
|
|
122
|
+
* ⚠️ REWRITTEN 2026-08-21. Every branch was false under ADR-276:
|
|
123
|
+
*
|
|
124
|
+
* trial → "You're on a 9-day window of your trial. Today's catalogue
|
|
125
|
+
* fits the solo tier." — there is no trial and no tier ladder
|
|
126
|
+
* hibernated → "Your trial has ended and the catalogue is read-only.
|
|
127
|
+
* Subscribe to restore writes."
|
|
128
|
+
* — hibernation gates `pica_audio_analyze` and nothing else;
|
|
129
|
+
* the catalogue is NOT read-only, and there is nothing to
|
|
130
|
+
* subscribe to
|
|
131
|
+
* active → "Currently on pro. 412 of 4,000 slots used."
|
|
132
|
+
* — the capacity ladder was superseded
|
|
133
|
+
*
|
|
134
|
+
* 239 of 241 production organisations sit at `billing_state = 'trial'`, so the
|
|
135
|
+
* first branch was what an agent said to almost every user pica has. The screen
|
|
136
|
+
* had already been corrected; this had not, which is the recurring shape here —
|
|
137
|
+
* see `.claude/rules/canonical-model.md` on `WORK_NO_WRITER`.
|
|
138
|
+
*
|
|
139
|
+
* Capacity is deliberately not mentioned: no cap is enforced under ADR-276, and
|
|
140
|
+
* quoting a limit implies one. The work count is stated as a plain fact instead.
|
|
28
141
|
*
|
|
29
142
|
* Exported for unit tests.
|
|
30
143
|
*/
|
|
31
144
|
export declare function composeSummary(fields: {
|
|
32
145
|
billing_state: "trial" | "active" | "hibernated";
|
|
33
|
-
trial_days_remaining: number | null;
|
|
34
|
-
current_tier: BillingTier | null;
|
|
35
146
|
capacity_used: number;
|
|
36
|
-
|
|
37
|
-
|
|
147
|
+
/** WS-B — appended as one further sentence when the route measured them. */
|
|
148
|
+
pricing?: PricingSummary;
|
|
149
|
+
held?: HeldSummary;
|
|
38
150
|
}): string;
|
|
151
|
+
/**
|
|
152
|
+
* Turn a pay-link 4xx into the structured refusal an agent can act on, or
|
|
153
|
+
* `null` when the caller must keep propagating it — 5xx, timeouts, network
|
|
154
|
+
* failures, and any 403 whose body carries no message worth quoting.
|
|
155
|
+
*
|
|
156
|
+
* The 403 branch is the delicate one: exactly one 403 on this path is about
|
|
157
|
+
* money, and the rest are about access. See its comment.
|
|
158
|
+
*
|
|
159
|
+
* Exported for unit tests.
|
|
160
|
+
*/
|
|
161
|
+
export declare function payRefusal(err: unknown, offer: PayOffer, entityId?: string): ToolResult | null;
|
|
162
|
+
/**
|
|
163
|
+
* Pull the route's JSON body back out of an `ApiError`. The SDK folds the
|
|
164
|
+
* response text into the message (`"API request failed: 400 <body>"`, and
|
|
165
|
+
* `"Authentication failed: 403 <body>"` on the auth path) rather than
|
|
166
|
+
* carrying a structured body — the same extraction `duplicates.ts` and
|
|
167
|
+
* `integrity.ts` do. Returns `{}` when the body is absent or not JSON, so
|
|
168
|
+
* every caller reads a `code` of `undefined` rather than throwing twice.
|
|
169
|
+
*
|
|
170
|
+
* Exported for unit tests.
|
|
171
|
+
*/
|
|
172
|
+
export declare function parsePayErrorBody(err: ApiError): Record<string, unknown>;
|
|
39
173
|
export declare class SubscriptionTools {
|
|
40
174
|
private pica;
|
|
41
175
|
constructor(pica: PicaClient);
|
|
@@ -43,18 +177,20 @@ export declare class SubscriptionTools {
|
|
|
43
177
|
definition: ToolDefinition;
|
|
44
178
|
executor: ToolExecutor;
|
|
45
179
|
}>;
|
|
46
|
-
private status;
|
|
47
|
-
private manage;
|
|
48
180
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
181
|
+
* `pica_billing_pay` — hand the caller a link, and never a charge.
|
|
182
|
+
*
|
|
183
|
+
* The refusals the ROUTE composes (the flag is off; nothing is held on that
|
|
184
|
+
* work; that offer no longer applies) become structured results rather than
|
|
185
|
+
* thrown ApiErrors — a throw reaches the agent as UNKNOWN_ERROR, which
|
|
186
|
+
* reads as "pica is broken" when the honest answer is "there is nothing to
|
|
187
|
+
* pay for". `payRefusal` decides; everything it declines (5xx, timeouts,
|
|
188
|
+
* network failures, and a 403 with nothing quotable in it) is re-thrown
|
|
189
|
+
* unchanged, because an outage dressed as a tidy refusal is the worse lie.
|
|
56
190
|
*/
|
|
57
|
-
private
|
|
191
|
+
private pay;
|
|
192
|
+
private status;
|
|
193
|
+
private manage;
|
|
58
194
|
}
|
|
59
195
|
export {};
|
|
60
196
|
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/tools/subscription.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/tools/subscription.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAGhB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAChC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA+DtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,UAAU,sBAAsB;IAC9B,aAAa,EAAE,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC;IACjD,IAAI,EAAE,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC5C,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,WAAW,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,wEAAwE;AACxE,wBAAgB,OAAO,CACrB,YAAY,EAAE,OAAO,GAAG,QAAQ,GAAG,YAAY,GAC9C,aAAa,GAAG,UAAU,GAAG,QAAQ,CAIvC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,0BAA0B,GACjC,sBAAsB,CAyCxB;AAOD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,CAAC,EAAE,cAAc,EACxB,IAAI,CAAC,EAAE,WAAW,GACjB,MAAM,GAAG,IAAI,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,aAAa,EAAE,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC;IACjD,aAAa,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,GAAG,MAAM,CA0BT;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,QAAQ,EACf,QAAQ,CAAC,EAAE,MAAM,GAChB,UAAU,GAAG,IAAI,CAiHnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAcxE;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IAqJzE;;;;;;;;;;OAUG;YACW,GAAG;YAwDH,MAAM;YAkCN,MAAM;CAoErB"}
|