@inferencesh/sdk 0.38.13 → 0.38.14

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.
@@ -60,7 +60,7 @@
60
60
  "apps:execute"
61
61
  ],
62
62
  "also": [
63
- "engines:write"
63
+ "engine_self"
64
64
  ]
65
65
  },
66
66
  {
@@ -205,7 +205,7 @@
205
205
  "billing:read",
206
206
  "conversations:read",
207
207
  "credentials:read",
208
- "engines:write",
208
+ "engine_self",
209
209
  "knowledge:read",
210
210
  "remotes:read",
211
211
  "remotes:write",
package/dist/types.d.ts CHANGED
@@ -3341,6 +3341,13 @@ export interface EntitlementErrorMeta {
3341
3341
  addon_plan_id?: string;
3342
3342
  addon_plan_name?: string;
3343
3343
  addon_plan_price?: number;
3344
+ /**
3345
+ * Requirement is the unmet requirement of a purchase_required refusal,
3346
+ * WithinDays its window, BillingPage where to meet it.
3347
+ */
3348
+ requirement?: FeatureRequirement;
3349
+ within_days?: number;
3350
+ billing_page?: string;
3344
3351
  }
3345
3352
  /**
3346
3353
  * EntitlementRequestDTO is a team's request for an entitlement, with the
@@ -3392,7 +3399,7 @@ export interface DecideEntitlementRequestRequest {
3392
3399
  * and APIError.Code on the legacy envelope. Clients branch on these, so a
3393
3400
  * code is a named const here, where it generates into models and the SDKs.
3394
3401
  */
3395
- export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "access_restricted" | "web_access_restricted" | "requirements_not_met" | "team_role_required" | "in_other_workspace" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "last_authenticator" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "code_confirmation_required" | "app_retired" | "app_maintenance" | "invalid_transition" | "maintenance" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
3402
+ export type ErrorCode = "invalid_request" | "validation_error" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "name_conflict" | "already_exists" | "not_configured" | "method_not_allowed" | "rate_limited" | "internal_error" | "access_restricted" | "web_access_restricted" | "requirements_not_met" | "team_role_required" | "in_other_workspace" | "blocked_by_usage_policy" | "last_owner" | "account_deactivated" | "account_banned" | "person_required" | "otp_required" | "requires_sign_in" | "insufficient_scope" | "invalid_scope" | "impersonation_reason_required" | "mcp_auth_expired" | "admin_session_required" | "admin_scopes_not_approved" | "cli_session_required" | "admin_required" | "same_admin_required" | "browser_session_required" | "invalid_ttl" | "admin_authenticator_required" | "last_authenticator" | "limit_exceeded" | "feature_not_available" | "entitlement_unavailable" | "purchase_required" | "payment_required" | "payment_method_required" | "form_closed" | "already_submitted" | "notifications_disabled" | "already_claimed" | "already_entitled" | "request_open" | "invalid_code" | "already_processed" | "expired" | "code_confirmation_required" | "app_retired" | "app_maintenance" | "invalid_transition" | "maintenance" | "SESSION_NOT_FOUND" | "SESSION_EXPIRED" | "SESSION_ENDED" | "WORKER_LEASED" | "APP_MISMATCH" | "VERSION_MISMATCH" | "agents_disabled" | "remote_offline" | "remote_timeout" | "harness_not_drivable" | "harness_too_old";
3396
3403
  export declare const ErrorCodeInvalidRequest: ErrorCode;
3397
3404
  export declare const ErrorCodeValidationError: ErrorCode;
3398
3405
  export declare const ErrorCodeUnauthorized: ErrorCode;
@@ -3534,6 +3541,13 @@ export declare const ErrorCodeLastAuthenticator: ErrorCode;
3534
3541
  export declare const ErrorCodeLimitExceeded: ErrorCode;
3535
3542
  export declare const ErrorCodeFeatureNotAvailable: ErrorCode;
3536
3543
  export declare const ErrorCodeEntitlementUnavailable: ErrorCode;
3544
+ /**
3545
+ * ErrorCodePurchaseRequired (402): the feature requires a purchase
3546
+ * within the last EntitlementErrorMeta.WithinDays days
3547
+ * (shared.RequireRecentPurchase) and the team's payer made none. Meta is
3548
+ * EntitlementErrorMeta, with BillingPage where to make one.
3549
+ */
3550
+ export declare const ErrorCodePurchaseRequired: ErrorCode;
3537
3551
  export declare const ErrorCodePaymentRequired: ErrorCode;
3538
3552
  /**
3539
3553
  * ErrorCodePaymentMethodRequired (402): the action needs a saved payment
@@ -3548,6 +3562,11 @@ export declare const ErrorCodePaymentMethodRequired: ErrorCode;
3548
3562
  */
3549
3563
  export declare const ErrorCodeFormClosed: ErrorCode;
3550
3564
  export declare const ErrorCodeAlreadySubmitted: ErrorCode;
3565
+ /**
3566
+ * ErrorCodeNotificationsDisabled (409): the recipient switched this
3567
+ * notification off in their notification preferences.
3568
+ */
3569
+ export declare const ErrorCodeNotificationsDisabled: ErrorCode;
3551
3570
  /**
3552
3571
  * Bounty claims (409): the caller already claimed this proof, or as many
3553
3572
  * times as the program allows.
@@ -8105,6 +8124,13 @@ export declare const ResourceFeatureTeamBilling: EntitlementResource;
8105
8124
  export declare const ResourceFeatureAutoRecharge: EntitlementResource;
8106
8125
  export declare const ResourceFeatureInvoices: EntitlementResource;
8107
8126
  export declare const ResourceFeaturePublishApps: EntitlementResource;
8127
+ /**
8128
+ * FeatureRequirement is a condition a team must meet to pass a feature gate
8129
+ * on top of its entitlement (FeatureRequires). An enabled boolean row with
8130
+ * source override, which staff grant, waives a feature's requirements.
8131
+ */
8132
+ export type FeatureRequirement = "recent_purchase";
8133
+ export declare const RequireRecentPurchase: FeatureRequirement;
8108
8134
  export type ContentRating = "safe" | "sexual_suggestive" | "sexual_explicit" | "violence_non_graphic" | "violence_graphic" | "gore" | "unrated";
8109
8135
  export declare const ContentSafe: ContentRating;
8110
8136
  export declare const ContentSexualSuggestive: ContentRating;
package/dist/types.js CHANGED
@@ -658,6 +658,13 @@ export const ErrorCodeLastAuthenticator = "last_authenticator";
658
658
  export const ErrorCodeLimitExceeded = "limit_exceeded";
659
659
  export const ErrorCodeFeatureNotAvailable = "feature_not_available";
660
660
  export const ErrorCodeEntitlementUnavailable = "entitlement_unavailable";
661
+ /**
662
+ * ErrorCodePurchaseRequired (402): the feature requires a purchase
663
+ * within the last EntitlementErrorMeta.WithinDays days
664
+ * (shared.RequireRecentPurchase) and the team's payer made none. Meta is
665
+ * EntitlementErrorMeta, with BillingPage where to make one.
666
+ */
667
+ export const ErrorCodePurchaseRequired = "purchase_required";
661
668
  export const ErrorCodePaymentRequired = "payment_required";
662
669
  /**
663
670
  * ErrorCodePaymentMethodRequired (402): the action needs a saved payment
@@ -672,6 +679,11 @@ export const ErrorCodePaymentMethodRequired = "payment_method_required";
672
679
  */
673
680
  export const ErrorCodeFormClosed = "form_closed";
674
681
  export const ErrorCodeAlreadySubmitted = "already_submitted";
682
+ /**
683
+ * ErrorCodeNotificationsDisabled (409): the recipient switched this
684
+ * notification off in their notification preferences.
685
+ */
686
+ export const ErrorCodeNotificationsDisabled = "notifications_disabled";
675
687
  /**
676
688
  * Bounty claims (409): the caller already claimed this proof, or as many
677
689
  * times as the program allows.
@@ -1631,6 +1643,7 @@ export const ResourceFeatureTeamBilling = "feature:team_billing";
1631
1643
  export const ResourceFeatureAutoRecharge = "feature:auto_recharge";
1632
1644
  export const ResourceFeatureInvoices = "feature:invoices";
1633
1645
  export const ResourceFeaturePublishApps = "feature:publish_apps";
1646
+ export const RequireRecentPurchase = "recent_purchase";
1634
1647
  export const ContentSafe = "safe";
1635
1648
  export const ContentSexualSuggestive = "sexual_suggestive";
1636
1649
  export const ContentSexualExplicit = "sexual_explicit";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.38.13",
3
+ "version": "0.38.14",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",