deepline 0.2.12 → 0.2.13
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 +159 -3
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +70 -87
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +24 -7
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-contract.ts +8 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +7 -4
- package/dist/cli/index.js +158 -2
- package/dist/cli/index.mjs +158 -2
- package/dist/index.d.mts +90 -3
- package/dist/index.d.ts +90 -3
- package/dist/index.js +64 -2
- package/dist/index.mjs +64 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
|
|
|
763
763
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
764
764
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
765
765
|
// release keeps lazy paging semantics independent of row residency.
|
|
766
|
-
version: "0.2.
|
|
766
|
+
version: "0.2.13",
|
|
767
767
|
contracts: {
|
|
768
768
|
api: {
|
|
769
769
|
name: "sdk-http-api",
|
|
@@ -3229,6 +3229,17 @@ function resolveToolExecuteTimeoutMs(toolId, input) {
|
|
|
3229
3229
|
}
|
|
3230
3230
|
var RUNS_FAILED_LOG_LIMIT = 20;
|
|
3231
3231
|
var RUN_LOGS_PAGE_LIMIT = 1e3;
|
|
3232
|
+
function requireTargetBillingIdempotencyKey(value) {
|
|
3233
|
+
const normalized = value.trim();
|
|
3234
|
+
if (normalized.length === 0 || normalized.length > 200 || normalized !== value) {
|
|
3235
|
+
throw new DeeplineError(
|
|
3236
|
+
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace.",
|
|
3237
|
+
void 0,
|
|
3238
|
+
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
3239
|
+
);
|
|
3240
|
+
}
|
|
3241
|
+
return normalized;
|
|
3242
|
+
}
|
|
3232
3243
|
function isRecord6(value) {
|
|
3233
3244
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
3234
3245
|
}
|
|
@@ -3499,7 +3510,12 @@ var DeeplineClient = class {
|
|
|
3499
3510
|
},
|
|
3500
3511
|
invoices: {
|
|
3501
3512
|
list: (options2) => this.listBillingInvoices(options2)
|
|
3502
|
-
}
|
|
3513
|
+
},
|
|
3514
|
+
targetPlans: () => this.getTargetBillingPlans(),
|
|
3515
|
+
targetStatus: () => this.getTargetBillingStatus(),
|
|
3516
|
+
purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
|
|
3517
|
+
transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
|
|
3518
|
+
portalSession: () => this.createTargetBillingPortalSession()
|
|
3503
3519
|
};
|
|
3504
3520
|
this.monitors = {
|
|
3505
3521
|
status: () => this.getMonitorsAccess(),
|
|
@@ -5413,6 +5429,52 @@ var DeeplineClient = class {
|
|
|
5413
5429
|
`/api/v2/billing/invoices${suffix}`
|
|
5414
5430
|
);
|
|
5415
5431
|
}
|
|
5432
|
+
/** List the reviewed target plans and whether new acquisition is enabled. */
|
|
5433
|
+
async getTargetBillingPlans() {
|
|
5434
|
+
return this.http.get("/api/v2/billing/plans");
|
|
5435
|
+
}
|
|
5436
|
+
/** Read the workspace's normalized target plan, payment, and balance state. */
|
|
5437
|
+
async getTargetBillingStatus() {
|
|
5438
|
+
return this.http.get("/api/v2/billing/status");
|
|
5439
|
+
}
|
|
5440
|
+
/**
|
|
5441
|
+
* Purchase target-billing credits through the durable commercial operation
|
|
5442
|
+
* flow. The caller supplies an idempotency key for safe retries.
|
|
5443
|
+
*/
|
|
5444
|
+
async purchaseTargetBillingCredits(options) {
|
|
5445
|
+
const idempotencyKey = requireTargetBillingIdempotencyKey(
|
|
5446
|
+
options.idempotencyKey
|
|
5447
|
+
);
|
|
5448
|
+
return this.http.post(
|
|
5449
|
+
"/api/v2/billing/credit-purchases",
|
|
5450
|
+
{ credits: options.credits },
|
|
5451
|
+
{ "Idempotency-Key": idempotencyKey },
|
|
5452
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
5453
|
+
);
|
|
5454
|
+
}
|
|
5455
|
+
/**
|
|
5456
|
+
* Start, change, cancel, or restore a target plan through one idempotent
|
|
5457
|
+
* commercial operation.
|
|
5458
|
+
*/
|
|
5459
|
+
async transitionTargetBillingPlan(options) {
|
|
5460
|
+
const idempotencyKey = requireTargetBillingIdempotencyKey(
|
|
5461
|
+
options.idempotencyKey
|
|
5462
|
+
);
|
|
5463
|
+
return this.http.post(
|
|
5464
|
+
"/api/v2/billing/plan-transitions",
|
|
5465
|
+
{
|
|
5466
|
+
action: options.action,
|
|
5467
|
+
...options.targetPlanSku ? { target_plan_sku: options.targetPlanSku } : {}
|
|
5468
|
+
},
|
|
5469
|
+
{ "Idempotency-Key": idempotencyKey },
|
|
5470
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
5471
|
+
);
|
|
5472
|
+
}
|
|
5473
|
+
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
5474
|
+
async createTargetBillingPortalSession() {
|
|
5475
|
+
const response = await this.http.post("/api/v2/billing/portal-sessions", {});
|
|
5476
|
+
return response.data;
|
|
5477
|
+
}
|
|
5416
5478
|
// ——————————————————————————————————————————————————————————
|
|
5417
5479
|
// Monitors
|
|
5418
5480
|
// ——————————————————————————————————————————————————————————
|
package/dist/index.mjs
CHANGED
|
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
|
|
|
689
689
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
690
690
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
691
691
|
// release keeps lazy paging semantics independent of row residency.
|
|
692
|
-
version: "0.2.
|
|
692
|
+
version: "0.2.13",
|
|
693
693
|
contracts: {
|
|
694
694
|
api: {
|
|
695
695
|
name: "sdk-http-api",
|
|
@@ -3155,6 +3155,17 @@ function resolveToolExecuteTimeoutMs(toolId, input) {
|
|
|
3155
3155
|
}
|
|
3156
3156
|
var RUNS_FAILED_LOG_LIMIT = 20;
|
|
3157
3157
|
var RUN_LOGS_PAGE_LIMIT = 1e3;
|
|
3158
|
+
function requireTargetBillingIdempotencyKey(value) {
|
|
3159
|
+
const normalized = value.trim();
|
|
3160
|
+
if (normalized.length === 0 || normalized.length > 200 || normalized !== value) {
|
|
3161
|
+
throw new DeeplineError(
|
|
3162
|
+
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace.",
|
|
3163
|
+
void 0,
|
|
3164
|
+
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
3165
|
+
);
|
|
3166
|
+
}
|
|
3167
|
+
return normalized;
|
|
3168
|
+
}
|
|
3158
3169
|
function isRecord6(value) {
|
|
3159
3170
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
3160
3171
|
}
|
|
@@ -3425,7 +3436,12 @@ var DeeplineClient = class {
|
|
|
3425
3436
|
},
|
|
3426
3437
|
invoices: {
|
|
3427
3438
|
list: (options2) => this.listBillingInvoices(options2)
|
|
3428
|
-
}
|
|
3439
|
+
},
|
|
3440
|
+
targetPlans: () => this.getTargetBillingPlans(),
|
|
3441
|
+
targetStatus: () => this.getTargetBillingStatus(),
|
|
3442
|
+
purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
|
|
3443
|
+
transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
|
|
3444
|
+
portalSession: () => this.createTargetBillingPortalSession()
|
|
3429
3445
|
};
|
|
3430
3446
|
this.monitors = {
|
|
3431
3447
|
status: () => this.getMonitorsAccess(),
|
|
@@ -5339,6 +5355,52 @@ var DeeplineClient = class {
|
|
|
5339
5355
|
`/api/v2/billing/invoices${suffix}`
|
|
5340
5356
|
);
|
|
5341
5357
|
}
|
|
5358
|
+
/** List the reviewed target plans and whether new acquisition is enabled. */
|
|
5359
|
+
async getTargetBillingPlans() {
|
|
5360
|
+
return this.http.get("/api/v2/billing/plans");
|
|
5361
|
+
}
|
|
5362
|
+
/** Read the workspace's normalized target plan, payment, and balance state. */
|
|
5363
|
+
async getTargetBillingStatus() {
|
|
5364
|
+
return this.http.get("/api/v2/billing/status");
|
|
5365
|
+
}
|
|
5366
|
+
/**
|
|
5367
|
+
* Purchase target-billing credits through the durable commercial operation
|
|
5368
|
+
* flow. The caller supplies an idempotency key for safe retries.
|
|
5369
|
+
*/
|
|
5370
|
+
async purchaseTargetBillingCredits(options) {
|
|
5371
|
+
const idempotencyKey = requireTargetBillingIdempotencyKey(
|
|
5372
|
+
options.idempotencyKey
|
|
5373
|
+
);
|
|
5374
|
+
return this.http.post(
|
|
5375
|
+
"/api/v2/billing/credit-purchases",
|
|
5376
|
+
{ credits: options.credits },
|
|
5377
|
+
{ "Idempotency-Key": idempotencyKey },
|
|
5378
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
5379
|
+
);
|
|
5380
|
+
}
|
|
5381
|
+
/**
|
|
5382
|
+
* Start, change, cancel, or restore a target plan through one idempotent
|
|
5383
|
+
* commercial operation.
|
|
5384
|
+
*/
|
|
5385
|
+
async transitionTargetBillingPlan(options) {
|
|
5386
|
+
const idempotencyKey = requireTargetBillingIdempotencyKey(
|
|
5387
|
+
options.idempotencyKey
|
|
5388
|
+
);
|
|
5389
|
+
return this.http.post(
|
|
5390
|
+
"/api/v2/billing/plan-transitions",
|
|
5391
|
+
{
|
|
5392
|
+
action: options.action,
|
|
5393
|
+
...options.targetPlanSku ? { target_plan_sku: options.targetPlanSku } : {}
|
|
5394
|
+
},
|
|
5395
|
+
{ "Idempotency-Key": idempotencyKey },
|
|
5396
|
+
{ maxRetries: 0, exactUrlOnly: true }
|
|
5397
|
+
);
|
|
5398
|
+
}
|
|
5399
|
+
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
5400
|
+
async createTargetBillingPortalSession() {
|
|
5401
|
+
const response = await this.http.post("/api/v2/billing/portal-sessions", {});
|
|
5402
|
+
return response.data;
|
|
5403
|
+
}
|
|
5342
5404
|
// ——————————————————————————————————————————————————————————
|
|
5343
5405
|
// Monitors
|
|
5344
5406
|
// ——————————————————————————————————————————————————————————
|