deepline 0.3.466 → 0.3.467
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/dist/bundling-sources/sdk/src/client-core.ts +41 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +325 -44
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +51 -6
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +37 -1
- package/dist/cli/{auth-HYIPYSKK.mjs → auth-7H62VDZD.mjs} +5 -5
- package/dist/cli/auth-EXW5E3DI.js +41 -0
- package/dist/cli/{billing-5S6SGBUP.mjs → billing-6TM3ZXDR.mjs} +44 -6
- package/dist/cli/{billing-NG62QGPT.js → billing-N5BNGGYN.js} +115 -77
- package/dist/cli/{chunk-7YDN6AEK.mjs → chunk-3RGWTKK3.mjs} +10 -0
- package/dist/cli/{chunk-A7MWUG5H.js → chunk-3ZGSR6X7.js} +1 -1
- package/dist/cli/{chunk-7IWYO475.js → chunk-42AW4SQR.js} +21 -21
- package/dist/cli/{chunk-7QITO7XO.mjs → chunk-4LTQYDZG.mjs} +4 -4
- package/dist/cli/{chunk-SQFBLBYC.mjs → chunk-5RXKAXFD.mjs} +2 -2
- package/dist/cli/{chunk-WKOWXTDR.mjs → chunk-6UZ4MRWN.mjs} +2 -2
- package/dist/cli/{chunk-RGRSUMN6.js → chunk-7Y53LJLE.js} +5 -5
- package/dist/cli/{chunk-B7BNWOG6.js → chunk-7ZZWOJTM.js} +3 -3
- package/dist/cli/{chunk-EOKUL6XS.js → chunk-AD5BZUAP.js} +5 -5
- package/dist/cli/{chunk-YHPUJI7G.mjs → chunk-AU4BWQTT.mjs} +5 -5
- package/dist/cli/{chunk-IEQPOBTK.mjs → chunk-AUVEQ3JX.mjs} +1 -1
- package/dist/cli/{chunk-QWMXP2IP.mjs → chunk-C4GBOGTW.mjs} +2 -2
- package/dist/cli/{chunk-3DVJ2IPG.js → chunk-C6EGT3LO.js} +183 -173
- package/dist/cli/{chunk-W4XWGNW4.mjs → chunk-CER3XHT3.mjs} +3 -3
- package/dist/cli/{chunk-VSEKVRAP.mjs → chunk-DCDTCG2D.mjs} +2 -2
- package/dist/cli/{chunk-R2SQN2CD.js → chunk-FFOAOQ77.js} +6 -6
- package/dist/cli/{chunk-6R36QIG4.mjs → chunk-FP3DH46P.mjs} +4 -4
- package/dist/cli/{chunk-RCMT6AZ5.mjs → chunk-FQIGRZ52.mjs} +1 -1
- package/dist/cli/{chunk-4QJ63YHC.js → chunk-FRY76AFK.js} +8 -8
- package/dist/cli/{chunk-VVCMP45C.js → chunk-FS55YDCW.js} +3 -3
- package/dist/cli/{chunk-HOFXQYRF.js → chunk-FVA6XLRA.js} +7 -7
- package/dist/cli/{chunk-OGCAGZXO.mjs → chunk-FVYAEBGO.mjs} +23 -2
- package/dist/cli/{chunk-RSXOGXGX.mjs → chunk-G35HNL6P.mjs} +1 -1
- package/dist/cli/{chunk-MTH7WIE3.js → chunk-H3QDLCRT.js} +53 -53
- package/dist/cli/{chunk-HIMV32ZX.js → chunk-HNP5V5BN.js} +23 -2
- package/dist/cli/{chunk-UHAKSLL2.mjs → chunk-HTXQUA3V.mjs} +11 -1
- package/dist/cli/{chunk-QTTYIPFY.mjs → chunk-I3LWDZRN.mjs} +1 -1
- package/dist/cli/{chunk-22BKA2QL.js → chunk-KMYCHMZF.js} +26 -26
- package/dist/cli/{chunk-F6H74EFB.mjs → chunk-KUCUHRLC.mjs} +2 -2
- package/dist/cli/{chunk-LDEJ4NUP.js → chunk-LAMHSZ74.js} +13 -13
- package/dist/cli/{chunk-CMXFOZVG.js → chunk-LKVOV7PX.js} +258 -258
- package/dist/cli/{chunk-OB5NON4G.js → chunk-MGUQGKHE.js} +8 -8
- package/dist/cli/{chunk-JLE5UYZV.mjs → chunk-MRBDFPJ7.mjs} +2 -2
- package/dist/cli/{chunk-JLZKF7EY.js → chunk-NPZBE64X.js} +11 -1
- package/dist/cli/{chunk-NJ6KQLMO.mjs → chunk-NU64F53H.mjs} +11 -11
- package/dist/cli/{chunk-V27TVT7P.mjs → chunk-OSKGEBE7.mjs} +1 -1
- package/dist/cli/{chunk-H5MYPDO2.mjs → chunk-R5ZJICJA.mjs} +1 -1
- package/dist/cli/{chunk-6CYRIFZ3.mjs → chunk-RH6DVPGW.mjs} +2 -2
- package/dist/cli/{chunk-NQH7E3F2.js → chunk-SHGBHP6J.js} +3 -3
- package/dist/cli/{chunk-5EUJKY3G.mjs → chunk-SYLR33PS.mjs} +3 -3
- package/dist/cli/{chunk-L3U44YVO.js → chunk-T5GRG37B.js} +5 -5
- package/dist/cli/{chunk-FWHRCZET.mjs → chunk-TNAXVJEG.mjs} +5 -5
- package/dist/cli/{chunk-6P4OYABU.js → chunk-V6OMS7E2.js} +6 -6
- package/dist/cli/{chunk-QMHBWFU5.mjs → chunk-VGWH3BFC.mjs} +1 -1
- package/dist/cli/{chunk-5BEKJUOK.js → chunk-VOPKDTJT.js} +2 -2
- package/dist/cli/{chunk-ZBWKWMSH.js → chunk-WBYC7AYC.js} +16 -16
- package/dist/cli/{chunk-RRCVAVM7.js → chunk-WGMNXDRZ.js} +2 -2
- package/dist/cli/{chunk-46YQQOTC.mjs → chunk-WISHPL5Q.mjs} +5 -5
- package/dist/cli/{chunk-QZKSG7XZ.js → chunk-WS2BY2ST.js} +36 -36
- package/dist/cli/{chunk-PEUWKPY4.js → chunk-WTVTCSPY.js} +4 -4
- package/dist/cli/{chunk-MUQAKLBP.mjs → chunk-X3RAGNNZ.mjs} +1 -1
- package/dist/cli/{chunk-I2TCWIW2.mjs → chunk-XSX6TJUA.mjs} +1 -1
- package/dist/cli/{chunk-NYNNNOJW.js → chunk-YIJS7ET7.js} +51 -51
- package/dist/cli/{chunk-SWUSDFG2.js → chunk-ZTA4JIAB.js} +9 -9
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ZGZX2IIP.mjs → csv-435JAJ45.mjs} +4 -4
- package/dist/cli/{csv-AD2DLLLL.js → csv-BPZ4VLR6.js} +13 -13
- package/dist/cli/{db-NBY4LHAY.js → db-EBR2UQK3.js} +27 -27
- package/dist/cli/{db-LUFEKPEK.mjs → db-IEUTNOOC.mjs} +6 -6
- package/dist/cli/describe-EPT52IUE.js +48 -0
- package/dist/cli/{describe-MLXMC47U.mjs → describe-GM233O75.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-HDJMKNBR.js → executions-5SWPQTLB.js} +8 -8
- package/dist/cli/{executions-JKVWM3P4.mjs → executions-LDPBVSKZ.mjs} +6 -6
- package/dist/cli/{feedback-7E5Z4ZO5.mjs → feedback-JB7BBF64.mjs} +4 -4
- package/dist/cli/{feedback-VXMP7HDF.js → feedback-YFW5KT36.js} +8 -8
- package/dist/cli/git-7L7LKOKW.js +25 -0
- package/dist/cli/{git-UFMRAGMY.mjs → git-MCGUPO2W.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-BDULCVGD.mjs → legacy-noops-EHNXHQL7.mjs} +5 -5
- package/dist/cli/{legacy-noops-4QKREY4K.js → legacy-noops-LMGSIBWM.js} +8 -8
- package/dist/cli/{monitors-S6TDJYCK.mjs → monitors-355EWLGN.mjs} +7 -7
- package/dist/cli/{monitors-LNNSTELC.js → monitors-VRQ32EAA.js} +91 -91
- package/dist/cli/{org-EEEMWKQ2.mjs → org-MJ6XMAI4.mjs} +51 -10
- package/dist/cli/{org-OWM3IGOK.js → org-W3YZN65W.js} +113 -72
- package/dist/cli/{pages-ZYYMQUDX.mjs → pages-62QNUXV2.mjs} +6 -6
- package/dist/cli/{pages-7JF6AKDI.js → pages-JPK6UVMV.js} +17 -17
- package/dist/cli/{play-5Z3E7KL6.mjs → play-CKBPES6Q.mjs} +18 -18
- package/dist/cli/{play-WLAFXAHR.js → play-WPPJQBBS.js} +305 -305
- package/dist/cli/{providers-TTDFQQU2.js → providers-DH5JJ5HN.js} +9 -9
- package/dist/cli/{providers-JUT7IYD3.mjs → providers-LLPKHVXL.mjs} +6 -6
- package/dist/cli/{quickstart-P4TL4NWJ.mjs → quickstart-K5HVPO2L.mjs} +4 -4
- package/dist/cli/{quickstart-OZYEGICI.js → quickstart-NNEF37EG.js} +6 -6
- package/dist/cli/{run-BYGE4LUB.js → run-N2KY2VNQ.js} +40 -40
- package/dist/cli/{run-CM6OZUBR.mjs → run-SKIZFJ5O.mjs} +25 -25
- package/dist/cli/{search-RZRJ73YL.mjs → search-2WXJ3GID.mjs} +7 -7
- package/dist/cli/search-HO7ARG3H.js +32 -0
- package/dist/cli/{secrets-XLTN3SCL.js → secrets-5YVX7LK7.js} +15 -15
- package/dist/cli/{secrets-DHI6ZMKE.mjs → secrets-6GEQ75OU.mjs} +6 -6
- package/dist/cli/{sessions-MZD5WZBT.mjs → sessions-GOPZ3YRN.mjs} +5 -5
- package/dist/cli/{sessions-6NCQQXVK.js → sessions-H3QES7C2.js} +6 -6
- package/dist/cli/{settings-JJH72W5V.js → settings-62SU5ROV.js} +78 -78
- package/dist/cli/{settings-S6GQ4XFZ.mjs → settings-IP47HYC6.mjs} +11 -11
- package/dist/cli/{setup-ZJ4G54XN.mjs → setup-LCKXUSW5.mjs} +9 -9
- package/dist/cli/{setup-3BIOG6N2.js → setup-YCCU7TU4.js} +44 -44
- package/dist/cli/{skills-FBH4REPB.mjs → skills-3QAQI6X7.mjs} +7 -7
- package/dist/cli/skills-UVAIKQNC.js +31 -0
- package/dist/cli/{tools-J6YGZTD5.mjs → tools-HKD4G6HA.mjs} +18 -18
- package/dist/cli/tools-KAIUUBTD.js +55 -0
- package/dist/cli/{update-6CSRALIQ.mjs → update-2VYSBSDD.mjs} +9 -9
- package/dist/cli/update-Q3AMECAG.js +33 -0
- package/dist/cli/{workflow-3ATSB7HQ.mjs → workflow-EFRGY6JD.mjs} +7 -7
- package/dist/cli/{workflow-2ETKYSJV.js → workflow-MMWGUSGY.js} +17 -17
- package/dist/{client-BClp2yrq.d.ts → client-BOEAXwJj.d.ts} +1 -1
- package/dist/{client-ADFHNtFM.d.mts → client-DL0koOaP.d.mts} +1 -1
- package/dist/{client-core-BFU73Ttw.d.ts → client-core-BX_8khUY.d.ts} +23 -1
- package/dist/{client-core-DWLmmJWo.d.mts → client-core-CowyuxKu.d.mts} +23 -1
- package/dist/{compiler-manifest-Cs17yO-H.d.ts → compiler-manifest-D5dARg3M.d.mts} +64 -10
- package/dist/{compiler-manifest-Cs17yO-H.d.mts → compiler-manifest-D5dARg3M.d.ts} +64 -10
- package/dist/{errors-Dee-QpVS.d.ts → errors-BtHHzWL8.d.ts} +1 -1
- package/dist/{errors-qNfvQuRB.d.mts → errors-BveMVPwA.d.mts} +1 -1
- package/dist/{index-BTqNNXmC.d.mts → index-BboApDGD.d.mts} +1 -1
- package/dist/{index-DXTh1Lxe.d.ts → index-C6sovoYP.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +277 -76
- package/dist/index.mjs +239 -38
- package/dist/install-integrity.json +114 -114
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-Y3UTWD3W.js +0 -41
- package/dist/cli/describe-Z66CQESH.js +0 -48
- package/dist/cli/git-NNSJKW3V.js +0 -25
- package/dist/cli/search-RIG4LTCS.js +0 -32
- package/dist/cli/skills-ODISCL7S.js +0 -31
- package/dist/cli/tools-IHBHDI4P.js +0 -55
- package/dist/cli/update-5O3HDR5O.js +0 -33
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkAD5BZUAPjs = require('./chunk-AD5BZUAP.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkC6EGT3LOjs = require('./chunk-C6EGT3LO.js');
|
|
8
8
|
require('./chunk-E4CABWXL.js');
|
|
9
9
|
require('./chunk-JKVRBCZL.js');
|
|
10
10
|
require('./chunk-NMU3VR5U.js');
|
|
@@ -15,9 +15,9 @@ require('./chunk-XDVT3GOM.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-
|
|
20
|
-
require('./chunk-
|
|
18
|
+
var _chunkFVA6XLRAjs = require('./chunk-FVA6XLRA.js');
|
|
19
|
+
require('./chunk-SHGBHP6J.js');
|
|
20
|
+
require('./chunk-WTVTCSPY.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
29
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-3ZGSR6X7.js');
|
|
30
30
|
require('./chunk-OG64RBAC.js');
|
|
31
31
|
require('./chunk-COGTRVWW.js');
|
|
32
32
|
|
|
@@ -75,7 +75,7 @@ function reportBillingFailure(failure, options) {
|
|
|
75
75
|
if (failure.next) {
|
|
76
76
|
textLines.push(`Next: ${failure.next}`);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
79
79
|
{
|
|
80
80
|
ok: false,
|
|
81
81
|
exitCode: failure.exitCode,
|
|
@@ -96,7 +96,7 @@ function parseTopUpCredits(raw) {
|
|
|
96
96
|
return parsed;
|
|
97
97
|
}
|
|
98
98
|
function topUpIdempotencyKey(raw) {
|
|
99
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
99
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkC6EGT3LOjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
100
100
|
}
|
|
101
101
|
function targetBillingIdempotencyKey(raw) {
|
|
102
102
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -315,7 +315,7 @@ function defaultLedgerExportPath() {
|
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
317
|
async function handleBalance(options) {
|
|
318
|
-
const { http } =
|
|
318
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
"/api/v2/billing/balance"
|
|
321
321
|
);
|
|
@@ -399,7 +399,7 @@ async function handleBalance(options) {
|
|
|
399
399
|
...options.verbose ? detail : [],
|
|
400
400
|
...lines.slice(1)
|
|
401
401
|
];
|
|
402
|
-
|
|
402
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
403
403
|
{
|
|
404
404
|
...payload,
|
|
405
405
|
...recovery ? { recovery } : {},
|
|
@@ -435,7 +435,7 @@ async function handleUsageEvents(options) {
|
|
|
435
435
|
);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
|
-
const client = new (0,
|
|
438
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
439
439
|
let payload;
|
|
440
440
|
try {
|
|
441
441
|
payload = await client.billing.usageEvents({
|
|
@@ -466,7 +466,7 @@ async function handleUsageEvents(options) {
|
|
|
466
466
|
),
|
|
467
467
|
...nextPage ? [`Next page: ${nextPage}`] : []
|
|
468
468
|
];
|
|
469
|
-
|
|
469
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
470
470
|
{
|
|
471
471
|
...payload,
|
|
472
472
|
next: { page: nextPage },
|
|
@@ -477,7 +477,7 @@ async function handleUsageEvents(options) {
|
|
|
477
477
|
}
|
|
478
478
|
async function handleUsage(options) {
|
|
479
479
|
if (options.events) return handleUsageEvents(options);
|
|
480
|
-
const { http } =
|
|
480
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
481
481
|
const params = new URLSearchParams();
|
|
482
482
|
if (options.requestId !== void 0) {
|
|
483
483
|
const requestId = options.requestId.trim();
|
|
@@ -558,7 +558,7 @@ async function handleUsage(options) {
|
|
|
558
558
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
559
559
|
] : []
|
|
560
560
|
];
|
|
561
|
-
|
|
561
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
562
562
|
{
|
|
563
563
|
...payload,
|
|
564
564
|
recent: {
|
|
@@ -572,7 +572,7 @@ async function handleUsage(options) {
|
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
574
|
async function handleLimit(options) {
|
|
575
|
-
const { http } =
|
|
575
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
576
576
|
const payload = await http.get(
|
|
577
577
|
"/api/v2/billing/limit"
|
|
578
578
|
);
|
|
@@ -580,7 +580,7 @@ async function handleLimit(options) {
|
|
|
580
580
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
581
581
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
582
582
|
] : ["Monthly usage cap: off"];
|
|
583
|
-
|
|
583
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
584
584
|
{
|
|
585
585
|
...payload,
|
|
586
586
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -589,12 +589,12 @@ async function handleLimit(options) {
|
|
|
589
589
|
);
|
|
590
590
|
}
|
|
591
591
|
async function handleSetLimit(credits, options) {
|
|
592
|
-
const { http } =
|
|
592
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
593
593
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
594
594
|
method: "PUT",
|
|
595
595
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
596
596
|
});
|
|
597
|
-
|
|
597
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
598
598
|
{
|
|
599
599
|
...payload,
|
|
600
600
|
render: {
|
|
@@ -610,11 +610,11 @@ async function handleSetLimit(credits, options) {
|
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
612
|
async function handleLimitOff(options) {
|
|
613
|
-
const { http } =
|
|
613
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
614
614
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
615
615
|
method: "DELETE"
|
|
616
616
|
});
|
|
617
|
-
|
|
617
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
618
618
|
{
|
|
619
619
|
...payload,
|
|
620
620
|
render: {
|
|
@@ -634,7 +634,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
634
634
|
let initialized = false;
|
|
635
635
|
let pageNumber = 0;
|
|
636
636
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
637
|
-
for await (const entries of
|
|
637
|
+
for await (const entries of _chunkC6EGT3LOjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
638
638
|
pageNumber += 1;
|
|
639
639
|
console.error(
|
|
640
640
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -673,7 +673,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
673
673
|
return summary;
|
|
674
674
|
}
|
|
675
675
|
async function handleHistory(options) {
|
|
676
|
-
const { http } =
|
|
676
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
677
677
|
const windows = {
|
|
678
678
|
"1d": 86400,
|
|
679
679
|
"1w": 604800,
|
|
@@ -685,10 +685,10 @@ async function handleHistory(options) {
|
|
|
685
685
|
process.cwd(),
|
|
686
686
|
"deepline",
|
|
687
687
|
"data",
|
|
688
|
-
|
|
688
|
+
_chunkFVA6XLRAjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
689
689
|
);
|
|
690
690
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
691
|
-
|
|
691
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
692
692
|
{
|
|
693
693
|
output_path: outputPath,
|
|
694
694
|
row_count: summary.row_count,
|
|
@@ -725,14 +725,14 @@ async function handleLedgerExportAll(options) {
|
|
|
725
725
|
);
|
|
726
726
|
return;
|
|
727
727
|
}
|
|
728
|
-
const { http } =
|
|
728
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
729
729
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
730
730
|
const summary = await exportLedger(http, outputPath, {
|
|
731
731
|
sinceAt,
|
|
732
732
|
runId: options.runId,
|
|
733
733
|
operation: options.operation
|
|
734
734
|
});
|
|
735
|
-
|
|
735
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
736
736
|
{
|
|
737
737
|
output_path: outputPath,
|
|
738
738
|
row_count: summary.row_count,
|
|
@@ -771,7 +771,7 @@ function targetPlanLine(plan) {
|
|
|
771
771
|
return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
772
772
|
}
|
|
773
773
|
async function handlePlans(options) {
|
|
774
|
-
const client = new (0,
|
|
774
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
775
775
|
const payload = await client.billing.targetPlans();
|
|
776
776
|
const listedCurrentPlan = payload.plans.find(
|
|
777
777
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -784,8 +784,8 @@ async function handlePlans(options) {
|
|
|
784
784
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
785
785
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
786
786
|
];
|
|
787
|
-
const legacyPayload =
|
|
788
|
-
|
|
787
|
+
const legacyPayload = _chunkFVA6XLRAjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
788
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
789
789
|
{
|
|
790
790
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
791
791
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -795,7 +795,7 @@ async function handlePlans(options) {
|
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
797
|
async function handleSubscribe(planVersionId, options) {
|
|
798
|
-
const { http } =
|
|
798
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
799
799
|
const payload = await http.request(
|
|
800
800
|
"/api/v2/billing/subscription/checkout",
|
|
801
801
|
{
|
|
@@ -804,8 +804,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
804
804
|
}
|
|
805
805
|
);
|
|
806
806
|
const url = String(payload.checkout_url || "");
|
|
807
|
-
if (!options.json && options.open !== false && url)
|
|
808
|
-
|
|
807
|
+
if (!options.json && options.open !== false && url) _chunkFVA6XLRAjs.openInBrowser.call(void 0, url);
|
|
808
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
809
809
|
{
|
|
810
810
|
...payload,
|
|
811
811
|
render: {
|
|
@@ -821,7 +821,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
821
821
|
);
|
|
822
822
|
}
|
|
823
823
|
async function handleSubscriptionStatus(options) {
|
|
824
|
-
const client = new (0,
|
|
824
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
825
825
|
const payload = await client.billing.subscription.status();
|
|
826
826
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
827
827
|
const lines = [
|
|
@@ -841,7 +841,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
841
841
|
],
|
|
842
842
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
843
843
|
];
|
|
844
|
-
|
|
844
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
845
845
|
{
|
|
846
846
|
...payload,
|
|
847
847
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -850,7 +850,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
850
850
|
);
|
|
851
851
|
}
|
|
852
852
|
async function handleSubscriptionCancel(options) {
|
|
853
|
-
const client = new (0,
|
|
853
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
854
854
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
855
855
|
if (options.dryRun) {
|
|
856
856
|
const status = await client.billing.subscription.status();
|
|
@@ -867,7 +867,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
867
867
|
return;
|
|
868
868
|
}
|
|
869
869
|
const consequence = action === "cancel" ? `Would schedule cancellation at period end${status.current_period_end ? ` (${status.current_period_end})` : ""}. The subscription stays active until then and remaining credits are kept.` : "Would reverse the pending cancellation; the subscription would renew normally.";
|
|
870
|
-
|
|
870
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
871
871
|
{
|
|
872
872
|
ok: true,
|
|
873
873
|
dry_run: true,
|
|
@@ -922,7 +922,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
922
922
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
923
923
|
"Undo with: deepline billing subscription cancel --undo"
|
|
924
924
|
];
|
|
925
|
-
|
|
925
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
926
926
|
{
|
|
927
927
|
ok: true,
|
|
928
928
|
...result,
|
|
@@ -976,7 +976,7 @@ async function handleInvoices(options) {
|
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
const client = new (0,
|
|
979
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
980
980
|
let payload;
|
|
981
981
|
try {
|
|
982
982
|
payload = await client.billing.invoices.list(
|
|
@@ -1005,7 +1005,7 @@ async function handleInvoices(options) {
|
|
|
1005
1005
|
url: entry.url
|
|
1006
1006
|
}))
|
|
1007
1007
|
} : { ...payload, count: entries.length };
|
|
1008
|
-
|
|
1008
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1009
1009
|
{
|
|
1010
1010
|
...envelope,
|
|
1011
1011
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -1014,7 +1014,7 @@ async function handleInvoices(options) {
|
|
|
1014
1014
|
);
|
|
1015
1015
|
}
|
|
1016
1016
|
async function handleCheckout(options) {
|
|
1017
|
-
const { http } =
|
|
1017
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
1018
1018
|
const payload = await http.post(
|
|
1019
1019
|
"/api/v2/billing/checkout",
|
|
1020
1020
|
{
|
|
@@ -1024,8 +1024,8 @@ async function handleCheckout(options) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
);
|
|
1026
1026
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1027
|
-
if (!options.json && !options.noOpen && url)
|
|
1028
|
-
|
|
1027
|
+
if (!options.json && !options.noOpen && url) _chunkFVA6XLRAjs.openInBrowser.call(void 0, url);
|
|
1028
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1029
1029
|
{
|
|
1030
1030
|
...payload,
|
|
1031
1031
|
render: {
|
|
@@ -1070,7 +1070,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
1072
|
if (options.dryRun) {
|
|
1073
|
-
|
|
1073
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1074
1074
|
{
|
|
1075
1075
|
ok: true,
|
|
1076
1076
|
dry_run: true,
|
|
@@ -1100,7 +1100,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1100
1100
|
);
|
|
1101
1101
|
return;
|
|
1102
1102
|
}
|
|
1103
|
-
const client = new (0,
|
|
1103
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
1104
1104
|
let payload;
|
|
1105
1105
|
try {
|
|
1106
1106
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1117,7 +1117,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
1119
|
if (payload.status === "pending") {
|
|
1120
|
-
|
|
1120
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1121
1121
|
{
|
|
1122
1122
|
ok: true,
|
|
1123
1123
|
...payload,
|
|
@@ -1181,17 +1181,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1181
1181
|
]
|
|
1182
1182
|
}
|
|
1183
1183
|
};
|
|
1184
|
-
|
|
1184
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1185
1185
|
json: options.json
|
|
1186
1186
|
});
|
|
1187
1187
|
}
|
|
1188
1188
|
async function handleTargetStatus(options) {
|
|
1189
|
-
const client = new (0,
|
|
1189
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
1190
1190
|
const payload = await client.billing.targetStatus();
|
|
1191
1191
|
const balanceCommand = "deepline billing balance";
|
|
1192
1192
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1193
1193
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1194
|
-
|
|
1194
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1195
1195
|
{
|
|
1196
1196
|
ok: true,
|
|
1197
1197
|
...payload,
|
|
@@ -1223,9 +1223,41 @@ async function handleTargetStatus(options) {
|
|
|
1223
1223
|
function formatAllowanceAmount(value) {
|
|
1224
1224
|
return Number(value.toFixed(2)).toLocaleString("en-US");
|
|
1225
1225
|
}
|
|
1226
|
+
function formatComputeMinutes(minutes) {
|
|
1227
|
+
return minutes < 120 ? `${Number(minutes.toFixed(1)).toLocaleString("en-US")} minutes` : `${Number((minutes / 60).toFixed(1)).toLocaleString("en-US")} hours`;
|
|
1228
|
+
}
|
|
1229
|
+
async function handleIncludedCompute(options) {
|
|
1230
|
+
const client = new (0, _chunkAD5BZUAPjs.DeeplineClient)();
|
|
1231
|
+
const payload = options.enable ? await client.billing.enableIncludedCompute() : await client.billing.includedCompute();
|
|
1232
|
+
const plan = `${formatComputeMinutes(payload.plan.included_minutes)} included per month, then ${Math.round(payload.plan.credits_per_minute * 60)} credits/hour`;
|
|
1233
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1234
|
+
{
|
|
1235
|
+
ok: true,
|
|
1236
|
+
...payload,
|
|
1237
|
+
render: {
|
|
1238
|
+
sections: [
|
|
1239
|
+
{
|
|
1240
|
+
title: "billing compute",
|
|
1241
|
+
lines: payload.status === "on" ? [
|
|
1242
|
+
`Included compute: on, ${formatComputeMinutes(payload.included_minutes)} per month, then ${Math.round((_nullishCoalesce(payload.credits_per_minute, () => ( 0))) * 60)} credits/hour`,
|
|
1243
|
+
`Used: ${formatComputeMinutes(payload.included_minutes_used)} included, ${formatComputeMinutes(payload.minutes_used)} total since ${payload.period_start_at.slice(0, 10)}`
|
|
1244
|
+
] : payload.status === "off" ? [
|
|
1245
|
+
"Included compute: off; Play compute is billed at provider cost.",
|
|
1246
|
+
`Used: ${formatComputeMinutes(payload.minutes_used)} since ${payload.period_start_at.slice(0, 10)}`,
|
|
1247
|
+
`Turning it on gives ${plan}. Run deepline billing compute --enable; it cannot be turned off again.`
|
|
1248
|
+
] : [
|
|
1249
|
+
"Included compute is not available for this workspace yet."
|
|
1250
|
+
]
|
|
1251
|
+
}
|
|
1252
|
+
]
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
{ json: options.json }
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1226
1258
|
async function handleEntitlements(options) {
|
|
1227
|
-
const payload = await new (0,
|
|
1228
|
-
|
|
1259
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.entitlements();
|
|
1260
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1229
1261
|
{
|
|
1230
1262
|
ok: true,
|
|
1231
1263
|
...payload,
|
|
@@ -1258,7 +1290,7 @@ async function handleEntitlements(options) {
|
|
|
1258
1290
|
);
|
|
1259
1291
|
}
|
|
1260
1292
|
async function handleAutoRechargeStatus(options) {
|
|
1261
|
-
const payload = await new (0,
|
|
1293
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1262
1294
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1263
1295
|
const lines = [
|
|
1264
1296
|
`State: ${state}`,
|
|
@@ -1268,7 +1300,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1268
1300
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1269
1301
|
] : []
|
|
1270
1302
|
];
|
|
1271
|
-
|
|
1303
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1272
1304
|
{
|
|
1273
1305
|
ok: true,
|
|
1274
1306
|
...payload,
|
|
@@ -1317,7 +1349,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1317
1349
|
}
|
|
1318
1350
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1319
1351
|
if (options.dryRun) {
|
|
1320
|
-
|
|
1352
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1321
1353
|
{
|
|
1322
1354
|
ok: true,
|
|
1323
1355
|
dry_run: true,
|
|
@@ -1338,7 +1370,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1338
1370
|
);
|
|
1339
1371
|
return;
|
|
1340
1372
|
}
|
|
1341
|
-
const payload = await new (0,
|
|
1373
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1342
1374
|
enabled: true,
|
|
1343
1375
|
thresholdCredits,
|
|
1344
1376
|
refillToCredits,
|
|
@@ -1346,7 +1378,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1346
1378
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1347
1379
|
idempotencyKey
|
|
1348
1380
|
});
|
|
1349
|
-
|
|
1381
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1350
1382
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1351
1383
|
{ json: options.json }
|
|
1352
1384
|
);
|
|
@@ -1354,7 +1386,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1354
1386
|
async function handleAutoRechargeOff(options) {
|
|
1355
1387
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1356
1388
|
if (options.dryRun) {
|
|
1357
|
-
|
|
1389
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1358
1390
|
{
|
|
1359
1391
|
ok: true,
|
|
1360
1392
|
dry_run: true,
|
|
@@ -1369,11 +1401,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1369
1401
|
);
|
|
1370
1402
|
return;
|
|
1371
1403
|
}
|
|
1372
|
-
const payload = await new (0,
|
|
1404
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1373
1405
|
enabled: false,
|
|
1374
1406
|
idempotencyKey
|
|
1375
1407
|
});
|
|
1376
|
-
|
|
1408
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1377
1409
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1378
1410
|
{ json: options.json }
|
|
1379
1411
|
);
|
|
@@ -1392,11 +1424,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1392
1424
|
return;
|
|
1393
1425
|
}
|
|
1394
1426
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1395
|
-
const payload = await new (0,
|
|
1427
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.purchaseCredits({
|
|
1396
1428
|
credits,
|
|
1397
1429
|
idempotencyKey
|
|
1398
1430
|
});
|
|
1399
|
-
|
|
1431
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1400
1432
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1401
1433
|
{ json: options.json }
|
|
1402
1434
|
);
|
|
@@ -1432,7 +1464,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1432
1464
|
return;
|
|
1433
1465
|
}
|
|
1434
1466
|
if (options.dryRun) {
|
|
1435
|
-
|
|
1467
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1436
1468
|
{
|
|
1437
1469
|
ok: true,
|
|
1438
1470
|
dry_run: true,
|
|
@@ -1445,12 +1477,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1445
1477
|
);
|
|
1446
1478
|
return;
|
|
1447
1479
|
}
|
|
1448
|
-
const payload = await new (0,
|
|
1480
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1449
1481
|
credits,
|
|
1450
1482
|
orgId: options.orgId,
|
|
1451
1483
|
idempotencyKey: options.idempotencyKey
|
|
1452
1484
|
});
|
|
1453
|
-
|
|
1485
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1454
1486
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1455
1487
|
{ json: options.json }
|
|
1456
1488
|
);
|
|
@@ -1470,37 +1502,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1470
1502
|
return;
|
|
1471
1503
|
}
|
|
1472
1504
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1473
|
-
const payload = await new (0,
|
|
1505
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.transitionPlan({
|
|
1474
1506
|
action: "start_or_change",
|
|
1475
1507
|
targetPlanSku: planSku,
|
|
1476
1508
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1477
1509
|
idempotencyKey
|
|
1478
1510
|
});
|
|
1479
|
-
|
|
1511
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1480
1512
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1481
1513
|
{ json: options.json }
|
|
1482
1514
|
);
|
|
1483
1515
|
}
|
|
1484
1516
|
async function handleTargetPlanCancellation(options) {
|
|
1485
1517
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1486
|
-
const payload = await new (0,
|
|
1518
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.transitionPlan({
|
|
1487
1519
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1488
1520
|
idempotencyKey
|
|
1489
1521
|
});
|
|
1490
|
-
|
|
1522
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1491
1523
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1492
1524
|
{ json: options.json }
|
|
1493
1525
|
);
|
|
1494
1526
|
}
|
|
1495
1527
|
async function handleTargetPortal(options) {
|
|
1496
|
-
const payload = await new (0,
|
|
1528
|
+
const payload = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.portalSession(
|
|
1497
1529
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1498
1530
|
);
|
|
1499
|
-
if (!options.json && !options.noOpen)
|
|
1500
|
-
|
|
1531
|
+
if (!options.json && !options.noOpen) _chunkFVA6XLRAjs.openInBrowser.call(void 0, payload.url);
|
|
1532
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1501
1533
|
}
|
|
1502
1534
|
async function handleRedeemCode(code, options) {
|
|
1503
|
-
const { http } =
|
|
1535
|
+
const { http } = _chunkFVA6XLRAjs.getAuthedHttpClient.call(void 0, );
|
|
1504
1536
|
const payload = await http.post(
|
|
1505
1537
|
"/api/v2/billing/checkout",
|
|
1506
1538
|
{
|
|
@@ -1508,8 +1540,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1508
1540
|
}
|
|
1509
1541
|
);
|
|
1510
1542
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1511
|
-
if (!options.json && !options.noOpen && url)
|
|
1512
|
-
|
|
1543
|
+
if (!options.json && !options.noOpen && url) _chunkFVA6XLRAjs.openInBrowser.call(void 0, url);
|
|
1544
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
1513
1545
|
{
|
|
1514
1546
|
...payload,
|
|
1515
1547
|
render: {
|
|
@@ -1567,14 +1599,14 @@ Examples:
|
|
|
1567
1599
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1568
1600
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1569
1601
|
}
|
|
1570
|
-
const quote = await new (0,
|
|
1602
|
+
const quote = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.quote({
|
|
1571
1603
|
quantity,
|
|
1572
1604
|
sandbox_runtime: {
|
|
1573
1605
|
timeout: options.sandboxTimeout,
|
|
1574
1606
|
size: "standard"
|
|
1575
1607
|
}
|
|
1576
1608
|
});
|
|
1577
|
-
|
|
1609
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0, quote, {
|
|
1578
1610
|
json: options.json,
|
|
1579
1611
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1580
1612
|
${quote.explanation}
|
|
@@ -1777,6 +1809,12 @@ Examples:
|
|
|
1777
1809
|
billing.command("entitlements").description(
|
|
1778
1810
|
"Show workspace benefits, remaining people search profiles, and effective rate limits."
|
|
1779
1811
|
).option("--json", "Emit JSON output").action(handleEntitlements);
|
|
1812
|
+
billing.command("compute").description(
|
|
1813
|
+
"Show Play compute pricing and minutes used; --enable turns on included compute."
|
|
1814
|
+
).option(
|
|
1815
|
+
"--enable",
|
|
1816
|
+
"Turn on included compute for this workspace (cannot be undone)"
|
|
1817
|
+
).option("--json", "Emit JSON output").action(handleIncludedCompute);
|
|
1780
1818
|
billing.command("auto-recharge").description("Inspect and manage automatic Deepline credit recharge.").addHelpText(
|
|
1781
1819
|
"after",
|
|
1782
1820
|
`
|
|
@@ -1813,8 +1851,8 @@ Examples:
|
|
|
1813
1851
|
new (0, _commander.Command)("trigger").description(
|
|
1814
1852
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1815
1853
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1816
|
-
const result = await new (0,
|
|
1817
|
-
|
|
1854
|
+
const result = await new (0, _chunkAD5BZUAPjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1855
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1818
1856
|
})
|
|
1819
1857
|
);
|
|
1820
1858
|
billing.command("change-plan").description("Start or change the target billing plan.").argument("<plan_sku>", "payg-v1, builder-v1, growth-v1, or team-v1").option(
|
|
@@ -564,6 +564,14 @@ function isOtherThing(id) {
|
|
|
564
564
|
const entity = FIELDS_BY_ID.get(id)?.entity;
|
|
565
565
|
return entity !== void 0 && entity !== "person" && entity !== "company" && entity !== "entity";
|
|
566
566
|
}
|
|
567
|
+
var LIST_NAMES = [
|
|
568
|
+
"people",
|
|
569
|
+
"companies",
|
|
570
|
+
"job_postings",
|
|
571
|
+
"posts",
|
|
572
|
+
"podcasts",
|
|
573
|
+
"pages"
|
|
574
|
+
];
|
|
567
575
|
function resolveFieldName(name, bindings, outputs = []) {
|
|
568
576
|
const byId = /* @__PURE__ */ new Map();
|
|
569
577
|
for (const binding of bindings) {
|
|
@@ -643,7 +651,9 @@ export {
|
|
|
643
651
|
DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
|
|
644
652
|
DEEPLINE_EXTRACTOR_TARGETS,
|
|
645
653
|
isDeeplineExtractorTarget,
|
|
654
|
+
isFieldId,
|
|
646
655
|
fieldOfName,
|
|
656
|
+
LIST_NAMES,
|
|
647
657
|
resolveFieldName,
|
|
648
658
|
fieldPaths
|
|
649
659
|
};
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.467",
|
|
53
53
|
updateSummary: {
|
|
54
54
|
introducedIn: "0.3.90",
|
|
55
55
|
summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
|