deepline 0.3.425 → 0.3.427
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 +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +5 -6
- package/dist/bundling-sources/shared_libs/play-runtime/zerobounce-batching.ts +6 -1
- package/dist/cli/{auth-RF5WGHBC.mjs → auth-4X5ZKTJJ.mjs} +4 -4
- package/dist/cli/auth-MK7F2EYA.js +40 -0
- package/dist/cli/{billing-E4G4QVR5.js → billing-OXG3Q7AS.js} +73 -73
- package/dist/cli/{billing-P4RUJ4UT.mjs → billing-V3OQHRKV.mjs} +4 -4
- package/dist/cli/{chunk-ODO6ZIHB.mjs → chunk-3H4CUTG5.mjs} +2 -2
- package/dist/cli/{chunk-FDM3BUIB.mjs → chunk-3O5BPCWB.mjs} +5 -5
- package/dist/cli/{chunk-NUET45RU.mjs → chunk-3UGHZGXU.mjs} +1 -1
- package/dist/cli/{chunk-J6FKYOFB.js → chunk-4GJT6BAH.js} +35 -35
- package/dist/cli/{chunk-CSP5CXTC.js → chunk-4NZAT6VQ.js} +20 -20
- package/dist/cli/{chunk-RTFXD5ZX.mjs → chunk-5HFIHG2V.mjs} +3 -3
- package/dist/cli/{chunk-XSC2FG4V.js → chunk-6KFFNYO6.js} +8 -8
- package/dist/cli/{chunk-ZYUKNQO4.js → chunk-7SUNA75F.js} +52 -52
- package/dist/cli/{chunk-XO5RJ3PF.js → chunk-BVJFHPB5.js} +79 -79
- package/dist/cli/{chunk-XC3J4P5W.mjs → chunk-CH7B3T5E.mjs} +1 -1
- package/dist/cli/{chunk-UDRNGM3S.mjs → chunk-CYF7Y2K3.mjs} +2 -2
- package/dist/cli/{chunk-RH2N5JUT.js → chunk-GYZDLABX.js} +26 -26
- package/dist/cli/{chunk-E7RPU3VG.mjs → chunk-H64EDTZZ.mjs} +2 -2
- package/dist/cli/{chunk-WNXYRODJ.mjs → chunk-JD5WFLF6.mjs} +1 -1
- package/dist/cli/{chunk-HT3UBTXV.mjs → chunk-JEFT6QTT.mjs} +1 -1
- package/dist/cli/{chunk-U42S2GAF.js → chunk-MALRKVEP.js} +4 -4
- package/dist/cli/{chunk-2J2I5A7K.mjs → chunk-MJ2WV3LS.mjs} +4 -4
- package/dist/cli/{chunk-VYO6TLWN.mjs → chunk-MTI24NKI.mjs} +1 -1
- package/dist/cli/{chunk-S5FCTT3E.mjs → chunk-MWL44NXV.mjs} +1 -1
- package/dist/cli/{chunk-IJPWBQEA.js → chunk-O3ZWP4KL.js} +8 -8
- package/dist/cli/{chunk-P7SNOFPA.mjs → chunk-OZ7M22PE.mjs} +3 -3
- package/dist/cli/{chunk-SBPPCMZD.js → chunk-PLN4F3DW.js} +16 -16
- package/dist/cli/{chunk-BFVDDMRH.mjs → chunk-POIETGSV.mjs} +2 -2
- package/dist/cli/{chunk-MWR452MP.mjs → chunk-STV2UBYA.mjs} +3 -3
- package/dist/cli/{chunk-NC5DYZ36.js → chunk-TXCYMXG7.js} +6 -6
- package/dist/cli/{chunk-UXLJZ4XQ.js → chunk-U4MH5KFQ.js} +10 -10
- package/dist/cli/{chunk-7F6KTNUP.js → chunk-WWOUGKO6.js} +6 -6
- package/dist/cli/{chunk-XLEA2CGA.mjs → chunk-X4FVKKU2.mjs} +8 -8
- package/dist/cli/{chunk-2ACYJZHU.js → chunk-XAUHRRUG.js} +1 -1
- package/dist/cli/{chunk-53DTOGNJ.js → chunk-XIZCVFTO.js} +2 -2
- package/dist/cli/{chunk-XN25EAP6.js → chunk-YTWDMQLC.js} +2 -2
- package/dist/cli/{chunk-WZLGL37A.js → chunk-ZNBMA4ZC.js} +50 -50
- package/dist/cli/{csv-XKCR2MB6.mjs → csv-MTZFRU7E.mjs} +3 -3
- package/dist/cli/{csv-P32NU7IS.js → csv-UP7VZ5XY.js} +12 -12
- package/dist/cli/{db-ZJQPREBZ.mjs → db-N67ZA3XK.mjs} +4 -4
- package/dist/cli/{db-AHFQJ7ZN.js → db-UYDMCKKN.js} +25 -25
- package/dist/cli/{describe-YE2WIS23.js → describe-ANKULJMG.js} +16 -16
- package/dist/cli/{describe-IZNT6RGY.mjs → describe-IHJTJI6Y.mjs} +12 -12
- package/dist/cli/{executions-WLRZODFZ.mjs → executions-5AV5LB25.mjs} +4 -4
- package/dist/cli/{executions-EZDFYAWW.js → executions-LYI4OYNS.js} +6 -6
- package/dist/cli/{feedback-A62XZMY2.js → feedback-V6AEZY7B.js} +7 -7
- package/dist/cli/{feedback-M6TNBIUP.mjs → feedback-WTBJTJNZ.mjs} +3 -3
- package/dist/cli/getting-started.d.mts +3 -1
- package/dist/cli/getting-started.d.ts +3 -1
- package/dist/cli/git-JGXSEUCH.js +24 -0
- package/dist/cli/{git-XYDEA57G.mjs → git-TI5FHJAN.mjs} +4 -4
- package/dist/cli/index.js +131 -131
- package/dist/cli/index.mjs +36 -36
- package/dist/cli/{legacy-noops-S4XSVXIN.mjs → legacy-noops-55WIJYDZ.mjs} +4 -4
- package/dist/cli/{legacy-noops-D34K4LWU.js → legacy-noops-HZSXECAV.js} +7 -7
- package/dist/cli/{monitors-VUSDOVGA.js → monitors-LCM5INTO.js} +84 -84
- package/dist/cli/{monitors-YDHQJMMQ.mjs → monitors-O233NFG3.mjs} +4 -4
- package/dist/cli/{org-EF7Q22GZ.mjs → org-RXBSIFKK.mjs} +4 -4
- package/dist/cli/{org-IRWGFW3I.js → org-YY33PBZT.js} +64 -64
- package/dist/cli/{play-Y4O3WFYH.mjs → play-RPVYEAPU.mjs} +10 -10
- package/dist/cli/{play-D54PEGMK.js → play-SKXVHW3X.js} +283 -283
- package/dist/cli/{providers-PX672XRG.mjs → providers-LD3KKFJ4.mjs} +4 -4
- package/dist/cli/{providers-2NPEOE22.js → providers-VEAXU2RJ.js} +7 -7
- package/dist/cli/{quickstart-KSFYOZGU.mjs → quickstart-R6AHSDG5.mjs} +3 -3
- package/dist/cli/{quickstart-3XXUIDVF.js → quickstart-RXWFQYS7.js} +5 -5
- package/dist/cli/{search-DIATDWNB.mjs → search-C5OKXPTC.mjs} +5 -5
- package/dist/cli/search-QETWAC7F.js +30 -0
- package/dist/cli/{secrets-S7J53N4D.js → secrets-4H6ZJX73.js} +13 -13
- package/dist/cli/{secrets-HSZNYSHN.mjs → secrets-6RB3VV44.mjs} +4 -4
- package/dist/cli/{sessions-BLJ5AZ2O.mjs → sessions-3VBCFW2E.mjs} +4 -4
- package/dist/cli/{sessions-ECOJWISN.js → sessions-6L3QV7NH.js} +5 -5
- package/dist/cli/{settings-4X2OSKMC.mjs → settings-MSLQGTMD.mjs} +8 -8
- package/dist/cli/{settings-BMKHMIN2.js → settings-QFBAOXNP.js} +75 -75
- package/dist/cli/{setup-NUEJ22OI.mjs → setup-2DIZBEKV.mjs} +7 -7
- package/dist/cli/{setup-GOT6Y2E3.js → setup-5STMP55W.js} +42 -42
- package/dist/cli/skills-LNQA7Y64.js +29 -0
- package/dist/cli/{skills-FCLEKW4O.mjs → skills-OK6IZA5B.mjs} +5 -5
- package/dist/cli/{tools-IVCHIOIY.mjs → tools-KNTK3ORX.mjs} +12 -12
- package/dist/cli/tools-ZSJRG6TM.js +44 -0
- package/dist/cli/{update-Y5RO5LSX.mjs → update-C36Q2GCK.mjs} +7 -7
- package/dist/cli/update-JVAQVWYF.js +31 -0
- package/dist/cli/{workflow-XGN3FZAE.js → workflow-5QUJOFPN.js} +15 -15
- package/dist/cli/{workflow-CSVQCXJZ.mjs → workflow-TF5JGNEE.mjs} +5 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +78 -78
- 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/package.json +1 -1
- package/dist/cli/auth-PTKVFEIT.js +0 -40
- package/dist/cli/git-62FZH46U.js +0 -24
- package/dist/cli/search-TW7PGWYR.js +0 -30
- package/dist/cli/skills-DCOMWBDX.js +0 -29
- package/dist/cli/tools-OAYJGYL7.js +0 -44
- package/dist/cli/update-2DBL37AU.js +0 -31
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ their source JSDoc and the generated SDK/API references describe the same reads.
|
|
|
51
51
|
Paste this into Claude Code, Codex, or another coding agent:
|
|
52
52
|
|
|
53
53
|
```text
|
|
54
|
-
Install and set up the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md.
|
|
54
|
+
Install and set up the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md. After setup, continue my existing task if I gave one. Otherwise, present the guide's four starter choices verbatim, with each of the first three requests starting with /deepline-gtm.
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Once setup is complete, tell your agent what you want to do:
|
|
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
|
|
|
205
205
|
// getters keep their established compatibility behavior.
|
|
206
206
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
207
207
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
208
|
-
version: '0.3.
|
|
208
|
+
version: '0.3.427',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -12845,8 +12845,12 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
12845
12845
|
const admissionObserver: ToolBatchAdmissionObserver = {
|
|
12846
12846
|
pending: (requests) => {
|
|
12847
12847
|
for (const request of requests) {
|
|
12848
|
-
|
|
12849
|
-
|
|
12848
|
+
const strategy = this.#options.getBatchOperationStrategy?.(
|
|
12849
|
+
request.toolId,
|
|
12850
|
+
);
|
|
12851
|
+
// A scalar-only strategy has no arrivals to aggregate. Holding its
|
|
12852
|
+
// lane would serialize receipt I/O before provider admission.
|
|
12853
|
+
if (!strategy || strategy.maxBatchSize <= 1) continue;
|
|
12850
12854
|
const key = this.toolDispatchLane(request).key;
|
|
12851
12855
|
const pending = pendingAdmissionByLane.get(key) ?? new Set<string>();
|
|
12852
12856
|
pending.add(request.callId);
|
|
@@ -146,12 +146,11 @@ export const SHARED_EXECUTION_POLICY: ResolvedExecutionPolicy = {
|
|
|
146
146
|
concurrency: {
|
|
147
147
|
// Bound the complete live row promise graph, not only outbound calls.
|
|
148
148
|
// Cached provider payloads can expand far beyond their encoded receipt size
|
|
149
|
-
// while Node parses and delivers result lists.
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
// Pure-compute maps
|
|
153
|
-
|
|
154
|
-
rowDefault: 20,
|
|
149
|
+
// while Node parses and delivers result lists. Fifty I/O rows overlap slow
|
|
150
|
+
// providers; heap, resident-memory, event-loop and byte admission still
|
|
151
|
+
// tighten this ceiling for larger response shapes. Pending rows remain
|
|
152
|
+
// compact indexes. Pure-compute maps use a separate fast path.
|
|
153
|
+
rowDefault: 50,
|
|
155
154
|
// Internal callers can request a wider window, but the default remains the
|
|
156
155
|
// safe standard-sandbox resident set. The input-byte estimator may reduce
|
|
157
156
|
// either value further for large source rows.
|
|
@@ -57,7 +57,12 @@ export const zerobounceValidateBatchStrategy: BatchOperationStrategy<
|
|
|
57
57
|
sourceOperation: 'zerobounce_validate',
|
|
58
58
|
batchOperation: 'zerobounce_batch_validate',
|
|
59
59
|
kind: 'identifier_batch',
|
|
60
|
-
|
|
60
|
+
// Automatic scalar validation must keep the scalar endpoint's rate lane.
|
|
61
|
+
// Bulk is limited to 27 requests/minute here (at most 45 emails/second even
|
|
62
|
+
// at 100/batch), below the scalar lane's 100/second adaptive ceiling. Sparse
|
|
63
|
+
// waterfall batches are much smaller and can hold dispatch for tens of
|
|
64
|
+
// seconds. The explicit bulk API and its splitter remain available.
|
|
65
|
+
maxBatchSize: 1,
|
|
61
66
|
bucketKeyPayloadFields: ['ip_address'],
|
|
62
67
|
canBatchWith: (left, right) => bucket(left) === bucket(right),
|
|
63
68
|
toBucketKey: bucket,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
reportSetupCompleted,
|
|
14
14
|
resolvePendingAuthClaimForResume,
|
|
15
15
|
statusBannerLine
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-3H4CUTG5.mjs";
|
|
17
|
+
import "./chunk-MTI24NKI.mjs";
|
|
18
|
+
import "./chunk-MWL44NXV.mjs";
|
|
19
19
|
import "./chunk-MAMVGOSC.mjs";
|
|
20
20
|
import "./chunk-DLIRSHV6.mjs";
|
|
21
21
|
import "./chunk-E4IXDAZI.mjs";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-CH7B3T5E.mjs";
|
|
23
23
|
import "./chunk-WZYKRD7T.mjs";
|
|
24
24
|
import "./chunk-KRD6H754.mjs";
|
|
25
25
|
export {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkZNBMA4ZCjs = require('./chunk-ZNBMA4ZC.js');
|
|
17
|
+
require('./chunk-WWOUGKO6.js');
|
|
18
|
+
require('./chunk-MALRKVEP.js');
|
|
19
|
+
require('./chunk-NPBJI7RE.js');
|
|
20
|
+
require('./chunk-XNYIZMNQ.js');
|
|
21
|
+
require('./chunk-PPDBRJRW.js');
|
|
22
|
+
require('./chunk-XAUHRRUG.js');
|
|
23
|
+
require('./chunk-OG64RBAC.js');
|
|
24
|
+
require('./chunk-COGTRVWW.js');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkZNBMA4ZCjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkZNBMA4ZCjs.authStatusLine; exports.clearPendingClaim = _chunkZNBMA4ZCjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkZNBMA4ZCjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkZNBMA4ZCjs.handleRegister; exports.handleStatus = _chunkZNBMA4ZCjs.handleStatus; exports.handleWait = _chunkZNBMA4ZCjs.handleWait; exports.httpJson = _chunkZNBMA4ZCjs.httpJson; exports.readPendingAuthClaim = _chunkZNBMA4ZCjs.readPendingAuthClaim; exports.readStatusBanner = _chunkZNBMA4ZCjs.readStatusBanner; exports.registerAuthCommands = _chunkZNBMA4ZCjs.registerAuthCommands; exports.reportSetupCompleted = _chunkZNBMA4ZCjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkZNBMA4ZCjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkZNBMA4ZCjs.statusBannerLine;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkU4MH5KFQjs = require('./chunk-U4MH5KFQ.js');
|
|
6
6
|
require('./chunk-E4CABWXL.js');
|
|
7
7
|
require('./chunk-2H4EY7KH.js');
|
|
8
8
|
require('./chunk-KXMNM4AQ.js');
|
|
@@ -13,8 +13,8 @@ require('./chunk-XDVT3GOM.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
require('./chunk-
|
|
16
|
+
var _chunkWWOUGKO6js = require('./chunk-WWOUGKO6.js');
|
|
17
|
+
require('./chunk-MALRKVEP.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
26
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-XAUHRRUG.js');
|
|
27
27
|
require('./chunk-OG64RBAC.js');
|
|
28
28
|
require('./chunk-COGTRVWW.js');
|
|
29
29
|
|
|
@@ -72,7 +72,7 @@ function reportBillingFailure(failure, options) {
|
|
|
72
72
|
if (failure.next) {
|
|
73
73
|
textLines.push(`Next: ${failure.next}`);
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
76
76
|
{
|
|
77
77
|
ok: false,
|
|
78
78
|
exitCode: failure.exitCode,
|
|
@@ -93,7 +93,7 @@ function parseTopUpCredits(raw) {
|
|
|
93
93
|
return parsed;
|
|
94
94
|
}
|
|
95
95
|
function topUpIdempotencyKey(raw) {
|
|
96
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
96
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkU4MH5KFQjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
97
97
|
}
|
|
98
98
|
function targetBillingIdempotencyKey(raw) {
|
|
99
99
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -299,7 +299,7 @@ function defaultLedgerExportPath() {
|
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
async function handleBalance(options) {
|
|
302
|
-
const { http } =
|
|
302
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
303
303
|
const payload = await http.get(
|
|
304
304
|
"/api/v2/billing/balance"
|
|
305
305
|
);
|
|
@@ -383,7 +383,7 @@ async function handleBalance(options) {
|
|
|
383
383
|
...options.verbose ? detail : [],
|
|
384
384
|
...lines.slice(1)
|
|
385
385
|
];
|
|
386
|
-
|
|
386
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
387
387
|
{
|
|
388
388
|
...payload,
|
|
389
389
|
...recovery ? { recovery } : {},
|
|
@@ -407,7 +407,7 @@ function quoteShellArgument(value) {
|
|
|
407
407
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
408
408
|
}
|
|
409
409
|
async function handleUsage(options) {
|
|
410
|
-
const { http } =
|
|
410
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
411
411
|
const params = new URLSearchParams();
|
|
412
412
|
if (options.requestId !== void 0) {
|
|
413
413
|
const requestId = options.requestId.trim();
|
|
@@ -488,7 +488,7 @@ async function handleUsage(options) {
|
|
|
488
488
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
489
489
|
] : []
|
|
490
490
|
];
|
|
491
|
-
|
|
491
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
492
492
|
{
|
|
493
493
|
...payload,
|
|
494
494
|
recent: {
|
|
@@ -502,7 +502,7 @@ async function handleUsage(options) {
|
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
504
|
async function handleLimit(options) {
|
|
505
|
-
const { http } =
|
|
505
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
506
506
|
const payload = await http.get(
|
|
507
507
|
"/api/v2/billing/limit"
|
|
508
508
|
);
|
|
@@ -510,7 +510,7 @@ async function handleLimit(options) {
|
|
|
510
510
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
511
511
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
512
512
|
] : ["Monthly usage cap: off"];
|
|
513
|
-
|
|
513
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
514
514
|
{
|
|
515
515
|
...payload,
|
|
516
516
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -519,12 +519,12 @@ async function handleLimit(options) {
|
|
|
519
519
|
);
|
|
520
520
|
}
|
|
521
521
|
async function handleSetLimit(credits, options) {
|
|
522
|
-
const { http } =
|
|
522
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
523
523
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
524
524
|
method: "PUT",
|
|
525
525
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
526
526
|
});
|
|
527
|
-
|
|
527
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
528
528
|
{
|
|
529
529
|
...payload,
|
|
530
530
|
render: {
|
|
@@ -540,11 +540,11 @@ async function handleSetLimit(credits, options) {
|
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
542
|
async function handleLimitOff(options) {
|
|
543
|
-
const { http } =
|
|
543
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
544
544
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
545
545
|
method: "DELETE"
|
|
546
546
|
});
|
|
547
|
-
|
|
547
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
548
548
|
{
|
|
549
549
|
...payload,
|
|
550
550
|
render: {
|
|
@@ -564,7 +564,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
564
564
|
let initialized = false;
|
|
565
565
|
let pageNumber = 0;
|
|
566
566
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
567
|
-
for await (const entries of
|
|
567
|
+
for await (const entries of _chunkU4MH5KFQjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
568
568
|
pageNumber += 1;
|
|
569
569
|
console.error(
|
|
570
570
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -603,7 +603,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
603
603
|
return summary;
|
|
604
604
|
}
|
|
605
605
|
async function handleHistory(options) {
|
|
606
|
-
const { http } =
|
|
606
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
607
607
|
const windows = {
|
|
608
608
|
"1d": 86400,
|
|
609
609
|
"1w": 604800,
|
|
@@ -615,10 +615,10 @@ async function handleHistory(options) {
|
|
|
615
615
|
process.cwd(),
|
|
616
616
|
"deepline",
|
|
617
617
|
"data",
|
|
618
|
-
|
|
618
|
+
_chunkWWOUGKO6js.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
619
619
|
);
|
|
620
620
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
621
|
-
|
|
621
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
622
622
|
{
|
|
623
623
|
output_path: outputPath,
|
|
624
624
|
row_count: summary.row_count,
|
|
@@ -655,14 +655,14 @@ async function handleLedgerExportAll(options) {
|
|
|
655
655
|
);
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
|
-
const { http } =
|
|
658
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
659
659
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
660
660
|
const summary = await exportLedger(http, outputPath, {
|
|
661
661
|
sinceAt,
|
|
662
662
|
runId: options.runId,
|
|
663
663
|
operation: options.operation
|
|
664
664
|
});
|
|
665
|
-
|
|
665
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
666
666
|
{
|
|
667
667
|
output_path: outputPath,
|
|
668
668
|
row_count: summary.row_count,
|
|
@@ -701,7 +701,7 @@ function targetPlanLine(plan) {
|
|
|
701
701
|
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"}`;
|
|
702
702
|
}
|
|
703
703
|
async function handlePlans(options) {
|
|
704
|
-
const client = new (0,
|
|
704
|
+
const client = new (0, _chunkU4MH5KFQjs.DeeplineClient)();
|
|
705
705
|
const payload = await client.billing.targetPlans();
|
|
706
706
|
const listedCurrentPlan = payload.plans.find(
|
|
707
707
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -714,8 +714,8 @@ async function handlePlans(options) {
|
|
|
714
714
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
715
715
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
716
716
|
];
|
|
717
|
-
const legacyPayload =
|
|
718
|
-
|
|
717
|
+
const legacyPayload = _chunkWWOUGKO6js.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
718
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
719
719
|
{
|
|
720
720
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
721
721
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -725,7 +725,7 @@ async function handlePlans(options) {
|
|
|
725
725
|
);
|
|
726
726
|
}
|
|
727
727
|
async function handleSubscribe(planVersionId, options) {
|
|
728
|
-
const { http } =
|
|
728
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
729
729
|
const payload = await http.request(
|
|
730
730
|
"/api/v2/billing/subscription/checkout",
|
|
731
731
|
{
|
|
@@ -734,8 +734,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
734
734
|
}
|
|
735
735
|
);
|
|
736
736
|
const url = String(payload.checkout_url || "");
|
|
737
|
-
if (!options.json && options.open !== false && url)
|
|
738
|
-
|
|
737
|
+
if (!options.json && options.open !== false && url) _chunkWWOUGKO6js.openInBrowser.call(void 0, url);
|
|
738
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
739
739
|
{
|
|
740
740
|
...payload,
|
|
741
741
|
render: {
|
|
@@ -751,7 +751,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
751
751
|
);
|
|
752
752
|
}
|
|
753
753
|
async function handleSubscriptionStatus(options) {
|
|
754
|
-
const client = new (0,
|
|
754
|
+
const client = new (0, _chunkU4MH5KFQjs.DeeplineClient)();
|
|
755
755
|
const payload = await client.billing.subscription.status();
|
|
756
756
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
757
757
|
const lines = [
|
|
@@ -771,7 +771,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
771
771
|
],
|
|
772
772
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
773
773
|
];
|
|
774
|
-
|
|
774
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
775
775
|
{
|
|
776
776
|
...payload,
|
|
777
777
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -780,7 +780,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
780
780
|
);
|
|
781
781
|
}
|
|
782
782
|
async function handleSubscriptionCancel(options) {
|
|
783
|
-
const client = new (0,
|
|
783
|
+
const client = new (0, _chunkU4MH5KFQjs.DeeplineClient)();
|
|
784
784
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
785
785
|
if (options.dryRun) {
|
|
786
786
|
const status = await client.billing.subscription.status();
|
|
@@ -797,7 +797,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
799
|
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.";
|
|
800
|
-
|
|
800
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
801
801
|
{
|
|
802
802
|
ok: true,
|
|
803
803
|
dry_run: true,
|
|
@@ -852,7 +852,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
852
852
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
853
853
|
"Undo with: deepline billing subscription cancel --undo"
|
|
854
854
|
];
|
|
855
|
-
|
|
855
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
856
856
|
{
|
|
857
857
|
ok: true,
|
|
858
858
|
...result,
|
|
@@ -906,7 +906,7 @@ async function handleInvoices(options) {
|
|
|
906
906
|
return;
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
|
-
const client = new (0,
|
|
909
|
+
const client = new (0, _chunkU4MH5KFQjs.DeeplineClient)();
|
|
910
910
|
let payload;
|
|
911
911
|
try {
|
|
912
912
|
payload = await client.billing.invoices.list(
|
|
@@ -935,7 +935,7 @@ async function handleInvoices(options) {
|
|
|
935
935
|
url: entry.url
|
|
936
936
|
}))
|
|
937
937
|
} : { ...payload, count: entries.length };
|
|
938
|
-
|
|
938
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
939
939
|
{
|
|
940
940
|
...envelope,
|
|
941
941
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -944,7 +944,7 @@ async function handleInvoices(options) {
|
|
|
944
944
|
);
|
|
945
945
|
}
|
|
946
946
|
async function handleCheckout(options) {
|
|
947
|
-
const { http } =
|
|
947
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
948
948
|
const payload = await http.post(
|
|
949
949
|
"/api/v2/billing/checkout",
|
|
950
950
|
{
|
|
@@ -954,8 +954,8 @@ async function handleCheckout(options) {
|
|
|
954
954
|
}
|
|
955
955
|
);
|
|
956
956
|
const url = String(payload.url || payload.checkout_url || "");
|
|
957
|
-
if (!options.json && !options.noOpen && url)
|
|
958
|
-
|
|
957
|
+
if (!options.json && !options.noOpen && url) _chunkWWOUGKO6js.openInBrowser.call(void 0, url);
|
|
958
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
959
959
|
{
|
|
960
960
|
...payload,
|
|
961
961
|
render: {
|
|
@@ -1000,7 +1000,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1000
1000
|
return;
|
|
1001
1001
|
}
|
|
1002
1002
|
if (options.dryRun) {
|
|
1003
|
-
|
|
1003
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1004
1004
|
{
|
|
1005
1005
|
ok: true,
|
|
1006
1006
|
dry_run: true,
|
|
@@ -1030,7 +1030,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1030
1030
|
);
|
|
1031
1031
|
return;
|
|
1032
1032
|
}
|
|
1033
|
-
const client = new (0,
|
|
1033
|
+
const client = new (0, _chunkU4MH5KFQjs.DeeplineClient)();
|
|
1034
1034
|
let payload;
|
|
1035
1035
|
try {
|
|
1036
1036
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1047,7 +1047,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
1049
|
if (payload.status === "pending") {
|
|
1050
|
-
|
|
1050
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1051
1051
|
{
|
|
1052
1052
|
ok: true,
|
|
1053
1053
|
...payload,
|
|
@@ -1111,17 +1111,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1111
1111
|
]
|
|
1112
1112
|
}
|
|
1113
1113
|
};
|
|
1114
|
-
|
|
1114
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1115
1115
|
json: options.json
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
1118
|
async function handleTargetStatus(options) {
|
|
1119
|
-
const client = new (0,
|
|
1119
|
+
const client = new (0, _chunkU4MH5KFQjs.DeeplineClient)();
|
|
1120
1120
|
const payload = await client.billing.targetStatus();
|
|
1121
1121
|
const balanceCommand = "deepline billing balance";
|
|
1122
1122
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1123
1123
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1124
|
-
|
|
1124
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1125
1125
|
{
|
|
1126
1126
|
ok: true,
|
|
1127
1127
|
...payload,
|
|
@@ -1151,8 +1151,8 @@ async function handleTargetStatus(options) {
|
|
|
1151
1151
|
);
|
|
1152
1152
|
}
|
|
1153
1153
|
async function handleEntitlements(options) {
|
|
1154
|
-
const payload = await new (0,
|
|
1155
|
-
|
|
1154
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.entitlements();
|
|
1155
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1156
1156
|
{
|
|
1157
1157
|
ok: true,
|
|
1158
1158
|
...payload,
|
|
@@ -1177,7 +1177,7 @@ async function handleEntitlements(options) {
|
|
|
1177
1177
|
);
|
|
1178
1178
|
}
|
|
1179
1179
|
async function handleAutoRechargeStatus(options) {
|
|
1180
|
-
const payload = await new (0,
|
|
1180
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1181
1181
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1182
1182
|
const lines = [
|
|
1183
1183
|
`State: ${state}`,
|
|
@@ -1187,7 +1187,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1187
1187
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1188
1188
|
] : []
|
|
1189
1189
|
];
|
|
1190
|
-
|
|
1190
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1191
1191
|
{
|
|
1192
1192
|
ok: true,
|
|
1193
1193
|
...payload,
|
|
@@ -1236,7 +1236,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1238
1238
|
if (options.dryRun) {
|
|
1239
|
-
|
|
1239
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1240
1240
|
{
|
|
1241
1241
|
ok: true,
|
|
1242
1242
|
dry_run: true,
|
|
@@ -1257,7 +1257,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1257
1257
|
);
|
|
1258
1258
|
return;
|
|
1259
1259
|
}
|
|
1260
|
-
const payload = await new (0,
|
|
1260
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1261
1261
|
enabled: true,
|
|
1262
1262
|
thresholdCredits,
|
|
1263
1263
|
refillToCredits,
|
|
@@ -1265,7 +1265,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1265
1265
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1266
1266
|
idempotencyKey
|
|
1267
1267
|
});
|
|
1268
|
-
|
|
1268
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1269
1269
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1270
1270
|
{ json: options.json }
|
|
1271
1271
|
);
|
|
@@ -1273,7 +1273,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1273
1273
|
async function handleAutoRechargeOff(options) {
|
|
1274
1274
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1275
1275
|
if (options.dryRun) {
|
|
1276
|
-
|
|
1276
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1277
1277
|
{
|
|
1278
1278
|
ok: true,
|
|
1279
1279
|
dry_run: true,
|
|
@@ -1288,11 +1288,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1288
1288
|
);
|
|
1289
1289
|
return;
|
|
1290
1290
|
}
|
|
1291
|
-
const payload = await new (0,
|
|
1291
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1292
1292
|
enabled: false,
|
|
1293
1293
|
idempotencyKey
|
|
1294
1294
|
});
|
|
1295
|
-
|
|
1295
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1296
1296
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1297
1297
|
{ json: options.json }
|
|
1298
1298
|
);
|
|
@@ -1311,11 +1311,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1311
1311
|
return;
|
|
1312
1312
|
}
|
|
1313
1313
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1314
|
-
const payload = await new (0,
|
|
1314
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.purchaseCredits({
|
|
1315
1315
|
credits,
|
|
1316
1316
|
idempotencyKey
|
|
1317
1317
|
});
|
|
1318
|
-
|
|
1318
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1319
1319
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1320
1320
|
{ json: options.json }
|
|
1321
1321
|
);
|
|
@@ -1351,7 +1351,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1351
1351
|
return;
|
|
1352
1352
|
}
|
|
1353
1353
|
if (options.dryRun) {
|
|
1354
|
-
|
|
1354
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1355
1355
|
{
|
|
1356
1356
|
ok: true,
|
|
1357
1357
|
dry_run: true,
|
|
@@ -1364,12 +1364,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1364
1364
|
);
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
|
-
const payload = await new (0,
|
|
1367
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1368
1368
|
credits,
|
|
1369
1369
|
orgId: options.orgId,
|
|
1370
1370
|
idempotencyKey: options.idempotencyKey
|
|
1371
1371
|
});
|
|
1372
|
-
|
|
1372
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1373
1373
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1374
1374
|
{ json: options.json }
|
|
1375
1375
|
);
|
|
@@ -1389,37 +1389,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1389
1389
|
return;
|
|
1390
1390
|
}
|
|
1391
1391
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1392
|
-
const payload = await new (0,
|
|
1392
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.transitionPlan({
|
|
1393
1393
|
action: "start_or_change",
|
|
1394
1394
|
targetPlanSku: planSku,
|
|
1395
1395
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1396
1396
|
idempotencyKey
|
|
1397
1397
|
});
|
|
1398
|
-
|
|
1398
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1399
1399
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1400
1400
|
{ json: options.json }
|
|
1401
1401
|
);
|
|
1402
1402
|
}
|
|
1403
1403
|
async function handleTargetPlanCancellation(options) {
|
|
1404
1404
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1405
|
-
const payload = await new (0,
|
|
1405
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.transitionPlan({
|
|
1406
1406
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1407
1407
|
idempotencyKey
|
|
1408
1408
|
});
|
|
1409
|
-
|
|
1409
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1410
1410
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1411
1411
|
{ json: options.json }
|
|
1412
1412
|
);
|
|
1413
1413
|
}
|
|
1414
1414
|
async function handleTargetPortal(options) {
|
|
1415
|
-
const payload = await new (0,
|
|
1415
|
+
const payload = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.portalSession(
|
|
1416
1416
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1417
1417
|
);
|
|
1418
|
-
if (!options.json && !options.noOpen)
|
|
1419
|
-
|
|
1418
|
+
if (!options.json && !options.noOpen) _chunkWWOUGKO6js.openInBrowser.call(void 0, payload.url);
|
|
1419
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1420
1420
|
}
|
|
1421
1421
|
async function handleRedeemCode(code, options) {
|
|
1422
|
-
const { http } =
|
|
1422
|
+
const { http } = _chunkWWOUGKO6js.getAuthedHttpClient.call(void 0, );
|
|
1423
1423
|
const payload = await http.post(
|
|
1424
1424
|
"/api/v2/billing/checkout",
|
|
1425
1425
|
{
|
|
@@ -1427,8 +1427,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
);
|
|
1429
1429
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1430
|
-
if (!options.json && !options.noOpen && url)
|
|
1431
|
-
|
|
1430
|
+
if (!options.json && !options.noOpen && url) _chunkWWOUGKO6js.openInBrowser.call(void 0, url);
|
|
1431
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0,
|
|
1432
1432
|
{
|
|
1433
1433
|
...payload,
|
|
1434
1434
|
render: {
|
|
@@ -1486,14 +1486,14 @@ Examples:
|
|
|
1486
1486
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1487
1487
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1488
1488
|
}
|
|
1489
|
-
const quote = await new (0,
|
|
1489
|
+
const quote = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.quote({
|
|
1490
1490
|
quantity,
|
|
1491
1491
|
sandbox_runtime: {
|
|
1492
1492
|
timeout: options.sandboxTimeout,
|
|
1493
1493
|
size: "standard"
|
|
1494
1494
|
}
|
|
1495
1495
|
});
|
|
1496
|
-
|
|
1496
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0, quote, {
|
|
1497
1497
|
json: options.json,
|
|
1498
1498
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1499
1499
|
${quote.explanation}
|
|
@@ -1721,8 +1721,8 @@ Examples:
|
|
|
1721
1721
|
new (0, _commander.Command)("trigger").description(
|
|
1722
1722
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1723
1723
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1724
|
-
const result = await new (0,
|
|
1725
|
-
|
|
1724
|
+
const result = await new (0, _chunkU4MH5KFQjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1725
|
+
_chunkWWOUGKO6js.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1726
1726
|
})
|
|
1727
1727
|
);
|
|
1728
1728
|
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(
|