@agentforge-io/sdk-server 4.75.0 → 4.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,8 +70,14 @@ export interface BillingPaymentMethod {
70
70
  export interface BillingStartTrialInput {
71
71
  /** Slug of the plan to trial (not the default plan). */
72
72
  planId: string;
73
- /** 1 to 90. */
74
- days: number;
73
+ /** 1 to 90, from now. Send `days` OR `endsAt`, not both. */
74
+ days?: number;
75
+ /**
76
+ * Explicit end of the trial (ISO 8601 with offset/`Z`), to run it from an earlier date, e.g. the business's registration.
77
+ * Must be in the future and at most 90 days from now: the platform rejects an already-over trial with
78
+ * `invalid_request` (the App just does not start one). Send `days` OR `endsAt`, not both.
79
+ */
80
+ endsAt?: string;
75
81
  }
76
82
  export interface BillingCheckoutInput {
77
83
  planId: string;
@@ -109,7 +115,7 @@ export declare class BillingResource {
109
115
  private call;
110
116
  /** `GET /api/v1/billing/entitlements` — plan, status, trial, period, limits. Self-heals an expired trial. */
111
117
  entitlements(): Promise<BillingEntitlement>;
112
- /** `POST /api/v1/billing/trial/start` — a no-card trial, once per tenant. `trial_already_used` / `already_subscribed` (409). */
118
+ /** `POST /api/v1/billing/trial/start` — a no-card trial (`days` from now, or until `endsAt`), once per tenant. `trial_already_used` / `already_subscribed` (409). */
113
119
  startTrial(input: BillingStartTrialInput): Promise<BillingEntitlement>;
114
120
  /** `GET /api/v1/billing/plans` — the App's plans, without provider refs. */
115
121
  plans(): Promise<BillingPlan[]>;
@@ -50,7 +50,7 @@ class BillingResource {
50
50
  entitlements() {
51
51
  return this.call('GET', '/entitlements');
52
52
  }
53
- /** `POST /api/v1/billing/trial/start` — a no-card trial, once per tenant. `trial_already_used` / `already_subscribed` (409). */
53
+ /** `POST /api/v1/billing/trial/start` — a no-card trial (`days` from now, or until `endsAt`), once per tenant. `trial_already_used` / `already_subscribed` (409). */
54
54
  startTrial(input) {
55
55
  return this.call('POST', '/trial/start', input);
56
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.75.0",
3
+ "version": "4.76.0",
4
4
  "description": "Server-side SDK for backend apps integrating with AgentForge platform. Auth via ChatToken, ak_live_ API key or App secret (sk_live_), with App installations across tenants.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",