deepline 0.3.457 → 0.3.458
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.ts +0 -23
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/auth-4CBIXFOR.js +40 -0
- package/dist/cli/{auth-MZG5NF5U.mjs → auth-APD43NYT.mjs} +4 -4
- package/dist/cli/{billing-DWKZIL66.mjs → billing-QW4K272E.mjs} +4 -4
- package/dist/cli/{billing-RG3LF5OU.js → billing-TI4YOWAJ.js} +73 -73
- package/dist/cli/{chunk-KKPKLLNB.js → chunk-2A63IJ2J.js} +6 -6
- package/dist/cli/{chunk-QGLFBQ43.mjs → chunk-4TWDW7PI.mjs} +5 -5
- package/dist/cli/{chunk-YVQVS7SF.mjs → chunk-5KO62ZXQ.mjs} +4 -4
- package/dist/cli/{chunk-KTAVYWYI.js → chunk-6FLTFNAY.js} +8 -8
- package/dist/cli/{chunk-W3IZ55XS.mjs → chunk-6UJJZWT2.mjs} +3 -3
- package/dist/cli/{chunk-JL5DCH37.js → chunk-7M6C4STX.js} +16 -16
- package/dist/cli/{chunk-7IIRZXCO.mjs → chunk-7MZQ64FI.mjs} +1 -1
- package/dist/cli/{chunk-US3SZ7VQ.js → chunk-AA2DMXBN.js} +50 -50
- package/dist/cli/{chunk-EHEBXARN.js → chunk-AJQUFGTJ.js} +1 -1
- package/dist/cli/{chunk-CTWD4ZHP.js → chunk-CF2GXP2O.js} +2 -2
- package/dist/cli/{chunk-TTBQOHG4.js → chunk-DHERSOIG.js} +4 -4
- package/dist/cli/{chunk-CHBYYJ7Q.mjs → chunk-ECS3KXM7.mjs} +1 -1
- package/dist/cli/{chunk-KVXBMYRY.js → chunk-ECVZUWRR.js} +2 -2
- package/dist/cli/{chunk-LVGCJZ5S.mjs → chunk-EMIR3EXE.mjs} +1 -12
- package/dist/cli/{chunk-MU4ZDVQK.mjs → chunk-EO7WQN5X.mjs} +8 -8
- package/dist/cli/{chunk-LHHJATXY.mjs → chunk-GFGBHE43.mjs} +2 -2
- package/dist/cli/{chunk-L7WE7Q63.mjs → chunk-HJ5WE6S5.mjs} +1 -1
- package/dist/cli/{chunk-5TIASNUT.js → chunk-JIDT3SCM.js} +20 -20
- package/dist/cli/{chunk-VLL6RRIA.js → chunk-K6IHE6R5.js} +8 -8
- package/dist/cli/{chunk-SFCNYJ4B.js → chunk-L27PA5GT.js} +10 -21
- package/dist/cli/{chunk-J2ZS4PEC.js → chunk-LJDJ5GPR.js} +51 -51
- package/dist/cli/{chunk-NMVLO3JM.mjs → chunk-LZUXLXL3.mjs} +3 -3
- package/dist/cli/{chunk-F64XBZ3A.mjs → chunk-MNEN3RYE.mjs} +2 -2
- package/dist/cli/{chunk-JCWEQQGE.js → chunk-NDODDIEC.js} +35 -35
- package/dist/cli/{chunk-AQFHU3DW.js → chunk-NMJ4D2WO.js} +0 -21
- package/dist/cli/{chunk-LKAITV2M.js → chunk-NXVHTBBS.js} +26 -26
- package/dist/cli/{chunk-E5BGIERY.mjs → chunk-OTN6GV74.mjs} +1 -1
- package/dist/cli/{chunk-77Z5BO7D.mjs → chunk-R2GLGLDR.mjs} +0 -21
- package/dist/cli/{chunk-CQHTN3RY.mjs → chunk-U5O5TZC2.mjs} +1 -1
- package/dist/cli/{chunk-EXOCQILY.mjs → chunk-V6BEYE35.mjs} +2 -2
- package/dist/cli/{chunk-X4XNGIPL.mjs → chunk-VYLWKTDQ.mjs} +3 -3
- package/dist/cli/{chunk-MWRPRDHW.js → chunk-W3OAT72T.js} +6 -6
- package/dist/cli/{chunk-JANCYPKP.mjs → chunk-X3ZRKA3V.mjs} +1 -1
- package/dist/cli/{chunk-7JW4WIWU.js → chunk-XBVZ35XJ.js} +81 -81
- package/dist/cli/{chunk-GLXYOSEL.js → chunk-XI6AZJPO.js} +3 -3
- package/dist/cli/{chunk-BD5A242C.mjs → chunk-ZLL345RP.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-QSAAPCYE.js → csv-NIKB3RQX.js} +12 -12
- package/dist/cli/{csv-27M4PREP.mjs → csv-VOX5XXBB.mjs} +3 -3
- package/dist/cli/{db-H73PJID6.mjs → db-GETE5AIV.mjs} +4 -4
- package/dist/cli/{db-LYPTNAPX.js → db-ZH2NUZ3F.js} +25 -25
- package/dist/cli/{describe-KYLGQSMO.js → describe-JZ6QOTPY.js} +17 -17
- package/dist/cli/{describe-Y5BHLZLH.mjs → describe-LWGEU6IE.mjs} +13 -13
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-DHGYCPFO.js → executions-CEVMJ4QY.js} +6 -6
- package/dist/cli/{executions-ZGQEWS2X.mjs → executions-DUMCTK4E.mjs} +4 -4
- package/dist/cli/{feedback-EBXU4ANA.mjs → feedback-UEYC3V3O.mjs} +3 -3
- package/dist/cli/{feedback-3YQPYCMT.js → feedback-VI4N44TJ.js} +7 -7
- package/dist/cli/{git-CFPU33DJ.mjs → git-BOMW65V5.mjs} +4 -4
- package/dist/cli/git-QISWQQM3.js +24 -0
- package/dist/cli/index.js +136 -136
- package/dist/cli/index.mjs +38 -38
- package/dist/cli/{legacy-noops-TFGIWA5C.mjs → legacy-noops-33X26VLN.mjs} +4 -4
- package/dist/cli/{legacy-noops-CDKZ7RYT.js → legacy-noops-SWPSUKTD.js} +7 -7
- package/dist/cli/{monitors-6ED5RJYG.mjs → monitors-465GCZ73.mjs} +5 -5
- package/dist/cli/{monitors-PCMAB7NP.js → monitors-6HMDLDKU.js} +89 -89
- package/dist/cli/{org-V4QYXLOL.mjs → org-CAAOHGTM.mjs} +4 -4
- package/dist/cli/{org-KAARC2XN.js → org-JFQ4QBHQ.js} +66 -66
- package/dist/cli/{play-OTTJ6S2G.mjs → play-NJP6HIQD.mjs} +11 -11
- package/dist/cli/{play-PPWCRYME.js → play-UKD4KR4K.js} +284 -284
- package/dist/cli/{providers-ULL5EJHY.mjs → providers-UVHTTSKV.mjs} +4 -46
- package/dist/cli/{providers-ICY74FM5.js → providers-YTRBZARB.js} +8 -50
- package/dist/cli/{quickstart-YOUCGJQP.js → quickstart-3GXVHJRL.js} +5 -5
- package/dist/cli/{quickstart-QLVS53TD.mjs → quickstart-CB3TQ5L2.mjs} +3 -3
- package/dist/cli/{search-AGYQR6YQ.mjs → search-NXA6526R.mjs} +5 -5
- package/dist/cli/search-YM4ATHTV.js +30 -0
- package/dist/cli/{secrets-OA3HHNHP.js → secrets-E3Y6YDKR.js} +13 -13
- package/dist/cli/{secrets-PJFO3RZW.mjs → secrets-JFJK2X2N.mjs} +4 -4
- package/dist/cli/{sessions-WNRZQEBL.mjs → sessions-HAZJLQQL.mjs} +4 -4
- package/dist/cli/{sessions-OYTROOOG.js → sessions-NKLP6TVY.js} +5 -5
- package/dist/cli/{settings-JIYDWBPM.mjs → settings-BSD4DW4O.mjs} +10 -10
- package/dist/cli/{settings-RXGOZAZI.js → settings-D4LEZOEW.js} +77 -77
- package/dist/cli/{setup-VXNSUQYT.js → setup-KMZ4EFDK.js} +43 -43
- package/dist/cli/{setup-YAYE7KQM.mjs → setup-QO64H6YO.mjs} +8 -8
- package/dist/cli/skills-T5VTI2LZ.js +30 -0
- package/dist/cli/{skills-XYDBLLRK.mjs → skills-YLAH2YNN.mjs} +6 -6
- package/dist/cli/{tools-TRDYMDPL.mjs → tools-KGQ76YQE.mjs} +13 -13
- package/dist/cli/tools-M574OF4H.js +45 -0
- package/dist/cli/{update-KH36JGLK.mjs → update-JXUSVBH7.mjs} +8 -8
- package/dist/cli/update-WNG5DNNO.js +32 -0
- package/dist/cli/{workflow-EYWCMD4D.mjs → workflow-NYWZWN5Z.mjs} +5 -5
- package/dist/cli/{workflow-CQZBGIQ2.js → workflow-YTXY76FN.js} +15 -15
- package/dist/{client-BX2EVlPo.d.mts → client-BbU5_j7n.d.mts} +0 -14
- package/dist/{client-CRz2laoR.d.ts → client-CYqG23K1.d.ts} +0 -14
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +84 -84
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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-O3XJDECG.js +0 -40
- package/dist/cli/git-4ACVGA4W.js +0 -24
- package/dist/cli/search-XNU6FOOH.js +0 -30
- package/dist/cli/skills-5UCGZVCN.js +0 -30
- package/dist/cli/tools-UMSFNX5B.js +0 -45
- package/dist/cli/update-K5AOROYI.js +0 -32
|
@@ -5232,29 +5232,6 @@ export class DeeplineClient {
|
|
|
5232
5232
|
return this.http.get('/api/v2/settings/notifications');
|
|
5233
5233
|
}
|
|
5234
5234
|
|
|
5235
|
-
/** Start provider OAuth; complete the returned URL in an authenticated browser. */
|
|
5236
|
-
async connectIntegration(
|
|
5237
|
-
provider: string,
|
|
5238
|
-
scopes?: string[],
|
|
5239
|
-
): Promise<{ ok: boolean; redirect_url: string }> {
|
|
5240
|
-
return this.http.post('/api/v2/integrations/connect', {
|
|
5241
|
-
provider,
|
|
5242
|
-
...(scopes ? { scopes } : {}),
|
|
5243
|
-
});
|
|
5244
|
-
}
|
|
5245
|
-
|
|
5246
|
-
/** Probe an OAuth connection, refreshing expired tokens through the normal lifecycle. */
|
|
5247
|
-
async testIntegration(provider: string): Promise<{
|
|
5248
|
-
provider: string;
|
|
5249
|
-
status: string;
|
|
5250
|
-
hasAccessToken: boolean;
|
|
5251
|
-
hasRefreshToken: boolean;
|
|
5252
|
-
expiresAt: number | null;
|
|
5253
|
-
apiCheck: Record<string, unknown>;
|
|
5254
|
-
}> {
|
|
5255
|
-
return this.http.get(`/api/oauth/test/${encodeURIComponent(provider)}`);
|
|
5256
|
-
}
|
|
5257
|
-
|
|
5258
5235
|
/** Save provider-owned credential fields without starting an OAuth browser flow. */
|
|
5259
5236
|
async setIntegrationCredentials(
|
|
5260
5237
|
provider: string,
|
|
@@ -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.458',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -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 _chunkAA2DMXBNjs = require('./chunk-AA2DMXBN.js');
|
|
17
|
+
require('./chunk-2A63IJ2J.js');
|
|
18
|
+
require('./chunk-DHERSOIG.js');
|
|
19
|
+
require('./chunk-ALJJRZNJ.js');
|
|
20
|
+
require('./chunk-XNYIZMNQ.js');
|
|
21
|
+
require('./chunk-DIAWYWT5.js');
|
|
22
|
+
require('./chunk-AJQUFGTJ.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 = _chunkAA2DMXBNjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkAA2DMXBNjs.authStatusLine; exports.clearPendingClaim = _chunkAA2DMXBNjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkAA2DMXBNjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkAA2DMXBNjs.handleRegister; exports.handleStatus = _chunkAA2DMXBNjs.handleStatus; exports.handleWait = _chunkAA2DMXBNjs.handleWait; exports.httpJson = _chunkAA2DMXBNjs.httpJson; exports.readPendingAuthClaim = _chunkAA2DMXBNjs.readPendingAuthClaim; exports.readStatusBanner = _chunkAA2DMXBNjs.readStatusBanner; exports.registerAuthCommands = _chunkAA2DMXBNjs.registerAuthCommands; exports.reportSetupCompleted = _chunkAA2DMXBNjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkAA2DMXBNjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkAA2DMXBNjs.statusBannerLine;
|
|
@@ -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-GFGBHE43.mjs";
|
|
17
|
+
import "./chunk-7MZQ64FI.mjs";
|
|
18
|
+
import "./chunk-U5O5TZC2.mjs";
|
|
19
19
|
import "./chunk-4QF2K7TM.mjs";
|
|
20
20
|
import "./chunk-DLIRSHV6.mjs";
|
|
21
21
|
import "./chunk-HBL4PM5Q.mjs";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ECS3KXM7.mjs";
|
|
23
23
|
import "./chunk-WZYKRD7T.mjs";
|
|
24
24
|
import "./chunk-KRD6H754.mjs";
|
|
25
25
|
export {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DeeplineClient,
|
|
3
3
|
iterateCursorPages,
|
|
4
4
|
requireBillingIdempotencyKey
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EMIR3EXE.mjs";
|
|
6
6
|
import "./chunk-L2VKAASU.mjs";
|
|
7
7
|
import "./chunk-FAG4DFUC.mjs";
|
|
8
8
|
import "./chunk-EIMG75BT.mjs";
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
openInBrowser,
|
|
14
14
|
printCommandEnvelope,
|
|
15
15
|
shouldEmitJson
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-7MZQ64FI.mjs";
|
|
17
|
+
import "./chunk-U5O5TZC2.mjs";
|
|
18
18
|
import {
|
|
19
19
|
AuthError,
|
|
20
20
|
ConfigError
|
|
@@ -23,7 +23,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
23
23
|
import {
|
|
24
24
|
DeeplineError
|
|
25
25
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-ECS3KXM7.mjs";
|
|
27
27
|
import "./chunk-WZYKRD7T.mjs";
|
|
28
28
|
import "./chunk-KRD6H754.mjs";
|
|
29
29
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkL27PA5GTjs = require('./chunk-L27PA5GT.js');
|
|
6
6
|
require('./chunk-E4CABWXL.js');
|
|
7
7
|
require('./chunk-JKVRBCZL.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 _chunk2A63IJ2Jjs = require('./chunk-2A63IJ2J.js');
|
|
17
|
+
require('./chunk-DHERSOIG.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
26
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-AJQUFGTJ.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
|
+
_chunk2A63IJ2Jjs.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, )}` : _chunkL27PA5GTjs.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, )}`;
|
|
@@ -312,7 +312,7 @@ function defaultLedgerExportPath() {
|
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
314
|
async function handleBalance(options) {
|
|
315
|
-
const { http } =
|
|
315
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
316
316
|
const payload = await http.get(
|
|
317
317
|
"/api/v2/billing/balance"
|
|
318
318
|
);
|
|
@@ -396,7 +396,7 @@ async function handleBalance(options) {
|
|
|
396
396
|
...options.verbose ? detail : [],
|
|
397
397
|
...lines.slice(1)
|
|
398
398
|
];
|
|
399
|
-
|
|
399
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
400
400
|
{
|
|
401
401
|
...payload,
|
|
402
402
|
...recovery ? { recovery } : {},
|
|
@@ -420,7 +420,7 @@ function quoteShellArgument(value) {
|
|
|
420
420
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
421
421
|
}
|
|
422
422
|
async function handleUsage(options) {
|
|
423
|
-
const { http } =
|
|
423
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
424
424
|
const params = new URLSearchParams();
|
|
425
425
|
if (options.requestId !== void 0) {
|
|
426
426
|
const requestId = options.requestId.trim();
|
|
@@ -501,7 +501,7 @@ async function handleUsage(options) {
|
|
|
501
501
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
502
502
|
] : []
|
|
503
503
|
];
|
|
504
|
-
|
|
504
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
505
505
|
{
|
|
506
506
|
...payload,
|
|
507
507
|
recent: {
|
|
@@ -515,7 +515,7 @@ async function handleUsage(options) {
|
|
|
515
515
|
);
|
|
516
516
|
}
|
|
517
517
|
async function handleLimit(options) {
|
|
518
|
-
const { http } =
|
|
518
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
519
519
|
const payload = await http.get(
|
|
520
520
|
"/api/v2/billing/limit"
|
|
521
521
|
);
|
|
@@ -523,7 +523,7 @@ async function handleLimit(options) {
|
|
|
523
523
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
524
524
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
525
525
|
] : ["Monthly usage cap: off"];
|
|
526
|
-
|
|
526
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
527
527
|
{
|
|
528
528
|
...payload,
|
|
529
529
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -532,12 +532,12 @@ async function handleLimit(options) {
|
|
|
532
532
|
);
|
|
533
533
|
}
|
|
534
534
|
async function handleSetLimit(credits, options) {
|
|
535
|
-
const { http } =
|
|
535
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
536
536
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
537
537
|
method: "PUT",
|
|
538
538
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
539
539
|
});
|
|
540
|
-
|
|
540
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
541
541
|
{
|
|
542
542
|
...payload,
|
|
543
543
|
render: {
|
|
@@ -553,11 +553,11 @@ async function handleSetLimit(credits, options) {
|
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
555
|
async function handleLimitOff(options) {
|
|
556
|
-
const { http } =
|
|
556
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
557
557
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
558
558
|
method: "DELETE"
|
|
559
559
|
});
|
|
560
|
-
|
|
560
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
561
561
|
{
|
|
562
562
|
...payload,
|
|
563
563
|
render: {
|
|
@@ -577,7 +577,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
577
577
|
let initialized = false;
|
|
578
578
|
let pageNumber = 0;
|
|
579
579
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
580
|
-
for await (const entries of
|
|
580
|
+
for await (const entries of _chunkL27PA5GTjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
581
581
|
pageNumber += 1;
|
|
582
582
|
console.error(
|
|
583
583
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -616,7 +616,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
616
616
|
return summary;
|
|
617
617
|
}
|
|
618
618
|
async function handleHistory(options) {
|
|
619
|
-
const { http } =
|
|
619
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
620
620
|
const windows = {
|
|
621
621
|
"1d": 86400,
|
|
622
622
|
"1w": 604800,
|
|
@@ -628,10 +628,10 @@ async function handleHistory(options) {
|
|
|
628
628
|
process.cwd(),
|
|
629
629
|
"deepline",
|
|
630
630
|
"data",
|
|
631
|
-
|
|
631
|
+
_chunk2A63IJ2Jjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
632
632
|
);
|
|
633
633
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
634
|
-
|
|
634
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
635
635
|
{
|
|
636
636
|
output_path: outputPath,
|
|
637
637
|
row_count: summary.row_count,
|
|
@@ -668,14 +668,14 @@ async function handleLedgerExportAll(options) {
|
|
|
668
668
|
);
|
|
669
669
|
return;
|
|
670
670
|
}
|
|
671
|
-
const { http } =
|
|
671
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
672
672
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
673
673
|
const summary = await exportLedger(http, outputPath, {
|
|
674
674
|
sinceAt,
|
|
675
675
|
runId: options.runId,
|
|
676
676
|
operation: options.operation
|
|
677
677
|
});
|
|
678
|
-
|
|
678
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
679
679
|
{
|
|
680
680
|
output_path: outputPath,
|
|
681
681
|
row_count: summary.row_count,
|
|
@@ -714,7 +714,7 @@ function targetPlanLine(plan) {
|
|
|
714
714
|
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"}`;
|
|
715
715
|
}
|
|
716
716
|
async function handlePlans(options) {
|
|
717
|
-
const client = new (0,
|
|
717
|
+
const client = new (0, _chunkL27PA5GTjs.DeeplineClient)();
|
|
718
718
|
const payload = await client.billing.targetPlans();
|
|
719
719
|
const listedCurrentPlan = payload.plans.find(
|
|
720
720
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -727,8 +727,8 @@ async function handlePlans(options) {
|
|
|
727
727
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
728
728
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
729
729
|
];
|
|
730
|
-
const legacyPayload =
|
|
731
|
-
|
|
730
|
+
const legacyPayload = _chunk2A63IJ2Jjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
731
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
732
732
|
{
|
|
733
733
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
734
734
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -738,7 +738,7 @@ async function handlePlans(options) {
|
|
|
738
738
|
);
|
|
739
739
|
}
|
|
740
740
|
async function handleSubscribe(planVersionId, options) {
|
|
741
|
-
const { http } =
|
|
741
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
742
742
|
const payload = await http.request(
|
|
743
743
|
"/api/v2/billing/subscription/checkout",
|
|
744
744
|
{
|
|
@@ -747,8 +747,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
747
747
|
}
|
|
748
748
|
);
|
|
749
749
|
const url = String(payload.checkout_url || "");
|
|
750
|
-
if (!options.json && options.open !== false && url)
|
|
751
|
-
|
|
750
|
+
if (!options.json && options.open !== false && url) _chunk2A63IJ2Jjs.openInBrowser.call(void 0, url);
|
|
751
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
752
752
|
{
|
|
753
753
|
...payload,
|
|
754
754
|
render: {
|
|
@@ -764,7 +764,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
764
764
|
);
|
|
765
765
|
}
|
|
766
766
|
async function handleSubscriptionStatus(options) {
|
|
767
|
-
const client = new (0,
|
|
767
|
+
const client = new (0, _chunkL27PA5GTjs.DeeplineClient)();
|
|
768
768
|
const payload = await client.billing.subscription.status();
|
|
769
769
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
770
770
|
const lines = [
|
|
@@ -784,7 +784,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
784
784
|
],
|
|
785
785
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
786
786
|
];
|
|
787
|
-
|
|
787
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
788
788
|
{
|
|
789
789
|
...payload,
|
|
790
790
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -793,7 +793,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
793
793
|
);
|
|
794
794
|
}
|
|
795
795
|
async function handleSubscriptionCancel(options) {
|
|
796
|
-
const client = new (0,
|
|
796
|
+
const client = new (0, _chunkL27PA5GTjs.DeeplineClient)();
|
|
797
797
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
798
798
|
if (options.dryRun) {
|
|
799
799
|
const status = await client.billing.subscription.status();
|
|
@@ -810,7 +810,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
810
810
|
return;
|
|
811
811
|
}
|
|
812
812
|
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.";
|
|
813
|
-
|
|
813
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
814
814
|
{
|
|
815
815
|
ok: true,
|
|
816
816
|
dry_run: true,
|
|
@@ -865,7 +865,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
865
865
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
866
866
|
"Undo with: deepline billing subscription cancel --undo"
|
|
867
867
|
];
|
|
868
|
-
|
|
868
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
869
869
|
{
|
|
870
870
|
ok: true,
|
|
871
871
|
...result,
|
|
@@ -919,7 +919,7 @@ async function handleInvoices(options) {
|
|
|
919
919
|
return;
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
|
-
const client = new (0,
|
|
922
|
+
const client = new (0, _chunkL27PA5GTjs.DeeplineClient)();
|
|
923
923
|
let payload;
|
|
924
924
|
try {
|
|
925
925
|
payload = await client.billing.invoices.list(
|
|
@@ -948,7 +948,7 @@ async function handleInvoices(options) {
|
|
|
948
948
|
url: entry.url
|
|
949
949
|
}))
|
|
950
950
|
} : { ...payload, count: entries.length };
|
|
951
|
-
|
|
951
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
952
952
|
{
|
|
953
953
|
...envelope,
|
|
954
954
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -957,7 +957,7 @@ async function handleInvoices(options) {
|
|
|
957
957
|
);
|
|
958
958
|
}
|
|
959
959
|
async function handleCheckout(options) {
|
|
960
|
-
const { http } =
|
|
960
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
961
961
|
const payload = await http.post(
|
|
962
962
|
"/api/v2/billing/checkout",
|
|
963
963
|
{
|
|
@@ -967,8 +967,8 @@ async function handleCheckout(options) {
|
|
|
967
967
|
}
|
|
968
968
|
);
|
|
969
969
|
const url = String(payload.url || payload.checkout_url || "");
|
|
970
|
-
if (!options.json && !options.noOpen && url)
|
|
971
|
-
|
|
970
|
+
if (!options.json && !options.noOpen && url) _chunk2A63IJ2Jjs.openInBrowser.call(void 0, url);
|
|
971
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
972
972
|
{
|
|
973
973
|
...payload,
|
|
974
974
|
render: {
|
|
@@ -1013,7 +1013,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1013
1013
|
return;
|
|
1014
1014
|
}
|
|
1015
1015
|
if (options.dryRun) {
|
|
1016
|
-
|
|
1016
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1017
1017
|
{
|
|
1018
1018
|
ok: true,
|
|
1019
1019
|
dry_run: true,
|
|
@@ -1043,7 +1043,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1043
1043
|
);
|
|
1044
1044
|
return;
|
|
1045
1045
|
}
|
|
1046
|
-
const client = new (0,
|
|
1046
|
+
const client = new (0, _chunkL27PA5GTjs.DeeplineClient)();
|
|
1047
1047
|
let payload;
|
|
1048
1048
|
try {
|
|
1049
1049
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1060,7 +1060,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1060
1060
|
return;
|
|
1061
1061
|
}
|
|
1062
1062
|
if (payload.status === "pending") {
|
|
1063
|
-
|
|
1063
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1064
1064
|
{
|
|
1065
1065
|
ok: true,
|
|
1066
1066
|
...payload,
|
|
@@ -1124,17 +1124,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1124
1124
|
]
|
|
1125
1125
|
}
|
|
1126
1126
|
};
|
|
1127
|
-
|
|
1127
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1128
1128
|
json: options.json
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
1131
|
async function handleTargetStatus(options) {
|
|
1132
|
-
const client = new (0,
|
|
1132
|
+
const client = new (0, _chunkL27PA5GTjs.DeeplineClient)();
|
|
1133
1133
|
const payload = await client.billing.targetStatus();
|
|
1134
1134
|
const balanceCommand = "deepline billing balance";
|
|
1135
1135
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1136
1136
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1137
|
-
|
|
1137
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1138
1138
|
{
|
|
1139
1139
|
ok: true,
|
|
1140
1140
|
...payload,
|
|
@@ -1164,8 +1164,8 @@ async function handleTargetStatus(options) {
|
|
|
1164
1164
|
);
|
|
1165
1165
|
}
|
|
1166
1166
|
async function handleEntitlements(options) {
|
|
1167
|
-
const payload = await new (0,
|
|
1168
|
-
|
|
1167
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.entitlements();
|
|
1168
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1169
1169
|
{
|
|
1170
1170
|
ok: true,
|
|
1171
1171
|
...payload,
|
|
@@ -1193,7 +1193,7 @@ async function handleEntitlements(options) {
|
|
|
1193
1193
|
);
|
|
1194
1194
|
}
|
|
1195
1195
|
async function handleAutoRechargeStatus(options) {
|
|
1196
|
-
const payload = await new (0,
|
|
1196
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1197
1197
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1198
1198
|
const lines = [
|
|
1199
1199
|
`State: ${state}`,
|
|
@@ -1203,7 +1203,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1203
1203
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1204
1204
|
] : []
|
|
1205
1205
|
];
|
|
1206
|
-
|
|
1206
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1207
1207
|
{
|
|
1208
1208
|
ok: true,
|
|
1209
1209
|
...payload,
|
|
@@ -1252,7 +1252,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1254
1254
|
if (options.dryRun) {
|
|
1255
|
-
|
|
1255
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1256
1256
|
{
|
|
1257
1257
|
ok: true,
|
|
1258
1258
|
dry_run: true,
|
|
@@ -1273,7 +1273,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1273
1273
|
);
|
|
1274
1274
|
return;
|
|
1275
1275
|
}
|
|
1276
|
-
const payload = await new (0,
|
|
1276
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1277
1277
|
enabled: true,
|
|
1278
1278
|
thresholdCredits,
|
|
1279
1279
|
refillToCredits,
|
|
@@ -1281,7 +1281,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1281
1281
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1282
1282
|
idempotencyKey
|
|
1283
1283
|
});
|
|
1284
|
-
|
|
1284
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1286
1286
|
{ json: options.json }
|
|
1287
1287
|
);
|
|
@@ -1289,7 +1289,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1289
1289
|
async function handleAutoRechargeOff(options) {
|
|
1290
1290
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1291
1291
|
if (options.dryRun) {
|
|
1292
|
-
|
|
1292
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1293
1293
|
{
|
|
1294
1294
|
ok: true,
|
|
1295
1295
|
dry_run: true,
|
|
@@ -1304,11 +1304,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1304
1304
|
);
|
|
1305
1305
|
return;
|
|
1306
1306
|
}
|
|
1307
|
-
const payload = await new (0,
|
|
1307
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1308
1308
|
enabled: false,
|
|
1309
1309
|
idempotencyKey
|
|
1310
1310
|
});
|
|
1311
|
-
|
|
1311
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1312
1312
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1313
1313
|
{ json: options.json }
|
|
1314
1314
|
);
|
|
@@ -1327,11 +1327,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1327
1327
|
return;
|
|
1328
1328
|
}
|
|
1329
1329
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1330
|
-
const payload = await new (0,
|
|
1330
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.purchaseCredits({
|
|
1331
1331
|
credits,
|
|
1332
1332
|
idempotencyKey
|
|
1333
1333
|
});
|
|
1334
|
-
|
|
1334
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1335
1335
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1336
1336
|
{ json: options.json }
|
|
1337
1337
|
);
|
|
@@ -1367,7 +1367,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1367
1367
|
return;
|
|
1368
1368
|
}
|
|
1369
1369
|
if (options.dryRun) {
|
|
1370
|
-
|
|
1370
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1371
1371
|
{
|
|
1372
1372
|
ok: true,
|
|
1373
1373
|
dry_run: true,
|
|
@@ -1380,12 +1380,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1380
1380
|
);
|
|
1381
1381
|
return;
|
|
1382
1382
|
}
|
|
1383
|
-
const payload = await new (0,
|
|
1383
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1384
1384
|
credits,
|
|
1385
1385
|
orgId: options.orgId,
|
|
1386
1386
|
idempotencyKey: options.idempotencyKey
|
|
1387
1387
|
});
|
|
1388
|
-
|
|
1388
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1389
1389
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1390
1390
|
{ json: options.json }
|
|
1391
1391
|
);
|
|
@@ -1405,37 +1405,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1405
1405
|
return;
|
|
1406
1406
|
}
|
|
1407
1407
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1408
|
-
const payload = await new (0,
|
|
1408
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.transitionPlan({
|
|
1409
1409
|
action: "start_or_change",
|
|
1410
1410
|
targetPlanSku: planSku,
|
|
1411
1411
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1412
1412
|
idempotencyKey
|
|
1413
1413
|
});
|
|
1414
|
-
|
|
1414
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1415
1415
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1416
1416
|
{ json: options.json }
|
|
1417
1417
|
);
|
|
1418
1418
|
}
|
|
1419
1419
|
async function handleTargetPlanCancellation(options) {
|
|
1420
1420
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1421
|
-
const payload = await new (0,
|
|
1421
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.transitionPlan({
|
|
1422
1422
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1423
1423
|
idempotencyKey
|
|
1424
1424
|
});
|
|
1425
|
-
|
|
1425
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1426
1426
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1427
1427
|
{ json: options.json }
|
|
1428
1428
|
);
|
|
1429
1429
|
}
|
|
1430
1430
|
async function handleTargetPortal(options) {
|
|
1431
|
-
const payload = await new (0,
|
|
1431
|
+
const payload = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.portalSession(
|
|
1432
1432
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1433
1433
|
);
|
|
1434
|
-
if (!options.json && !options.noOpen)
|
|
1435
|
-
|
|
1434
|
+
if (!options.json && !options.noOpen) _chunk2A63IJ2Jjs.openInBrowser.call(void 0, payload.url);
|
|
1435
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1436
1436
|
}
|
|
1437
1437
|
async function handleRedeemCode(code, options) {
|
|
1438
|
-
const { http } =
|
|
1438
|
+
const { http } = _chunk2A63IJ2Jjs.getAuthedHttpClient.call(void 0, );
|
|
1439
1439
|
const payload = await http.post(
|
|
1440
1440
|
"/api/v2/billing/checkout",
|
|
1441
1441
|
{
|
|
@@ -1443,8 +1443,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
);
|
|
1445
1445
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1446
|
-
if (!options.json && !options.noOpen && url)
|
|
1447
|
-
|
|
1446
|
+
if (!options.json && !options.noOpen && url) _chunk2A63IJ2Jjs.openInBrowser.call(void 0, url);
|
|
1447
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0,
|
|
1448
1448
|
{
|
|
1449
1449
|
...payload,
|
|
1450
1450
|
render: {
|
|
@@ -1502,14 +1502,14 @@ Examples:
|
|
|
1502
1502
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1503
1503
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1504
1504
|
}
|
|
1505
|
-
const quote = await new (0,
|
|
1505
|
+
const quote = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.quote({
|
|
1506
1506
|
quantity,
|
|
1507
1507
|
sandbox_runtime: {
|
|
1508
1508
|
timeout: options.sandboxTimeout,
|
|
1509
1509
|
size: "standard"
|
|
1510
1510
|
}
|
|
1511
1511
|
});
|
|
1512
|
-
|
|
1512
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0, quote, {
|
|
1513
1513
|
json: options.json,
|
|
1514
1514
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1515
1515
|
${quote.explanation}
|
|
@@ -1739,8 +1739,8 @@ Examples:
|
|
|
1739
1739
|
new (0, _commander.Command)("trigger").description(
|
|
1740
1740
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1741
1741
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1742
|
-
const result = await new (0,
|
|
1743
|
-
|
|
1742
|
+
const result = await new (0, _chunkL27PA5GTjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1743
|
+
_chunk2A63IJ2Jjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1744
1744
|
})
|
|
1745
1745
|
);
|
|
1746
1746
|
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(
|